[82822] trunk/dports/graphics/magicpoint

jmr at macports.org jmr at macports.org
Sat Aug 20 18:02:15 PDT 2011


Revision: 82822
          http://trac.macports.org/changeset/82822
Author:   jmr at macports.org
Date:     2011-08-20 18:02:14 -0700 (Sat, 20 Aug 2011)
Log Message:
-----------
magicpoint: fix build with libpng 1.4

Modified Paths:
--------------
    trunk/dports/graphics/magicpoint/Portfile
    trunk/dports/graphics/magicpoint/files/patch-configure

Added Paths:
-----------
    trunk/dports/graphics/magicpoint/files/patch-image_png.c

Modified: trunk/dports/graphics/magicpoint/Portfile
===================================================================
--- trunk/dports/graphics/magicpoint/Portfile	2011-08-21 00:49:53 UTC (rev 82821)
+++ trunk/dports/graphics/magicpoint/Portfile	2011-08-21 01:02:14 UTC (rev 82822)
@@ -18,7 +18,8 @@
  files quickly with your favorite editor (e.g. Emacs, vi).
 
 patchfiles	patch-config.guess patch-image.h patch-new.c patch-parse.c \
-		patch-default.mgp patch-configure patch-freetype.patch
+		patch-default.mgp patch-configure patch-freetype.patch \
+		patch-image_png.c
 
 depends_build	port:pkgconfig \
 		port:imake

Modified: trunk/dports/graphics/magicpoint/files/patch-configure
===================================================================
--- trunk/dports/graphics/magicpoint/files/patch-configure	2011-08-21 00:49:53 UTC (rev 82821)
+++ trunk/dports/graphics/magicpoint/files/patch-configure	2011-08-21 01:02:14 UTC (rev 82822)
@@ -1,5 +1,60 @@
---- configure.orig	Wed Jan 21 18:25:37 2004
-+++ configure	Wed Jan 21 18:27:07 2004
+--- configure.orig	2003-05-28 15:34:23.000000000 +1000
++++ configure	2011-08-21 10:57:46.000000000 +1000
+@@ -4940,9 +4940,9 @@
+ _ACEOF
+ 
+ else
+-  echo "$as_me:$LINENO: checking for png_set_gray_1_2_4_to_8 in -lpng" >&5
+-echo $ECHO_N "checking for png_set_gray_1_2_4_to_8 in -lpng... $ECHO_C" >&6
+-if test "${ac_cv_lib_png_png_set_gray_1_2_4_to_8+set}" = set; then
++  echo "$as_me:$LINENO: checking for png_set_expand_gray_1_2_4_to_8 in -lpng" >&5
++echo $ECHO_N "checking for png_set_expand_gray_1_2_4_to_8 in -lpng... $ECHO_C" >&6
++if test "${ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+@@ -4957,7 +4957,7 @@
+ #endif
+ /* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+-char png_set_gray_1_2_4_to_8 ();
++char png_set_expand_gray_1_2_4_to_8 ();
+ #ifdef F77_DUMMY_MAIN
+ #  ifdef __cplusplus
+      extern "C"
+@@ -4967,7 +4967,7 @@
+ int
+ main ()
+ {
+-png_set_gray_1_2_4_to_8 ();
++png_set_expand_gray_1_2_4_to_8 ();
+   ;
+   return 0;
+ }
+@@ -4984,18 +4984,18 @@
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  ac_cv_lib_png_png_set_gray_1_2_4_to_8=yes
++  ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+-ac_cv_lib_png_png_set_gray_1_2_4_to_8=no
++ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_set_gray_1_2_4_to_8" >&5
+-echo "${ECHO_T}$ac_cv_lib_png_png_set_gray_1_2_4_to_8" >&6
+-if test $ac_cv_lib_png_png_set_gray_1_2_4_to_8 = yes; then
++echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&5
++echo "${ECHO_T}$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&6
++if test $ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8 = yes; then
+   LIBS="$LIBS -lpng -lz"
+ 			 cat >>confdefs.h <<\_ACEOF
+ #define USE_PNG 1
 @@ -5647,7 +5647,7 @@
  		echo 'FATAL: You need libungif to use gif images.  pass proper LIBS to configure.'
  		exit 1

Added: trunk/dports/graphics/magicpoint/files/patch-image_png.c
===================================================================
--- trunk/dports/graphics/magicpoint/files/patch-image_png.c	                        (rev 0)
+++ trunk/dports/graphics/magicpoint/files/patch-image_png.c	2011-08-21 01:02:14 UTC (rev 82822)
@@ -0,0 +1,11 @@
+--- image/png.c.orig	2001-04-11 18:37:00.000000000 +1000
++++ image/png.c	2011-08-21 10:56:49.000000000 +1000
+@@ -134,7 +134,7 @@ pngLoad(fullname, name, verbose)
+ 	} 
+ 
+ 	if (colortype == PNG_COLOR_TYPE_GRAY && bitdepth < 8){
+-		png_set_gray_1_2_4_to_8(png_ptr);
++		png_set_expand_gray_1_2_4_to_8(png_ptr);
+ 	}
+ 
+ 	if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)){
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110820/92970add/attachment.html>


More information about the macports-changes mailing list