Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] mesa: i686-musl cross-compile fix
@ 2024-05-27 15:18 tddys
  2024-05-27 15:39 ` [PR PATCH] [Closed]: " tddys
  2024-05-27 15:39 ` tddys
  0 siblings, 2 replies; 3+ messages in thread
From: tddys @ 2024-05-27 15:18 UTC (permalink / raw)
  To: ml

[-- 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
+}

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

* Re: [PR PATCH] [Closed]: mesa: i686-musl cross-compile fix
  2024-05-27 15:18 [PR PATCH] mesa: i686-musl cross-compile fix tddys
@ 2024-05-27 15:39 ` tddys
  2024-05-27 15:39 ` tddys
  1 sibling, 0 replies; 3+ messages in thread
From: tddys @ 2024-05-27 15:39 UTC (permalink / raw)
  To: ml

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

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

mesa: i686-musl cross-compile fix
https://github.com/void-linux/void-packages/pull/50540

Description:
#### 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


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

* Re: mesa: i686-musl cross-compile fix
  2024-05-27 15:18 [PR PATCH] mesa: i686-musl cross-compile fix tddys
  2024-05-27 15:39 ` [PR PATCH] [Closed]: " tddys
@ 2024-05-27 15:39 ` tddys
  1 sibling, 0 replies; 3+ messages in thread
From: tddys @ 2024-05-27 15:39 UTC (permalink / raw)
  To: ml

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

New comment by tddys on void-packages repository

https://github.com/void-linux/void-packages/pull/50540#issuecomment-2133715501

Comment:
OK, I'll try and find another way.

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

end of thread, other threads:[~2024-05-27 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-27 15:18 [PR PATCH] mesa: i686-musl cross-compile fix tddys
2024-05-27 15:39 ` [PR PATCH] [Closed]: " tddys
2024-05-27 15:39 ` tddys

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