premake: Enable aarch64 builds (#25882)

* Handle architecture mismatch
This commit is contained in:
Hernan Martinez 2025-10-09 22:24:16 -06:00 committed by GitHub
parent cb923a0d35
commit cd4d58f3f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 37 additions and 6 deletions

View File

@ -0,0 +1,12 @@
diff -bur premake-core-5.0.0-beta6-orig/src/base/oven.lua premake-core-5.0.0-beta6/src/base/oven.lua
--- premake-core-5.0.0-beta6-orig/src/base/oven.lua 2025-10-09 17:37:38.491740000 -0600
+++ premake-core-5.0.0-beta6/src/base/oven.lua 2025-10-09 17:37:42.317508600 -0600
@@ -874,7 +874,7 @@
-- assign human-readable names
cfg.longname = table.concat({ cfg.buildcfg, cfg.platform }, "|")
cfg.shortname = table.concat({ cfg.buildcfg, cfg.platform }, " ")
- cfg.shortname = cfg.shortname:gsub(" ", "_"):lower()
+ cfg.shortname = cfg.shortname:gsub(" ", "_")
cfg.name = cfg.longname
-- compute build and link targets

View File

@ -6,18 +6,35 @@ pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=5.0beta6
_realver=5.0.0-beta6
pkgrel=1
pkgrel=2
pkgdesc="A simple build configuration and project generation tool (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://premake.github.io/"
msys2_repository_url="https://github.com/premake/premake-core"
license=('spdx:BSD-3-Clause')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc")
source=("https://github.com/premake/premake-core/archive/v${_realver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('b46990b80aaa9e8f84ed628f179dfa55d1bae40de1be1239d7b27b22fa838989')
source=("https://github.com/premake/premake-core/archive/v${_realver}/${_realname}-${pkgver}.tar.gz"
"001-sensitive-arch.patch")
sha256sums=('b46990b80aaa9e8f84ed628f179dfa55d1bae40de1be1239d7b27b22fa838989'
'925d746addfd12dbaf1ef4a78615c0335b04caa8ff3affcbf6c1760f8e4b7c4f')
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
prepare() {
cd ${_realname}-core-${_realver}
apply_patch_with_msg \
001-sensitive-arch.patch
cd "${srcdir}"
rm -rf "build-${MSYSTEM}"
cp -r "${_realname}-core-${_realver}" "build-${MSYSTEM}"
cd "build-${MSYSTEM}"
@ -26,9 +43,9 @@ prepare() {
build() {
declare -a _config
if check_option "debug" "n"; then
_config="release"
_config="Release"
else
_config="debug"
_config="Debug"
fi
declare -a _arch
@ -36,6 +53,8 @@ build() {
_arch="x86"
elif [ "$CARCH" = "x86_64" ]; then
_arch="x64"
elif [ "$CARCH" = "aarch64" ]; then
_arch="ARM64"
fi
echo "==> Building for ${_config} ${_arch}"