Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xonotic: allow cross-compilation
@ 2025-01-01 12:08 Emru1
  2025-01-01 12:18 ` [PR PATCH] [Updated] " Emru1
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Emru1 @ 2025-01-01 12:08 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Emru1/void-packages xonotic_cross
https://github.com/void-linux/void-packages/pull/53786

xonotic: allow cross-compilation
sources/darkplaces/makefile checks arch with `uname -m`, which gives host arch, not target one, and then applies some AMD64-exclusive flags if it's compiled on AMD64, which causes breaks.

Also, some configure script checks if it can execute compiled stuff, so I've added build_helper=qemu

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO** (only building)

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, amd64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-glibc



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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xonotic_cross-53786.patch --]
[-- Type: text/x-diff, Size: 1614 bytes --]

From 6ace74f47d0787424f5d7e9d204dc386a685af70 Mon Sep 17 00:00:00 2001
From: Emil Tomczyk <emru@emru.xyz>
Date: Wed, 1 Jan 2025 13:05:41 +0100
Subject: [PATCH] xonotic: allow cross-compilation

sources/darkplaces/makefile checks arch with `uname -m`, which gives
host arch, not target one, and then applies some AMD64-exclusive flags
if it's compiled on AMD64, which causes breaks.

Also, some configure script checks if it can execute compiled stuff,
so I've added build_helper=qemu
---
 srcpkgs/xonotic/template | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/xonotic/template b/srcpkgs/xonotic/template
index 4c632a6ba15508..def3bf7131c68e 100644
--- a/srcpkgs/xonotic/template
+++ b/srcpkgs/xonotic/template
@@ -1,7 +1,8 @@
 # Template file for 'xonotic'
 pkgname=xonotic
 version=0.8.6
-revision=2
+revision=3
+build_helper=qemu
 hostmakedepends="unzip automake libtool"
 makedepends="gmp-devel MesaLib-devel SDL2-devel libcurl-devel alsa-lib-devel
  libmodplug-devel libvorbis-devel libXpm-devel libjpeg-turbo-devel
@@ -13,7 +14,6 @@ license="GPL-2.0-or-later, BSD-3-Clause"
 homepage="http://xonotic.org"
 distfiles="https://dl.xonotic.org/xonotic-${version}-source.zip"
 checksum=8b92ac781cff4ae89c121a23eacd7dec05a2aabedaccc23a19d1a0958b4012a8
-nocross=yes
 
 do_build() {
 	local target
@@ -25,6 +25,8 @@ do_build() {
 	esac
 	echo $make_build_args
 	cd source/darkplaces
+	sed -i makefile \
+		-e "s;DP_MACHINE:=.*;DP_MACHINE:=$XBPS_TARGET_MACHINE;"
 	# Inject our $CFLAGS and $LDFLAGS
 	sed -i makefile.inc \
 		-e "s;^\(CPUOPTIMIZATIONS\)?=\(.*\);\1=${CFLAGS} \2;" \

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

* Re: [PR PATCH] [Updated] xonotic: allow cross-compilation
  2025-01-01 12:08 [PR PATCH] xonotic: allow cross-compilation Emru1
@ 2025-01-01 12:18 ` Emru1
  2025-01-01 13:01 ` [PR REVIEW] " Johnnynator
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Emru1 @ 2025-01-01 12:18 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by Emru1 against master on the void-packages repository

https://github.com/Emru1/void-packages xonotic_cross
https://github.com/void-linux/void-packages/pull/53786

xonotic: allow cross-compilation
sources/darkplaces/makefile checks arch with `uname -m`, which gives host arch, not target one, and then applies some AMD64-exclusive flags if it's compiled on AMD64, which causes breaks.

Also, some configure script checks if it can execute compiled stuff, so I've added build_helper=qemu

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO** (only building)

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, amd64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-glibc



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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xonotic_cross-53786.patch --]
[-- Type: text/x-diff, Size: 1715 bytes --]

From 48b10b5905738e052f6b030a57bece3f56a6eb6b Mon Sep 17 00:00:00 2001
From: Emil Tomczyk <emru@emru.xyz>
Date: Wed, 1 Jan 2025 13:05:41 +0100
Subject: [PATCH] xonotic: allow cross-compilation

sources/darkplaces/makefile checks arch with `uname -m`, which gives
host arch, not target one, and then applies some AMD64-exclusive flags
if it's compiled on AMD64, which causes breaks.
---
 srcpkgs/xonotic/template | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xonotic/template b/srcpkgs/xonotic/template
index 4c632a6ba15508..42d548b624db11 100644
--- a/srcpkgs/xonotic/template
+++ b/srcpkgs/xonotic/template
@@ -1,7 +1,7 @@
 # Template file for 'xonotic'
 pkgname=xonotic
 version=0.8.6
-revision=2
+revision=3
 hostmakedepends="unzip automake libtool"
 makedepends="gmp-devel MesaLib-devel SDL2-devel libcurl-devel alsa-lib-devel
  libmodplug-devel libvorbis-devel libXpm-devel libjpeg-turbo-devel
@@ -13,7 +13,6 @@ license="GPL-2.0-or-later, BSD-3-Clause"
 homepage="http://xonotic.org"
 distfiles="https://dl.xonotic.org/xonotic-${version}-source.zip"
 checksum=8b92ac781cff4ae89c121a23eacd7dec05a2aabedaccc23a19d1a0958b4012a8
-nocross=yes
 
 do_build() {
 	local target
@@ -25,6 +24,8 @@ do_build() {
 	esac
 	echo $make_build_args
 	cd source/darkplaces
+	sed -i makefile \
+		-e "s;DP_MACHINE:=.*;DP_MACHINE:=$XBPS_TARGET_MACHINE;"
 	# Inject our $CFLAGS and $LDFLAGS
 	sed -i makefile.inc \
 		-e "s;^\(CPUOPTIMIZATIONS\)?=\(.*\);\1=${CFLAGS} \2;" \
@@ -35,7 +36,7 @@ do_build() {
 
 	cd ${wrksrc}/source/d0_blind_id
 	autoreconf -fi
-	./configure --prefix=/usr --disable-rijndael
+	./configure --prefix=/usr --disable-rijndael --host=$(uname -m)
 	make ${makejobs}
 }
 

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

* Re: [PR REVIEW] xonotic: allow cross-compilation
  2025-01-01 12:08 [PR PATCH] xonotic: allow cross-compilation Emru1
  2025-01-01 12:18 ` [PR PATCH] [Updated] " Emru1
@ 2025-01-01 13:01 ` Johnnynator
  2025-01-01 14:30 ` [PR PATCH] [Updated] " Emru1
  2025-01-02 12:01 ` [PR PATCH] [Merged]: " Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2025-01-01 13:01 UTC (permalink / raw)
  To: ml

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

New review comment by Johnnynator on void-packages repository

https://github.com/void-linux/void-packages/pull/53786#discussion_r1900394019

Comment:
This expands to e.g. `x86_64-musl` and later checks won't pass as intended, you want `${XBPS_TARGET_MACHINE/-musl/}`

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

* Re: [PR PATCH] [Updated] xonotic: allow cross-compilation
  2025-01-01 12:08 [PR PATCH] xonotic: allow cross-compilation Emru1
  2025-01-01 12:18 ` [PR PATCH] [Updated] " Emru1
  2025-01-01 13:01 ` [PR REVIEW] " Johnnynator
@ 2025-01-01 14:30 ` Emru1
  2025-01-02 12:01 ` [PR PATCH] [Merged]: " Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Emru1 @ 2025-01-01 14:30 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by Emru1 against master on the void-packages repository

https://github.com/Emru1/void-packages xonotic_cross
https://github.com/void-linux/void-packages/pull/53786

xonotic: allow cross-compilation
sources/darkplaces/makefile checks arch with `uname -m`, which gives host arch, not target one, and then applies some AMD64-exclusive flags if it's compiled on AMD64, which causes breaks.


<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO** (only building)

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, amd64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-glibc



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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xonotic_cross-53786.patch --]
[-- Type: text/x-diff, Size: 1723 bytes --]

From e1bee77f6391c0c3699be4c2db69d199dee4f284 Mon Sep 17 00:00:00 2001
From: Emil Tomczyk <emru@emru.xyz>
Date: Wed, 1 Jan 2025 13:05:41 +0100
Subject: [PATCH] xonotic: allow cross-compilation

sources/darkplaces/makefile checks arch with `uname -m`, which gives
host arch, not target one, and then applies some AMD64-exclusive flags
if it's compiled on AMD64, which causes breaks.
---
 srcpkgs/xonotic/template | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/xonotic/template b/srcpkgs/xonotic/template
index 4c632a6ba15508..1929bd27212b21 100644
--- a/srcpkgs/xonotic/template
+++ b/srcpkgs/xonotic/template
@@ -1,7 +1,7 @@
 # Template file for 'xonotic'
 pkgname=xonotic
 version=0.8.6
-revision=2
+revision=3
 hostmakedepends="unzip automake libtool"
 makedepends="gmp-devel MesaLib-devel SDL2-devel libcurl-devel alsa-lib-devel
  libmodplug-devel libvorbis-devel libXpm-devel libjpeg-turbo-devel
@@ -13,7 +13,6 @@ license="GPL-2.0-or-later, BSD-3-Clause"
 homepage="http://xonotic.org"
 distfiles="https://dl.xonotic.org/xonotic-${version}-source.zip"
 checksum=8b92ac781cff4ae89c121a23eacd7dec05a2aabedaccc23a19d1a0958b4012a8
-nocross=yes
 
 do_build() {
 	local target
@@ -25,6 +24,8 @@ do_build() {
 	esac
 	echo $make_build_args
 	cd source/darkplaces
+	sed -i makefile \
+		-e "s;DP_MACHINE:=.*;DP_MACHINE:=${XBPS_TARGET_MACHINE/-musl};"
 	# Inject our $CFLAGS and $LDFLAGS
 	sed -i makefile.inc \
 		-e "s;^\(CPUOPTIMIZATIONS\)?=\(.*\);\1=${CFLAGS} \2;" \
@@ -35,7 +36,7 @@ do_build() {
 
 	cd ${wrksrc}/source/d0_blind_id
 	autoreconf -fi
-	./configure --prefix=/usr --disable-rijndael
+	./configure --prefix=/usr --disable-rijndael --host=$(uname -m)
 	make ${makejobs}
 }
 

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

* Re: [PR PATCH] [Merged]: xonotic: allow cross-compilation
  2025-01-01 12:08 [PR PATCH] xonotic: allow cross-compilation Emru1
                   ` (2 preceding siblings ...)
  2025-01-01 14:30 ` [PR PATCH] [Updated] " Emru1
@ 2025-01-02 12:01 ` Johnnynator
  3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2025-01-02 12:01 UTC (permalink / raw)
  To: ml

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

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

xonotic: allow cross-compilation
https://github.com/void-linux/void-packages/pull/53786

Description:
sources/darkplaces/makefile checks arch with `uname -m`, which gives host arch, not target one, and then applies some AMD64-exclusive flags if it's compiled on AMD64, which causes breaks.


<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO** (only building)

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, amd64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-glibc



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

end of thread, other threads:[~2025-01-02 12:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-01 12:08 [PR PATCH] xonotic: allow cross-compilation Emru1
2025-01-01 12:18 ` [PR PATCH] [Updated] " Emru1
2025-01-01 13:01 ` [PR REVIEW] " Johnnynator
2025-01-01 14:30 ` [PR PATCH] [Updated] " Emru1
2025-01-02 12:01 ` [PR PATCH] [Merged]: " Johnnynator

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