bugfix: support libpng-1.4 in package gd (by Tony Theodore)

This commit is contained in:
Volker Grabsch 2010-07-16 15:09:33 +02:00
parent 040a708d86
commit 14f98d2e97
2 changed files with 19 additions and 2 deletions

17
src/gd-1-libpng14.patch Normal file
View File

@ -0,0 +1,17 @@
# This file is part of mingw-cross-env.
# See doc/index.html for further information.
This patch has been taken from:
http://bugs.gentoo.org/show_bug.cgi?id=305101
http://repos.archlinux.org/wsvn/packages/gd/trunk/libpng14.patch
--- a/gd_png.c
+++ b/gd_png.c
@@ -149,7 +149,7 @@
return NULL;
}
- if (!png_check_sig (sig, 8)) { /* bad signature */
+ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
return NULL; /* bad signature */
}

View File

@ -24,14 +24,14 @@ define $(PKG)_BUILD
touch '$(1)/config.hin'
touch '$(1)/Makefile.in'
$(SED) -i 's,-I@includedir@,-I@includedir@ -DNONDLL,' '$(1)/config/gdlib-config.in'
$(SED) -i 's,-lX11 ,,g' '$(1)/configure'
$(SED) -i 's,-lX11 ,,g' '$(1)/configure'
$(SED) -i 's,png12,png14,g' '$(1)/configure'
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
--with-freetype='$(PREFIX)/$(TARGET)' \
--without-x \
LIBPNG12_CONFIG='$(PREFIX)/$(TARGET)/bin/libpng12-config' \
LIBPNG_CONFIG='$(PREFIX)/$(TARGET)/bin/libpng-config' \
CFLAGS='-DNONDLL -DXMD_H -L$(PREFIX)/$(TARGET)/lib' \
LIBS="`$(PREFIX)/$(TARGET)/bin/xml2-config --libs`"