commit:     8ef0babfccf50f1c03735378b6c668ae8d19233e
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 22 15:15:47 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Mar 22 15:15:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ef0babf

media-sound/aumix: Fixed build with sys-libs/ncurses[tinfo]

Closes: https://bugs.gentoo.org/578722
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 media-sound/aumix/aumix-2.9.1.ebuild            | 35 ++++++++++++++++---------
 media-sound/aumix/files/aumix-2.9.1-tinfo.patch | 22 ++++++++++++++++
 2 files changed, 44 insertions(+), 13 deletions(-)

diff --git a/media-sound/aumix/aumix-2.9.1.ebuild 
b/media-sound/aumix/aumix-2.9.1.ebuild
index fc6bf40487e..deffad3e720 100644
--- a/media-sound/aumix/aumix-2.9.1.ebuild
+++ b/media-sound/aumix/aumix-2.9.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit desktop
+inherit autotools desktop
 
 DESCRIPTION="Aumix volume/mixer control program"
 HOMEPAGE="http://jpj.net/~trevor/aumix.html";
@@ -14,24 +14,33 @@ SLOT="0"
 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86"
 IUSE="gpm gtk nls"
 
-RDEPEND="sys-libs/ncurses:0
+RDEPEND="sys-libs/ncurses:0=
        gpm? ( sys-libs/gpm )
        gtk? ( x11-libs/gtk+:2 )
        nls? ( virtual/libintl )"
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
        virtual/pkgconfig
-       nls? ( sys-devel/gettext )"
+       nls? ( sys-devel/gettext )
+"
 
-src_configure() {
-       local myconf
+PATCHES=(
+       "${FILESDIR}/${P}-tinfo.patch" #578722
+)
 
-       use gtk || myconf="${myconf} --without-gtk"
-       use gpm || myconf="${myconf} --without-gpm"
+src_prepare() {
+       default
+       eautoreconf #578722
+}
+
+src_configure() {
+       local myeconfargs=(
+               $(use_enable nls)
+               $(usex gtk '' --without-gtk)
+               $(usex gpm '' --without-gpm)
+       )
 
-       econf \
-               $(use_enable nls) \
-               --disable-dependency-tracking \
-               ${myconf}
+       econf "${myeconfargs[@]}"
 }
 
 src_install() {

diff --git a/media-sound/aumix/files/aumix-2.9.1-tinfo.patch 
b/media-sound/aumix/files/aumix-2.9.1-tinfo.patch
new file mode 100644
index 00000000000..969e034e0cb
--- /dev/null
+++ b/media-sound/aumix/files/aumix-2.9.1-tinfo.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/578722
+
+--- aumix-2.9.1/configure.ac
++++ aumix-2.9.1/configure.ac
+@@ -69,6 +69,8 @@
+    [  --without-ncurses       compile with no ncurses or mouse support],
+   AC_MSG_RESULT([Compiling without ncurses support]),[
+   dnl Checks for ncurses library.
++  AC_CHECK_LIB(tinfo, main, TINFO_LIB="-ltinfo", TINFO_LIB=)
++  AC_SUBST(TINFO_LIB)
+   AC_CHECK_LIB(ncurses, initscr, initscr=on, initscr=off)
+   if test $initscr = on; then
+     CURSLIB="ncurses"
+@@ -83,7 +85,7 @@
+     fi
+   fi
+   if test x$CURSLIB != x; then
+-    LIBS="-l$CURSLIB $LIBS"
++    LIBS="-l$CURSLIB $TINFO_LIB $LIBS"
+     AC_DEFINE(HAVE_CURSES, 1,
+       [Define this if you have (n)curses and want to use it.])
+     AC_CHECK_LIB($CURSLIB, getmouse,

Reply via email to