Date: Wednesday, January 18, 2012 @ 15:30:41 Author: eric Revision: 146848
upgpkg: imlib 1.9.15-11 Rebuild against libpng 1.5 and libtiff 4.0 Added: imlib/trunk/imlib-1.9.15-libpng15.patch Modified: imlib/trunk/PKGBUILD Deleted: imlib/trunk/libpng14.patch -----------------------------+ PKGBUILD | 32 +++++---- imlib-1.9.15-libpng15.patch | 142 ++++++++++++++++++++++++++++++++++++++++++ libpng14.patch | 12 --- 3 files changed, 159 insertions(+), 27 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2012-01-18 20:25:31 UTC (rev 146847) +++ PKGBUILD 2012-01-18 20:30:41 UTC (rev 146848) @@ -1,32 +1,30 @@ # $Id$ -# Maintainer: Eric Belanger <[email protected]> -# Contributor: Judd Vinet <[email protected]> +# Maintainer: Eric Bélanger <[email protected]> pkgname=imlib pkgver=1.9.15 -pkgrel=10 +pkgrel=11 pkgdesc="General image handling library for X11 and Gtk" arch=('i686' 'x86_64') url="http://freshmeat.net/projects/imlib/" license=('GPL') -depends=('gtk' 'giflib' 'libpng>=1.4.0' 'libtiff>=3.9.2-2' 'libjpeg>=8') +depends=('gtk' 'giflib' 'libpng' 'libtiff') makedepends=('libxt') options=('!libtool') source=(http://ftp.gnome.org/pub/GNOME/sources/imlib/1.9/${pkgname}-${pkgver}.tar.bz2 - debian-bug448360.patch CAN-2004-1026.patch aclocal-fixes.patch libpng14.patch) -md5sums=('7db987e6c52e4daf70d7d0f471238eae' '5f9da697934b6bd3b497ac9160ce4f5c'\ - 'b273d36aa60adbfaacaf6062234e4c1f' '33b832f0dc6c9723cd0dfe9c8d0a6797'\ - '9d8a029f5fb05978db0dbcd4ff38fe23') -sha1sums=('c9a732a354fbb3c7e1a426e5d19fc92d73f8f720' 'fe2fd9ce4d7bc62271e724153de39012de8ec5ee'\ - 'ec1b47281c1a7fb21abe841f948ecc56ed13f310' 'af54cb1ee0c8c6122b277284ebdd1022e31df3b5'\ - '20ed6063ba787ac7c2677bb4b135c0b7285c52af') + debian-bug448360.patch CAN-2004-1026.patch aclocal-fixes.patch imlib-1.9.15-libpng15.patch) +sha1sums=('c9a732a354fbb3c7e1a426e5d19fc92d73f8f720' + 'fe2fd9ce4d7bc62271e724153de39012de8ec5ee' + 'ec1b47281c1a7fb21abe841f948ecc56ed13f310' + 'af54cb1ee0c8c6122b277284ebdd1022e31df3b5' + '33c3aaa43eb624f2a6ab0406285a8515903333e3') build() { cd "${srcdir}/${pkgname}-${pkgver}" - patch -Np1 -i "${srcdir}/debian-bug448360.patch" - patch -Np1 -i "${srcdir}/CAN-2004-1026.patch" - patch -Np0 -i "${srcdir}/aclocal-fixes.patch" - patch -Np1 -i "${srcdir}/libpng14.patch" + patch -p1 -i "${srcdir}/debian-bug448360.patch" + patch -p1 -i "${srcdir}/CAN-2004-1026.patch" + patch -p0 -i "${srcdir}/aclocal-fixes.patch" + patch -p0 -i "${srcdir}/imlib-1.9.15-libpng15.patch" sed '/AC_PATH_XTRA/d' -i configure.in libtoolize --force cp /usr/bin/libtool . @@ -34,5 +32,9 @@ ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --enable-shm --disable-static sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install } Added: imlib-1.9.15-libpng15.patch =================================================================== --- imlib-1.9.15-libpng15.patch (rev 0) +++ imlib-1.9.15-libpng15.patch 2012-01-18 20:30:41 UTC (rev 146848) @@ -0,0 +1,142 @@ +--- gdk_imlib/io-png.c ++++ gdk_imlib/io-png.c +@@ -40,13 +40,13 @@ + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; +@@ -275,13 +275,13 @@ + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; +@@ -301,6 +301,9 @@ + /* Setup Translators */ + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand(png_ptr); ++ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) ++ png_set_expand(png_ptr); ++ + png_set_strip_16(png_ptr); + png_set_packing(png_ptr); + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) +@@ -440,13 +443,13 @@ + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; +@@ -635,7 +638,7 @@ + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + fclose(f); + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); +--- Imlib/load.c ++++ Imlib/load.c +@@ -197,12 +197,12 @@ + png_destroy_read_struct(&png_ptr, NULL, NULL); + return NULL; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; +@@ -260,7 +260,8 @@ + png_read_image(png_ptr, lines); + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + ptr = data; +- if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) ++ if (color_type == PNG_COLOR_TYPE_GRAY ++ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + for (y = 0; y < *h; y++) + { +@@ -285,6 +286,7 @@ + } + } + } ++#if 0 + else if (color_type == PNG_COLOR_TYPE_GRAY) + { + for (y = 0; y < *h; y++) +@@ -300,6 +302,7 @@ + } + } + } ++#endif + else + { + for (y = 0; y < *h; y++) +--- Imlib/save.c ++++ Imlib/save.c +@@ -342,7 +342,7 @@ + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + fclose(f); + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); +--- Imlib/utils.c ++++ Imlib/utils.c +@@ -1981,14 +1981,13 @@ + png_destroy_read_struct(&png_ptr, NULL, NULL); + return NULL; + } +- +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; Deleted: libpng14.patch =================================================================== --- libpng14.patch 2012-01-18 20:25:31 UTC (rev 146847) +++ libpng14.patch 2012-01-18 20:30:41 UTC (rev 146848) @@ -1,12 +0,0 @@ -diff -Naur imlib-1.9.15-orig/Imlib/load.c imlib-1.9.15/Imlib/load.c ---- imlib-1.9.15-orig/Imlib/load.c 2010-01-18 20:58:27.000000000 -0500 -+++ imlib-1.9.15/Imlib/load.c 2010-01-18 21:02:04.000000000 -0500 -@@ -1619,7 +1619,7 @@ - return 0; - fread(buf, 1, 8, f); - rewind(f); -- return (int)png_check_sig(buf, 8); -+ return (int)png_sig_cmp(buf, 0, 8)==0; - #else - return 0; - #endif
