From 83b70b6994c62a69b07bfaeffd1a6454fa37230e Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 5 Dec 2021 03:25:16 +0000
Subject: dev-lang/swi-prolog: fix pkg-config call

Signed-off-by: Sam James <sam@gentoo.org>
---
 dev-lang/swi-prolog/swi-prolog-8.2.4-r3.ebuild | 6 ++++--
 dev-lang/swi-prolog/swi-prolog-8.4.0.ebuild    | 6 ++++--
 dev-lang/swi-prolog/swi-prolog-8.4.1.ebuild    | 6 ++++--
 dev-lang/swi-prolog/swi-prolog-8.5.1.ebuild    | 6 ++++--
 dev-lang/swi-prolog/swi-prolog-8.5.2.ebuild    | 6 ++++--
 5 files changed, 20 insertions(+), 10 deletions(-)

(limited to 'dev-lang/swi-prolog')

diff --git a/dev-lang/swi-prolog/swi-prolog-8.2.4-r3.ebuild b/dev-lang/swi-prolog/swi-prolog-8.2.4-r3.ebuild
index a11d78960fa2..f00cd2215eae 100644
--- a/dev-lang/swi-prolog/swi-prolog-8.2.4-r3.ebuild
+++ b/dev-lang/swi-prolog/swi-prolog-8.2.4-r3.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit cmake desktop xdg-utils flag-o-matic
+inherit cmake desktop xdg-utils flag-o-matic toolchain-funcs
 
 PATCHSET_VER="0"
 
@@ -49,6 +49,8 @@ DEPEND="${RDEPEND}
 	X? ( x11-base/xorg-proto )
 	java? ( test? ( =dev-java/junit-3.8* ) )"
 
+BDEPEND="virtual/pkgconfig"
+
 S="${WORKDIR}/swipl-${PV}"
 
 src_prepare() {
@@ -60,7 +62,7 @@ src_prepare() {
 		-e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1   $(get_libdir)/|" \
 		-i CMakeLists.txt || die
 
-	local ncurses_lib_flags=$(pkg-config --libs ncurses)
+	local ncurses_lib_flags=$($(tc-getPKG_CONFIG) --libs ncurses)
 	sed -i "/project(SWI-Prolog)/a set(CMAKE_REQUIRED_LIBRARIES \${CMAKE_REQUIRED_LIBRARIES} ${ncurses_lib_flags})" CMakeLists.txt || die
 	sed -i "s:\${CURSES_LIBRARIES}:${ncurses_lib_flags}:" src/CMakeLists.txt || die
 
diff --git a/dev-lang/swi-prolog/swi-prolog-8.4.0.ebuild b/dev-lang/swi-prolog/swi-prolog-8.4.0.ebuild
index e6d102021369..f00dfe509d7c 100644
--- a/dev-lang/swi-prolog/swi-prolog-8.4.0.ebuild
+++ b/dev-lang/swi-prolog/swi-prolog-8.4.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit cmake desktop xdg-utils flag-o-matic
+inherit cmake desktop xdg-utils flag-o-matic toolchain-funcs
 
 PATCHSET_VER="0"
 
@@ -49,6 +49,8 @@ DEPEND="${RDEPEND}
 	X? ( x11-base/xorg-proto )
 	java? ( test? ( =dev-java/junit-3.8* ) )"
 
+BDEPEND="virtual/pkgconfig"
+
 S="${WORKDIR}/swipl-${PV}"
 
 src_prepare() {
@@ -60,7 +62,7 @@ src_prepare() {
 		-e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1   $(get_libdir)/|" \
 		-i CMakeLists.txt || die
 
-	local ncurses_lib_flags=$(pkg-config --libs ncurses)
+	local ncurses_lib_flags=$($(tc-getPKG_CONFIG) --libs ncurses)
 	sed -i "/project(SWI-Prolog)/a set(CMAKE_REQUIRED_LIBRARIES \${CMAKE_REQUIRED_LIBRARIES} ${ncurses_lib_flags})" CMakeLists.txt || die
 	sed -i "s:\${CURSES_LIBRARIES}:${ncurses_lib_flags}:" src/CMakeLists.txt || die
 
diff --git a/dev-lang/swi-prolog/swi-prolog-8.4.1.ebuild b/dev-lang/swi-prolog/swi-prolog-8.4.1.ebuild
index e6d102021369..f00dfe509d7c 100644
--- a/dev-lang/swi-prolog/swi-prolog-8.4.1.ebuild
+++ b/dev-lang/swi-prolog/swi-prolog-8.4.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit cmake desktop xdg-utils flag-o-matic
+inherit cmake desktop xdg-utils flag-o-matic toolchain-funcs
 
 PATCHSET_VER="0"
 
@@ -49,6 +49,8 @@ DEPEND="${RDEPEND}
 	X? ( x11-base/xorg-proto )
 	java? ( test? ( =dev-java/junit-3.8* ) )"
 
+BDEPEND="virtual/pkgconfig"
+
 S="${WORKDIR}/swipl-${PV}"
 
 src_prepare() {
@@ -60,7 +62,7 @@ src_prepare() {
 		-e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1   $(get_libdir)/|" \
 		-i CMakeLists.txt || die
 
-	local ncurses_lib_flags=$(pkg-config --libs ncurses)
+	local ncurses_lib_flags=$($(tc-getPKG_CONFIG) --libs ncurses)
 	sed -i "/project(SWI-Prolog)/a set(CMAKE_REQUIRED_LIBRARIES \${CMAKE_REQUIRED_LIBRARIES} ${ncurses_lib_flags})" CMakeLists.txt || die
 	sed -i "s:\${CURSES_LIBRARIES}:${ncurses_lib_flags}:" src/CMakeLists.txt || die
 
diff --git a/dev-lang/swi-prolog/swi-prolog-8.5.1.ebuild b/dev-lang/swi-prolog/swi-prolog-8.5.1.ebuild
index 671e98da2c75..01e65b4777f1 100644
--- a/dev-lang/swi-prolog/swi-prolog-8.5.1.ebuild
+++ b/dev-lang/swi-prolog/swi-prolog-8.5.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit cmake desktop xdg-utils flag-o-matic
+inherit cmake desktop xdg-utils flag-o-matic toolchain-funcs
 
 PATCHSET_VER="0"
 
@@ -49,6 +49,8 @@ DEPEND="${RDEPEND}
 	X? ( x11-base/xorg-proto )
 	java? ( test? ( =dev-java/junit-3.8* ) )"
 
+BDEPEND="virtual/pkgconfig"
+
 S="${WORKDIR}/swipl-${PV}"
 
 src_prepare() {
@@ -60,7 +62,7 @@ src_prepare() {
 		-e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1   $(get_libdir)/|" \
 		-i CMakeLists.txt || die
 
-	local ncurses_lib_flags=$(pkg-config --libs ncurses)
+	local ncurses_lib_flags=$($(tc-getPKG_CONFIG) --libs ncurses)
 	sed -i "/project(SWI-Prolog)/a set(CMAKE_REQUIRED_LIBRARIES \${CMAKE_REQUIRED_LIBRARIES} ${ncurses_lib_flags})" CMakeLists.txt || die
 	sed -i "s:\${CURSES_LIBRARIES}:${ncurses_lib_flags}:" src/CMakeLists.txt || die
 
diff --git a/dev-lang/swi-prolog/swi-prolog-8.5.2.ebuild b/dev-lang/swi-prolog/swi-prolog-8.5.2.ebuild
index 671e98da2c75..01e65b4777f1 100644
--- a/dev-lang/swi-prolog/swi-prolog-8.5.2.ebuild
+++ b/dev-lang/swi-prolog/swi-prolog-8.5.2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit cmake desktop xdg-utils flag-o-matic
+inherit cmake desktop xdg-utils flag-o-matic toolchain-funcs
 
 PATCHSET_VER="0"
 
@@ -49,6 +49,8 @@ DEPEND="${RDEPEND}
 	X? ( x11-base/xorg-proto )
 	java? ( test? ( =dev-java/junit-3.8* ) )"
 
+BDEPEND="virtual/pkgconfig"
+
 S="${WORKDIR}/swipl-${PV}"
 
 src_prepare() {
@@ -60,7 +62,7 @@ src_prepare() {
 		-e "s|\(SWIPL_INSTALL_CMAKE_CONFIG_DIR\) lib/|\1   $(get_libdir)/|" \
 		-i CMakeLists.txt || die
 
-	local ncurses_lib_flags=$(pkg-config --libs ncurses)
+	local ncurses_lib_flags=$($(tc-getPKG_CONFIG) --libs ncurses)
 	sed -i "/project(SWI-Prolog)/a set(CMAKE_REQUIRED_LIBRARIES \${CMAKE_REQUIRED_LIBRARIES} ${ncurses_lib_flags})" CMakeLists.txt || die
 	sed -i "s:\${CURSES_LIBRARIES}:${ncurses_lib_flags}:" src/CMakeLists.txt || die
 
-- 
cgit v1.2.3-65-gdbad