ports/184833: databases/wmjsql: Fix build on -current

KATO Tsuguru tkato432 at yahoo.com
Mon Dec 16 18:10:09 UTC 2013


>Number:         184833
>Category:       ports
>Synopsis:       databases/wmjsql: Fix build on -current
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:08 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build on -current
- Add LICENSE
- Support PLIST_FILES

Remove file:
files/patch-Makefile
pkg-plist

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/databases/wmjsql/Makefile databases/wmjsql/Makefile
--- /usr/ports/databases/wmjsql/Makefile	2013-12-09 14:59:01.000000000 +0900
+++ databases/wmjsql/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -11,32 +11,41 @@
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	MySQL server status displaying dockapp
 
-USE_MYSQL=	yes
+LICENSE=	GPLv2 # (or later)
+
+WRKSRC=		${WRKDIR}/${PORTNAME}/src
+
 USES=		gmake
+USE_MYSQL=	yes
 USE_XORG=	xpm
-
 ALL_TARGET=	clean all
 MAKE_JOBS_UNSAFE=	yes
 
-WRKSRC=		${WRKDIR}/${PORTNAME}/src
+CPPFLAGS+=	-I${LOCALBASE}/include/X11 -I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib/mysql -L${LOCALBASE}/lib
+
+PORTDOCS=	README
+PLIST_FILES=	bin/${PORTNAME}
 
-NO_STAGE=	yes
 post-patch:
-	@${REINPLACE_CMD} -e 's,^INCDIR.*$$,INCDIR = -I${PREFIX}/include/X11 \
-		-I${PREFIX}/include -I${LOCALBASE}/include,' \
-		-e 's,^LIBDIR.*$$,LIBDIR = -L${PREFIX}/lib \
-		-L${LOCALBASE}/lib/mysql,' -e '/^CC/d; /^CFLAGS/d' \
-		-e 's,-D$$(shell echo `uname -s`),,' ${WRKSRC}/Makefile \
-		${WRKSRC}/jDockApp/Makefile ${WRKSRC}/xutils/Makefile
-	@${REINPLACE_CMD} -E 's,\.wmjsql([^r]),\.wmjsqlrc\1,' \
-		${WRKSRC}/wmjsql.jet ${WRKSRC}/../README
+.for i in Makefile jDockApp/Makefile xutils/Makefile
+	@${REINPLACE_CMD} -e \
+		'/^INCDIR/s|=.*|= $${CPPFLAGS}| ; \
+		 /^LIBDIR/s|=.*|= $${LDFLAGS}| ; \
+		 /^CC/d ; \
+		 /^CFLAGS/d ; \
+		 s| make | $$(MAKE) | ; \
+		 s|-D$$(shell echo `uname -s`)||' ${WRKSRC}/${i}
+.endfor
+.for i in wmjsql.jet ../README
+	@${REINPLACE_CMD} -E 's|\.wmjsql([^r])|\.wmjsqlrc\1|' \
+		${WRKSRC}/${i}
+.endfor
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/../README ${DOCSDIR}
-.endif
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} \
+		${STAGEDIR}${PREFIX}/bin)
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC}/.. && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR})
 
 .include <bsd.port.mk>
diff -urN /usr/ports/databases/wmjsql/files/patch-Makefile databases/wmjsql/files/patch-Makefile
--- /usr/ports/databases/wmjsql/files/patch-Makefile	2013-12-09 14:59:01.000000000 +0900
+++ databases/wmjsql/files/patch-Makefile	1970-01-01 09:00:00.000000000 +0900
@@ -1,27 +0,0 @@
---- Makefile.orig	2001-08-16 13:04:23.000000000 +0000
-+++ Makefile
-@@ -25,20 +25,20 @@ all:	${name}
- #	${name}
- 
- jDockApp.o: jDockApp/jDockApp_main.xpm jDockApp/jDockApp.c
--	cd $*; make $*.o
-+	cd $*; $(MAKE) $*.o
- 
- xutils.o: xutils/xutils.c
--	cd $*; make $*.o
-+	cd $*; $(MAKE) $*.o
- 
- jprintf.o: jDockApp/jprintf.c
--	cd jDockApp; make jprintf.o
-+	cd jDockApp; $(MAKE) jprintf.o
- 
- ${name}: $(OBJS) ${name}.c
- 	$(CC) $(CFLAGS) $(SYSTEM) -o ${name} $^ $(INCDIR) $(LIBDIR) $(LIBS)
- 
- install: all
- 	sudo install ${owner} ${group} -s -m 755 ./${name}  ${prefix}/${name}
--	make clean;
-+	$(MAKE) clean;
- 
- clean:
- 	rm -f *.o ${name} ${name}.c *.orig *.rej *.3
diff -urN /usr/ports/databases/wmjsql/pkg-plist databases/wmjsql/pkg-plist
--- /usr/ports/databases/wmjsql/pkg-plist	2013-11-06 22:03:57.000000000 +0900
+++ databases/wmjsql/pkg-plist	1970-01-01 09:00:00.000000000 +0900
@@ -1,3 +0,0 @@
-bin/wmjsql
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list