summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-02-09 16:13:51 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-02-09 16:13:51 +0000
commitfa677274e8dfec1b118951d360ce34605d440834 (patch)
tree12ac61cb88feb9c9b2a02f1ec4933cef49c51438 /media-libs/jbig2dec
parentBump up to EAPI=4 so we can use REQUIRED_USE to ensure at least one is enabled. (diff)
downloadgentoo-2-fa677274e8dfec1b118951d360ce34605d440834.tar.gz
gentoo-2-fa677274e8dfec1b118951d360ce34605d440834.tar.bz2
gentoo-2-fa677274e8dfec1b118951d360ce34605d440834.zip
Fix building with libpng15.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/jbig2dec')
-rw-r--r--media-libs/jbig2dec/ChangeLog8
-rw-r--r--media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch31
-rw-r--r--media-libs/jbig2dec/jbig2dec-0.11-r1.ebuild40
3 files changed, 78 insertions, 1 deletions
diff --git a/media-libs/jbig2dec/ChangeLog b/media-libs/jbig2dec/ChangeLog
index 3683011f2f05..62e162b6e9d7 100644
--- a/media-libs/jbig2dec/ChangeLog
+++ b/media-libs/jbig2dec/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-libs/jbig2dec
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/jbig2dec/ChangeLog,v 1.10 2012/02/09 01:30:33 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/jbig2dec/ChangeLog,v 1.11 2012/02/09 16:13:51 ssuominen Exp $
+
+*jbig2dec-0.11-r1 (09 Feb 2012)
+
+ 09 Feb 2012; Samuli Suominen <ssuominen@gentoo.org> +jbig2dec-0.11-r1.ebuild,
+ +files/jbig2dec-0.11-libpng15.patch:
+ Fix building with libpng15.
09 Feb 2012; Jeroen Roovers <jer@gentoo.org> jbig2dec-0.11.ebuild:
Marked ~hppa (bug #401853).
diff --git a/media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch b/media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch
new file mode 100644
index 000000000000..c18ccb7af606
--- /dev/null
+++ b/media-libs/jbig2dec/files/jbig2dec-0.11-libpng15.patch
@@ -0,0 +1,31 @@
+--- configure.ac
++++ configure.ac
+@@ -45,7 +45,7 @@
+ fi
+ dnl libpng requires pow() which may be in libm
+ AC_SEARCH_LIBS([pow], [m])
+- AC_CHECK_LIB([png], [png_check_sig], [
++ AC_CHECK_LIB([png], [png_sig_cmp], [
+ AC_CHECK_LIB([z], [deflate], [
+ AC_DEFINE(HAVE_LIBPNG, 1, [Define if libpng is available (-lpng)])
+ LIBS="-lpng -lz $LIBS"
+--- jbig2_image_png.c
++++ jbig2_image_png.c
+@@ -33,7 +33,7 @@
+ {
+ png_size_t check;
+
+- check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
++ check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr));
+ if (check != length) {
+ png_error(png_ptr, "Write Error");
+ }
+@@ -43,7 +43,7 @@
+ jbig2_png_flush(png_structp png_ptr)
+ {
+ png_FILE_p io_ptr;
+- io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
++ io_ptr = (png_FILE_p)png_get_io_ptr(png_ptr);
+ if (io_ptr != NULL)
+ fflush(io_ptr);
+ }
diff --git a/media-libs/jbig2dec/jbig2dec-0.11-r1.ebuild b/media-libs/jbig2dec/jbig2dec-0.11-r1.ebuild
new file mode 100644
index 000000000000..d2faac7c8fbc
--- /dev/null
+++ b/media-libs/jbig2dec/jbig2dec-0.11-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/jbig2dec/jbig2dec-0.11-r1.ebuild,v 1.1 2012/02/09 16:13:51 ssuominen Exp $
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="A decoder implementation of the JBIG2 image compression format"
+HOMEPAGE="http://jbig2dec.sourceforge.net/"
+SRC_URI="http://ghostscript.com/~giles/jbig2/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~x86"
+IUSE="png static-libs"
+
+RDEPEND="png? ( >=media-libs/libpng-1.2:0 )"
+DEPEND="${RDEPEND}"
+
+RESTRICT="test"
+#the test files are missing from the tarball, nothing is tested and the
+#test function just returns error. permanently restricted, see bug 324275
+
+DOCS="CHANGES README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with png libpng)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}