jdtranslationhelper: update to version 3.3, support Python 3.10. (#9480)

Updated homepage/source URL/URI.
This commit is contained in:
OscarL
2023-09-21 02:01:26 -03:00
committed by GitHub
parent 98f1f38f40
commit 4847a62fcc
2 changed files with 63 additions and 60 deletions

View File

@@ -1,60 +0,0 @@
SUMMARY="A Python library to translate programs"
DESCRIPTION="With this lib you can translate your programs using .lang files"
HOMEPAGE="https://gitlab.com/Jakobdev/jdTranslationHelper"
COPYRIGHT="2019 JakobDev"
LICENSE="BSD (2-clause)"
REVISION="3"
SOURCE_URI="https://gitlab.com/JakobDev/jdTranslationHelper/-/archive/$portVersion/jdTranslationHelper-$portVersion.tar.gz"
CHECKSUM_SHA256="86be8fb6ca81505cc1e9fd393cab853867923b2ed01e1a06fa630ab877557d87"
SOURCE_DIR="jdTranslationHelper-$portVersion"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python39)
PYTHON_VERSIONS=(3.9)
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
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
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
packageEntries $pythonPackage \
$prefix/lib/python*
done
}

View File

@@ -0,0 +1,63 @@
SUMMARY="A Python library to translate programs"
DESCRIPTION="With this lib you can translate your programs using .lang files"
HOMEPAGE="https://codeberg.org/JakobDev/jdTranslationHelper"
COPYRIGHT="2019 JakobDev"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://codeberg.org/JakobDev/jdTranslationHelper/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="3e9da9743839b1223fa190c5449ce460b9cb97504610a36db0a93530dfae4b58"
SOURCE_DIR="jdtranslationhelper"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
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
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
rm -rf dist
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer --p $prefix dist/*.whl
packageEntries ${PYTHON_PACKAGES[i]} \
"$prefix"/lib/python*
done
}