[97304] trunk/dports/print/transfig

ryandesign at macports.org ryandesign at macports.org
Mon Sep 3 01:00:29 PDT 2012


Revision: 97304
          https://trac.macports.org/changeset/97304
Author:   ryandesign at macports.org
Date:     2012-09-03 01:00:25 -0700 (Mon, 03 Sep 2012)
Log Message:
-----------
transfig: fix build with libpng 1.5, using patch from Gentoo from Alexis Ballier

Modified Paths:
--------------
    trunk/dports/print/transfig/Portfile

Added Paths:
-----------
    trunk/dports/print/transfig/files/patch-libpng-1.5.diff

Modified: trunk/dports/print/transfig/Portfile
===================================================================
--- trunk/dports/print/transfig/Portfile	2012-09-03 06:09:43 UTC (rev 97303)
+++ trunk/dports/print/transfig/Portfile	2012-09-03 08:00:25 UTC (rev 97304)
@@ -35,12 +35,11 @@
 
 patchfiles          patch-fig2dev-dev-Imakefile \
                     patch-fig2dev-Imakefile \
+                    patch-libpng-1.5.diff \
                     patch-transfig-Imakefile
 
 # https://trac.macports.org/ticket/31504
-if {${configure.compiler} == "clang"} {
-    configure.compiler llvm-gcc-4.2
-}
+compiler.blacklist  clang
 
 post-patch {
     reinplace "s|__PREFIX|${prefix}|g"  ${worksrcpath}/fig2dev/Imakefile \

Added: trunk/dports/print/transfig/files/patch-libpng-1.5.diff
===================================================================
--- trunk/dports/print/transfig/files/patch-libpng-1.5.diff	                        (rev 0)
+++ trunk/dports/print/transfig/files/patch-libpng-1.5.diff	2012-09-03 08:00:25 UTC (rev 97304)
@@ -0,0 +1,35 @@
+--- fig2dev/dev/readpng.c.orig
++++ fig2dev/dev/readpng.c
+@@ -62,7 +62,7 @@ read_png(file,filetype,pic,llx,lly)
+     }
+ 
+     /* set long jump here */
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+ 	/* if we get here there was a problem reading the file */
+ 	png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ 	return 0;
+@@ -78,15 +78,17 @@ read_png(file,filetype,pic,llx,lly)
+     png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type,
+ 	&interlace_type, &compression_type, &filter_type);
+ 
+-    if (info_ptr->valid & PNG_INFO_gAMA)
+-	png_set_gamma(png_ptr, 2.2, info_ptr->gamma);
+-    else
+-	png_set_gamma(png_ptr, 2.2, 0.45);
++    png_fixed_point gamma = 0.45;
++    png_get_gAMA_fixed(png_ptr,info_ptr,&gamma);
++    png_set_gamma(png_ptr, 2.2, gamma);
+ 
+-    if (info_ptr->valid & PNG_INFO_bKGD)
++    if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) {
+ 	/* set the background to the one supplied */
+-	png_set_background(png_ptr, &info_ptr->background,
++    	png_color_16p background;
++	png_get_bKGD(png_ptr,info_ptr,&background);
++	png_set_background(png_ptr, background,
+ 		PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
++    }
+     else {
+ 	/* blend the canvas background using the alpha channel */
+ 	if (bgspec) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120903/2d57b5b9/attachment.html>


More information about the macports-changes mailing list