gd2 stable port information

Package: gd2
Version: 2.0.35
Revision: 11
Depends: %N-shlibs (= %v-%r)
BuildDepends: <<
autoconf2.6,
automake1.11,
expat1,
fink (>= 0.24.12),
fink-package-precedence,
fontconfig2-dev (>= 2.8.0-4),
freetype219 (>= 2.3.12-1),
gettext-tools,
libiconv-dev,
libjpeg8 (>= 8-2),
libpng15,
libtool2,
x11-dev
<<
Conflicts: gd, gd2-nox, gd209
Replaces: gd, gd2-nox, gd209, %N-bin (<< 2.0.33-3)
Source: http://www.libgd.org/releases/gd-%v.tar.bz2
Source-MD5: 6c6c3dbb7bf079e0bb5fbbfd3bb8a71c
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 --enable-dependency-tracking --disable-static
PatchFile: gd2.patch
PatchFile-MD5: ee8b68f14a6d1bf0fb74b724461a9d4c
PatchScript: <<
#!/bin/sh -ev
%{default_script}
<<
CompileScript: <<
autoreconf -fi
./configure %c
make
fink-package-precedence --prohibit-bdep=%n .
<<
DocFiles: COPYING INSTALL index.html README-JPEG.TXT README.TXT readme.jpn
BuildDependsOnly: True
SplitOff2: <<
Package: %N-shlibs
Depends: <<
fontconfig2-shlibs (>= 2.8.0-4),
freetype219-shlibs (>= 2.3.12-1),
libiconv,
libjpeg8-shlibs (>= 8-2),
libpng15-shlibs,
x11-shlibs
<<
Replaces: gd209-shlibs
Files: lib/libgd.2*.dylib
Shlibs: %p/lib/libgd.2.dylib 3.0.0 %n (>= 2.0.28-1)
Description: Shared libraries for gd2 package
DocFiles: COPYING index.html
<<
SplitOff: <<
Package: %N-bin
Depends: <<
%N-shlibs (>= %v-%r),
fontconfig2-shlibs (>= 2.8.0-4),
freetype219-shlibs (>= 2.3.12-1),
libiconv,
libjpeg-bin (>= 8-2),
libjpeg8-shlibs (>= 8-2),
libpng15-shlibs,
x11
<<
Conflicts: gd-bin, gd2-nox-bin, gd209-bin
Replaces: gd-bin, gd2-nox-bin, gd209-bin
Files: <<
bin/annotate
bin/bdftogd
bin/gd2copypal
bin/gd2togif
bin/gd2topng
bin/gdcmpgif
bin/gdparttopng
bin/gdtopng
bin/giftogd2
bin/pngtogd
bin/pngtogd2
bin/webpng
<<
Description: Executables for gd2 package
DocFiles: COPYING index.html
<<
Description: Graphics generation library
DescDetail: <<
The GD library is useful for creating graphics like hit counters on
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.

dmacks removed static libs and cleared internal-use-only
dependencies' flags from gdlib-config (all .dylib symbols
resolved via dyld so no need to force InheritedBuildDepends)
as of 2.0.35-11
<<
License: OSI-Approved
Homepage: http://www.libgd.org/
Maintainer: Dave Morrison

gd2 stable port .patch

--- gd-2.0.35.orig/config/gdlib-config.in 2006-10-11 05:46:22.000000000 -0400
+++ gd-2.0.35/config/gdlib-config.in 2011-08-09 21:02:10.000000000 -0400
@@ -68,10 +68,10 @@
echo @GDLIB_REVISION@
;;
--ldflags)
- echo @LDFLAGS@
+ echo -L@libdir@
;;
--libs)
- echo @LIBS@ @LIBICONV@
+ echo
;;
--cflags|--includes)
echo -I@includedir@
@@ -83,8 +83,8 @@
echo "GD library @VERSION@"
echo "includedir: $includedir"
echo "cflags: -I@includedir@"
- echo "ldflags: @LDFLAGS@"
- echo "libs: @LIBS@ @LIBICONV@"
+ echo "ldflags: -L@libdir@"
+ echo "libs: "
echo "libdir: $libdir"
echo "features: @FEATURES@"
;;
--- ./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,
+# libpng15.so is a nightmare. We have to test separately for
+# libpng15-config and libpng-config. If we find libpng15-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([LIBPNG15_CONFIG], [libpng15-config])
AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config])
- if test -n "$LIBPNG12_CONFIG"; then
- libpng_CPPFLAGS=`libpng12-config --cflags`
+ if test -n "$LIBPNG15_CONFIG"; then
+ libpng_CPPFLAGS=`libpng15-config --cflags`
# should be --ldopts, but it's currently broken
- libpng_LDFLAGS=`libpng12-config --ldflags`
+ libpng_LDFLAGS=`libpng15-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 "$LIBPNG15_CONFIG"; then
+ AC_CHECK_LIB(png15,png_create_read_struct,
+ [LIBS="-lpng15 $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: png15'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_png15_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 */
}

gd2 _unstable_ port .patch