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

games-simulation/pmars-sdl: use pkg-config to find ncurses, x11

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

 games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild 
b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild
index ae564aa94c0..df1ca5fb51e 100644
--- a/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild
+++ b/games-simulation/pmars-sdl/pmars-sdl-0.9.2e-r1.ebuild
@@ -25,6 +25,7 @@ RDEPEND="
        !sdl? ( !X? ( sys-libs/ncurses:0= ) )
 "
 DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
 
 PATCHES=(
        "${FILESDIR}"/${P}-format.patch
@@ -46,15 +47,15 @@ src_compile() {
                append-cflags $(sdl-config --cflags)
                append-cppflags -DSDLGRAPHX
 
-               LIB=$(sdl-config --libs)
+               LIB="$(sdl-config --libs)"
        elif use X ; then
                append-cppflags -DXWINGRAPHX
 
-               LIB="-L${ESYSROOT}/usr/X11R6/lib -lX11"
+               LIB="$($(tc-getPKG_CONFIG) --libs x11)"
        else
                append-cppflags -DCURSESGRAPHX
 
-               LIB="-lcurses -ltinfo"
+               LIB="$($(tc-getPKG_CONFIG) --libs ncurses)"
        fi
 
        cd src || die

Reply via email to