[75448] trunk/dports/graphics/netpbm
mas at macports.org
mas at macports.org
Tue Jan 25 03:37:07 PST 2011
Revision: 75448
http://trac.macports.org/changeset/75448
Author: mas at macports.org
Date: 2011-01-25 03:37:05 -0800 (Tue, 25 Jan 2011)
Log Message:
-----------
Update netpbm to 10.47.25. This includes a switch from the "super
stable" branch, which we had been tracking up till now, to the
"stable" branch. The rationale for this is reduced maintenance
effort, since the ageing "super stable" branch was no longer easily
compatible with current libraries.
The JPEG patch is no longer required for stable and has been removed.
Some other patches were required and will be communicated upstream.
Linux and FreeBSD support was not tested by me, and was left
unchanged.
Modified Paths:
--------------
trunk/dports/graphics/netpbm/Portfile
trunk/dports/graphics/netpbm/files/patch-lib-Makefile.diff
trunk/dports/graphics/netpbm/files/patch-pm_config.in.h.diff
Added Paths:
-----------
trunk/dports/graphics/netpbm/files/patch-pngtopnm.c.diff
Removed Paths:
-------------
trunk/dports/graphics/netpbm/files/libpng14.diff
trunk/dports/graphics/netpbm/files/patch-jpeg7.diff
Modified: trunk/dports/graphics/netpbm/Portfile
===================================================================
--- trunk/dports/graphics/netpbm/Portfile 2011-01-25 10:20:32 UTC (rev 75447)
+++ trunk/dports/graphics/netpbm/Portfile 2011-01-25 11:37:05 UTC (rev 75448)
@@ -3,8 +3,9 @@
PortSystem 1.0
name netpbm
-version 10.26.64
-revision 1
+version 10.47.25
+revision 0
+svn.revision 1391
categories graphics
maintainers mas openmaintainer
description Image manipulation
@@ -29,15 +30,14 @@
depends_lib port:zlib port:jpeg port:tiff \
port:libpng port:jasper
-extract.suffix .tgz
-checksums md5 a895f002d8e20bc68d003ee772db76f1 \
- sha1 1518d6268a35a208b1df557d6e193236d2ec56f8 \
- rmd160 c3e922aaec320a5692fb0d71b5e34303d9dc2f9f
+fetch.type svn
+svn.url http://${name}.svn.sourceforge.net/svnroot/${name}/stable
+worksrcdir stable
-patchfiles patch-lib-Makefile.diff patch-pm_config.in.h.diff \
- patch-jpeg7.diff \
- libpng14.diff
+patchfiles patch-pngtopnm.c.diff \
+ patch-pm_config.in.h.diff \
+ patch-lib-Makefile.diff
post-patch {
reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/pm_config.in.h
@@ -46,21 +46,24 @@
configure.optflags -O3
configure {
- file copy ${worksrcpath}/Makefile.config.in ${worksrcpath}/Makefile.config
- reinplace "s|^CC =.*\$|CC = ${configure.cc}|" ${worksrcpath}/Makefile.config
+ # 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
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
+ reinplace "s|^#CFLAGS =.*\$|CFLAGS = ${configure.cppflags} ${configure.cflags} ${configure.universal_cflags}|" ${worksrcpath}/config.mk
+ reinplace "s|^#LDFLAGS +=.*\$|LDFLAGS = ${configure.ldflags} ${configure.universal_ldflags}|g" ${worksrcpath}/config.mk
} else {
- reinplace "s|^#CFLAGS =.*\$|CFLAGS = ${configure.cppflags} ${configure.cflags} ${configure.cc_archflags}|" ${worksrcpath}/Makefile.config
- reinplace "s|^#LDFLAGS +=.*\$|LDFLAGS = ${configure.ldflags} ${configure.ld_archflags}|g" ${worksrcpath}/Makefile.config
+ reinplace "s|^#CFLAGS =.*\$|CFLAGS = ${configure.cppflags} ${configure.cflags} ${configure.cc_archflags}|" ${worksrcpath}/config.mk
+ reinplace "s|^#LDFLAGS +=.*\$|LDFLAGS = ${configure.ldflags} ${configure.ld_archflags}|g" ${worksrcpath}/config.mk
}
- 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
+ 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
}
platform darwin {
@@ -71,32 +74,32 @@
} else {
set ldshlib "${ldshlib} ${configure.ld_archflags}"
}
- 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
+ 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
}
}
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
+ 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
}
}
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
+ 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
}
patchfiles-append patch-libopt.c.diff
depends_build port:libtool
@@ -139,6 +142,6 @@
}
}
-livecheck.type regex
-livecheck.url http://sourceforge.net/projects/${name}/files/
-livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix}
+livecheck.type md5
+livecheck.url http://${name}.svn.sourceforge.net/viewvc/${name}/stable/version.mk
+livecheck.md5 7e9de24ce27123e4711e1a77d14d4719
Deleted: trunk/dports/graphics/netpbm/files/libpng14.diff
===================================================================
--- trunk/dports/graphics/netpbm/files/libpng14.diff 2011-01-25 10:20:32 UTC (rev 75447)
+++ trunk/dports/graphics/netpbm/files/libpng14.diff 2011-01-25 11:37:05 UTC (rev 75448)
@@ -1,113 +0,0 @@
-http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2010-March/185101.html
---- converter/other/pngtopnm.c.orig 2009-08-01 14:35:54.000000000 -0500
-+++ converter/other/pngtopnm.c 2011-01-18 03:48:18.000000000 -0600
-@@ -43,11 +43,6 @@
- #include "nstring.h"
- #include "shhopt.h"
-
--#if PNG_LIBPNG_VER >= 10400
--#error Your PNG library (<png.h>) is incompatible with this Netpbm source code.
--#error You need either an older PNG library (older than 1.4)
--#error newer Netpbm source code (at least 10.48)
--#endif
-
- typedef struct _jmpbuf_wrapper {
- jmp_buf jmpbuf;
-@@ -500,7 +495,7 @@
- case PNG_COLOR_TYPE_GRAY:
- setXel(&xelrow[col], c, c, c,
- ((info_ptr->valid & PNG_INFO_tRNS) &&
-- (c == gamma_correct(info_ptr->trans_values.gray,
-+ (c == gamma_correct(info_ptr->trans_color.gray,
- totalgamma))) ?
- 0 : maxval);
- break;
-@@ -517,7 +512,7 @@
- info_ptr->palette[c].blue,
- (info_ptr->valid & PNG_INFO_tRNS) &&
- c < info_ptr->num_trans ?
-- info_ptr->trans[c] : maxval);
-+ info_ptr->trans_alpha[c] : maxval);
- break;
-
- case PNG_COLOR_TYPE_RGB: {
-@@ -525,11 +520,11 @@
- png_uint_16 const c3 = get_png_val(png_pixelP);
- setXel(&xelrow[col], c, c2, c3,
- ((info_ptr->valid & PNG_INFO_tRNS) &&
-- (c == gamma_correct(info_ptr->trans_values.red,
-+ (c == gamma_correct(info_ptr->trans_color.red,
- totalgamma)) &&
-- (c2 == gamma_correct(info_ptr->trans_values.green,
-+ (c2 == gamma_correct(info_ptr->trans_color.green,
- totalgamma)) &&
-- (c3 == gamma_correct(info_ptr->trans_values.blue,
-+ (c3 == gamma_correct(info_ptr->trans_color.blue,
- totalgamma))) ?
- 0 : maxval);
- }
-@@ -694,7 +689,7 @@
- (info_ptr->valid & PNG_INFO_tRNS)) {
- trans_mix = TRUE;
- for (i = 0 ; i < info_ptr->num_trans ; i++)
-- if (info_ptr->trans[i] != 0 && info_ptr->trans[i] != 255) {
-+ if (info_ptr->trans_alpha[i] != 0 && info_ptr->trans_alpha[i] != 255) {
- trans_mix = FALSE;
- break;
- }
-@@ -847,7 +842,7 @@
- pnm_type = PBM_TYPE;
- if (info_ptr->valid & PNG_INFO_tRNS) {
- for (i = 0 ; i < info_ptr->num_trans ; i++) {
-- if (info_ptr->trans[i] != 0 && info_ptr->trans[i] != maxval) {
-+ if (info_ptr->trans_alpha[i] != 0 && info_ptr->trans_alpha[i] != maxval) {
- pnm_type = PGM_TYPE;
- break;
- }
---- converter/other/pnmtopng.c.orig 2009-08-01 14:31:33.000000000 -0500
-+++ converter/other/pnmtopng.c 2011-01-18 03:48:18.000000000 -0600
-@@ -63,11 +63,6 @@
- #include "mallocvar.h"
- #include "nstring.h"
-
--#if PNG_LIBPNG_VER >= 10400
--#error Your PNG library (<png.h>) is incompatible with this Netpbm source code.
--#error You need either an older PNG library (older than 1.4)
--#error newer Netpbm source code (at least 10.48)
--#endif
-
- struct zlib_compression {
- /* These are parameters that describe a form of zlib compression.
-@@ -1869,7 +1864,7 @@
- info_ptr->num_palette = palette_size;
- if (trans_size > 0) {
- info_ptr->valid |= PNG_INFO_tRNS;
-- info_ptr->trans = trans;
-+ info_ptr->trans_alpha = trans;
- info_ptr->num_trans = trans_size; /* omit opaque values */
- }
- /* creating hIST chunk */
-@@ -1906,7 +1901,7 @@
- info_ptr->color_type == PNG_COLOR_TYPE_RGB) {
- if (transparent > 0) {
- info_ptr->valid |= PNG_INFO_tRNS;
-- info_ptr->trans_values =
-+ info_ptr->trans_color =
- xelToPngColor_16(transcolor, maxval, png_maxval);
- }
- } else {
-@@ -1918,10 +1913,10 @@
- if (info_ptr->valid && PNG_INFO_tRNS)
- pm_message("Transparent color {gray, red, green, blue} = "
- "{%d, %d, %d, %d}",
-- info_ptr->trans_values.gray,
-- info_ptr->trans_values.red,
-- info_ptr->trans_values.green,
-- info_ptr->trans_values.blue);
-+ info_ptr->trans_color.gray,
-+ info_ptr->trans_color.red,
-+ info_ptr->trans_color.green,
-+ info_ptr->trans_color.blue);
- else
- pm_message("No transparent color");
- }
Deleted: trunk/dports/graphics/netpbm/files/patch-jpeg7.diff
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-jpeg7.diff 2011-01-25 10:20:32 UTC (rev 75447)
+++ trunk/dports/graphics/netpbm/files/patch-jpeg7.diff 2011-01-25 11:37:05 UTC (rev 75448)
@@ -1,12 +0,0 @@
-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
Modified: trunk/dports/graphics/netpbm/files/patch-lib-Makefile.diff
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-lib-Makefile.diff 2011-01-25 10:20:32 UTC (rev 75447)
+++ trunk/dports/graphics/netpbm/files/patch-lib-Makefile.diff 2011-01-25 11:37:05 UTC (rev 75448)
@@ -1,6 +1,6 @@
---- 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 @@
+--- lib/Makefile.orig 2009-09-27 23:44:29.000000000 +0200
++++ lib/Makefile 2011-01-25 11:59:32.000000000 +0100
+@@ -271,9 +271,9 @@
$(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.dll.a $(PKGDIR)/link
endif
ifeq ($(NETPBMLIBTYPE),dylib)
@@ -11,4 +11,4 @@
+ $(SYMLINK) libnetpbm.$(MAJ).$(MIN).dylib libnetpbm.dylib
endif
- clean: localclean
+ distclean clean: localclean
Modified: trunk/dports/graphics/netpbm/files/patch-pm_config.in.h.diff
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-pm_config.in.h.diff 2011-01-25 10:20:32 UTC (rev 75447)
+++ trunk/dports/graphics/netpbm/files/patch-pm_config.in.h.diff 2011-01-25 11:37:05 UTC (rev 75448)
@@ -1,13 +1,10 @@
---- pm_config.in.h.orig 2004-08-24 15:21:46.000000000 -0600
-+++ pm_config.in.h 2009-03-27 01:19:33.000000000 -0600
-@@ -99,8 +99,8 @@
- #define RGB_DB2 "PBMplus_Dir:RGB.TXT"
- #define RGB_DB3 "PBMplus_Dir:RGB.TXT"
- #else
--#define RGB_DB1 "/usr/lib/X11/rgb.txt"
--#define RGB_DB2 "/usr/openwin/lib/rgb.txt"
-+#define RGB_DB1 "@@PREFIX@@/share/netpbm/rgb.txt"
-+#define RGB_DB2 "/usr/X11/share/X11/rgb.txt"
- #define RGB_DB3 "/usr/X11R6/lib/X11/rgb.txt"
- #endif
+--- pm_config.in.h.orig 2009-09-27 23:44:29.000000000 +0200
++++ pm_config.in.h 2011-01-25 11:51:36.000000000 +0100
+@@ -60,6 +60,7 @@
+ ** hex and decimal forms to specify colors (see ppm/pgmtoppm.1 for details). */
+ #define RGB_DB_PATH \
++"@@PREFIX@@/share/netpbm/rgb.txt:" \
+ "/usr/share/netpbm/rgb.txt:" \
+ "/usr/lib/X11/rgb.txt:" \
+ "/usr/share/X11/rgb.txt:" \
Added: trunk/dports/graphics/netpbm/files/patch-pngtopnm.c.diff
===================================================================
--- trunk/dports/graphics/netpbm/files/patch-pngtopnm.c.diff (rev 0)
+++ trunk/dports/graphics/netpbm/files/patch-pngtopnm.c.diff 2011-01-25 11:37:05 UTC (rev 75448)
@@ -0,0 +1,46 @@
+--- converter/other/pngtopnm.c.orig 2009-09-27 23:44:29.000000000 +0200
++++ converter/other/pngtopnm.c 2011-01-25 12:06:08.000000000 +0100
+@@ -32,6 +32,14 @@
+ #include "shhopt.h"
+ #include "pnm.h"
+
++/* Hack copied over from pnmtopng.c */
++#if PNG_LIBPNG_VER >= 10400
++#define TRANS_ALPHA trans_alpha
++#else
++#define TRANS_ALPHA trans
++#endif
++
++
+ enum alpha_handling {ALPHA_NONE, ALPHA_ONLY, ALPHA_MIX};
+
+ struct cmdlineInfo {
+@@ -725,8 +733,8 @@
+ for (i = 0, foundGray = FALSE;
+ i < info_ptr->num_trans && !foundGray;
+ ++i) {
+- if (info_ptr->trans[i] != 0 &&
+- info_ptr->trans[i] != maxval) {
++ if (info_ptr->TRANS_ALPHA[i] != 0 &&
++ info_ptr->TRANS_ALPHA[i] != maxval) {
+ foundGray = TRUE;
+ }
+ }
+@@ -798,7 +806,7 @@
+ unsigned int i;
+ trans_mix = TRUE;
+ for (i = 0; i < info_ptr->num_trans; ++i)
+- if (info_ptr->trans[i] != 0 && info_ptr->trans[i] != 255) {
++ if (info_ptr->TRANS_ALPHA[i] != 0 && info_ptr->TRANS_ALPHA[i] != 255) {
+ trans_mix = FALSE;
+ break;
+ }
+@@ -1061,7 +1069,7 @@
+ setXel(&xelrow[col], fgColor, bgColor, alphaHandling,
+ (pngxP->info_ptr->valid & PNG_INFO_tRNS) &&
+ index < pngxP->info_ptr->num_trans ?
+- pngxP->info_ptr->trans[index] : maxval);
++ pngxP->info_ptr->TRANS_ALPHA[index] : maxval);
+ }
+ break;
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110125/39966710/attachment-0001.html>
More information about the macports-changes
mailing list