diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-08-07 09:10:19 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-08-07 09:10:19 +0000 |
commit | 98973deadb77025a57427cc014cdae661099491a (patch) | |
tree | 8c73908420bf4996edaab370cb0db3be014dc5bf /media-libs | |
parent | Fix building with libpng15 wrt #356287 by Hanno Boeck (diff) | |
download | gentoo-2-98973deadb77025a57427cc014cdae661099491a.tar.gz gentoo-2-98973deadb77025a57427cc014cdae661099491a.tar.bz2 gentoo-2-98973deadb77025a57427cc014cdae661099491a.zip |
Fix building with libpng15 wrt #368315 with NetBSD patch.
(Portage version: 2.2.0_alpha47/cvs/Linux x86_64)
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/lensfun/ChangeLog | 8 | ||||
-rw-r--r-- | media-libs/lensfun/files/lensfun-0.2.5-libpng15.patch | 40 | ||||
-rw-r--r-- | media-libs/lensfun/lensfun-0.2.5-r2.ebuild | 52 |
3 files changed, 99 insertions, 1 deletions
diff --git a/media-libs/lensfun/ChangeLog b/media-libs/lensfun/ChangeLog index 7d7f5fe97358..83d62df8c2cd 100644 --- a/media-libs/lensfun/ChangeLog +++ b/media-libs/lensfun/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/lensfun # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/lensfun/ChangeLog,v 1.26 2011/07/13 14:38:06 xarthisius Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/lensfun/ChangeLog,v 1.27 2011/08/07 09:10:19 ssuominen Exp $ + +*lensfun-0.2.5-r2 (07 Aug 2011) + + 07 Aug 2011; Samuli Suominen <ssuominen@gentoo.org> +lensfun-0.2.5-r2.ebuild, + +files/lensfun-0.2.5-libpng15.patch: + Fix building with libpng15 wrt #368315 with NetBSD patch. 13 Jul 2011; Kacper Kowalik <xarthisius@gentoo.org> lensfun-0.2.5-r1.ebuild: ppc64 stable wrt #354033 diff --git a/media-libs/lensfun/files/lensfun-0.2.5-libpng15.patch b/media-libs/lensfun/files/lensfun-0.2.5-libpng15.patch new file mode 100644 index 000000000000..6d10b6c7d0ca --- /dev/null +++ b/media-libs/lensfun/files/lensfun-0.2.5-libpng15.patch @@ -0,0 +1,40 @@ +--- libs/auxfun/image.cpp ++++ libs/auxfun/image.cpp +@@ -94,7 +94,7 @@ bool Image::LoadPNG () + + png_init_io (png, file); + +- if (setjmp (png->jmpbuf)) ++ if (setjmp (png_jmpbuf(png))) + // If we get here, we had a problem reading the file + goto nomem; + +@@ -157,7 +157,7 @@ bool Image::LoadPNG () + row_pointers = new png_bytep [Height]; + + if (!row_pointers +- || setjmp (png->jmpbuf)) // Set a new exception handler ++ || setjmp (png_jmpbuf(png))) // Set a new exception handler + { + delete [] row_pointers; + nomem: +@@ -214,7 +214,7 @@ bool Image::SavePNG (const char *fName) + } + + /* Catch processing errors */ +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + /* If we get here, we had a problem writing the file */ + goto error2; + +@@ -273,10 +273,6 @@ bool Image::SavePNG (const char *fName) + /* It is REQUIRED to call this to finish writing the rest of the file */ + png_write_end (png, info); + +- /* if you malloced the palette, free it here */ +- if (info->palette) +- free (info->palette); +- + /* clean up after the write, and free any memory allocated */ + png_destroy_write_struct (&png, &info); + diff --git a/media-libs/lensfun/lensfun-0.2.5-r2.ebuild b/media-libs/lensfun/lensfun-0.2.5-r2.ebuild new file mode 100644 index 000000000000..475c6d7b0fce --- /dev/null +++ b/media-libs/lensfun/lensfun-0.2.5-r2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/lensfun/lensfun-0.2.5-r2.ebuild,v 1.1 2011/08/07 09:10:19 ssuominen Exp $ + +EAPI=2 +inherit eutils python + +DESCRIPTION="lensfun: A library for rectifying and simulating photographic lens distortions" +HOMEPAGE="http://lensfun.berlios.de/" +SRC_URI="mirror://berlios/lensfun/${P}.tar.bz2" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="debug doc" + +RDEPEND=">=dev-libs/glib-2 + >=media-libs/libpng-1.2" +DEPEND="${RDEPEND} + =dev-lang/python-2* + doc? ( >=app-doc/doxygen-1.5.0 )" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + # disable stripping, remove ricer CFLAGS + sed -i \ + -e 's:-s -O3 -fomit-frame-pointer -funroll-loops::g' \ + -e 's:GCC.LDFLAGS.release = -s:GCC.LDFLAGS.release =:g' \ + build/tibs/compiler/gcc.mak || die + + epatch "${FILESDIR}"/${P}-libpng15.patch +} + +src_configure() { + local myconf="" + use debug && myconf="--mode=debug" + # econf does NOT work + ./configure --prefix=/usr --docdir="/usr/share/doc/${PF}" --vectorization= ${myconf} || die +} + +src_compile() { + emake all V=1 || die +} + +src_install() { + emake DESTDIR="${D}" install || die + # TODO remove docs if ! use doc +} |