Bug 186893 - [patch] print/pdftk fix minor bugs in port
Summary: [patch] print/pdftk fix minor bugs in port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-19 12:40 UTC by Serhii (Sergey) Kozlov
Modified: 2014-03-06 19:00 UTC (History)
0 users

See Also:


Attachments
file.diff (1.61 KB, patch)
2014-02-19 12:40 UTC, Serhii (Sergey) Kozlov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Serhii (Sergey) Kozlov freebsd_committer freebsd_triage 2014-02-19 12:40:00 UTC
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.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-02-19 12:40:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mat

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-03-06 18:54:13 UTC
Author: mat
Date: Thu Mar  6 18:54:06 2014
New Revision: 347306
URL: http://svnweb.freebsd.org/changeset/ports/347306
QAT: https://qat.redports.org/buildarchive/r347306/

Log:
  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
  
  PR:		186893
  Submitted by:	Kozlov Sergey
  Sponsored by:	Absolight

Modified:
  head/print/pdftk/Makefile

Modified: head/print/pdftk/Makefile
==============================================================================
--- head/print/pdftk/Makefile	Thu Mar  6 18:51:17 2014	(r347305)
+++ head/print/pdftk/Makefile	Thu Mar  6 18:54:06 2014	(r347306)
@@ -13,14 +13,6 @@ COMMENT=	Simple tool for doing everyday 
 
 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 @@ MAKE_ENV=	GCJ=gcj${CSUFF} GCJH=gcjh${CSU
 
 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:
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Mathieu Arnold freebsd_committer freebsd_triage 2014-03-06 18:54:17 UTC
State Changed
From-To: open->closed

Committed, thanks!