[135102] trunk/dports/graphics/netpbm
ryandesign at macports.org
ryandesign at macports.org
Wed Apr 15 11:21:01 PDT 2015
Revision: 135102
https://trac.macports.org/changeset/135102
Author: ryandesign at macports.org
Date: 2015-04-15 11:21:01 -0700 (Wed, 15 Apr 2015)
Log Message:
-----------
netpbm: update to 10.70.01; enable tests and apply patches to fix some tests on OS X
Modified Paths:
--------------
trunk/dports/graphics/netpbm/Portfile
Added Paths:
-----------
trunk/dports/graphics/netpbm/files/patch-test-Execute-Tests.diff
trunk/dports/graphics/netpbm/files/patch-test-ppmdim.test.diff
Modified: trunk/dports/graphics/netpbm/Portfile
===================================================================
--- trunk/dports/graphics/netpbm/Portfile 2015-04-15 18:00:16 UTC (rev 135101)
+++ trunk/dports/graphics/netpbm/Portfile 2015-04-15 18:21:01 UTC (rev 135102)
@@ -5,8 +5,8 @@
PortGroup conflicts_build 1.0
name netpbm
-version 10.70.00
-svn.revision 2442
+version 10.70.01
+svn.revision 2451
categories graphics
platforms darwin freebsd linux
maintainers ryandesign openmaintainer
@@ -36,14 +36,12 @@
svn.url https://svn.code.sf.net/p/netpbm/code/advanced/
worksrcdir advanced
-patchfiles patch-lib-Makefile.diff \
- patch-converter-other-giftopnm.c-strcaseeq.diff \
- patch-other-pamx-Makefile.diff
+patchfiles patch-converter-other-giftopnm.c-strcaseeq.diff \
+ patch-lib-Makefile.diff \
+ patch-other-pamx-Makefile.diff \
+ patch-test-Execute-Tests.diff \
+ patch-test-ppmdim.test.diff
-post-patch {
- reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/pm_config.in.h
-}
-
conflicts_build ${name}
variant universal {}
@@ -113,34 +111,44 @@
build.target
build.type gnu
-destroot.target package
-destroot.destdir pkgdir=${destroot}${prefix}
+set pkgdir ${workpath}/package
-pre-destroot {
- # "make package" complains if this directory already exists.
- delete ${destroot}${prefix}
+post-build {
+ system -W ${worksrcpath} "${build.cmd} package pkgdir=${pkgdir}"
+ delete ${pkgdir}/bin/doc.url
+ # Problem setting PKGMANDIR in config.mk reported to developer; might be fixed after 10.70.01
+ file mkdir ${pkgdir}/share/
+ move ${pkgdir}/man ${pkgdir}/share/
}
-post-destroot {
+test.run yes
+test.target check
+test.args pkgdir=${pkgdir} \
+ resultdir=${workpath}/test \
+ tmpdir=${workpath}/.tmp
+# Problem reported to developer; might be fixed after 10.70.01
+test.env DYLD_LIBRARY_PATH=${pkgdir}/lib
+
+destroot {
+ delete ${destroot}${prefix}/bin ${destroot}${prefix}/share
+ copy ${pkgdir}/bin ${pkgdir}/share ${destroot}${prefix}/
+ copy ${pkgdir}/include/${name} ${destroot}${prefix}/include/
+ copy {*}[glob ${pkgdir}/lib/*] {*}[glob ${pkgdir}/link/*] ${destroot}${prefix}/lib/
+
xinstall -d ${destroot}${prefix}/share/${name}/
- move ${destroot}${prefix}/bin/doc.url {*}[glob ${destroot}${prefix}/misc/*] ${destroot}${prefix}/share/${name}/
- move ${destroot}${prefix}/link/libnetpbm.a ${destroot}${prefix}/lib/
- move ${destroot}${prefix}/man ${destroot}${prefix}/share/
+ copy {*}[glob ${pkgdir}/misc/*] ${destroot}${prefix}/share/${name}/
- reinplace -W ${destroot}${prefix} "/^@/d" config_template pkgconfig_template
- reinplace -W ${destroot}${prefix} "s|@BINDIR@|${prefix}/bin|g" config_template pkgconfig_template
- reinplace -W ${destroot}${prefix} "s|@DATADIR@|${prefix}/share/${name}|g" config_template pkgconfig_template
- reinplace -W ${destroot}${prefix} "s|@INCLUDEDIR@|${prefix}/include|g" config_template pkgconfig_template
- reinplace -W ${destroot}${prefix} "s|@LIBDIR@|${prefix}/lib|g" config_template pkgconfig_template
- reinplace -W ${destroot}${prefix} "s|@LINKDIR@|${prefix}/lib|g" config_template pkgconfig_template
- reinplace -W ${destroot}${prefix} "s|@MANDIR@|${prefix}/share/man|g" config_template pkgconfig_template
- reinplace -W ${destroot}${prefix} "s|@VERSION@|${version}|g" config_template pkgconfig_template
- xinstall -d ${destroot}${prefix}/lib/pkgconfig/
- xinstall ${destroot}${prefix}/config_template ${destroot}${prefix}/bin/netpbm-config
- move ${destroot}${prefix}/pkgconfig_template ${destroot}${prefix}/lib/pkgconfig/netpbm.pc
+ reinplace -W ${pkgdir} "/^@/d" config_template pkgconfig_template
+ reinplace -W ${pkgdir} "s|@BINDIR@|${prefix}/bin|g" config_template pkgconfig_template
+ reinplace -W ${pkgdir} "s|@DATADIR@|${prefix}/share/${name}|g" config_template pkgconfig_template
+ reinplace -W ${pkgdir} "s|@INCLUDEDIR@|${prefix}/include|g" config_template pkgconfig_template
+ reinplace -W ${pkgdir} "s|@LIBDIR@|${prefix}/lib|g" config_template pkgconfig_template
+ reinplace -W ${pkgdir} "s|@LINKDIR@|${prefix}/lib|g" config_template pkgconfig_template
+ reinplace -W ${pkgdir} "s|@MANDIR@|${prefix}/share/man|g" config_template pkgconfig_template
+ reinplace -W ${pkgdir} "s|@VERSION@|${version}|g" config_template pkgconfig_template
+ xinstall -m 755 ${pkgdir}/config_template ${destroot}${prefix}/bin/netpbm-config
+ xinstall -m 644 ${pkgdir}/pkgconfig_template ${destroot}${prefix}/lib/pkgconfig/netpbm.pc
- delete {*}[glob -type f -directory ${destroot}${prefix} *]
-
foreach old_library {pbm pgm pnm ppm} {
ln -s libnetpbm.dylib ${destroot}${prefix}/lib/lib${old_library}.dylib
}
Added: trunk/dports/graphics/netpbm/files/patch-test-Execute-Tests.diff
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-test-Execute-Tests.diff (rev 0)
+++ trunk/dports/graphics/netpbm/files/patch-test-Execute-Tests.diff 2015-04-15 18:21:01 UTC (rev 135102)
@@ -0,0 +1,21 @@
+OS X compatibility
+--- test/Execute-Tests.orig 2014-03-30 12:12:47.000000000 -0500
++++ test/Execute-Tests 2015-04-06 17:17:14.000000000 -0500
+@@ -56,7 +56,7 @@
+
+ if [ -z $tmpdir ]
+ then
+- tmpdir_created=$(mktemp -d) || exit 1;
++ tmpdir_created=$(mktemp -d "${TMPDIR:-/tmp}/netpbm.XXXXXXXX") || exit 1;
+ export tmpdir=${tmpdir_created}
+ else
+ tmpdir_created="";
+@@ -194,7 +194,7 @@
+
+ echo ==================
+ echo "All tests done."
+-date -R -u
++date -u +"%a, %d %b %Y %H:%M:%S %z"
+
+
+ # Exit with status 0 if all possible tests succeeded, 1 otherwise.
Added: trunk/dports/graphics/netpbm/files/patch-test-ppmdim.test.diff
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-test-ppmdim.test.diff (rev 0)
+++ trunk/dports/graphics/netpbm/files/patch-test-ppmdim.test.diff 2015-04-15 18:21:01 UTC (rev 135102)
@@ -0,0 +1,12 @@
+OS X compatibility
+--- test/ppmdim.test.orig 2014-09-26 11:03:01.000000000 -0500
++++ test/ppmdim.test 2015-04-06 17:25:08.000000000 -0500
+@@ -24,7 +24,7 @@
+ pamfunc -mult=$i testimg.ppm > ${dim2_ppm}
+ pnmarith -diff ${dim1_ppm} ${dim2_ppm} | \
+ pamsumm -mean -brief | \
+- awk '{print $1<0.75 ? "ok" : "fail"}'
++ awk '{print ($1<0.75) ? "ok" : "fail"}'
+ done
+
+ rm ${dim1_ppm} ${dim2_ppm}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150415/f2b3e5ac/attachment.html>
More information about the macports-changes
mailing list