irrlicht: Enable aarch64 builds (#24064)

This commit is contained in:
Hernan Martinez 2025-04-21 03:03:04 -06:00 committed by GitHub
parent 1888e21ded
commit 526ff9994e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 45 additions and 6 deletions

View File

@ -0,0 +1,14 @@
diff -bur irrlicht-1.8.5-o/source/Irrlicht/Makefile irrlicht-1.8.5/source/Irrlicht/Makefile
--- irrlicht-1.8.5-o/source/Irrlicht/Makefile 2025-04-20 19:14:14.318395200 -0600
+++ irrlicht-1.8.5/source/Irrlicht/Makefile 2025-04-20 19:14:42.227736400 -0600
@@ -54,6 +54,10 @@
LIBAESGM = aesGladman/aescrypt.o aesGladman/aeskey.o aesGladman/aestab.o aesGladman/fileenc.o aesGladman/hmac.o aesGladman/prng.o aesGladman/pwd2key.o aesGladman/sha1.o aesGladman/sha2.o
BZIP2OBJ = bzip2/blocksort.o bzip2/huffman.o bzip2/crctable.o bzip2/randtable.o bzip2/bzcompress.o bzip2/decompress.o bzip2/bzlib.o
+ifeq ($(MSYSTEM_CARCH),aarch64)
+ LIBPNGOBJ += libpng/arm/arm_init.o libpng/arm/filter_neon_intrinsics.o libpng/arm/palette_neon_intrinsics.o libpng/arm/filter_neon.o
+endif
+
# Next variable is for additional scene nodes etc. of customized Irrlicht versions
EXTRAOBJ =
LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \

View File

@ -5,22 +5,47 @@ _realname=irrlicht
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.8.5
pkgrel=2
pkgrel=3
pkgdesc="An open source high performance realtime 3D graphics engine (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://irrlicht.sourceforge.io/"
license=("custom")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
$([[ ${CARCH} == aarch64 ]] && echo "git"))
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
source=("https://downloads.sourceforge.net/irrlicht/irrlicht-${pkgver}.zip"
"001-compile-fixes.patch")
"001-compile-fixes.patch"
"002-aarch64.patch")
sha256sums=('effb7beed3985099ce2315a959c639b4973aac8210f61e354475a84105944f3d'
'd8693950e4caa0199a57b84c9d1dcbec6186158372595db84b45522a38c57412')
'd8693950e4caa0199a57b84c9d1dcbec6186158372595db84b45522a38c57412'
'67805e208400d834f87ba8857fabfb1622fdce5b2a74c162aec40967bb1e9323')
# Bring back NEON optimized code that matches the version being used
_pngver="1.6.37" # From source/Irrlicht/libpng/png.h
if [[ ${MSYSTEM} == CLANGARM64 ]]; then
source+=("png::git+https://github.com/pnggroup/libpng.git#tag=v${_pngver}")
sha256sums+=('2f502df9c7230e2706095386afb0f876cc9b8d688e5f07ded7c4d169d7a96bdf')
fi
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying ${_patch}"
patch -Nbp1 -i "${srcdir}/${_patch}"
done
}
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i "${srcdir}/001-compile-fixes.patch"
apply_patch_with_msg \
001-compile-fixes.patch \
002-aarch64.patch
if [[ ${MSYSTEM} == CLANGARM64 ]]; then
mv "${srcdir}/png/arm" "${srcdir}/${_realname}-${pkgver}/source/Irrlicht/libpng"
fi
cd "${srcdir}"
cp -rf "${_realname}-${pkgver}" "build-${MSYSTEM}-shared"