diff --git a/dev-python/pylzma/pylzma-0.5.0.recipe b/dev-python/pylzma/pylzma-0.5.0.recipe index 3ab465c1e..74ef7e9ab 100644 --- a/dev-python/pylzma/pylzma-0.5.0.recipe +++ b/dev-python/pylzma/pylzma-0.5.0.recipe @@ -6,11 +6,11 @@ COPYRIGHT="2004-2015 Joachim Bauch 7-zip 1999-2010 Igor Pavlov LZMA SDK 1999-2010 Igor Pavlov" LICENSE="MIT" -REVISION="1" +REVISION="2" SOURCE_URI="https://pypi.io/packages/source/p/pylzma/pylzma-$portVersion.tar.gz" CHECKSUM_SHA256="b874172afbf37770e643bf2dc9d9b6b03eb95d8f8162e157145b3fe9e1b68a1c" -ARCHITECTURES="all" +ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" PROVIDES=" @@ -27,39 +27,34 @@ BUILD_PREREQUIRES=" gcc$secondaryArchSuffix " -PYTHON_PACKAGES=() -PYTHON_VERSIONS=() -# We don't have python2 for secondaryArch -if [ -z "$secondaryArchSuffix" ]; then - PYTHON_PACKAGES+=(python) - PYTHON_VERSIONS+=(2.7) -fi -# gcc2 does not support the flags passed by python3 -if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then - PYTHON_PACKAGES+=(python3) - PYTHON_VERSIONS+=(3.7) -fi - +PYTHON_PACKAGES=(python39 python310) +PYTHON_VERSIONS=(3.9 3.10) for i in "${!PYTHON_PACKAGES[@]}"; do -pythonPackage=${PYTHON_PACKAGES[i]} -pythonVersion=${PYTHON_VERSIONS[$i]} -eval "PROVIDES_${pythonPackage}=\"\ - ${portName}_$pythonPackage = $portVersion\ - \"; \ -REQUIRES_$pythonPackage=\"\ - haiku\n\ - cmd:python$pythonVersion\ - \"" -BUILD_REQUIRES="$BUILD_REQUIRES - setuptools_$pythonPackage" -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - cmd:python$pythonVersion" -done -if [ "$targetArchitecture" = x86_gcc2 -a -n "$secondaryArchSuffix" ]; then - PROVIDES_python3+=" - pylzma_python3 = $portVersion + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + eval "PROVIDES_${pythonPackage}=\" + ${portName}_$pythonPackage = $portVersion + \"" + + if [ "$targetArchitecture" = x86_gcc2 ]; then + eval "PROVIDES_$pythonPackage+=\" + pylzma_$pythonPackage = $portVersion + \"" + fi + + eval "REQUIRES_$pythonPackage=\" + haiku$secondaryArchSuffix + cmd:python$pythonVersion + \"" + BUILD_REQUIRES+=" + setuptools_$pythonPackage " -fi + BUILD_PREREQUIRES+=" + cmd:python$pythonVersion + " +done + INSTALL() { @@ -70,8 +65,10 @@ INSTALL() python=python$pythonVersion installLocation=$prefix/lib/$python/vendor-packages/ export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation rm -rf build + $python setup.py build install \ --root=/ --prefix=$prefix