1 |
commit: 14e83b0d9340dc22e50ea22b74cc25ccc52ff897 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 7 18:20:11 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 7 18:21:52 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14e83b0d |
7 |
|
8 |
sci-mathematics/geomview: Fix missing declarations with USE=-zlib |
9 |
|
10 |
Gentoo-bug: 596414 |
11 |
* EAPI=6 |
12 |
|
13 |
Package-Manager: portage-2.3.1 |
14 |
|
15 |
.../geomview/files/geomview-1.9.5-zlib.patch | 34 ++++++++++++++++++++++ |
16 |
...mview-1.9.5.ebuild => geomview-1.9.5-r1.ebuild} | 22 +++++++------- |
17 |
2 files changed, 46 insertions(+), 10 deletions(-) |
18 |
|
19 |
diff --git a/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch b/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch |
20 |
new file mode 100644 |
21 |
index 00000000..5d4b16a |
22 |
--- /dev/null |
23 |
+++ b/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch |
24 |
@@ -0,0 +1,34 @@ |
25 |
+Upstream diff to fix missing declarations with --without-zlib: |
26 |
+* image.c:1028:34: error: 'gzip_data_pipe' undeclared here (not in a function) |
27 |
+* { decompressors+1, "gzip -dc", gzip_data_pipe, { "z", "gz", "gzip", NULL } }, |
28 |
+* ^~~~~~~~~~~~~~ |
29 |
+See also: https://bugs.gentoo.org/show_bug.cgi?id=596414 |
30 |
+ |
31 |
+--- a/src/lib/shade/image.c |
32 |
++++ b/src/lib/shade/image.c |
33 |
+@@ -36,6 +36,8 @@ |
34 |
+ |
35 |
+ #ifndef HAVE_LIBZ |
36 |
+ # define HAVE_LIBZ 0 |
37 |
++#elif HAVE_LIBZ |
38 |
++# define HAVE_LIBZ 1 |
39 |
+ #endif |
40 |
+ |
41 |
+ #if HAVE_LIBZ |
42 |
+@@ -1025,9 +1027,15 @@ |
43 |
+ }; |
44 |
+ |
45 |
+ static struct filter decompressors[] = { |
46 |
++#if HAVE_LIBZ |
47 |
+ { decompressors+1, "gzip -dc", gzip_data_pipe, { "z", "gz", "gzip", NULL } }, |
48 |
+- { decompressors+2, "bzip2 -dc", NULL, { "bz2", "bzip2", NULL } }, |
49 |
++#else |
50 |
++ { decompressors+1, "gzip -dc", NULL, { "z", "gz", "gzip", NULL } }, |
51 |
++#endif |
52 |
++ { HAVE_LIBZ ? decompressors+2 : NULL, "bzip2 -dc", NULL, { "bz2", "bzip2", NULL } }, |
53 |
++#if HAVE_LIBZ |
54 |
+ { NULL, NULL, zlib_data_pipe, { "zlib", NULL } }, |
55 |
++#endif |
56 |
+ }; |
57 |
+ |
58 |
+ static struct filter converters[] = { |
59 |
|
60 |
diff --git a/sci-mathematics/geomview/geomview-1.9.5.ebuild b/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild |
61 |
similarity index 76% |
62 |
rename from sci-mathematics/geomview/geomview-1.9.5.ebuild |
63 |
rename to sci-mathematics/geomview/geomview-1.9.5-r1.ebuild |
64 |
index 838dbc9..2213994 100644 |
65 |
--- a/sci-mathematics/geomview/geomview-1.9.5.ebuild |
66 |
+++ b/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild |
67 |
@@ -1,10 +1,10 @@ |
68 |
-# Copyright 1999-2015 Gentoo Foundation |
69 |
+# Copyright 1999-2016 Gentoo Foundation |
70 |
# Distributed under the terms of the GNU General Public License v2 |
71 |
# $Id$ |
72 |
|
73 |
-EAPI=5 |
74 |
+EAPI=6 |
75 |
|
76 |
-inherit elisp-common eutils flag-o-matic fdo-mime |
77 |
+inherit elisp-common eutils fdo-mime flag-o-matic |
78 |
|
79 |
DESCRIPTION="Interactive Geometry Viewer" |
80 |
HOMEPAGE="http://geomview.sourceforge.net" |
81 |
@@ -15,7 +15,7 @@ LICENSE="LGPL-2.1" |
82 |
SLOT="0" |
83 |
IUSE="motionaveraging debug emacs zlib" |
84 |
|
85 |
-DEPEND=">=x11-libs/motif-2.3:0 |
86 |
+DEPEND="x11-libs/motif:0 |
87 |
virtual/glu |
88 |
virtual/opengl |
89 |
emacs? ( virtual/emacs ) |
90 |
@@ -25,10 +25,11 @@ RDEPEND="${DEPEND} |
91 |
|
92 |
S="${WORKDIR}/${P/_/-}" |
93 |
|
94 |
-SITEFILE=50${PN}-gentoo.el |
95 |
+SITEFILE="50${PN}-gentoo.el" |
96 |
+PATCHES=( "${FILESDIR}/${PN}-1.9.5-zlib.patch" ) |
97 |
|
98 |
src_configure() { |
99 |
- econf --docdir=/usr/share/doc/${PF} \ |
100 |
+ econf \ |
101 |
--with-htmlbrowser=xdg-open \ |
102 |
--with-pdfviewer=xdg-open \ |
103 |
$(use_enable debug d1debug) \ |
104 |
@@ -38,16 +39,17 @@ src_configure() { |
105 |
|
106 |
src_compile() { |
107 |
default |
108 |
+ |
109 |
if use emacs; then |
110 |
- cp "${FILESDIR}/gvcl-mode.el" "${S}" |
111 |
+ cp "${FILESDIR}/gvcl-mode.el" . || die |
112 |
elisp-compile *.el |
113 |
fi |
114 |
} |
115 |
|
116 |
src_install() { |
117 |
- emake DESTDIR="${D}" install |
118 |
- dodoc AUTHORS ChangeLog NEWS INSTALL.Geomview || die |
119 |
- doicon "${WORKDIR}"/geomview.png || die |
120 |
+ default |
121 |
+ |
122 |
+ doicon "${WORKDIR}"/geomview.png |
123 |
make_desktop_entry ${PN} "GeomView ${PV}" \ |
124 |
/usr/share/pixmaps/${PN}.png \ |
125 |
"Science;Math;Education" |