[27904] trunk/dports/graphics/netpbm

source_changes at macosforge.org source_changes at macosforge.org
Wed Aug 15 14:56:21 PDT 2007


Revision: 27904
          http://trac.macosforge.org/projects/macports/changeset/27904
Author:   afb at macports.org
Date:     2007-08-15 14:56:21 -0700 (Wed, 15 Aug 2007)

Log Message:
-----------
freebsd/linux support, livecheck

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

Added Paths:
-----------
    trunk/dports/graphics/netpbm/files/Makefile.config.freebsd
    trunk/dports/graphics/netpbm/files/Makefile.config.linux
    trunk/dports/graphics/netpbm/files/patch-libopt.c

Modified: trunk/dports/graphics/netpbm/Portfile
===================================================================
--- trunk/dports/graphics/netpbm/Portfile	2007-08-15 21:49:18 UTC (rev 27903)
+++ trunk/dports/graphics/netpbm/Portfile	2007-08-15 21:56:21 UTC (rev 27904)
@@ -1,5 +1,7 @@
 # $Id$
+
 PortSystem 1.0
+
 name            netpbm
 version         10.26.44
 categories      graphics
@@ -14,7 +16,7 @@
 
 homepage        http://netpbm.sourceforge.net/
 master_sites    sourceforge:netpbm
-platforms       darwin
+platforms       darwin freebsd linux
 
 depends_lib     port:zlib port:jpeg port:tiff \
                 port:libpng port:jasper
@@ -26,17 +28,18 @@
 
 configure {
     system "cd ${worksrcpath} &&
-        cat Makefile.config.in ${filespath}/Makefile.config.darwin |
+        cat Makefile.config.in ${filespath}/Makefile.config.${os.platform} |
         sed -e '/@PREFIX@/s@@${prefix}@' -e '/@GCC_SUFFIX@/s@@${gcc-suffix}@' \
             > Makefile.config";
 }
 
 build.args    "messages=yes"
 build.target  ""
+build.type    gnu
 
 destroot {
     file delete -force ${destroot}${prefix}
-    system "cd ${worksrcpath} && make package pkgdir=${destroot}${prefix}"
+    system "cd ${worksrcpath} && ${build.cmd} package pkgdir=${destroot}${prefix}"
     xinstall -m 755 -d ${destroot}${prefix}/share/netpbm
     system "cd ${destroot}${prefix} &&
         mv bin/doc.url misc/* share/netpbm &&
@@ -44,6 +47,9 @@
         rm -rf README VERSION config_template link misc pkginfo share/man/web"
 }
 
+# "Netpbm has a sophisticated, rather novel system of releasing source code"
+livecheck.distname super stable
+
 # work around bug in Apple's gcc build 4061
 platform darwin 8 {
     set fl [open "| gcc --version"]
@@ -55,3 +61,8 @@
         set gcc-suffix "-4.0"
     }
 }
+
+platform freebsd {
+    patchfiles-append patch-libopt.c
+    depends_build port:libtool
+}

Added: trunk/dports/graphics/netpbm/files/Makefile.config.freebsd
===================================================================
--- trunk/dports/graphics/netpbm/files/Makefile.config.freebsd	                        (rev 0)
+++ trunk/dports/graphics/netpbm/files/Makefile.config.freebsd	2007-08-15 21:56:21 UTC (rev 27904)
@@ -0,0 +1,19 @@
+#
+# FreeBSD configuration
+#
+DEFAULT_TARGET      = nonmerge
+NETPBMLIBTYPE       = unixshared
+NETPBMLIBSUFFIX     = so
+STATICLIB_TOO       = y
+NETPBM_RUNTIME_PATH = @PREFIX@/lib
+CC              = gcc
+CFLAGS          = -O3 -I at PREFIX@/include
+CFLAGS_SHLIB    = -fno-common
+LD              = glibtool --mode=link gcc
+LDFLAGS         = -L at PREFIX@/lib
+TIFFLIB         = -ltiff
+JPEGLIB         = -ljpeg
+PNGLIB          = -lpng
+ZLIB            = -lz
+JASPERHDR_DIR   = @PREFIX@/include
+JASPERLIB       = @PREFIX@/lib/libjasper.la

Added: trunk/dports/graphics/netpbm/files/Makefile.config.linux
===================================================================
--- trunk/dports/graphics/netpbm/files/Makefile.config.linux	                        (rev 0)
+++ trunk/dports/graphics/netpbm/files/Makefile.config.linux	2007-08-15 21:56:21 UTC (rev 27904)
@@ -0,0 +1,23 @@
+#
+# GNU/Linux configuration
+#
+DEFAULT_TARGET      = nonmerge
+NETPBMLIBTYPE       = unixshared
+NETPBMLIBSUFFIX     = so
+STATICLIB_TOO       = y
+NETPBM_RUNTIME_PATH = @PREFIX@/lib
+CC              = gcc
+CFLAGS          = -O3 -I at PREFIX@/include
+CFLAGS_SHLIB    = -fno-common
+LDRELOC         = ld --reloc
+LDFLAGS         = -L at PREFIX@/lib
+LDSHLIB         = -shared \
+                  -Wl,-soname,$(SONAME)
+LINKER_CAN_DO_EXPLICIT_LIBRARY=Y
+LINKERISCOMPILER = Y
+TIFFLIB         = -ltiff
+JPEGLIB         = -ljpeg
+PNGLIB          = -lpng
+ZLIB            = -lz
+JASPERHDR_DIR   = @PREFIX@/include
+JASPERLIB       = -ljasper

Added: trunk/dports/graphics/netpbm/files/patch-libopt.c
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-libopt.c	                        (rev 0)
+++ trunk/dports/graphics/netpbm/files/patch-libopt.c	2007-08-15 21:56:21 UTC (rev 27904)
@@ -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;


Property changes on: trunk/dports/graphics/netpbm/files/patch-libopt.c
___________________________________________________________________
Name: svn:eol-style
   + native

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070815/2b06cade/attachment.html


More information about the macports-changes mailing list