summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2016-10-16 10:27:50 +0200
committerPacho Ramos <pacho@gentoo.org>2016-10-16 10:49:45 +0200
commit89e22bc0633c5e0370df9e6d6223209abfa0f726 (patch)
tree7004fa1fa4399f45797a5ea39eb4c96214a95dcd /net-proxy/ziproxy
parentx11-libs/pixman: remove old beta versions (diff)
downloadgentoo-89e22bc0633c5e0370df9e6d6223209abfa0f726.tar.gz
gentoo-89e22bc0633c5e0370df9e6d6223209abfa0f726.tar.bz2
gentoo-89e22bc0633c5e0370df9e6d6223209abfa0f726.zip
net-proxy/ziproxy: Support giflib-5 (#571898 by Oleg and Toralf Förster)
Package-Manager: portage-2.3.1
Diffstat (limited to 'net-proxy/ziproxy')
-rw-r--r--net-proxy/ziproxy/files/ziproxy-3.3.1-giflib5.patch46
-rw-r--r--net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild11
2 files changed, 51 insertions, 6 deletions
diff --git a/net-proxy/ziproxy/files/ziproxy-3.3.1-giflib5.patch b/net-proxy/ziproxy/files/ziproxy-3.3.1-giflib5.patch
new file mode 100644
index 000000000000..e8404ecc47b4
--- /dev/null
+++ b/net-proxy/ziproxy/files/ziproxy-3.3.1-giflib5.patch
@@ -0,0 +1,46 @@
+Description: Build using giflib5
+Forwarded: yes
+Author: Marcos Talau <talau@users.sourceforge.net>
+Author: Matthias Klose <doko@debian.org>
+Last-Update: 2015-11-04
+
+Index: ziproxy-3.3.1/src/image.c
+===================================================================
+--- ziproxy-3.3.1.orig/src/image.c
++++ ziproxy-3.3.1/src/image.c
+@@ -905,7 +905,11 @@ int gif2bitmap(char *inbuf, int insize,
+ desc.size=insize;
+ desc.x.pos=0;
+
++#if GIFLIB_MAJOR >= 5
++ if ((GifFile = DGifOpen((void*)&desc, &gif_mem_input, NULL)) == NULL)
++#else
+ if ((GifFile = DGifOpen((void*)&desc, &gif_mem_input)) == NULL)
++#endif
+ return( IMG_RET_ERR_UNKNOWN + IMG_RET_FLG_WHILE_DECOMP);//more possible reasons
+
+ bmp = new_raw_bitmap();
+@@ -1083,7 +1087,11 @@ int gif2bitmap(char *inbuf, int insize,
+ }
+ bmp->pal_bpp = bmp->bpp;
+
++#if GIFLIB_MAJOR >= 5
++ DGifCloseFile(GifFile, NULL);
++#else
+ DGifCloseFile(GifFile);
++#endif
+ return IMG_RET_OK;
+ }
+
+@@ -1738,7 +1746,11 @@ static int bitmap2jp2 (raw_bitmap *bmp,
+ cmptparm->width = cwidth [cmptno];
+ cmptparm->height = cheight [cmptno];
+ cmptparm->prec = cbitlen [cmptno];
++#if GIFLIB_MAJOR >= 5
++ cmptparm->sgnd = 0; // we only generate unsigned components
++#else
+ cmptparm->sgnd = false; // we only generate unsigned components
++#endif
+
+ cshiftR [cmptno] = 8 - cbitlen [cmptno]; // calculate the resampling shift for this component
+ }
diff --git a/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild b/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild
index 6ebbbf477c94..9228a26c6287 100644
--- a/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild
+++ b/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild
@@ -15,7 +15,7 @@ KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="jpeg2k sasl xinetd"
RDEPEND="
- media-libs/giflib
+ media-libs/giflib:0=
media-libs/libpng:0=
virtual/jpeg
sys-libs/zlib
@@ -23,9 +23,9 @@ RDEPEND="
sasl? ( dev-libs/cyrus-sasl )
xinetd? ( virtual/inetd )
"
-DEPEND="${RDEPEND}
- app-arch/xz-utils
-"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-giflib5.patch )
pkg_setup() {
enewgroup ziproxy
@@ -57,7 +57,7 @@ src_configure() {
}
src_install() {
- emake DESTDIR="${D}" install
+ default
dodir /usr/sbin
mv -vf "${D}"usr/{,s}bin/ziproxy || die
@@ -67,7 +67,6 @@ src_install() {
newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
- dodoc ChangeLog CREDITS README README.tools
use jpeg2k && dodoc JPEG2000.txt
insinto /etc