Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] xbps-src: hook to remove & warn cross cruft
Date: Sat, 23 May 2020 08:16:40 +0200	[thread overview]
Message-ID: <20200523061640.ags_qk-hImFiEIaXtkQp-nitD58reuDecGvHgpLkBtM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22218@inbox.vuxu.org>

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

There is an updated 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: 5542 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/5] 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 ef5eb55af98458cafaad5d3cadbd0aa996d47d68 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/5] post-install: warn if cross wrapper not cleared

---
 .../99-pkglint-warn-cross-cruft.sh            | 21 +++++++++++++++++++
 1 file changed, 21 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..16e6c5ff656
--- /dev/null
+++ b/common/hooks/post-install/99-pkglint-warn-cross-cruft.sh
@@ -0,0 +1,21 @@
+# This hook warns if :
+# - Any text file /usr/{bin,lib,libexec,share} contains $XBPS_CROSS_BASE
+# - Any text file /usr/{bin,lib,libexec,share} contains $XBPS_WRAPPERDIR
+
+hook() {
+	if [ -z "$CROSS_BUILD" ]; then
+		return 0
+	fi
+	for d in bin lib libexec share; do
+		for f in $PKGDESTDIR/usr/$d/* $PKGDESTDIR/usr/$d/**/*; do
+			case "$(file -bi "$f")" in
+			text/*) if grep -q -e "$XBPS_CROSS_BASE" \
+					   -e "$XBPS_WRAPPERDIR" "$f"; then
+					msg_warn "${f#$PKGDESTDIR} has cross cruft\n"
+				fi
+				;;
+			esac
+		done
+	done
+	return 0;
+}

From 8b83b0bd13d12a897466d878c57b918fac5fc4e8 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/5] 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 f0db6c1de2b59a37e48416c2a53ccb462d774a45 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/5] 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"

From 29e1052b30b5a17de945dc7592bc55102a6d22d2 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:43:20 +0700
Subject: [PATCH 5/5] ncurses: remove $XBPS_CROSS_BASE

[ci skip]
---
 srcpkgs/ncurses/template | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ncurses/template b/srcpkgs/ncurses/template
index 2e346236043..b7c30b07344 100644
--- a/srcpkgs/ncurses/template
+++ b/srcpkgs/ncurses/template
@@ -1,7 +1,7 @@
 # Template file for 'ncurses'
 pkgname=ncurses
 version=6.2
-revision=1
+revision=2
 bootstrap=yes
 configure_args="--enable-big-core"
 short_desc="System V Release 4.0 curses emulation library"
@@ -90,6 +90,10 @@ do_install() {
 
 	ln -sf ncursesw6-config ${DESTDIR}/usr/bin/ncursesw5-config
 	ln -sf ncursesw6-config ${DESTDIR}/usr/bin/ncurses5-config
+
+	if [ "$CROSS_BUILD" ]; then
+		sed -i -e "s,-L$XBPS_CROSS_BASE,-L,g" ${DESTDIR}/usr/bin/ncursesw6-config
+	fi
 }
 
 ncurses-libs_package() {

  reply	other threads:[~2020-05-23  6:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23  5:40 [PR PATCH] " sgn
2020-05-23  6:16 ` sgn [this message]
2020-05-23  7:33 ` [PR PATCH] [Updated] " sgn
2020-05-23  7:54 ` sgn
2020-05-23  8:08 ` sgn
2020-05-31  2:10 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200523061640.ags_qk-hImFiEIaXtkQp-nitD58reuDecGvHgpLkBtM@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).