app-antivirus/clamav: Fixed compilation with sys-libs/ncurses[tinfo]
authorLars Wendler <polynomial-c@gentoo.org>
Wed, 31 Jul 2019 12:47:12 +0000 (14:47 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Wed, 31 Jul 2019 12:47:39 +0000 (14:47 +0200)
Fixed without excplicit permission due to maintainer timeout.

Thanks-to: Jeroen Roovers <jer@gentoo.org>
Bug: https://bugs.gentoo.org/670729
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
app-antivirus/clamav/clamav-0.101.2-r1.ebuild
app-antivirus/clamav/files/clamav-0.101.2-tinfo.patch [new file with mode: 0644]

index 986cc1711ae1856e8c270eb70f1e4767bde5ab00..372a1c6336b2075dc31e47bc41cabf95e5d47d2b 100644 (file)
@@ -41,7 +41,8 @@ DOCS=( docs/UserManual.md docs/UserManual )
 HTML_DOCS=( docs/html )
 
 PATCHES=(
-       "${FILESDIR}/clamav-0.101.2-libxml2_pkgconfig.patch" #661328
+       "${FILESDIR}/${PN}-0.101.2-libxml2_pkgconfig.patch" #661328
+       "${FILESDIR}/${PN}-0.101.2-tinfo.patch" #670729
 )
 
 pkg_setup() {
diff --git a/app-antivirus/clamav/files/clamav-0.101.2-tinfo.patch b/app-antivirus/clamav/files/clamav-0.101.2-tinfo.patch
new file mode 100644 (file)
index 0000000..66130be
--- /dev/null
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/670729
+
+--- a/m4/reorganization/clamdtop.m4
++++ b/m4/reorganization/clamdtop.m4
+@@ -4,12 +4,26 @@
+ if test "$enable_clamdtop" != "no"; then
++PKG_CHECK_MODULES([CURSES], [ncursesw],
++              [CURSES_INCLUDE="<ncurses.h>";
++               HAVE_LIBNCURSES=yes],
++              HAVE_LIBNCURSES=no])
++
++if test "X$HAVE_LIBNCURSES" != "Xyes"; then
++PKG_CHECK_MODULES([CURSES], [ncurses],
++          [CURSES_INCLUDE="<ncurses.h>";
++           HAVE_LIBNCURSES=yes],
++          HAVE_LIBNCURSES=no])
++fi
++
++if test "X$HAVE_LIBNCURSES" != "Xyes"; then
+ 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=