summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-10-07 20:20:11 +0200
committerDavid Seifert <soap@gentoo.org>2016-10-07 20:21:52 +0200
commit14e83b0d9340dc22e50ea22b74cc25ccc52ff897 (patch)
treefff08bb2cf67edc8ee1fe11dcb4f422e59edaa64 /sci-mathematics/geomview/files
parentdev-python/txaio: Add pypi homepage (diff)
downloadgentoo-14e83b0d9340dc22e50ea22b74cc25ccc52ff897.tar.gz
gentoo-14e83b0d9340dc22e50ea22b74cc25ccc52ff897.tar.bz2
gentoo-14e83b0d9340dc22e50ea22b74cc25ccc52ff897.zip
sci-mathematics/geomview: Fix missing declarations with USE=-zlib
Gentoo-bug: 596414 * EAPI=6 Package-Manager: portage-2.3.1
Diffstat (limited to 'sci-mathematics/geomview/files')
-rw-r--r--sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch34
1 files changed, 34 insertions, 0 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 000000000000..5d4b16a0867a
--- /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[] = {