[115650] trunk/dports/graphics/netpbm/Portfile

ryandesign at macports.org ryandesign at macports.org
Tue Jan 7 14:05:52 PST 2014


Revision: 115650
          https://trac.macports.org/changeset/115650
Author:   ryandesign at macports.org
Date:     2014-01-07 14:05:52 -0800 (Tue, 07 Jan 2014)
Log Message:
-----------
netpbm: update to 10.65.03

Modified Paths:
--------------
    trunk/dports/graphics/netpbm/Portfile

Modified: trunk/dports/graphics/netpbm/Portfile
===================================================================
--- trunk/dports/graphics/netpbm/Portfile	2014-01-07 20:40:09 UTC (rev 115649)
+++ trunk/dports/graphics/netpbm/Portfile	2014-01-07 22:05:52 UTC (rev 115650)
@@ -3,8 +3,8 @@
 PortSystem 1.0
 
 name            netpbm
-version         10.64.06
-svn.revision    2078
+version         10.65.03
+svn.revision    2109
 categories      graphics
 license         {BSD GPL-2 IJG Permissive}
 maintainers     ryandesign openmaintainer
@@ -45,54 +45,62 @@
     reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/pm_config.in.h
 }
 
+variant universal {}
+
+configure.cflags-append -fno-common
+
+set jasperlib -ljasper
+set ldreloc NONE
+set ldshlib {-shared -Wl,-soname,$(SONAME)}
+set linker_can_do_explicit_library N
+set netpbmlibtype unixshared
+set netpbmlibsuffix so
+set want_sse N
+
 configure {
-    # netpbm uses a "configure" script that simply helps building
-    # config.mk manually.  During automated install using macports,
-    # we do that for our user.
-    file copy ${worksrcpath}/config.mk.in ${worksrcpath}/config.mk
-    reinplace "s|^CC =.*\$|CC = ${configure.cc}|" ${worksrcpath}/config.mk
-    reinplace "s|^#CFLAGS =.*\$|CFLAGS = ${configure.cppflags} ${configure.cflags} [get_canonical_archflags]|" ${worksrcpath}/config.mk
-    reinplace "s|^#LDFLAGS +=.*\$|LDFLAGS = ${configure.ldflags} [get_canonical_archflags]|g" ${worksrcpath}/config.mk
-    reinplace "s|^CFLAGS_SHLIB =.*\$|CFLAGS_SHLIB = -fno-common|" ${worksrcpath}/config.mk
-    reinplace "s|^TIFFLIB =.*\$|TIFFLIB = -ltiff|" ${worksrcpath}/config.mk
-    reinplace "s|^JPEGLIB =.*\$|JPEGLIB = -ljpeg|" ${worksrcpath}/config.mk
-    reinplace "s|^PNGLIB =.*\$|PNGLIB = -lpng|" ${worksrcpath}/config.mk
-    reinplace "s|^ZLIB =.*\$|ZLIB = -lz|" ${worksrcpath}/config.mk
-    reinplace "s|^JASPERHDR_DIR =.*\$|JASPERHDR_DIR = ${prefix}/include|" ${worksrcpath}/config.mk
+    # The netpbm configure script is interactive, and appends its results to
+    # the config.mk file; doc/INSTALL recommends packagers do that manually.
+    copy -force ${worksrcpath}/config.mk.in ${worksrcpath}/config.mk
+    set configmk [open ${worksrcpath}/config.mk a]
+    puts ${configmk} "
+CC = ${configure.cc}
+CFLAGS = ${configure.cflags} ${configure.cppflags} [get_canonical_archflags cc]
+CFLAGS_CONFIG = \$(CFLAGS)
+JASPERHDR_DIR = ${prefix}/include
+JASPERLIB = ${jasperlib}
+JPEGLIB = -ljpeg
+LDFLAGS = ${configure.ldflags} [get_canonical_archflags ld]
+LDRELOC = ${ldreloc}
+LDSHLIB = ${ldshlib}
+LINKER_CAN_DO_EXPLICIT_LIBRARY = ${linker_can_do_explicit_library}
+NETPBMLIBTYPE = ${netpbmlibtype}
+NETPBMLIBSUFFIX = ${netpbmlibsuffix}
+PNGLIB = -lpng
+TIFFLIB = -ltiff
+WANT_SSE = ${want_sse}
+ZLIB = -lz
+"
+    close ${configmk}
 }
 
 platform darwin {
-    post-configure {
-        set ldshlib "${configure.ldflags} -dynamiclib -install_name ${prefix}/lib/libnetpbm.\$(MAJ).dylib -compatibility_version \$(MAJ) -current_version \$(MAJ).\$(MIN).\$(NETPBM_POINT_RELEASE) [get_canonical_archflags]"
-        reinplace "s|^NETPBMLIBTYPE =.*\$|NETPBMLIBTYPE = dylib|" ${worksrcpath}/config.mk
-        reinplace "s|^NETPBMLIBSUFFIX =.*\$|NETPBMLIBSUFFIX = dylib|" ${worksrcpath}/config.mk
-        reinplace "s|^LDSHLIB =.*\$|LDSHLIB = ${ldshlib}|" ${worksrcpath}/config.mk
-        reinplace "s|^JASPERLIB =.*\$|JASPERLIB = -ljasper|" ${worksrcpath}/config.mk
-    }
+    set ldshlib "\$(LDFLAGS) -dynamiclib -install_name ${prefix}/lib/libnetpbm.\$(MAJ).dylib -compatibility_version \$(MAJ) -current_version \$(MAJ).\$(MIN).\$(NETPBM_POINT_RELEASE)"
+    set netpbmlibtype dylib
+    set netpbmlibsuffix dylib
 }
 
 platform linux {
-    post-configure {
-        set ldshlib {-shared -Wl,-soname,$(SONAME)}
-        reinplace "s|^NETPBMLIBTYPE =.*\$|NETPBMLIBTYPE = unixshared|" ${worksrcpath}/config.mk
-        reinplace "s|^NETPBMLIBSUFFIX =.*\$|NETPBMLIBSUFFIX = so|" ${worksrcpath}/config.mk
-        reinplace "s|^LDSHLIB =.*\$|LDSHLIB = ${ldshlib}|" ${worksrcpath}/config.mk
-        reinplace "s|^JASPERLIB =.*\$|JASPERLIB = -ljasper|" ${worksrcpath}/config.mk
-        reinplace "s|^LDRELOC =.*\$|LDRELOC = ld --reloc|" ${worksrcpath}/config.mk
-        reinplace "s|^LINKER_CAN_DO_EXPLICIT_LIBRARY =.*\$|LINKER_CAN_DO_EXPLICIT_LIBRARY = Y|" ${worksrcpath}/config.mk
-    }
+    set ldreloc {ld --reloc}
+    set linker_can_do_explicit_library Y
 }
 
 platform freebsd {
-    post-configure {
-        set ldshlib {glibtool --mode=link gcc}
-        reinplace "s|^NETPBMLIBTYPE =.*\$|NETPBMLIBTYPE = unixshared|" ${worksrcpath}/config.mk
-        reinplace "s|^NETPBMLIBSUFFIX =.*\$|NETPBMLIBSUFFIX = so|" ${worksrcpath}/config.mk
-        reinplace "s|^LDSHLIB =.*\$|LDSHLIB = ${ldshlib}|" ${worksrcpath}/config.mk
-        reinplace "s|^JASPERLIB =.*\$|JASPERLIB = ${prefix}/lib/libjasper.la|" ${worksrcpath}/config.mk
-    }
+    depends_build-append port:libtool
+
     patchfiles-append patch-libopt.c.diff
-    depends_build port:libtool
+
+    set jasperlib ${prefix}/lib/libjasper.la
+    set ldshlib "${prefix}/lib/glibtool --mode=link gcc"
 }
 
 build.args    "messages=yes"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140107/2ccd36fa/attachment.html>


More information about the macports-changes mailing list