app-antivirus/clamav: use upstream fix for broken zlib check instead of disabling...
authorAustin English <wizardedit@gentoo.org>
Fri, 27 Jan 2017 19:36:06 +0000 (13:36 -0600)
committerAustin English <wizardedit@gentoo.org>
Fri, 27 Jan 2017 19:44:13 +0000 (13:44 -0600)
Ack'ed by radhermit

Gentoo-Bug: https://bugs.gentoo.org/604650

Package-Manager: Portage-2.3.2, Repoman-2.3.1

app-antivirus/clamav/clamav-0.99.1.ebuild
app-antivirus/clamav/clamav-0.99.2.ebuild
app-antivirus/clamav/clamav-0.99.ebuild
app-antivirus/clamav/files/clamav-configure-zlib.patch [new file with mode: 0644]

index 4f16064a1185554e9d17fc7792f7f0ff2afb018b..be2a73a046537d4da820f6770355392ec299c989 100644 (file)
@@ -1,10 +1,10 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=5
 
-inherit eutils flag-o-matic user systemd
+inherit autotools eutils flag-o-matic user systemd
 
 DESCRIPTION="Clam Anti-Virus Scanner"
 HOMEPAGE="http://www.clamav.net/"
@@ -45,6 +45,9 @@ pkg_setup() {
 src_prepare() {
        use ppc64 && append-flags -mminimal-toc
        use uclibc && export ac_cv_type_error_t=yes
+
+       epatch "${FILESDIR}"/${PN}-configure-zlib.patch # 604650, fixed in upstream HEAD
+       eautoconf
 }
 
 src_configure() {
index 5ab484b348758175b800c441f05d9d0d7bc033e4..1ce83997bf9478c6c8b14523ff4f0e6e4f86ebca 100644 (file)
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-inherit eutils flag-o-matic user systemd
+inherit autotools eutils flag-o-matic user systemd
 
 DESCRIPTION="Clam Anti-Virus Scanner"
 HOMEPAGE="http://www.clamav.net/"
@@ -48,13 +48,14 @@ src_prepare() {
        use uclibc && export ac_cv_type_error_t=yes
 
        epatch "${FILESDIR}"/${P}-gcc-6.patch #592432
+       epatch "${FILESDIR}"/${PN}-configure-zlib.patch # 604650, fixed in upstream HEAD
+       eautoconf
 }
 
 src_configure() {
        econf \
                --disable-experimental \
                --disable-fanotify \
-               --disable-zlib-vcheck \
                --enable-id-check \
                --with-dbdir="${EPREFIX}"/var/lib/clamav \
                --with-system-tommath \
index 144082fa06e6d5954a1d5befc09ae3c0439d2855..b77f3e708c133975c6cc07e34a981337c6b58892 100644 (file)
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-inherit eutils flag-o-matic user systemd
+inherit autotools eutils flag-o-matic user systemd
 
 DESCRIPTION="Clam Anti-Virus Scanner"
 HOMEPAGE="http://www.clamav.net/"
@@ -45,6 +45,9 @@ pkg_setup() {
 src_prepare() {
        use ppc64 && append-flags -mminimal-toc
        use uclibc && export ac_cv_type_error_t=yes
+
+       epatch "${FILESDIR}"/${PN}-configure-zlib.patch # 604650, fixed in upstream HEAD
+       eautoconf
 }
 
 src_configure() {
diff --git a/app-antivirus/clamav/files/clamav-configure-zlib.patch b/app-antivirus/clamav/files/clamav-configure-zlib.patch
new file mode 100644 (file)
index 0000000..8d1f4e6
--- /dev/null
@@ -0,0 +1,22 @@
+commit f0bcd186190fe6e67b3f0eaaceb7a99aa6a98865
+Author: Steven Morgan <stevmorg@cisco.com>
+Date:   Thu Jan 5 12:30:35 2017 -0500
+
+    bb111711 - fix zlib version check - patch by Daniel J. Luke.
+
+diff --git a/m4/reorganization/libs/libz.m4 b/m4/reorganization/libs/libz.m4
+index b5c7414..f7b67ca 100644
+--- a/m4/reorganization/libs/libz.m4
++++ b/m4/reorganization/libs/libz.m4
+@@ -29,9 +29,9 @@ then
+     AC_MSG_ERROR([Please install zlib and zlib-devel packages])
+ else
+ 
+-    vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
++    vuln=`grep "ZLIB_VERSION \"1.2.0\"" $ZLIB_HOME/include/zlib.h`
+     if test -z "$vuln"; then
+-      vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
++      vuln=`grep "ZLIB_VERSION \"1.2.1\"" $ZLIB_HOME/include/zlib.h`
+     fi
+ 
+     if test -n "$vuln"; then