pygame, pyscroll: Enable aarch64 builds (#23969)
This commit is contained in:
parent
2c3c7c66d9
commit
5bc5dc172c
50
mingw-w64-python-pygame/002-aarch64-sse-mmx.patch
Normal file
50
mingw-w64-python-pygame/002-aarch64-sse-mmx.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
diff -bur pygame-2.6.1-o/src_c/alphablit.c pygame-2.6.1/src_c/alphablit.c
|
||||||
|
--- pygame-2.6.1-o/src_c/alphablit.c 2025-04-13 18:52:15.879513700 -0600
|
||||||
|
+++ pygame-2.6.1/src_c/alphablit.c 2025-04-13 18:52:43.769349900 -0600
|
||||||
|
@@ -47,7 +47,7 @@
|
||||||
|
|
||||||
|
#if PG_ENABLE_ARM_NEON
|
||||||
|
// sse2neon.h is from here: https://github.com/DLTcollab/sse2neon
|
||||||
|
-#include "include/sse2neon.h"
|
||||||
|
+#include <sse2neon/sse2neon.h>
|
||||||
|
#endif /* PG_ENABLE_ARM_NEON */
|
||||||
|
|
||||||
|
/* This defines PG_ENABLE_SSE_NEON as True if either SSE or NEON is available
|
||||||
|
diff -bur pygame-2.6.1-o/src_c/simd_blitters_sse2.c pygame-2.6.1/src_c/simd_blitters_sse2.c
|
||||||
|
--- pygame-2.6.1-o/src_c/simd_blitters_sse2.c 2025-04-13 18:52:15.900212100 -0600
|
||||||
|
+++ pygame-2.6.1/src_c/simd_blitters_sse2.c 2025-04-13 18:52:40.608100200 -0600
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
#if PG_ENABLE_ARM_NEON
|
||||||
|
// sse2neon.h is from here: https://github.com/DLTcollab/sse2neon
|
||||||
|
-#include "include/sse2neon.h"
|
||||||
|
+#include <sse2neon/sse2neon.h>
|
||||||
|
#endif /* PG_ENABLE_ARM_NEON */
|
||||||
|
|
||||||
|
/* See if we are compiled 64 bit on GCC or MSVC */
|
||||||
|
diff -bur pygame-2.6.1-o/buildconfig/Setup.SDL2.in pygame-2.6.1/buildconfig/Setup.SDL2.in
|
||||||
|
--- pygame-2.6.1-o/buildconfig/Setup.SDL2.in 2025-04-13 19:13:32.407008700 -0600
|
||||||
|
+++ pygame-2.6.1/buildconfig/Setup.SDL2.in 2025-04-13 19:18:58.455823000 -0600
|
||||||
|
@@ -67,7 +67,7 @@
|
||||||
|
joystick src_c/joystick.c $(SDL) $(DEBUG)
|
||||||
|
draw src_c/draw.c $(SDL) $(DEBUG)
|
||||||
|
image src_c/image.c $(SDL) $(DEBUG)
|
||||||
|
-transform src_c/transform.c src_c/rotozoom.c src_c/scale2x.c src_c/scale_mmx.c $(SDL) $(DEBUG)
|
||||||
|
+transform src_c/transform.c src_c/rotozoom.c src_c/scale2x.c src_c/scale_mmx.c $(SDL) $(DEBUG) -D_NO_MMX_FOR_X86_64
|
||||||
|
mask src_c/mask.c src_c/bitmask.c $(SDL) $(DEBUG)
|
||||||
|
bufferproxy src_c/bufferproxy.c $(SDL) $(DEBUG)
|
||||||
|
pixelarray src_c/pixelarray.c $(SDL) $(DEBUG)
|
||||||
|
diff -bur pygame-2.6.1-o/src_c/camera.h pygame-2.6.1/src_c/camera.h
|
||||||
|
--- pygame-2.6.1-o/src_c/camera.h 2025-04-13 19:25:38.008567000 -0600
|
||||||
|
+++ pygame-2.6.1/src_c/camera.h 2025-04-13 19:25:45.373221400 -0600
|
||||||
|
@@ -60,8 +60,8 @@
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#undef WINVER
|
||||||
|
-/** _WIN32_WINNT_WINBLUE sets minimum platform SDK to Windows 8.1. */
|
||||||
|
-#define WINVER _WIN32_WINNT_WINBLUE
|
||||||
|
+/** _WIN32_WINNT_WIN10 sets minimum platform SDK to Windows 10. */
|
||||||
|
+#define WINVER _WIN32_WINNT_WIN10
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <mfapi.h>
|
||||||
@ -4,10 +4,10 @@ _realname=pygame
|
|||||||
pkgbase=mingw-w64-python-${_realname}
|
pkgbase=mingw-w64-python-${_realname}
|
||||||
pkgname=${MINGW_PACKAGE_PREFIX}-python-${_realname}
|
pkgname=${MINGW_PACKAGE_PREFIX}-python-${_realname}
|
||||||
pkgver=2.6.1
|
pkgver=2.6.1
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc='A Python library for making multimedia applications like games (mingw-w64)'
|
pkgdesc='A Python library for making multimedia applications like games (mingw-w64)'
|
||||||
arch=('any')
|
arch=('any')
|
||||||
mingw_arch=('mingw64' 'ucrt64' 'clang64')
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||||
url='https://www.pygame.org'
|
url='https://www.pygame.org'
|
||||||
msys2_repository_url="https://github.com/pygame/pygame"
|
msys2_repository_url="https://github.com/pygame/pygame"
|
||||||
msys2_references=(
|
msys2_references=(
|
||||||
@ -37,16 +37,33 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|||||||
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
||||||
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
||||||
"${MINGW_PACKAGE_PREFIX}-cc"
|
"${MINGW_PACKAGE_PREFIX}-cc"
|
||||||
"${MINGW_PACKAGE_PREFIX}-cython")
|
"${MINGW_PACKAGE_PREFIX}-cython"
|
||||||
|
$([[ ${CARCH} == aarch64 ]] && echo "${MINGW_PACKAGE_PREFIX}-sse2neon"))
|
||||||
source=(https://github.com/pygame/pygame/archive/refs/tags/${pkgver}.tar.gz
|
source=(https://github.com/pygame/pygame/archive/refs/tags/${pkgver}.tar.gz
|
||||||
001-setup-fixes.patch)
|
001-setup-fixes.patch
|
||||||
|
002-aarch64-sse-mmx.patch)
|
||||||
sha256sums=('6a5dd68af93a11ba6eb35c971fa220bf253cebf63b1f54cbe697b30fae9c7c72'
|
sha256sums=('6a5dd68af93a11ba6eb35c971fa220bf253cebf63b1f54cbe697b30fae9c7c72'
|
||||||
'1567a433fc8bb60e8bafafd92169372e181907e397736200c8f950a39a4722de')
|
'1567a433fc8bb60e8bafafd92169372e181907e397736200c8f950a39a4722de'
|
||||||
|
'7e222c39766fbeedcd1a00c98775fe1b71ee1cb586b719c7af6f2f14c6443020')
|
||||||
|
|
||||||
|
apply_patch_with_msg() {
|
||||||
|
for _fname in "$@"
|
||||||
|
do
|
||||||
|
msg2 "Applying ${_fname}"
|
||||||
|
patch -Nbp1 -i "${srcdir}"/${_fname}
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${_realname}-${pkgver}"
|
cd "${_realname}-${pkgver}"
|
||||||
|
|
||||||
patch -p1 -i "${srcdir}"/001-setup-fixes.patch
|
apply_patch_with_msg \
|
||||||
|
001-setup-fixes.patch
|
||||||
|
|
||||||
|
if [ "${CARCH}" == "aarch64" ]; then
|
||||||
|
apply_patch_with_msg \
|
||||||
|
002-aarch64-sse-mmx.patch
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ pkgver=2.31
|
|||||||
pkgrel=2
|
pkgrel=2
|
||||||
pkgdesc="Make scrolling games with animated maps in pygame (mingw-w64)"
|
pkgdesc="Make scrolling games with animated maps in pygame (mingw-w64)"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
mingw_arch=('mingw64' 'ucrt64' 'clang64')
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||||
url="https://github.com/bitcraft/pyscroll"
|
url="https://github.com/bitcraft/pyscroll"
|
||||||
msys2_references=(
|
msys2_references=(
|
||||||
'purl: pkg:pypi/pyscroll'
|
'purl: pkg:pypi/pyscroll'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user