summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-radio/qrq/files/qrq-0.3.1-tinfo.patch20
-rw-r--r--media-radio/qrq/qrq-0.3.1-r1.ebuild41
2 files changed, 61 insertions, 0 deletions
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
index 000000000000..83ae2b0e7bca
--- /dev/null
+++ b/media-radio/qrq/files/qrq-0.3.1-tinfo.patch
@@ -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
index 000000000000..9b3638030629
--- /dev/null
+++ b/media-radio/qrq/qrq-0.3.1-r1.ebuild
@@ -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
+}