summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2013-04-08 14:47:03 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2013-04-08 14:47:03 +0000
commit049f6697c3767d8da848cbf86b3b355afebe3b31 (patch)
tree78610b893b98c25afefd6e82ea47fddfaaf6b452 /media-gfx
parentmigration revbump, added missing test phase (diff)
downloadhistorical-049f6697c3767d8da848cbf86b3b355afebe3b31.tar.gz
historical-049f6697c3767d8da848cbf86b3b355afebe3b31.tar.bz2
historical-049f6697c3767d8da848cbf86b3b355afebe3b31.zip
Prevent conflict with libpng16 by renaming png_image with rwpng_png_image in rwpng.c and rwpng.h wrt #464762
Package-Manager: portage-2.2.0_alpha171/cvs/Linux x86_64 Manifest-Sign-Key: 0x4868F14D
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/pngquant/ChangeLog7
-rw-r--r--media-gfx/pngquant/files/pngquant-1.8.3-libpng16.patch53
-rw-r--r--media-gfx/pngquant/pngquant-1.8.3.ebuild12
3 files changed, 63 insertions, 9 deletions
diff --git a/media-gfx/pngquant/ChangeLog b/media-gfx/pngquant/ChangeLog
index e16496c1f2ce..f40814df6aec 100644
--- a/media-gfx/pngquant/ChangeLog
+++ b/media-gfx/pngquant/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-gfx/pngquant
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/pngquant/ChangeLog,v 1.3 2013/04/05 09:40:16 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/pngquant/ChangeLog,v 1.4 2013/04/08 14:47:03 ssuominen Exp $
+
+ 08 Apr 2013; Samuli Suominen <ssuominen@gentoo.org> pngquant-1.8.3.ebuild,
+ +files/pngquant-1.8.3-libpng16.patch:
+ Prevent conflict with libpng16 by renaming png_image with rwpng_png_image in
+ rwpng.c and rwpng.h wrt #464762
*pngquant-1.8.3 (05 Apr 2013)
diff --git a/media-gfx/pngquant/files/pngquant-1.8.3-libpng16.patch b/media-gfx/pngquant/files/pngquant-1.8.3-libpng16.patch
new file mode 100644
index 000000000000..edf089ff9678
--- /dev/null
+++ b/media-gfx/pngquant/files/pngquant-1.8.3-libpng16.patch
@@ -0,0 +1,53 @@
+Rename to prevent conflict with png_image from libpng16
+
+http://bugs.gentoo.org/464762
+
+--- rwpng.c
++++ rwpng.c
+@@ -213,7 +213,7 @@
+ }
+
+
+-pngquant_error rwpng_write_image_init(png_image *mainprog_ptr, png_structpp png_ptr_p, png_infopp info_ptr_p, FILE *outfile)
++pngquant_error rwpng_write_image_init(rwpng_png_image *mainprog_ptr, png_structpp png_ptr_p, png_infopp info_ptr_p, FILE *outfile)
+ {
+ /* could also replace libpng warning-handler (final NULL), but no need: */
+
+@@ -277,7 +277,7 @@
+ png_structp png_ptr;
+ png_infop info_ptr;
+
+- pngquant_error retval = rwpng_write_image_init((png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
++ pngquant_error retval = rwpng_write_image_init((rwpng_png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
+ if (retval) return retval;
+
+ // Palette images generally don't gain anything from filtering
+@@ -321,7 +321,7 @@
+ png_structp png_ptr;
+ png_infop info_ptr;
+
+- pngquant_error retval = rwpng_write_image_init((png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
++ pngquant_error retval = rwpng_write_image_init((rwpng_png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
+ if (retval) return retval;
+
+ rwpng_set_gamma(info_ptr, png_ptr, mainprog_ptr->gamma);
+@@ -344,7 +344,7 @@
+
+ static void rwpng_error_handler(png_structp png_ptr, png_const_charp msg)
+ {
+- png_image *mainprog_ptr;
++ rwpng_png_image *mainprog_ptr;
+
+ /* This function, aside from the extra step of retrieving the "error
+ * pointer" (below) and the fact that it exists within the application
+--- rwpng.h
++++ rwpng.h
+@@ -80,7 +80,7 @@
+ jmp_buf jmpbuf;
+ png24_image png24;
+ png8_image png8;
+-} png_image;
++} rwpng_png_image;
+
+ /* prototypes for public functions in rwpng.c */
+
diff --git a/media-gfx/pngquant/pngquant-1.8.3.ebuild b/media-gfx/pngquant/pngquant-1.8.3.ebuild
index af7ccaa3129e..33f6a4f0338d 100644
--- a/media-gfx/pngquant/pngquant-1.8.3.ebuild
+++ b/media-gfx/pngquant/pngquant-1.8.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/pngquant/pngquant-1.8.3.ebuild,v 1.1 2013/04/05 09:40:16 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/pngquant/pngquant-1.8.3.ebuild,v 1.2 2013/04/08 14:47:03 ssuominen Exp $
EAPI=5
inherit toolchain-funcs flag-o-matic
@@ -18,13 +18,9 @@ RDEPEND="media-libs/libpng:0=
sys-libs/zlib:="
DEPEND=${RDEPEND}
-pkg_pretend() {
- if use openmp ; then
- tc-has-openmp || die "Please switch to an openmp compatible compiler"
- fi
-}
-
src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng16.patch
+
# Failure in upstream logic. Otherwise we lose the -I and -L flags
# from Makefile.
sed -i \
@@ -38,7 +34,7 @@ src_compile() {
use sse2 && append-cflags -DUSE_SSE=1
local openmp
- if use openmp ; then
+ if use openmp && tc-has-openmp; then
append-cflags -fopenmp
openmp="-lgomp"
fi