ports/186893: [patch] print/pdftk fix minor bugs in port

Kozlov Sergey kozlov.sergey.404 at gmail.com
Wed Feb 19 12:40:00 UTC 2014


>Number:         186893
>Category:       ports
>Synopsis:       [patch] print/pdftk fix minor bugs in port
>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:   Wed Feb 19 12:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Kozlov Sergey
>Release:        9.2-RELEASE-p3
>Organization:
ARC
>Environment:
FreeBSD sonya 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #1: Fri Jan 17 19:43:47 EET 2014     root at sonya:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Fix minor bugs in print/pdftk

Changes:
- Previously USE_GCC didn't add gcc as run dependency (the code was there, but didn't work). GCC is required during for many libraries. Some commit between Dec 5 and Jan 7 solved the problem, so there is no need for LIB_DEPENDS workaround anymore.
- If GCC wasn't built with java support the port couldn't build and BUILD_DEPENDS only made gcc recompile without actually solving the problem. This patch introduces pre-configure target to check for gcc java items and give a meaningful explanation if none found.
- Changed "-Wl,-rpath" to "LDFLAGS" in REINPLACE as suggested by Gerald Pfeifer here (http://docs.freebsd.org/cgi/getmsg.cgi?fetch=606002+0+archive/2013/svn-ports-head/20131208.svn-ports-head). I've tested it, it works.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 341857)
+++ Makefile	(working copy)
@@ -13,14 +13,6 @@
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	libgcj.so:${PORTSDIR}/lang/${_GCC_PORT} \
-		libstdc++.so:${PORTSDIR}/lang/${_GCC_PORT} \
-		libgcc_s.so:${PORTSDIR}/lang/${_GCC_PORT}
-
-BUILD_DEPENDS=	gcj${CSUFF}:${PORTSDIR}/lang/${_GCC_PORT} \
-		gcjh${CSUFF}:${PORTSDIR}/lang/${_GCC_PORT} \
-		cpp${CSUFF}:${PORTSDIR}/lang/${_GCC_PORT}
-
 USE_ZIP=	yes
 
 # Get GCC version suffix without the dot in USE_GCC
@@ -42,11 +34,20 @@
 
 PLIST_FILES=	bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
 
+pre-configure:
+	@if [ ! -e ${LOCALBASE}/bin/gcj${CSUFF} ]; then \
+		${ECHO_MSG} ""; \
+		${ECHO_MSG} "Can not find gcj${CSUFF}"; \
+		${ECHO_MSG} "Please rebuild ${_GCC_PORT} with java support"; \
+		${ECHO_MSG} ""; \
+		exit 1; \
+	fi
+
 post-patch:
 	@${REINPLACE_CMD} -e "s|TOOLPATH=|TOOLPATH=${LOCALBASE}/bin/|g" ${WRKSRC}/${MAKEFILE}
 	@${REINPLACE_CMD} -e "s|VERSUFF=|VERSUFF=${CSUFF}|g" ${WRKSRC}/${MAKEFILE}
-	@${REINPLACE_CMD} -e "s|GCJFLAGS=|GCJFLAGS= -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" ${WRKSRC}/${MAKEFILE}
-	@${REINPLACE_CMD} -e "s|LDLIBS= -lgcj|LDLIBS= -lgcj ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} ${ICONV_LIB} -lz -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" \
+	@${REINPLACE_CMD} -e "s|GCJFLAGS=|GCJFLAGS= -L${LOCALBASE}/lib ${LDFLAGS} -w|g" ${WRKSRC}/${MAKEFILE}
+	@${REINPLACE_CMD} -e "s|LDLIBS= -lgcj|LDLIBS= -lgcj ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} ${ICONV_LIB} -lz -L${LOCALBASE}/lib ${LDFLAGS} -w|g" \
 			${WRKSRC}/${MAKEFILE}
 
 do-install:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list