From 1e2638d5c4b0b2ce6e3d86162d5933fab52cb6ba Mon Sep 17 00:00:00 2001 From: John Date: Thu, 7 May 2020 19:43:49 +0200 Subject: [PATCH 1/3] common/xbps-src: set PKG_CONFIG{,FOR_BUILD} env vars --- common/build-style/meson.sh | 3 +-- common/build-style/qmake.sh | 2 +- common/xbps-src/shutils/common.sh | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/build-style/meson.sh b/common/build-style/meson.sh index 38bbddd765a..3302171504b 100644 --- a/common/build-style/meson.sh +++ b/common/build-style/meson.sh @@ -52,7 +52,7 @@ ld = '${LD}' strip = '${STRIP}' readelf = '${READELF}' objcopy = '${OBJCOPY}' -pkgconfig = 'pkg-config' +pkgconfig = '${PKG_CONFIG}' rust = 'rustc' g-ir-scanner = '${XBPS_CROSS_BASE}/usr/bin/g-ir-scanner' g-ir-compiler = '${XBPS_CROSS_BASE}/usr/bin/g-ir-compiler' @@ -88,7 +88,6 @@ do_configure() { if [ "$CROSS_BUILD" ]; then configure_args+=" --cross-file=${meson_crossfile}" - export PKG_CONFIG_FOR_BUILD="/usr/bin/pkg-config" fi ${meson_cmd} \ diff --git a/common/build-style/qmake.sh b/common/build-style/qmake.sh index 33762e2324d..14d071cd85a 100644 --- a/common/build-style/qmake.sh +++ b/common/build-style/qmake.sh @@ -107,7 +107,7 @@ HostLibraries=/usr/lib Spec=${wrksrc}/.host-spec/linux-g++ TargetSpec=${wrksrc}/.target-spec/linux-g++ _EOF - qmake_args="-qtconf ${wrksrc}/qt.conf PKG_CONFIG_EXECUTABLE=${XBPS_WRAPPERDIR}/pkg-config" + qmake_args="-qtconf ${wrksrc}/qt.conf PKG_CONFIG_EXECUTABLE=${XBPS_WRAPPERDIR}/${PKG_CONFIG}" ${qmake} ${qmake_args} \ PREFIX=/usr \ QT_INSTALL_PREFIX=/usr \ diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 44a92d52361..5ddf57a0330 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -514,6 +514,7 @@ setup_pkg() { export CPP_FOR_BUILD="cpp" export FC_FOR_BUILD="gfortran" export LD_FOR_BUILD="ld" + export PKG_CONFIG_FOR_BUILD="/usr/bin/pkg-config" export CFLAGS_FOR_BUILD="$XBPS_CFLAGS" export CXXFLAGS_FOR_BUILD="$XBPS_CXXFLAGS" export CPPFLAGS_FOR_BUILD="$XBPS_CPPFLAGS" @@ -536,6 +537,7 @@ setup_pkg() { export OBJCOPY="${XBPS_CROSS_TRIPLET}-objcopy" export NM="${XBPS_CROSS_TRIPLET}-nm" export READELF="${XBPS_CROSS_TRIPLET}-readelf" + export PKG_CONFIG="${XBPS_CROSS_TRIPLET}-pkg-config" # Target tools export CC_target="$CC" export CXX_target="$CXX" From bff002f3d8a845156dc00f7869056c41c2db8b0e Mon Sep 17 00:00:00 2001 From: John Date: Thu, 7 May 2020 19:44:59 +0200 Subject: [PATCH 2/3] xbps-src/common: add option to disable generic pkg-config link --- common/hooks/pre-configure/02-script-wrapper.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/hooks/pre-configure/02-script-wrapper.sh b/common/hooks/pre-configure/02-script-wrapper.sh index 2b46a029223..cc38ceebd20 100644 --- a/common/hooks/pre-configure/02-script-wrapper.sh +++ b/common/hooks/pre-configure/02-script-wrapper.sh @@ -92,7 +92,9 @@ export PKG_CONFIG_LIBDIR="$XBPS_CROSS_BASE/usr/lib/pkgconfig\${PKG_CONFIG_LIBDIR exec /usr/bin/pkg-config "\$@" _EOF chmod 755 ${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config - ln -sf ${XBPS_CROSS_TRIPLET}-pkg-config ${XBPS_WRAPPERDIR}/pkg-config + if [ -z $no_generic_pkgconfig_link ]; then + ln -sf ${XBPS_CROSS_TRIPLET}-pkg-config ${XBPS_WRAPPERDIR}/pkg-config + fi } vapigen_wrapper() { From 9c733487a6f3ba65ea54dbea21ad0c1b6cc0b8d3 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 7 May 2020 19:45:16 +0200 Subject: [PATCH 3/3] gimp: use no_generic_pkgconfig_link --- srcpkgs/gimp/template | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/srcpkgs/gimp/template b/srcpkgs/gimp/template index 4c5b31c3291..364056a705c 100644 --- a/srcpkgs/gimp/template +++ b/srcpkgs/gimp/template @@ -20,13 +20,12 @@ distfiles="https://download.gimp.org/pub/gimp/v${version%.*}/gimp-${version}.tar checksum=65bfe111e8eebffd3dde3016ccb507f9948d2663d9497cb438d9bb609e11d716 python_version=2 #unverified lib32disabled=yes +no_generic_pkgconfig_link=yes pre_configure() { NOCONFIGURE=1 autoreconf -fi if [ "$CROSS_BUILD" ]; then sed -i 's:^py_prefix=`:py_prefix='"$XBPS_CROSS_BASE"'`:' configure - rm "${XBPS_WRAPPERDIR}/pkg-config" - export PKG_CONFIG="${XBPS_WRAPPERDIR}/${XBPS_CROSS_TRIPLET}-pkg-config" fi }