ports/156930: [PATCH] graphics/netpbm: fix upgrade hell, fix parallel build
Matthias Andree
mandree at FreeBSD.org
Tue May 10 16:20:07 UTC 2011
>Number: 156930
>Category: ports
>Synopsis: [PATCH] graphics/netpbm: fix upgrade hell, fix parallel build
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue May 10 16:20:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Matthias Andree
>Release: FreeBSD 8.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD apollo.emma.line.org 8.2-RELEASE FreeBSD 8.2-RELEASE #65: Fri Feb 25 01:47:50 CET 2011
>Description:
Hi Dirk,
note that the current shape of netpbm frequently breaks portmaster
upgrades, too, so we should get rid of it as soon as possible.
Find below a patch to fix two major issues in graphics/netpbm:
1. the addition to files/patch-Makefile.common fixes the "compile with
netpbm version installed" problem. We
can remove the pre-configure check. I've tested this with the old
10.28 headers in /usr/local/include (taken from a package), broke before
the patch, no ill effects after. Basically we just make sure that
-I$(LOCALBASE)/include comes after all the local includes.
And certainly we don't want to wedge a PORTREVISION-bumped build...
This wasn't too hard, was it?
2. The pre-build line makes it safe to build the whole package
in parallel. Consequently mark MAKE_JOBS_SAFE. Tested on a real
quad-core computer (AMD Phenom II X4) several times, no build
failures.
Port maintainer (dinoex at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- netpbm-10.35.80_3.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/graphics/netpbm/Makefile,v
retrieving revision 1.197
diff -u -u -r1.197 Makefile
--- Makefile 10 May 2011 04:46:59 -0000 1.197
+++ Makefile 10 May 2011 15:58:35 -0000
@@ -22,7 +22,7 @@
jasper.4:${PORTSDIR}/graphics/jasper \
xml2.5:${PORTSDIR}/textproc/libxml2
-MAKE_JOBS_UNSAFE= yes
+MAKE_JOBS_SAFE= yes
USE_PERL5= yes
USE_GMAKE= yes
@@ -43,9 +43,6 @@
.endif
pre-configure:
- @if [ -e ${DESTDIR}/${LOCALBASE}/include/pm.h ]; then \
- (${ECHO_MSG} "===> Cannot build with netpbm installed, please deinstall first"; exit 1) \
- fi
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/pm_config.in.h
@@ -57,6 +54,10 @@
@${LN} -sf ${WRKSRC}/lib/util/nstring.h ${WRKSRC}/lib/util/pm_nstring.h
cd ${WRKSRC} && buildtools/stamp-date > ${WRKSRC}/lib/compile.h
+# This snippet is all it takes to make the port as of 10.35.80 MAKE_JOBS_SAFE:
+pre-build:
+ ${GMAKE} -C ${WRKSRC}/lib/util
+
post-install:
@${ECHO_MSG} "===> Installing man pages..."
@${REINPLACE_CMD} -e 's|doc/USERDOC|${DOCSDIR}/USERDOC|g' \
Index: files/patch-Makefile.common
===================================================================
RCS file: /home/ncvs/ports/graphics/netpbm/files/patch-Makefile.common,v
retrieving revision 1.3
diff -u -u -r1.3 patch-Makefile.common
--- files/patch-Makefile.common 12 Oct 2002 16:36:45 -0000 1.3
+++ files/patch-Makefile.common 10 May 2011 15:55:06 -0000
@@ -1,6 +1,15 @@
---- Makefile.common.orig Wed Oct 9 11:17:24 2002
-+++ Makefile.common Sat Oct 12 00:00:00 2002
-@@ -231,19 +231,19 @@
+--- ./Makefile.common.orig 2006-11-13 05:14:19.000000000 +0100
++++ ./Makefile.common 2011-05-10 15:44:47.000000000 +0200
+@@ -68,7 +68,7 @@
+
+ include $(SRCDIR)/Makefile.version
+
+-INCLUDES2 := $(INCLUDES) -I$(SRCDIR)/$(SUBDIR) -I. -I importinc
++INCLUDES2 := $(shell echo "$(INCLUDES) " | sed -Ee 's|-I$(LOCALBASE)/include/?[ ]+||g;') -I$(SRCDIR)/$(SUBDIR) -I. -Iimportinc -I$(LOCALBASE)/include
+
+ ifeq ($(NETPBMLIBTYPE),unixstatic)
+ NETPBMLIBFNAME = libnetpbm.$(STATICLIBSUFFIX)
+@@ -408,19 +408,19 @@
INSTALLBIN_TARGETS = $(BINARIES:%=%_installbin) netpbm_installbin
.PHONY: $(INSTALLBIN_TARGETS)
$(INSTALLBIN_TARGETS): $(PKGDIR)/bin
--- netpbm-10.35.80_3.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list