app-antivirus/clamav: Fix building against sys-libs/ncurses[tinfo] (bug #596310).
authorJeroen Roovers <jer@gentoo.org>
Sun, 23 Apr 2017 20:22:05 +0000 (22:22 +0200)
committerJeroen Roovers <jer@gentoo.org>
Sun, 23 Apr 2017 20:26:12 +0000 (22:26 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

app-antivirus/clamav/clamav-0.99.1.ebuild
app-antivirus/clamav/clamav-0.99.2-r1.ebuild
app-antivirus/clamav/clamav-0.99.2.ebuild
app-antivirus/clamav/clamav-0.99.ebuild
app-antivirus/clamav/files/clamav-0.99-zlib.patch [moved from app-antivirus/clamav/files/clamav-configure-zlib.patch with 100% similarity]
app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch [new file with mode: 0644]

index 132c114a62a862c2acb65cd23c061b1ae2eeec8e..8b65d87de6b240cab2c231f6d507828d2620c450 100644 (file)
@@ -45,7 +45,7 @@ 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
+       epatch "${FILESDIR}"/${PN}-0.99-zlib.patch # 604650, fixed in upstream HEAD
        eautoconf
 }
 
index b6bd457b4a543ed44a8c76f261b3119f1f22d870..75d679e3bd5e266cf78bea325542a443777c6d10 100644 (file)
@@ -38,7 +38,8 @@ RDEPEND="${CDEPEND}
 DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
 PATCHES=(
        "${FILESDIR}"/${P}-gcc-6.patch
-       "${FILESDIR}"/${PN}-configure-zlib.patch
+       "${FILESDIR}"/${P}-tinfo.patch
+       "${FILESDIR}"/${PN}-0.99-zlib.patch
 )
 
 pkg_setup() {
@@ -57,18 +58,21 @@ src_configure() {
        use uclibc && export ac_cv_type_error_t=yes
 
        econf \
-               --disable-experimental \
-               --enable-id-check \
-               --with-dbdir="${EPREFIX}"/var/lib/clamav \
-               --with-system-tommath \
-               --with-zlib="${EPREFIX}"/usr \
                $(use_enable bzip2) \
                $(use_enable clamdtop) \
                $(use_enable ipv6) \
                $(use_enable milter) \
                $(use_enable static-libs static) \
                $(use_with iconv) \
-               $(use_with metadata-analysis-api libjson /usr)
+               $(use_with metadata-analysis-api libjson /usr) \
+               --cache-file="${S}"/config.cache \
+               --disable-experimental \
+               --disable-gcc-vcheck \
+               --disable-zlib-vcheck \
+               --enable-id-check \
+               --with-dbdir="${EPREFIX}"/var/lib/clamav \
+               --with-system-tommath \
+               --with-zlib="${EPREFIX}"/usr
 }
 
 src_install() {
index 1987aac7e78ab3d90f4dd17b18cc619d51f8aa00..bf0acf80abb17ee8691c300337b727f2b401dd30 100644 (file)
@@ -47,7 +47,7 @@ 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
+       epatch "${FILESDIR}"/${PN}-0.99-zlib.patch # 604650, fixed in upstream HEAD
        eautoconf
 }
 
index 9ae42e5bba4ca7eb3b3d944cf5641513360a2e3c..020f61bb23ec2cd52770b33f70446e9ef1a42d67 100644 (file)
@@ -45,7 +45,7 @@ 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
+       epatch "${FILESDIR}"/${P}-zlib.patch # 604650, fixed in upstream HEAD
        eautoconf
 }
 
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch b/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch
new file mode 100644 (file)
index 0000000..4593d16
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/m4/reorganization/clamdtop.m4
++++ b/m4/reorganization/clamdtop.m4
+@@ -4,12 +4,20 @@
+ 
+ if test "$enable_clamdtop" != "no"; then
+ 
++PKG_CHECK_MODULES([CURSES],[ncurses],
++      [HAVE_LIBNCURSES=yes; CURSES_INCLUDE="<ncurses.h>"],
++      [HAVE_LIBNCURSES=no],
++)
++
++if test "X$HAVE_LIBNCURSES" != "Xyes"; then
++    HAVE_LIBNCURSES=
+ AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
+           AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
+                           [initscr(); KEY_RESIZE;]),
+           [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
+            CURSES_INCLUDE="<ncurses/ncurses.h>"],
+           [])
++fi
+ 
+ if test "X$HAVE_LIBNCURSES" != "Xyes"; then
+     HAVE_LIBNCURSES=