media-sound/cvoicecontrol: Fixed build with sys-libs/ncurses[tinfo]
authorLars Wendler <polynomial-c@gentoo.org>
Sun, 24 Mar 2019 00:01:09 +0000 (01:01 +0100)
committerLars Wendler <polynomial-c@gentoo.org>
Sun, 24 Mar 2019 00:01:19 +0000 (01:01 +0100)
Closes: https://bugs.gentoo.org/647166
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
media-sound/cvoicecontrol/cvoicecontrol-0.9_alpha-r1.ebuild
media-sound/cvoicecontrol/files/cvoicecontrol-0.9_alpha-tinfo.patch [new file with mode: 0644]

index 5aed99496537adca18109c976b9eb00fa740793c..db4a6d89d14d19196de36e848f032466fb99989a 100644 (file)
@@ -1,9 +1,11 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-MY_P=${P/_/}
+inherit autotools
+
+MY_P="${P/_/}"
 
 DESCRIPTION="Console based speech recognition system"
 HOMEPAGE="http://www.kiecza.net/daniel/linux"
@@ -14,15 +16,25 @@ SLOT="0"
 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
 IUSE=""
 
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${MY_P}"
 
-PATCHES=( "${FILESDIR}/${P}-gentoo-2.patch" )
+PATCHES=(
+       "${FILESDIR}/${P}-gentoo-2.patch"
+       "${FILESDIR}/${P}-tinfo.patch" #647166
+)
 
 src_prepare() {
        default
-       sed -i -e "s/install-data-am: install-data-local/install-data-am:/" Makefile.in || die "sed failed"
        # Handle documentation with dohtml instead.
-       sed -i -e "s:SUBDIRS = docs:#SUBDIRS = docs:" cvoicecontrol/Makefile.in || die "sed #2 failed"
+       sed \
+               -e "s:SUBDIRS = docs:#SUBDIRS = docs:" \
+               -i cvoicecontrol/Makefile.am || die
+
+       eautoreconf #647166
+
+       sed \
+               -e "s/install-data-am: install-data-local/install-data-am:/" \
+               -i Makefile.in || die
 }
 
 src_install () {
diff --git a/media-sound/cvoicecontrol/files/cvoicecontrol-0.9_alpha-tinfo.patch b/media-sound/cvoicecontrol/files/cvoicecontrol-0.9_alpha-tinfo.patch
new file mode 100644 (file)
index 0000000..2ad44a1
--- /dev/null
@@ -0,0 +1,10 @@
+--- cvoicecontrol-0.9alpha/configure.in
++++ cvoicecontrol-0.9alpha/configure.in
+@@ -12,6 +12,7 @@
+ AC_CHECK_LIB(pthread, main, [LIBPTHREAD="-lpthread"], LIBPTHREAD= )
+ AC_SUBST(LIBPTHREAD)
+ AC_CHECK_LIB(ncurses, main, [LIBNCURSES="-lncurses"], LIBNCURSES= )
++AC_CHECK_LIB(tinfo, keypad, [LIBNCURSES="$LIBNCURSES -ltinfo"])
+ AC_SUBST(LIBNCURSES)
+ dnl Checks for header files.
+ AC_CHECK_HEADERS(fcntl.h glob.h math.h ncurses.h pthread.h signal.h stdio.h stdlib.h string.h sys/ioctl.h sys/select.h sys/soundcard.h sys/time.h sys/types.h termios.h time.h unistd.h)