commit:     efc07b04ebe215e44e0051bca585bc6630d965b4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 18 21:07:11 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Jun 18 21:07:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efc07b04

media-radio/ibp: use pkg-config to find ncurses

This is more resilient in the (rare) case of non-split tinfo,
which still occurs on e.g. Prefix.

Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../ibp/{ibp-0.21-r1.ebuild => ibp-0.21-r2.ebuild}        | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/media-radio/ibp/ibp-0.21-r1.ebuild 
b/media-radio/ibp/ibp-0.21-r2.ebuild
similarity index 77%
rename from media-radio/ibp/ibp-0.21-r1.ebuild
rename to media-radio/ibp/ibp-0.21-r2.ebuild
index a02af617b34..08a4b2b5fa4 100644
--- a/media-radio/ibp/ibp-0.21-r1.ebuild
+++ b/media-radio/ibp/ibp-0.21-r2.ebuild
@@ -1,7 +1,8 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="6"
+EAPI="7"
+
 inherit toolchain-funcs
 
 DESCRIPTION="Shows currently transmitting beacons of the International Beacon 
Project (IBP)"
@@ -13,18 +14,18 @@ SLOT="0"
 KEYWORDS="amd64 x86"
 IUSE="X"
 
-RDEPEND="sys-libs/ncurses:0
+RDEPEND="sys-libs/ncurses:0=
        X? ( x11-libs/libX11  )"
 DEPEND="${RDEPEND}
        X? ( >=x11-misc/imake-1.0.8-r1 )"
+BDEPEND="virtual/pkgconfig"
 
 src_prepare() {
-       # respect CFLAGS if built without USE=X
+       # Respect CFLAGS if built without USE=X
        sed -i -e "s/= -D/+= -D/" Makefile || die
-       # fix compile if ncurses is built with separate libtinfo
-       if has_version "sys-libs/ncurses:0[tinfo]" ;then
-               sed -i -e "s/-lcurses/-lcurses -ltinfo/" Imakefile Makefile || 
die
-       fi
+
+       # Fix compile if ncurses is built with separate libtinfo
+       sed -i -e "s:-lcurses:$($(tc-getPKG_CONFIG) --libs ncurses):" Imakefile 
Makefile || die
 
        eapply_user
 }

Reply via email to