[61379] trunk/dports/graphics/netpbm

jmr at macports.org jmr at macports.org
Wed Dec 9 16:15:07 PST 2009


Revision: 61379
          http://trac.macports.org/changeset/61379
Author:   jmr at macports.org
Date:     2009-12-09 16:15:04 -0800 (Wed, 09 Dec 2009)
Log Message:
-----------
netpbm: fix build with jpeg 7, disable universal for now but make a start at fixing build_arch and universal support (#21240)

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

Added Paths:
-----------
    trunk/dports/graphics/netpbm/files/patch-jpeg7.diff

Modified: trunk/dports/graphics/netpbm/Portfile
===================================================================
--- trunk/dports/graphics/netpbm/Portfile	2009-12-09 23:54:22 UTC (rev 61378)
+++ trunk/dports/graphics/netpbm/Portfile	2009-12-10 00:15:04 UTC (rev 61379)
@@ -25,6 +25,9 @@
 # please make sure to test it on OS X 10.4 as well!  Thanks!
 use_parallel_build  no
 
+# See http://trac.macports.org/ticket/21240
+universal_variant no
+
 depends_build   path:bin/perl:perl5
 
 depends_lib     port:zlib port:jpeg port:tiff \
@@ -34,20 +37,25 @@
                 sha1    38e47c96adcfdaa8a8cc4741b6985f82f0100260 \
                 rmd160  18a8ee7160edeaf99e98125b9af01352f359f4ec
 
-patchfiles      patch-lib-Makefile.diff patch-pm_config.in.h.diff
+patchfiles      patch-lib-Makefile.diff patch-pm_config.in.h.diff \
+                patch-jpeg7.diff
 
 post-patch {
     reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/pm_config.in.h
 }
 
-configure.cflags-delete -O2
-configure.cflags-append -O3
+configure.optflags -O3
 
 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
+    #if {[variant_isset universal]} {
+    #    reinplace "s|^#CFLAGS =.*\$|CFLAGS = ${configure.cppflags} ${configure.cflags} ${configure.universal_cflags}|" ${worksrcpath}/Makefile.config
+    #    reinplace "s|^#LDFLAGS +=.*\$|LDFLAGS = ${configure.ldflags} ${configure.universal_ldflags}|g" ${worksrcpath}/Makefile.config
+    #} else {
+        reinplace "s|^#CFLAGS =.*\$|CFLAGS = ${configure.cppflags} ${configure.cflags} ${configure.cc_archflags}|" ${worksrcpath}/Makefile.config
+        reinplace "s|^#LDFLAGS +=.*\$|LDFLAGS = ${configure.ldflags} ${configure.cc_archflags}|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

Added: trunk/dports/graphics/netpbm/files/patch-jpeg7.diff
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-jpeg7.diff	                        (rev 0)
+++ trunk/dports/graphics/netpbm/files/patch-jpeg7.diff	2009-12-10 00:15:04 UTC (rev 61379)
@@ -0,0 +1,12 @@
+diff -ur netpbm-free-10.0.old/ppm/ppmtompeg/jpeg.c netpbm-free-10.0/ppm/ppmtompeg/jpeg.c
+--- converter/ppm/ppmtompeg/jpeg.c   2003-08-12 20:23:03.000000000 +0200
++++ converter/ppm/ppmtompeg/jpeg.c       2009-09-14 10:47:26.000000000 +0200
+@@ -480,6 +483,8 @@
+   /* Make an 8-row-high sample array that will go away when done with image */
+ #ifdef JPEG4
+   buffer_height = 8;  /* could be 2, 4,8 rows high */
++#elif JPEG_LIB_VERSION >= 70
++  buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_v_scaled_size;
+ #else
+   buffer_height = cinfo.max_v_samp_factor * cinfo.min_DCT_scaled_size;
+ #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091209/85bd1985/attachment.html>


More information about the macports-changes mailing list