sys-devel/smatch: avoid hardcoded pkg-config invocation
authorMike Frysinger <vapier@chromium.org>
Fri, 22 May 2020 07:09:49 +0000 (03:09 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 22 May 2020 07:32:49 +0000 (03:32 -0400)
It's not a big deal here as we disable most deps, but it avoids
"command not found" errors when cross-compiling, and confusing
checkers looking for bad pkg-config invocation.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
sys-devel/smatch/smatch-1.60.ebuild
sys-devel/smatch/smatch-9999.ebuild

index e8505ae64d2332c0d77cfba7adf7ecf325fe3ea6..9423f1d108f6988cf39463d9c59d3a41c735bda1 100644 (file)
@@ -24,6 +24,7 @@ IUSE=""
 
 RDEPEND="dev-db/sqlite"
 DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
 
 S=${WORKDIR}/${P}-7a4fdad
 
@@ -32,6 +33,7 @@ src_prepare() {
 
        sed -i \
                -e '/^CFLAGS =/{s:=:+=:;s:-O2 -finline-functions:${CPPFLAGS}:}' \
+               -e 's:pkg-config:$(PKG_CONFIG):' \
                Makefile || die
 }
 
@@ -43,6 +45,7 @@ _emake() {
                AR="$(tc-getAR)" \
                CC="$(tc-getCC)" \
                LD='$(CC)' \
+               PKG_CONFIG="$(tc-getPKG_CONFIG)" \
                HAVE_GTK2=no \
                HAVE_LLVM=no \
                HAVE_LIBXML=no \
index 4e3cca48e997321c2ec102050ff53db36e7b4a18..8ba49a55ed46ddb7638e0f378c01bcc3c2d87846 100644 (file)
@@ -23,12 +23,14 @@ IUSE=""
 
 RDEPEND="dev-db/sqlite"
 DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
 
 src_prepare() {
        default
 
        sed -i \
                -e '/^CFLAGS =/{s:=:+=:;s:-O2 -finline-functions:${CPPFLAGS}:}' \
+               -e 's:pkg-config:$(PKG_CONFIG):' \
                Makefile || die
 }
 
@@ -40,6 +42,7 @@ _emake() {
                AR="$(tc-getAR)" \
                CC="$(tc-getCC)" \
                LD='$(CC)' \
+               PKG_CONFIG="$(tc-getPKG_CONFIG)" \
                HAVE_GTK2=no \
                HAVE_LLVM=no \
                HAVE_LIBXML=no \