From 48726a08716bb85e2f5ec049e54eab6f0639741a Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Sun, 23 Apr 2017 22:22:05 +0200 Subject: app-antivirus/clamav: Fix building against sys-libs/ncurses[tinfo] (bug #596310). Package-Manager: Portage-2.3.5, Repoman-2.3.2 --- app-antivirus/clamav/clamav-0.99.1.ebuild | 2 +- app-antivirus/clamav/clamav-0.99.2-r1.ebuild | 18 ++++++++++------- app-antivirus/clamav/clamav-0.99.2.ebuild | 2 +- app-antivirus/clamav/clamav-0.99.ebuild | 2 +- app-antivirus/clamav/files/clamav-0.99-zlib.patch | 22 +++++++++++++++++++++ .../clamav/files/clamav-0.99.2-tinfo.patch | 23 ++++++++++++++++++++++ .../clamav/files/clamav-configure-zlib.patch | 22 --------------------- 7 files changed, 59 insertions(+), 32 deletions(-) create mode 100644 app-antivirus/clamav/files/clamav-0.99-zlib.patch create mode 100644 app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch delete mode 100644 app-antivirus/clamav/files/clamav-configure-zlib.patch (limited to 'app-antivirus') diff --git a/app-antivirus/clamav/clamav-0.99.1.ebuild b/app-antivirus/clamav/clamav-0.99.1.ebuild index 132c114a62a8..8b65d87de6b2 100644 --- a/app-antivirus/clamav/clamav-0.99.1.ebuild +++ b/app-antivirus/clamav/clamav-0.99.1.ebuild @@ -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 } diff --git a/app-antivirus/clamav/clamav-0.99.2-r1.ebuild b/app-antivirus/clamav/clamav-0.99.2-r1.ebuild index b6bd457b4a54..75d679e3bd5e 100644 --- a/app-antivirus/clamav/clamav-0.99.2-r1.ebuild +++ b/app-antivirus/clamav/clamav-0.99.2-r1.ebuild @@ -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() { diff --git a/app-antivirus/clamav/clamav-0.99.2.ebuild b/app-antivirus/clamav/clamav-0.99.2.ebuild index 1987aac7e78a..bf0acf80abb1 100644 --- a/app-antivirus/clamav/clamav-0.99.2.ebuild +++ b/app-antivirus/clamav/clamav-0.99.2.ebuild @@ -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 } diff --git a/app-antivirus/clamav/clamav-0.99.ebuild b/app-antivirus/clamav/clamav-0.99.ebuild index 9ae42e5bba4c..020f61bb23ec 100644 --- a/app-antivirus/clamav/clamav-0.99.ebuild +++ b/app-antivirus/clamav/clamav-0.99.ebuild @@ -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-zlib.patch b/app-antivirus/clamav/files/clamav-0.99-zlib.patch new file mode 100644 index 000000000000..8d1f4e615379 --- /dev/null +++ b/app-antivirus/clamav/files/clamav-0.99-zlib.patch @@ -0,0 +1,22 @@ +commit f0bcd186190fe6e67b3f0eaaceb7a99aa6a98865 +Author: Steven Morgan +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 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 index 000000000000..4593d16836e1 --- /dev/null +++ b/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch @@ -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=""], ++ [HAVE_LIBNCURSES=no], ++) ++ ++if test "X$HAVE_LIBNCURSES" != "Xyes"; then ++ HAVE_LIBNCURSES= + AC_LIB_FIND([ncurses], [ncurses/ncurses.h], + AC_LANG_PROGRAM([#include ], + [initscr(); KEY_RESIZE;]), + [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES"; + CURSES_INCLUDE=""], + []) ++fi + + if test "X$HAVE_LIBNCURSES" != "Xyes"; then + HAVE_LIBNCURSES= diff --git a/app-antivirus/clamav/files/clamav-configure-zlib.patch b/app-antivirus/clamav/files/clamav-configure-zlib.patch deleted file mode 100644 index 8d1f4e615379..000000000000 --- a/app-antivirus/clamav/files/clamav-configure-zlib.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit f0bcd186190fe6e67b3f0eaaceb7a99aa6a98865 -Author: Steven Morgan -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 -- cgit v1.2.3-65-gdbad