From: tddys <tddys@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] mesa: i686-musl cross-compile fix
Date: Mon, 27 May 2024 17:18:51 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50540@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
There is a new pull request by tddys against master on the void-packages repository
https://github.com/tddys/void-packages mesa
https://github.com/void-linux/void-packages/pull/50540
mesa: i686-musl cross-compile fix
#### Testing the changes
- I tested the changes in this PR: **YES**
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64
- aarch64-musl
- armv7l
- armv7l-musl
- x86_64
- x86_64-musl
- i686
- i686-musl
A patch file from https://github.com/void-linux/void-packages/pull/50540.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mesa-50540.patch --]
[-- Type: text/x-diff, Size: 1587 bytes --]
From 5b1695b80a3c4bb483a3d1913d93652ac83d1549 Mon Sep 17 00:00:00 2001
From: tddys <tddys@proton.me>
Date: Mon, 27 May 2024 17:10:40 +0200
Subject: [PATCH] mesa i686-musl cross-compile fix
---
srcpkgs/mesa/template | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template
index 0710fee6a872a3..5f1970efeb91b4 100644
--- a/srcpkgs/mesa/template
+++ b/srcpkgs/mesa/template
@@ -184,6 +184,18 @@ case "$XBPS_TARGET_MACHINE" in
ppc*) configure_args+=" -Dpower8=false" ;;
esac
+post_extract() {
+ # Patch for glibc-devel when cross-building to i686-musl
+ if [ ! -z "${CROSS_BUILD}" ]; then
+ case "$XBPS_TARGET_MACHINE" in
+ i686-musl)
+ cp -af /usr/include/sys/single_threaded.h /usr/include/sys/single_threaded.h.bak
+ sed -i 's@__BEGIN_DECLS@#ifdef __cplusplus\nextern "C" {\n#endif@g' /usr/include/sys/single_threaded.h
+ sed -i 's@__END_DECLS@#ifdef __cplusplus\n}\n#endif@g' /usr/include/sys/single_threaded.h ;;
+ esac
+ fi
+}
+
post_configure() {
if [ "$CROSS_BUILD" ]; then
find -iname "*.ninja" -exec sed -i "{}" \
@@ -454,3 +466,14 @@ mesa-vc4-dri_package() {
short_desc="Mesa DRI drivers for Videocore IV GPU (transitional dummy package)"
depends="mesa-dri"
}
+
+do_clean() {
+ # Cleanup of patch for glibc-devel when cross-building to i686-musl
+ if [ ! -z "${CROSS_BUILD}" ]; then
+ case "$XBPS_TARGET_MACHINE" in
+ i686-musl)
+ rm -f /usr/include/sys/single_threaded.h
+ mv -f /usr/include/sys/single_threaded.h.bak /usr/include/sys/single_threaded.h ;;
+ esac
+ fi
+}
next reply other threads:[~2024-05-27 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 15:18 tddys [this message]
2024-05-27 15:39 ` [PR PATCH] [Closed]: " tddys
2024-05-27 15:39 ` tddys
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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50540@inbox.vuxu.org \
--to=tddys@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).