Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/graphics
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv1727

Modified Files:
        gd2.info 
Added Files:
        gd2.patch 
Log Message:
build gd2 against libpng14


--- NEW FILE: gd2.patch ---
--- ./configure.ac.orig 2007-04-25 07:48:41.000000000 -0500
+++ ./configure.ac      2010-02-12 01:37:29.000000000 -0600
@@ -342,20 +342,20 @@
 [  --with-png=DIR          where to find the png library],,
   withval=yes)
 
-# libpng12.so is a nightmare. We have to test separately for
-# libpng12-config and libpng-config. If we find libpng12-config,
+# libpng14.so is a nightmare. We have to test separately for
+# libpng14-config and libpng-config. If we find libpng14-config,
 # we don't look for the other, which will just be a symlink to it,
 # confusing autoconf into thinking the library itself will be named -lpng,
 # which it won't be. Awful. This code will suffice unless the libpng
 # authors decide to do this AGAIN. Which I really hope they won't. TBB
 
 if test "$withval" != no; then
-  AC_PATH_PROG([LIBPNG12_CONFIG], [libpng12-config])
+  AC_PATH_PROG([LIBPNG14_CONFIG], [libpng14-config])
   AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config])
-  if test -n "$LIBPNG12_CONFIG"; then
-    libpng_CPPFLAGS=`libpng12-config --cflags`
+  if test -n "$LIBPNG14_CONFIG"; then
+    libpng_CPPFLAGS=`libpng14-config --cflags`
     # should be --ldopts, but it's currently broken
-    libpng_LDFLAGS=`libpng12-config --ldflags`
+    libpng_LDFLAGS=`libpng14-config --ldflags`
     libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[[^ ]][[^ ]]*//g'`
   elif test -n "$LIBPNG_CONFIG"; then
     libpng_CPPFLAGS=`libpng-config --cflags`
@@ -375,9 +375,9 @@
   _ldflags="$LDFLAGS"
   LDFLAGS="$libpng_LDFLAGS $LDFLAGS"
 
-  if test -n "$LIBPNG12_CONFIG"; then
-    AC_CHECK_LIB(png12,png_create_read_struct,
-      [LIBS="-lpng12 $LIBS"
+  if test -n "$LIBPNG14_CONFIG"; then
+    AC_CHECK_LIB(png14,png_create_read_struct,
+      [LIBS="-lpng14 $LIBS"
        FEATURES="GD_PNG $FEATURES"
        AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])],
       [LDFLAGS="$_ldflags"  
@@ -402,9 +402,9 @@
   AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])
 fi
 
-#TBB: png12's png_create_read_struct is just as good 
+#TBB: png14's png_create_read_struct is just as good 
 #2.0.23: should be = not ==  
-if test "$ac_cv_lib_png12_png_create_read_struct" = yes; then
+if test "$ac_cv_lib_png14_png_create_read_struct" = yes; then
   ac_cv_lib_png_png_create_read_struct=yes
 fi 
 
--- ./gd_png.c.orig     2007-06-14 14:51:41.000000000 -0500
+++ ./gd_png.c  2010-02-12 01:43:36.000000000 -0600
@@ -149,7 +149,7 @@
        return NULL;
   }
 
-       if (!png_check_sig (sig, 8)) { /* bad signature */
+       if (!(png_sig_cmp(sig, 0, 8) == 0)) { /* bad signature */
        return NULL;            /* bad signature */
        }
 

Index: gd2.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/graphics/gd2.info,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- gd2.info    7 Jun 2010 04:32:23 -0000       1.14
+++ gd2.info    16 Jan 2011 21:44:43 -0000      1.15
@@ -1,6 +1,6 @@
 Package: gd2
 Version: 2.0.35
-Revision: 7
+Revision: 8
 Depends: %N-shlibs (= %v-%r)
 BuildDepends: <<
   autoconf,
@@ -11,7 +11,7 @@
   gettext-tools,
   libiconv-dev,
   libjpeg8 (>= 8-2),
-  libpng3 (>= 1:1.2.35-2),
+  libpng14,
   libtool2,
   x11-dev
 <<
@@ -22,6 +22,8 @@
 SetCPPFLAGS: -I%p/lib/fontconfig2/include
 SetLDFLAGS: -L%p/lib/fontconfig2/lib
 ConfigureParams: --with-fontconfig=%p/lib/fontconfig2 
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib 
--disable-dependency-tracking
+PatchFile: gd2.patch
+PatchFile-MD5: d32c3cb1afea7b094dbf0cae20594a98
 CompileScript: <<
   autoreconf -fi
   ./configure %c
@@ -36,7 +38,7 @@
     freetype219-shlibs (>= 2.3.8-2),
     libiconv,
     libjpeg8-shlibs (>= 8-2),
-    libpng3-shlibs (>= 1:1.2.35-2),
+    libpng14-shlibs,
     x11-shlibs
   <<
   Replaces: gd209-shlibs
@@ -54,7 +56,7 @@
     libiconv,
     libjpeg-bin (>= 8-2),
     libjpeg8-shlibs (>= 8-2),
-    libpng3-shlibs (>= 1:1.2.35-2),
+    libpng14-shlibs,
     x11
   <<
   Conflicts: gd-bin, gd2-nox-bin, gd209-bin
@@ -82,13 +84,13 @@
  the fly. This version supports the PNG, JPEG and WBMP formats and lets
  you use TrueType fonts rendered via freetype2.
 <<
+DescPort: <<
+ Patch for compiling gd2 against libpng14 borrowed from slackware:
+   
http://www.mirrorservice.org/sites/ftp.slackware.com/pub/slackware/slackware64-current/source/l/gd/gd.png14.diff.gz
+<<
 DescPackaging: <<
  This package is based on previous work by Chris Pepper, Jeremy Higgs
  and Peter O'Gorman.  Previously maintained by Christoph Pfisterer.
-
- The configure script for this library explicitly checks for libpng12
- (contained in fink's libpng3 package); a more recent version of libpng
- will not suffice.
 <<
 License: OSI-Approved
 Homepage: http://www.libgd.org/


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to