Revision: 87422 http://trac.macports.org/changeset/87422 Author: ryandesign@macports.org Date: 2011-11-20 16:10:54 -0800 (Sun, 20 Nov 2011) Log Message: ----------- abiword: fix libpng 1.4 incompatibility; see #32164 Modified Paths: -------------- trunk/dports/editors/abiword/Portfile trunk/dports/editors/abiword/files/abi-detect-platform.m4.patch trunk/dports/editors/abiword/files/configure.patch Added Paths: ----------- trunk/dports/editors/abiword/files/patch-wv-magick-png.c.diff Modified: trunk/dports/editors/abiword/Portfile =================================================================== --- trunk/dports/editors/abiword/Portfile 2011-11-20 23:59:11 UTC (rev 87421) +++ trunk/dports/editors/abiword/Portfile 2011-11-21 00:10:54 UTC (rev 87422) @@ -15,14 +15,11 @@ rmd160 f0de27f97135f8fff9b4400b05d74a27eee348cd distname abiword-${version} use_bzip2 yes -worksrcdir ${distname}/abi if {![variant_isset use_source]} { default_variants +use_binary } -build.target {} - pre-fetch { if {! [variant_isset use_binary] && ! [variant_isset use_source]} { return -code 1 "Please select either use_binary or use_source variant" @@ -65,8 +62,14 @@ patchfiles \ configure.patch \ - abi-detect-platform.m4.patch + abi-detect-platform.m4.patch \ + patch-wv-magick-png.c.diff + configure.dir ${worksrcpath}/abi + + build.dir ${configure.dir} + build.target + configure.args \ --enable-Cocoa \ --mandir=${prefix}/share/man \ Modified: trunk/dports/editors/abiword/files/abi-detect-platform.m4.patch =================================================================== --- trunk/dports/editors/abiword/files/abi-detect-platform.m4.patch 2011-11-20 23:59:11 UTC (rev 87421) +++ trunk/dports/editors/abiword/files/abi-detect-platform.m4.patch 2011-11-21 00:10:54 UTC (rev 87422) @@ -1,5 +1,5 @@ ---- ac-helpers/abi-detect-platform.m4~ 2006-07-22 09:32:04.000000000 -0400 -+++ ac-helpers/abi-detect-platform.m4 2006-07-22 09:39:47.000000000 -0400 +--- abi/ac-helpers/abi-detect-platform.m4~ 2006-07-22 09:32:04.000000000 -0400 ++++ abi/ac-helpers/abi-detect-platform.m4 2006-07-22 09:39:47.000000000 -0400 @@ -104,6 +104,15 @@ fi ]) Modified: trunk/dports/editors/abiword/files/configure.patch =================================================================== --- trunk/dports/editors/abiword/files/configure.patch 2011-11-20 23:59:11 UTC (rev 87421) +++ trunk/dports/editors/abiword/files/configure.patch 2011-11-21 00:10:54 UTC (rev 87422) @@ -1,5 +1,5 @@ ---- configure.fink 2006-07-22 07:06:55.000000000 -0400 -+++ configure 2006-07-22 07:09:52.000000000 -0400 +--- abi/configure.fink 2006-07-22 07:06:55.000000000 -0400 ++++ abi/configure 2006-07-22 07:09:52.000000000 -0400 @@ -888,6 +888,7 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-epath hardcode relative install path in libwv (MacOS X only) Added: trunk/dports/editors/abiword/files/patch-wv-magick-png.c.diff =================================================================== --- trunk/dports/editors/abiword/files/patch-wv-magick-png.c.diff (rev 0) +++ trunk/dports/editors/abiword/files/patch-wv-magick-png.c.diff 2011-11-21 00:10:54 UTC (rev 87422) @@ -0,0 +1,131 @@ +libpng 1.4+ compatibility +--- wv/magick/png.c.orig 2000-12-08 00:35:29.000000000 -0600 ++++ wv/magick/png.c 2011-11-20 18:01:26.000000000 -0600 +@@ -2015,10 +2015,10 @@ + /* + Image has a transparent background. + */ +- transparent_color.red=ping_info->trans_values.red; +- transparent_color.green=ping_info->trans_values.green; +- transparent_color.blue=ping_info->trans_values.blue; +- transparent_color.index=ping_info->trans_values.gray; ++ transparent_color.red=ping_info->trans_color.red; ++ transparent_color.green=ping_info->trans_color.green; ++ transparent_color.blue=ping_info->trans_color.blue; ++ transparent_color.index=ping_info->trans_color.gray; + if (ping_info->color_type == PNG_COLOR_TYPE_GRAY) + { + transparent_color.red=transparent_color.index; +@@ -2029,9 +2029,9 @@ + { + printf("transparent color = %5d %5d %5d (tRNS = %5d %5d %5d %5d)\n", + transparent_color.red,transparent_color.green, +- transparent_color.blue,ping_info->trans_values.red, +- ping_info->trans_values.green,ping_info->trans_values.blue, +- ping_info->trans_values.index); ++ transparent_color.blue,ping_info->trans_color.red, ++ ping_info->trans_color.green,ping_info->trans_color.blue, ++ ping_info->trans_color.index); + if (ping_info->color_type == PNG_COLOR_TYPE_GRAY) + printf("transparent color index= %5d\n",transparent_color.index); + } +@@ -2391,7 +2391,7 @@ + if (ping_info->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (index < ping_info->num_trans) +- q->index=(unsigned short)UpScale(ping_info->trans[index]); ++ q->index=(unsigned short)UpScale(ping_info->trans_alpha[index]); + } + else + { +@@ -3646,11 +3646,11 @@ + if (p->index != Opaque) + { + ping_info->valid|=PNG_INFO_tRNS; +- ping_info->trans_values.red=p->red; +- ping_info->trans_values.green=p->green; +- ping_info->trans_values.blue=p->blue; +- ping_info->trans_values.gray=(unsigned short) Intensity(*p); +- ping_info->trans_values.index=(unsigned short) DownScale(p->index); ++ ping_info->trans_color.red=p->red; ++ ping_info->trans_color.green=p->green; ++ ping_info->trans_color.blue=p->blue; ++ ping_info->trans_color.gray=(unsigned short) Intensity(*p); ++ ping_info->trans_color.index=(unsigned short) DownScale(p->index); + } + else + { +@@ -3673,7 +3673,7 @@ + { + if (p->index != Opaque) + { +- if (!ColorMatch(ping_info->trans_values,*p,0)) ++ if (!ColorMatch(ping_info->trans_color,*p,0)) + { + ping_info->valid&=(~PNG_INFO_tRNS); + if (image_info->verbose) +@@ -3689,7 +3689,7 @@ + } + else + { +- if (ColorMatch(ping_info->trans_values,*p,0)) ++ if (ColorMatch(ping_info->trans_color,*p,0)) + { + /* Can't use RGB + tRNS */ + ping_info->valid&=(~PNG_INFO_tRNS); +@@ -3708,11 +3708,11 @@ + if (save_image_depth == 16 && image->depth == 8) + { + if(image_info->verbose) +- printf("reducing trans_values to 8-bit\n"); +- ping_info->trans_values.red&=0xff; +- ping_info->trans_values.green&=0xff; +- ping_info->trans_values.blue&=0xff; +- ping_info->trans_values.gray&=0xff; ++ printf("reducing trans_color to 8-bit\n"); ++ ping_info->trans_color.red&=0xff; ++ ping_info->trans_color.green&=0xff; ++ ping_info->trans_color.blue&=0xff; ++ ping_info->trans_color.gray&=0xff; + } + } + } +@@ -3763,28 +3763,28 @@ + if (save_image_depth == 16 && image->depth == 8) + { + if(image_info->verbose) +- printf("re-expanding trans_values to 16-bit\n"); +- ping_info->trans_values.red*=0x0101; +- ping_info->trans_values.green*=0x0101; +- ping_info->trans_values.blue*=0x0101; +- ping_info->trans_values.gray*=0x0101; ++ printf("re-expanding trans_color to 16-bit\n"); ++ ping_info->trans_color.red*=0x0101; ++ ping_info->trans_color.green*=0x0101; ++ ping_info->trans_color.blue*=0x0101; ++ ping_info->trans_color.gray*=0x0101; + } + /* + Identify which colormap entry is transparent. + */ + if (image_info->verbose) + printf("Allocating memory for trans\n"); +- ping_info->trans=(unsigned char *) ++ ping_info->trans_alpha=(unsigned char *) + AllocateMemory(image->colors*sizeof(unsigned char)); +- if (ping_info->trans == (unsigned char *) NULL) ++ if (ping_info->trans_alpha == (unsigned char *) NULL) + WriterExit(ResourceLimitWarning,"Memory allocation failed", + image); + for (i=0; i < (int) image->colors; i++) + { +- ping_info->trans[i]=DownScale(Opaque); +- if (ColorMatch(ping_info->trans_values,image->colormap[i],0)) ++ ping_info->trans_alpha[i]=DownScale(Opaque); ++ if (ColorMatch(ping_info->trans_color,image->colormap[i],0)) + { +- ping_info->trans[i]=ping_info->trans_values.index; ++ ping_info->trans_alpha[i]=ping_info->trans_color.index; + break; + } + }
participants (1)
-
ryandesign@macports.org