commit:     f51503a3a00c3d085e673b6d738159eac253cf60
Author:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 16 15:02:52 2017 +0000
Commit:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Sun Apr 16 15:02:52 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f51503a3

media-radio/qrq: Move to EAPI 6. Fix tinfo problem. Thanks for report to S. 
Kricner.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 media-radio/qrq/files/qrq-0.3.1-tinfo.patch | 20 ++++++++++++++
 media-radio/qrq/qrq-0.3.1-r1.ebuild         | 41 +++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

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 00000000000..83ae2b0e7bc
--- /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 00000000000..9b363803062
--- /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
+}

Reply via email to