commit:     89e22bc0633c5e0370df9e6d6223209abfa0f726
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 16 08:27:50 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Oct 16 08:49:45 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89e22bc0

net-proxy/ziproxy: Support giflib-5 (#571898 by Oleg and Toralf Förster)

Package-Manager: portage-2.3.1

 .../ziproxy/files/ziproxy-3.3.1-giflib5.patch      | 46 ++++++++++++++++++++++
 net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild          | 11 +++---
 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 00000000..e8404ec
--- /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 <ta...@users.sourceforge.net>
+Author: Matthias Klose <d...@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 6ebbbf4..9228a26 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

Reply via email to