commit: 14e83b0d9340dc22e50ea22b74cc25ccc52ff897 Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Fri Oct 7 18:20:11 2016 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Fri Oct 7 18:21:52 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14e83b0d
sci-mathematics/geomview: Fix missing declarations with USE=-zlib Gentoo-bug: 596414 * EAPI=6 Package-Manager: portage-2.3.1 .../geomview/files/geomview-1.9.5-zlib.patch | 34 ++++++++++++++++++++++ ...mview-1.9.5.ebuild => geomview-1.9.5-r1.ebuild} | 22 +++++++------- 2 files changed, 46 insertions(+), 10 deletions(-) diff --git a/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch b/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch new file mode 100644 index 00000000..5d4b16a --- /dev/null +++ b/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch @@ -0,0 +1,34 @@ +Upstream diff to fix missing declarations with --without-zlib: +* image.c:1028:34: error: 'gzip_data_pipe' undeclared here (not in a function) +* { decompressors+1, "gzip -dc", gzip_data_pipe, { "z", "gz", "gzip", NULL } }, +* ^~~~~~~~~~~~~~ +See also: https://bugs.gentoo.org/show_bug.cgi?id=596414 + +--- a/src/lib/shade/image.c ++++ b/src/lib/shade/image.c +@@ -36,6 +36,8 @@ + + #ifndef HAVE_LIBZ + # define HAVE_LIBZ 0 ++#elif HAVE_LIBZ ++# define HAVE_LIBZ 1 + #endif + + #if HAVE_LIBZ +@@ -1025,9 +1027,15 @@ + }; + + static struct filter decompressors[] = { ++#if HAVE_LIBZ + { decompressors+1, "gzip -dc", gzip_data_pipe, { "z", "gz", "gzip", NULL } }, +- { decompressors+2, "bzip2 -dc", NULL, { "bz2", "bzip2", NULL } }, ++#else ++ { decompressors+1, "gzip -dc", NULL, { "z", "gz", "gzip", NULL } }, ++#endif ++ { HAVE_LIBZ ? decompressors+2 : NULL, "bzip2 -dc", NULL, { "bz2", "bzip2", NULL } }, ++#if HAVE_LIBZ + { NULL, NULL, zlib_data_pipe, { "zlib", NULL } }, ++#endif + }; + + static struct filter converters[] = { diff --git a/sci-mathematics/geomview/geomview-1.9.5.ebuild b/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild similarity index 76% rename from sci-mathematics/geomview/geomview-1.9.5.ebuild rename to sci-mathematics/geomview/geomview-1.9.5-r1.ebuild index 838dbc9..2213994 100644 --- a/sci-mathematics/geomview/geomview-1.9.5.ebuild +++ b/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=5 +EAPI=6 -inherit elisp-common eutils flag-o-matic fdo-mime +inherit elisp-common eutils fdo-mime flag-o-matic DESCRIPTION="Interactive Geometry Viewer" HOMEPAGE="http://geomview.sourceforge.net" @@ -15,7 +15,7 @@ LICENSE="LGPL-2.1" SLOT="0" IUSE="motionaveraging debug emacs zlib" -DEPEND=">=x11-libs/motif-2.3:0 +DEPEND="x11-libs/motif:0 virtual/glu virtual/opengl emacs? ( virtual/emacs ) @@ -25,10 +25,11 @@ RDEPEND="${DEPEND} S="${WORKDIR}/${P/_/-}" -SITEFILE=50${PN}-gentoo.el +SITEFILE="50${PN}-gentoo.el" +PATCHES=( "${FILESDIR}/${PN}-1.9.5-zlib.patch" ) src_configure() { - econf --docdir=/usr/share/doc/${PF} \ + econf \ --with-htmlbrowser=xdg-open \ --with-pdfviewer=xdg-open \ $(use_enable debug d1debug) \ @@ -38,16 +39,17 @@ src_configure() { src_compile() { default + if use emacs; then - cp "${FILESDIR}/gvcl-mode.el" "${S}" + cp "${FILESDIR}/gvcl-mode.el" . || die elisp-compile *.el fi } src_install() { - emake DESTDIR="${D}" install - dodoc AUTHORS ChangeLog NEWS INSTALL.Geomview || die - doicon "${WORKDIR}"/geomview.png || die + default + + doicon "${WORKDIR}"/geomview.png make_desktop_entry ${PN} "GeomView ${PV}" \ /usr/share/pixmaps/${PN}.png \ "Science;Math;Education"