Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xbps-src: some changes to pkg-config wrapper
@ 2020-05-07 17:47 Johnnynator
  2020-05-12 19:13 ` Piraty
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johnnynator @ 2020-05-07 17:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

There is a new pull request by Johnnynator against master on the void-packages repository

https://github.com/Johnnynator/void-packages pkg-config
https://github.com/void-linux/void-packages/pull/21728

xbps-src: some changes to pkg-config wrapper
None

A patch file from https://github.com/void-linux/void-packages/pull/21728.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg-config-21728.patch --]
[-- Type: text/x-diff, Size: 4490 bytes --]

From 1e2638d5c4b0b2ce6e3d86162d5933fab52cb6ba Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
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 <me@johnnynator.dev>
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 <me@johnnynator.dev>
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
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xbps-src: some changes to pkg-config wrapper
  2020-05-07 17:47 [PR PATCH] xbps-src: some changes to pkg-config wrapper Johnnynator
@ 2020-05-12 19:13 ` Piraty
  2020-05-13  0:24 ` Johnnynator
  2020-05-26 19:22 ` [PR PATCH] [Closed]: " Johnnynator
  2 siblings, 0 replies; 4+ messages in thread
From: Piraty @ 2020-05-12 19:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

New comment by Piraty on void-packages repository

https://github.com/void-linux/void-packages/pull/21728#issuecomment-627538085

Comment:
Do you really see fit for more templates besides gimp?
`no_generic_pkgconfig_link` requires an entry in Manual.md

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xbps-src: some changes to pkg-config wrapper
  2020-05-07 17:47 [PR PATCH] xbps-src: some changes to pkg-config wrapper Johnnynator
  2020-05-12 19:13 ` Piraty
@ 2020-05-13  0:24 ` Johnnynator
  2020-05-26 19:22 ` [PR PATCH] [Closed]: " Johnnynator
  2 siblings, 0 replies; 4+ messages in thread
From: Johnnynator @ 2020-05-13  0:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

New comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/21728#issuecomment-627669842

Comment:
The qt5-webengine template can also benefit from this. I'm not fully sure about bff002f3d8a845156dc00f7869056c41c2db8b0e yet, but there is imo no reason to not set the env vars always.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Closed]: xbps-src: some changes to pkg-config wrapper
  2020-05-07 17:47 [PR PATCH] xbps-src: some changes to pkg-config wrapper Johnnynator
  2020-05-12 19:13 ` Piraty
  2020-05-13  0:24 ` Johnnynator
@ 2020-05-26 19:22 ` Johnnynator
  2 siblings, 0 replies; 4+ messages in thread
From: Johnnynator @ 2020-05-26 19:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

There's a closed pull request on the void-packages repository

xbps-src: some changes to pkg-config wrapper
https://github.com/void-linux/void-packages/pull/21728

Description:
None

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-26 19:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 17:47 [PR PATCH] xbps-src: some changes to pkg-config wrapper Johnnynator
2020-05-12 19:13 ` Piraty
2020-05-13  0:24 ` Johnnynator
2020-05-26 19:22 ` [PR PATCH] [Closed]: " Johnnynator

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).