[43004] trunk/dports/graphics/netpbm
mcalhoun at macports.org
mcalhoun at macports.org
Tue Dec 2 23:05:05 PST 2008
Revision: 43004
http://trac.macports.org/changeset/43004
Author: mcalhoun at macports.org
Date: 2008-12-02 23:05:05 -0800 (Tue, 02 Dec 2008)
Log Message:
-----------
netpbm: Version update 10.26.57 -> 10.26.58.
Changed configure mechanism to ensure correct compiler was used.
Fixed lint errors.
Modified Paths:
--------------
trunk/dports/graphics/netpbm/Portfile
Added Paths:
-----------
trunk/dports/graphics/netpbm/files/patch-lib-Makefile.diff
trunk/dports/graphics/netpbm/files/patch-libopt.c.diff
Removed Paths:
-------------
trunk/dports/graphics/netpbm/files/patch-lib-Makefile
trunk/dports/graphics/netpbm/files/patch-libopt.c
Modified: trunk/dports/graphics/netpbm/Portfile
===================================================================
--- trunk/dports/graphics/netpbm/Portfile 2008-12-03 06:51:43 UTC (rev 43003)
+++ trunk/dports/graphics/netpbm/Portfile 2008-12-03 07:05:05 UTC (rev 43004)
@@ -3,7 +3,7 @@
PortSystem 1.0
name netpbm
-version 10.26.57
+version 10.26.58
categories graphics
maintainers mas openmaintainer
description Image manipulation
@@ -17,39 +17,91 @@
homepage http://netpbm.sourceforge.net/
master_sites sourceforge:netpbm
platforms darwin freebsd linux
-use_parallel_build no
+use_parallel_build yes
+depends_build path:bin/perl:perl5
+
depends_lib port:zlib port:jpeg port:tiff \
port:libpng port:jasper
extract.suffix .tgz
-checksums md5 2975e9c4a90cd16eeff763c38c9aa73f \
- sha1 159d297902facbbae4621e194448b01a24baf365 \
- rmd160 69f5a44e57b21d8a45f93e8f982ef16c0d775e4e
+checksums md5 9824116c1a7bb9c05fa63a26e6586c87 \
+ sha1 663baa755e8336622cff48009435503119fbce00 \
+ rmd160 29695ca9ef5cca1e147a3bbb5b0d60fe5a6fca5d
-set gcc-suffix ""
-patchfiles patch-lib-Makefile
+patchfiles patch-lib-Makefile.diff
-configure {
- system "cd ${worksrcpath} &&
- cat Makefile.config.in ${filespath}/Makefile.config.${os.platform} |
- sed -e '/@PREFIX@/s@@${prefix}@' -e '/@GCC_SUFFIX@/s@@${gcc-suffix}@' \
- > Makefile.config";
+use_configure no
+configure.cflags-delete -O2
+configure.cflags-append -O3
+
+post-configure {
+ file copy ${worksrcpath}/Makefile.config.in ${worksrcpath}/Makefile.config
+ reinplace "s|^CC =.*\$|CC = ${configure.cc}|" ${worksrcpath}/Makefile.config
+ reinplace "s|^#CFLAGS =.*\$|CFLAGS = ${configure.cppflags} ${configure.cflags}|" ${worksrcpath}/Makefile.config
+ reinplace "s|^#LDFLAGS +=.*\$|LDFLAGS = ${configure.ldflags}|g" ${worksrcpath}/Makefile.config
+ reinplace "s|^CFLAGS_SHLIB =.*\$|CFLAGS_SHLIB = -fno-common|" ${worksrcpath}/Makefile.config
+ reinplace "s|^TIFFLIB =.*\$|TIFFLIB = -ltiff|" ${worksrcpath}/Makefile.config
+ reinplace "s|^JPEGLIB =.*\$|JPEGLIB = -ljpeg|" ${worksrcpath}/Makefile.config
+ reinplace "s|^PNGLIB =.*\$|PNGLIB = -lpng|" ${worksrcpath}/Makefile.config
+ reinplace "s|^ZLIB =.*\$|ZLIB = -lz|" ${worksrcpath}/Makefile.config
+ reinplace "s|^JASPERHDR_DIR =.*\$|JASPERHDR_DIR = ${prefix}/include|" ${worksrcpath}/Makefile.config
}
+platform darwin {
+ post-configure {
+ set ldshlib "-dynamiclib -install_name ${prefix}/lib/libnetpbm.\$(MAJ).dylib -compatibility_version \$(MAJ) -current_version \$(MAJ).\$(MIN)"
+ reinplace "s|^NETPBMLIBTYPE =.*\$|NETPBMLIBTYPE = dylib|" ${worksrcpath}/Makefile.config
+ reinplace "s|^NETPBMLIBSUFFIX =.*\$|NETPBMLIBSUFFIX = dylib|" ${worksrcpath}/Makefile.config
+ reinplace "s|^LDSHLIB =.*\$|LDSHLIB = ${ldshlib}|" ${worksrcpath}/Makefile.config
+ reinplace "s|^JASPERLIB =.*\$|JASPERLIB = -ljasper|" ${worksrcpath}/Makefile.config
+ }
+}
+
+platform linux {
+ post-configure {
+ set ldshlib {-shared -Wl,-soname,$(SONAME)}
+ reinplace "s|^NETPBMLIBTYPE =.*\$|NETPBMLIBTYPE = unixshared|" ${worksrcpath}/Makefile.config
+ reinplace "s|^NETPBMLIBSUFFIX =.*\$|NETPBMLIBSUFFIX = so|" ${worksrcpath}/Makefile.config
+ reinplace "s|^LDSHLIB =.*\$|LDSHLIB = ${ldshlib}|" ${worksrcpath}/Makefile.config
+ reinplace "s|^JASPERLIB =.*\$|JASPERLIB = -ljasper|" ${worksrcpath}/Makefile.config
+ reinplace "s|^LDRELOC =.*\$|LDRELOC = ld --reloc|" ${worksrcpath}/Makefile.config
+ reinplace "s|^LINKER_CAN_DO_EXPLICIT_LIBRARY =.*\$|LINKER_CAN_DO_EXPLICIT_LIBRARY = Y|" ${worksrcpath}/Makefile.config
+ }
+}
+
+platform freebsd {
+ post-configure {
+ set ldshlib {glibtool --mode=link gcc}
+ reinplace "s|^NETPBMLIBTYPE =.*\$|NETPBMLIBTYPE = unixshared|" ${worksrcpath}/Makefile.config
+ reinplace "s|^NETPBMLIBSUFFIX =.*\$|NETPBMLIBSUFFIX = so|" ${worksrcpath}/Makefile.config
+ reinplace "s|^LDSHLIB =.*\$|LDSHLIB = ${ldshlib}|" ${worksrcpath}/Makefile.config
+ reinplace "s|^JASPERLIB =.*\$|JASPERLIB = ${prefix}/lib/libjasper.la|" ${worksrcpath}/Makefile.config
+ }
+ patchfiles-append patch-libopt.c.diff
+ depends_build port:libtool
+}
+
build.args "messages=yes"
build.target ""
build.type gnu
-destroot {
+destroot.target package
+destroot.destdir pkgdir=${destroot}${prefix}
+
+pre-destroot {
file delete -force ${destroot}${prefix}
- system "cd ${worksrcpath} && ${build.cmd} package pkgdir=${destroot}${prefix}"
+}
+
+post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/netpbm
- system "cd ${destroot}${prefix} &&
- mv bin/doc.url misc/* share/netpbm &&
- mv man share &&
- rm -rf README VERSION config_template link misc pkginfo share/man/web"
+ eval move ${destroot}${prefix}/bin/doc.url [glob ${destroot}${prefix}/misc/* ${destroot}${prefix}/share/netpbm]
+ move ${destroot}${prefix}/man ${destroot}${prefix}/share/
+ move ${destroot}${prefix}/link/libnetpbm.a ${destroot}${prefix}/lib
+
+ eval 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
+ ln -s libnetpbm.dylib ${destroot}${prefix}/lib/lib${old_library}.dylib
}
}
@@ -64,13 +116,6 @@
set data [read $fl]
close $fl
if {[regexp "build 4061" $data]} {
- set gcc-suffix "-3.3"
- } else {
- set gcc-suffix "-4.0"
+ configure.compiler gcc-3.3
}
}
-
-platform freebsd {
- patchfiles-append patch-libopt.c
- depends_build port:libtool
-}
Deleted: trunk/dports/graphics/netpbm/files/patch-lib-Makefile
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-lib-Makefile 2008-12-03 06:51:43 UTC (rev 43003)
+++ trunk/dports/graphics/netpbm/files/patch-lib-Makefile 2008-12-03 07:05:05 UTC (rev 43004)
@@ -1,14 +0,0 @@
---- lib/Makefile.orig 2005-02-05 13:47:27.000000000 -0500
-+++ lib/Makefile 2005-05-15 21:47:58.000000000 -0400
-@@ -257,9 +257,9 @@
- $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.dll.a $(PKGDIR)/link
- endif
- ifeq ($(NETPBMLIBTYPE),dylib)
-- cd $(PKGDIR)/link/ ; \
-+ cd $(PKGDIR)/lib/ ; \
- rm -f libnetpbm.dylib; \
-- $(SYMLINK) ../lib/libnetpbm.$(MAJ).$(MIN).dylib libnetpbm.dylib
-+ $(SYMLINK) libnetpbm.$(MAJ).$(MIN).dylib libnetpbm.dylib
- endif
-
- clean: localclean
Copied: trunk/dports/graphics/netpbm/files/patch-lib-Makefile.diff (from rev 42849, trunk/dports/graphics/netpbm/files/patch-lib-Makefile)
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-lib-Makefile.diff (rev 0)
+++ trunk/dports/graphics/netpbm/files/patch-lib-Makefile.diff 2008-12-03 07:05:05 UTC (rev 43004)
@@ -0,0 +1,14 @@
+--- lib/Makefile.orig 2005-02-05 13:47:27.000000000 -0500
++++ lib/Makefile 2005-05-15 21:47:58.000000000 -0400
+@@ -248,9 +248,9 @@
+ $(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.dll.a $(PKGDIR)/link
+ endif
+ ifeq ($(NETPBMLIBTYPE),dylib)
+- cd $(PKGDIR)/link/ ; \
++ cd $(PKGDIR)/lib/ ; \
+ rm -f libnetpbm.dylib; \
+- $(SYMLINK) ../lib/libnetpbm.$(MAJ).$(MIN).dylib libnetpbm.dylib
++ $(SYMLINK) libnetpbm.$(MAJ).$(MIN).dylib libnetpbm.dylib
+ endif
+
+ clean: localclean
Deleted: trunk/dports/graphics/netpbm/files/patch-libopt.c
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-libopt.c 2008-12-03 06:51:43 UTC (rev 43003)
+++ trunk/dports/graphics/netpbm/files/patch-libopt.c 2008-12-03 07:05:05 UTC (rev 43004)
@@ -1,14 +0,0 @@
---- buildtools/libopt.c.orig Wed Nov 8 20:00:24 2006
-+++ buildtools/libopt.c Wed Aug 15 22:10:53 2007
-@@ -306,6 +306,11 @@
- */
- *valid_library_p = FALSE;
- *error_p = FALSE;
-+ } else if (strcmp(lastdot, ".la") == 0) {
-+ /* Skip conversion of GNU libtool library files.
-+ */
-+ *valid_library_p = FALSE;
-+ *error_p = FALSE;
- } else {
- unsigned int prefix_length;
- bool prefix_good;
Copied: trunk/dports/graphics/netpbm/files/patch-libopt.c.diff (from rev 42849, trunk/dports/graphics/netpbm/files/patch-libopt.c)
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-libopt.c.diff (rev 0)
+++ trunk/dports/graphics/netpbm/files/patch-libopt.c.diff 2008-12-03 07:05:05 UTC (rev 43004)
@@ -0,0 +1,14 @@
+--- buildtools/libopt.c.orig Wed Nov 8 20:00:24 2006
++++ buildtools/libopt.c Wed Aug 15 22:10:53 2007
+@@ -306,6 +306,11 @@
+ */
+ *valid_library_p = FALSE;
+ *error_p = FALSE;
++ } else if (strcmp(lastdot, ".la") == 0) {
++ /* Skip conversion of GNU libtool library files.
++ */
++ *valid_library_p = FALSE;
++ *error_p = FALSE;
+ } else {
+ unsigned int prefix_length;
+ bool prefix_good;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081202/8377c67b/attachment-0001.html>
More information about the macports-changes
mailing list