From 48726a08716bb85e2f5ec049e54eab6f0639741a Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Sun, 23 Apr 2017 22:22:05 +0200 Subject: [PATCH] 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 +- ...gure-zlib.patch => clamav-0.99-zlib.patch} | 0 .../clamav/files/clamav-0.99.2-tinfo.patch | 23 +++++++++++++++++++ 6 files changed, 37 insertions(+), 10 deletions(-) rename app-antivirus/clamav/files/{clamav-configure-zlib.patch => clamav-0.99-zlib.patch} (100%) create mode 100644 app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch 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-configure-zlib.patch b/app-antivirus/clamav/files/clamav-0.99-zlib.patch similarity index 100% rename from app-antivirus/clamav/files/clamav-configure-zlib.patch rename to app-antivirus/clamav/files/clamav-0.99-zlib.patch 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= -- 2.26.2