pygame: fix recipe issues, update affected recipes. (#11530)

Fixes #11529.
This commit is contained in:
OscarL
2024-12-26 04:54:47 -03:00
committed by GitHub
parent 13bf14bfd8
commit e777491cec
4 changed files with 121 additions and 97 deletions

View File

@@ -8,7 +8,7 @@ COPYRIGHT="2000-2004, 2007 Pete Shinners
2007 Richard Goedeken
2007-2008 Marcus von Appen"
LICENSE="GNU LGPL v2.1"
REVISION="5"
REVISION="6"
SOURCE_URI="https://files.pythonhosted.org/packages/source/p/pygame/pygame-$portVersion.tar.gz"
CHECKSUM_SHA256="63b038da116a643046181b02173fd894d87d2f85ecfd6aa7d5ece73c6ef501e9"
SOURCE_DIR="pygame-$portVersion"
@@ -17,81 +17,93 @@ PATCHES="pygame-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PYTHON_PACKAGES=(python310)
PYTHON_VERSIONS=(3.10)
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
PROVIDES="
pygame$secondaryArchSuffix = $portVersion
$portName = $portVersion
"
if [ "$targetArchitecture" = x86_gcc2 ]; then
PROVIDES+="
pygame = $portVersion
"
fi
REQUIRES="
cmd:cython$pythonVersion
cmd:f2py3
cmd:python3
lib:libfreetype$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libSDL_1.2$secondaryArchSuffix
lib:libSDL_gfx$secondaryArchSuffix
lib:libSDL_image_1.2$secondaryArchSuffix
lib:libSDL_mixer_1.2$secondaryArchSuffix
lib:libSDL_ttf_2.0$secondaryArchSuffix
# lib:libSDL2_2.0$secondaryArchSuffix
# lib:libSDL2_gfx_1.0$secondaryArchSuffix
# lib:libSDL2_image_2.0$secondaryArchSuffix
# lib:libSDL2_mixer_2.0$secondaryArchSuffix
# lib:libSDL2_ttf_2.0$secondaryArchSuffix
lib:libsmpeg_0.4
"
# portmidi
# portmap
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
setuptools_$pythonPackage
devel:libfreetype$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libSDL_1.2$secondaryArchSuffix
devel:libSDL_gfx$secondaryArchSuffix
devel:libSDL_image_1.2$secondaryArchSuffix
devel:libSDL_mixer_1.2$secondaryArchSuffix
devel:libSDL_ttf_2.0$secondaryArchSuffix
# devel:libSDL2_2.0$secondaryArchSuffix
# devel:libSDL2_gfx_1.0$secondaryArchSuffix
# devel:libSDL2_image_2.0$secondaryArchSuffix
# devel:libSDL2_mixer_2.0$secondaryArchSuffix
# devel:libSDL2_ttf_2.0$secondaryArchSuffix
devel:libsmpeg_0.4
"
BUILD_PREREQUIRES="
cmd:cython$pythonVersion
cmd:gcc$secondaryArchSuffix
cmd:python3
cmd:pkg_config$secondaryArchSuffix
haiku$secondaryArchSuffix
"
BUILD()
{
# don't build without features
# to build against SDL2 remove -sdl1 from the next line
python=python$pythonVersion
echo "y" | $python setup.py build -auto -sdl1 || exit 1
}
PYTHON_VERSIONS=(3.10)
defaultVersion=3.10
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
\""
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_${pythonPackage}+=\"
pygame_$pythonPackage = $portVersion
\""
fi
# This is because there was only one pygame package before.
if [ $pythonVersion = $defaultVersion ]; then
eval "REPLACES_$pythonPackage=\"
pygame
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
numpy_$pythonPackage
cmd:cython$pythonVersion
cmd:python$pythonVersion
lib:libfreetype$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libSDL_1.2$secondaryArchSuffix
lib:libSDL_gfx$secondaryArchSuffix
lib:libSDL_image_1.2$secondaryArchSuffix
lib:libSDL_mixer_1.2$secondaryArchSuffix
lib:libSDL_ttf_2.0$secondaryArchSuffix
lib:libsmpeg_0.4
\""
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
setuptools_$pythonPackage
devel:libfreetype$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libSDL_1.2$secondaryArchSuffix
devel:libSDL_gfx$secondaryArchSuffix
devel:libSDL_image_1.2$secondaryArchSuffix
devel:libSDL_mixer_1.2$secondaryArchSuffix
devel:libSDL_ttf_2.0$secondaryArchSuffix
devel:libsmpeg_0.4
"
BUILD_PREREQUIRES="
cmd:cython$pythonVersion
cmd:gcc$secondaryArchSuffix
cmd:python$pythonVersion
cmd:pkg_config$secondaryArchSuffix
"
done
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
python=python$pythonVersion
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
# to build against SDL2 remove -sdl1 from the next line
echo "y" | $python setup.py build -auto -sdl1 || exit 1
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}

View File

@@ -11,7 +11,7 @@ Michael Speck, David White Mike Kershaw"
LICENSE="WTFPL v2
GNU GPL v1
GNU LGPL v2"
REVISION="4"
REVISION="5"
SOURCE_URI="http://sam.zoy.org/monsterz/monsterz-$portVersion.tar.gz"
CHECKSUM_SHA256="50828b8fa26d107bcc2bd134328f83c905b9f5e124846bdf239daf0eed34973d"
PATCHES="monsterz-$portVersion.patchset"
@@ -24,7 +24,8 @@ PROVIDES="
"
REQUIRES="
haiku
pygame
pygame_python310
cmd:python3.10
"
BUILD_REQUIRES="

View File

@@ -11,7 +11,7 @@ COPYRIGHT="2003 John-Paul Gignac
Barry deFreese
Reiner Herrmann"
LICENSE="GNU GPL v2"
REVISION="1"
REVISION="2"
SOURCE_URI="https://salsa.debian.org/games-team/pathological/-/archive/debian/1.1.3-17/pathological-debian-1.1.3-17.tar.bz2"
CHECKSUM_SHA256="3a4ed34d9f1d70a918e0aff6ef48e598c80bf3f3cdea9430b96a2dd51cd3e20a"
SOURCE_DIR="pathological-debian-1.1.3-17"
@@ -29,7 +29,8 @@ PROVIDES="
"
REQUIRES="
haiku$secondaryArchSuffix
pygame$secondaryArchSuffix
pygame_python310
cmd:python3.10
"
BUILD_REQUIRES="
@@ -59,12 +60,26 @@ INSTALL()
sed -i 's,\.pathological_scores,\config/settings/pathological_scores,g' pathological.py
mkdir -p $appsDir $dataDir/pathological
make install DESTDIR=$prefix \
BINDIR=$appsDir \
DATADIR=$dataDir/pathological \
DOCDIR=$docDir \
LIBDIR=$prefix/lib \
MANDIR=$manDir
rm -rf $prefix/usr # pixmaps
mv $appsDir/pathological $appsDir/Pathological
entryPoint=$appsDir/Pathological
mv $appsDir/pathological $entryPoint
# Leaving the following lines disabled, because Pathological hangs if started from
# Deskbar/Tracker anyway.
# addattr -t mime "BEOS:TYPE" application/x-vnd.be-elfexecutable $entryPoint
# addattr -t mime "BEOS:APP_SIG" application/x-vnd.pygame-pathological $entryPoint
# ToDo: vector icon
# addattr -t icon "BEOS:ICON" -f $portDir/additional-files/pathological.hvif $entryPoint
# addAppDeskbarSymlink $entryPoint "Pathological"
}

View File

@@ -5,7 +5,7 @@ have a chance."
HOMEPAGE="https://singularity.github.io/"
COPYRIGHT="2005-2023 EMH Software, Singularity community"
LICENSE="GNU GPL v2"
REVISION="3"
REVISION="4"
srcGitTag="1.00"
musicVersion="007"
SOURCE_URI="https://github.com/singularity/singularity/archive/v$portVersion.tar.gz"
@@ -14,49 +14,46 @@ CHECKSUM_SHA256="5e747268d9e96e69adace1f346fe40d0c3ec05764b98e82cc3ab0335d96d917
CHECKSUM_SHA256_2="eb5a3c2730731fda0cc7861977cd97937950b85d3fe08bc431054a639cc2c26d"
ADDITIONAL_FILES="singularity.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
ARCHITECTURES="any"
pythonVer="python310"
pythonVersion=3.10
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
PROVIDES="
singularity$secondaryArchSuffix = $portVersion
singularity = $portVersion
app:singularity = $portVersion
"
if [ "$targetArchitecture" = x86_gcc2 ]; then
# Previously, this package was built for archs "all !x86_gcc2" / "x86".
REPLACES="
singularity_x86
"
fi
REQUIRES="
haiku$secondaryArchSuffix
cmd:python3
importlib_metadata_$pythonVer
lib:libimagequant$secondaryArchSuffix
numpy_$pythonVer
pillow${secondaryArchSuffix}_$pythonVer
polib_$pythonVer
pygame$secondaryArchSuffix
haiku
numpy_$pythonPackage
pygame_$pythonPackage
cmd:python$pythonVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libimagequant$secondaryArchSuffix
importlib_metadata_$pythonVer
numpy_$pythonVer
pillow${secondaryArchSuffix}_$pythonVer
polib_$pythonVer
pygame$secondaryArchSuffix
setuptools_$pythonVer
setuptools_$pythonPackage
"
BUILD_PREREQUIRES="
cmd:python3
pip_$pythonVer
cmd:python$pythonVersion
"
BUILD()
{
python3 setup.py build
$python setup.py build
}
INSTALL()
{
python3 setup.py install \
$python setup.py install \
--root=/ --prefix=$prefix \
--install-data=$dataDir
mkdir -p $appsDir
@@ -81,6 +78,5 @@ INSTALL()
addAppDeskbarSymlink $appsDir/Singularity "Endgame: Singularity"
# install music
local pythonDir="python3.10"
cp -r $sourceDir2/ $prefix/lib/$pythonDir/vendor-packages/singularity/music
cp -r $sourceDir2/ $prefix/lib/$python/vendor-packages/singularity/music
}