pygame, revbump, fixes detection in python3.10 (#9197)

This commit is contained in:
Schrijvers Luc
2023-08-13 05:59:40 +00:00
committed by GitHub
parent 994d288db8
commit c21207d49e

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="4"
REVISION="5"
SOURCE_URI="https://files.pythonhosted.org/packages/source/p/pygame/pygame-$portVersion.tar.gz"
CHECKSUM_SHA256="63b038da116a643046181b02173fd894d87d2f85ecfd6aa7d5ece73c6ef501e9"
SOURCE_DIR="pygame-$portVersion"
@@ -17,8 +17,10 @@ PATCHES="pygame-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
pythonVersion=3.10
pythonPackage="python${pythonVersion//.}"
PYTHON_PACKAGES=(python310)
PYTHON_VERSIONS=(3.10)
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
PROVIDES="
pygame$secondaryArchSuffix = $portVersion
@@ -79,18 +81,17 @@ BUILD()
{
# don't build without features
# to build against SDL2 remove -sdl1 from the next line
echo "y" | $portPackageLinksDir/cmd~python3/bin/python3 setup.py build -auto -sdl1 || exit 1
python=python$pythonVersion
echo "y" | $python setup.py build -auto -sdl1 || exit 1
}
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python3/bin/python3
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
echo "y" | $portPackageLinksDir/cmd~python3/bin/python3 setup.py \
build install --prefix $prefix || exit 1
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
$python setup.py build install \
--root=/ --prefix=$prefix
}