media-radio/qrq: Move to EAPI 6. Fix tinfo problem. Thanks for report to S. Kricner.
authorThomas Beierlein <tomjbe@gentoo.org>
Sun, 16 Apr 2017 15:02:52 +0000 (17:02 +0200)
committerThomas Beierlein <tomjbe@gentoo.org>
Sun, 16 Apr 2017 15:02:52 +0000 (17:02 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

media-radio/qrq/files/qrq-0.3.1-tinfo.patch [new file with mode: 0644]
media-radio/qrq/qrq-0.3.1-r1.ebuild [new file with mode: 0644]

diff --git a/media-radio/qrq/files/qrq-0.3.1-tinfo.patch b/media-radio/qrq/files/qrq-0.3.1-tinfo.patch
new file mode 100644 (file)
index 0000000..83ae2b0
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/Makefile 2017-04-03 18:45:09.028423872 +0200
++++ b/Makefile 2017-04-03 18:45:55.711048924 +0200
+@@ -47,7 +47,7 @@ ifeq ($(USE_CA), YES)
+               endif
+ else ifeq ($(USE_PA), YES)
+               CFLAGS:=$(CFLAGS) -D PA -pthread
+-              LDFLAGS:=$(LDFLAGS) -lpulse-simple -lpulse -lncurses
++              LDFLAGS:=$(LDFLAGS) -lpulse-simple -lpulse $(shell pkg-config ncurses --libs)
+               OBJECTS=qrq.o pulseaudio.o
+ else ifeq ($(USE_WIN32), YES)
+               CFLAGS:=$(CFLAGS) -D PA
+@@ -55,7 +55,7 @@
+               OBJECTS=qrq.o qrq.res pdcurses.a libpthreadGC1.a 
+ else
+               OBJECTS=qrq.o oss.o
+-              LDFLAGS:=$(LDFLAGS) -lpthread -lncurses
++              LDFLAGS:=$(LDFLAGS) -lpthread $(shell pkg-config ncurses --libs)
+               CFLAGS:=$(CFLAGS) -D OSS
+ endif 
+ 
diff --git a/media-radio/qrq/qrq-0.3.1-r1.ebuild b/media-radio/qrq/qrq-0.3.1-r1.ebuild
new file mode 100644 (file)
index 0000000..9b36380
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Yet another CW trainer for Linux/Unix"
+HOMEPAGE="http://fkurz.net/ham/qrq.html"
+SRC_URI="http://fkurz.net/ham/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pulseaudio"
+
+DEPEND="sys-libs/ncurses:=
+       pulseaudio? ( media-sound/pulseaudio )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       eapply "${FILESDIR}"/${P}-tinfo.patch
+       # avoid prestripping of 'qrq' binary
+       sed -i -e "s/install -s -m/install -m/" Makefile || die
+       sed -i -e "s/CC=gcc/CC=$(tc-getCC)/" Makefile || die
+       sed -i -e "s/-lpulse-simple/-lpthread -lpulse-simple/" Makefile || die
+       default
+}
+
+src_compile() {
+       CONF="USE_PA=NO USE_OSS=YES"
+       if use pulseaudio; then
+               CONF="USE_PA=YES USE_OSS=NO"
+       fi
+       emake $CONF
+}
+
+src_install() {
+       emake $CONF DESTDIR="${D}/usr" install
+       dodoc AUTHORS ChangeLog README
+}