Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xbps-src: hook to remove & warn cross cruft
@ 2020-05-23  5:40 sgn
  2020-05-23  6:16 ` [PR PATCH] [Updated] " sgn
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sgn @ 2020-05-23  5:40 UTC (permalink / raw)
  To: ml

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

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

https://github.com/sgn/void-packages remove-cross-cruft
https://github.com/void-linux/void-packages/pull/22218

xbps-src: hook to remove & warn cross cruft
See #22139 

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-remove-cross-cruft-22218.patch --]
[-- Type: text/x-diff, Size: 4452 bytes --]

From 6f72224b506f324e1e41a2988e3c197775deef61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Wed, 20 May 2020 07:07:07 +0700
Subject: [PATCH 1/4] post-install: clean reference to $XBPS_CROSS_BASE in
 pkgconfig

---
 ...13-pkg-config-clean-xbps-cross-base-ref.sh | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh

diff --git a/common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh b/common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh
new file mode 100644
index 00000000000..998c1917abd
--- /dev/null
+++ b/common/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh
@@ -0,0 +1,22 @@
+# This hook removes reference to $XBPS_CROSS_BASE in
+# /usr/{lib,share}/pkgconfig/*.pc
+#
+# We don't touch /usr/bin/*-config since there're other information that
+# references $XBPS_CROSS_BASE
+
+hook() {
+	if [ -z "$CROSS_BUILD" ]; then
+		return 0
+	fi
+	for f in "$PKGDESTDIR"/usr/lib/pkgconfig/*.pc \
+		"$PKGDESTDIR"/usr/share/pkgconfig/*.pc
+	do
+		if [ -f "$f" ]; then
+			# Sample sed script
+			# s,/usr/armv7l-linux-musleabihf/,/,g
+			# trailing / to avoid clashing with other $XBPS_CROSS_BASE and
+			# $XBPS_CROSS_TRIPLET reference.
+			sed -i -e "s,$XBPS_CROSS_BASE/,/,g" "$f"
+		fi
+	done
+}

From 33525623a799b7c59ccf8811591f27c8dfba674d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 23 May 2020 12:29:12 +0700
Subject: [PATCH 2/4] post-install: warn if cross wrapper not cleared

---
 .../99-pkglint-warn-cross-cruft.sh            | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 common/hooks/post-install/99-pkglint-warn-cross-cruft.sh

diff --git a/common/hooks/post-install/99-pkglint-warn-cross-cruft.sh b/common/hooks/post-install/99-pkglint-warn-cross-cruft.sh
new file mode 100644
index 00000000000..e3d002c88e7
--- /dev/null
+++ b/common/hooks/post-install/99-pkglint-warn-cross-cruft.sh
@@ -0,0 +1,22 @@
+# This hook warns those informations:
+# - Any text file contains $XBPS_CROSS_BASE
+# - Any text file contains $XBPS_WRAPPERDIR
+
+hook() {
+	if [ -z "$CROSS_BUILD" ]; then
+		return 0
+	fi
+	for f in $PKGDESTDIR/usr/bin/**/* \
+		$PKGDESTDIR/usr/lib/**/* \
+		$PKGDESTDIR/usr/libexec/**/* \
+		$PKGDESTDIR/usr/share/**/*
+	do
+		case "$(file -bi "$f")" in
+		text/*)
+			if grep -q -e "$XBPS_CROSS_BASE" -e "$XBPS_WRAPPERDIR" "$f"; then
+				msg_warn "$f has cross cruft"
+			fi
+			;;
+		esac
+	done
+}

From eb61629441a087b01cef0d66bfdb3805ee3a0f9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Wed, 20 May 2020 08:03:02 +0700
Subject: [PATCH 3/4] coin3: remove $XBPS_CROSS_BASE cruft

---
 srcpkgs/coin3/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/coin3/template b/srcpkgs/coin3/template
index e009eebc97f..4150c863e9f 100644
--- a/srcpkgs/coin3/template
+++ b/srcpkgs/coin3/template
@@ -1,7 +1,7 @@
 # Template file for 'coin3'
 pkgname=coin3
 version=3.1.3
-revision=4
+revision=5
 wrksrc="Coin-${version}"
 build_style=gnu-configure
 configure_args="--includedir=/usr/include/Coin3 --disable-dependency-tracking
@@ -44,6 +44,14 @@ post_configure() {
 	esac
 }
 
+post_install() {
+	if [ "$CROSS_BUILD" ]; then
+		sed -i -e "s,$XBPS_CROSS_BASE,,g" \
+			$DESTDIR/usr/share/Coin/conf/coin-default.cfg \
+			$DESTDIR/usr/lib/pkgconfig/Coin.pc
+	fi
+}
+
 coin3-devel_package() {
 	short_desc+=" - development files"
 	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"

From 585f559a14f7f968784072258c387ef98fd496c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 23 May 2020 11:44:07 +0700
Subject: [PATCH 4/4] serf: revbump to remove XBPS_CROSS_BASE

[ci skip]
---
 srcpkgs/serf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/serf/template b/srcpkgs/serf/template
index de6101439df..6fdcf782458 100644
--- a/srcpkgs/serf/template
+++ b/srcpkgs/serf/template
@@ -1,7 +1,7 @@
 # Template file for 'serf'
 pkgname=serf
 version=1.3.9
-revision=10
+revision=11
 build_style=scons
 make_build_args="PREFIX=/usr"
 hostmakedepends="libressl-devel"

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

end of thread, other threads:[~2020-05-31  2:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23  5:40 [PR PATCH] xbps-src: hook to remove & warn cross cruft sgn
2020-05-23  6:16 ` [PR PATCH] [Updated] " sgn
2020-05-23  7:33 ` sgn
2020-05-23  7:54 ` sgn
2020-05-23  8:08 ` sgn
2020-05-31  2:10 ` [PR PATCH] [Merged]: " sgn

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).