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 09:54:07 +0200	[thread overview]
Message-ID: <20200523075407.I-gfZpGAdaX7vNH_slIFoKfKjcEAxcvYAHmLKA_u4sA@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: 423 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 

(I'll add as much as possible packages, but this PR can be merged as is)

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: 6574 bytes --]

From c591ce4625519d9eb139651b00dde7027434234e 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/6] 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..5cdfb0e9bfd
--- /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/usr,/usr,g
+			# trailing /usr to avoid clashing with
+			# other $XBPS_CROSS_BASE and $XBPS_CROSS_TRIPLET.
+			sed -i -e "s,$XBPS_CROSS_BASE/usr,/usr,g" "$f"
+		fi
+	done
+}

From af695acb0976a49bc9a271c345417dafdd1f58a8 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/6] 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 114ead39f9a42622f65d8faa679d6fa701900f44 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/6] 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 07e8864fce85f2ac2a08a07c0a4dd21c9d1872d6 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/6] 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 bb57169faedd835f1ff80f318d995948efdc1b30 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/6] 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() {

From 10cd48e41ec66552e93192a111ddbdbade6aa624 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 14:23:27 +0700
Subject: [PATCH 6/6] ImageMagick: remove $XBPS_WRAPPERDIR cruft

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

diff --git a/srcpkgs/ImageMagick/template b/srcpkgs/ImageMagick/template
index 08275b47ce4..10f1467ebd1 100644
--- a/srcpkgs/ImageMagick/template
+++ b/srcpkgs/ImageMagick/template
@@ -3,7 +3,7 @@ pkgname=ImageMagick
 _majorver=7.0.10
 _patchver=12
 version="${_majorver}.${_patchver}"
-revision=1
+revision=2
 wrksrc="${pkgname}-${_majorver}-${_patchver}"
 build_style=gnu-configure
 configure_args="--without-autotrace --with-wmf=yes
@@ -47,6 +47,10 @@ do_check() {
 }
 
 post_install() {
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i -e "s,$XBPS_WRAPPERDIR/$XBPS_CROSS_TRIPLET-,,g" \
+			$DESTDIR/usr/bin/*-config
+	fi
 	vlicense LICENSE
 	vlicense NOTICE
 }

  parent reply	other threads:[~2020-05-23  7:54 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 ` [PR PATCH] [Updated] " sgn
2020-05-23  7:33 ` sgn
2020-05-23  7:54 ` sgn [this message]
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=20200523075407.I-gfZpGAdaX7vNH_slIFoKfKjcEAxcvYAHmLKA_u4sA@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).