mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
89 lines
2.3 KiB
Bash
89 lines
2.3 KiB
Bash
SUMMARY="A collection of tools for internationalizing Python applications"
|
|
DESCRIPTION="Babel is a Python library that provides an integrated \
|
|
collection of utilities that assist with internationalizing and localizing \
|
|
Python applications (in particular web-based applications)."
|
|
HOMEPAGE="http://babel.pocoo.org/"
|
|
COPYRIGHT="2013-2022 by the Babel Team"
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="2"
|
|
SOURCE_URI="https://github.com/python-babel/babel/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="37de3435fdec7c3267430765fc3ebe05cd234e65774ff1dc42a7b3b5cd39ef97"
|
|
SOURCE_FILENAME="babel-v$portVersion.tar.gz"
|
|
SOURCE_URI_2="https://unicode.org/Public/cldr/42/cldr-common-42.0.zip#noarchive"
|
|
CHECKSUM_SHA256_2="53cd4fd1ac2ee4d4cbcae362e7af5d02e98e5e39c826ce9d723d41ca836fc846"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.10)
|
|
defaultVersion=3.10
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
cmd:pybabel_$pythonVersion = $portVersion
|
|
\""
|
|
# Provide non-suffixed cmd only for the default Python version
|
|
if [ $pythonVersion = $defaultVersion ]; then
|
|
eval "PROVIDES_$pythonPackage+=\"
|
|
cmd:pybabel = $portVersion
|
|
\""
|
|
fi
|
|
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku
|
|
cmd:python$pythonVersion
|
|
setuptools_$pythonPackage
|
|
\""
|
|
|
|
BUILD_REQUIRES="$BUILD_REQUIRES
|
|
setuptools_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
cp $sourceDir2/* cldr
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
installLocation=$prefix/lib/$python/vendor-packages/
|
|
export PYTHONPATH=$installLocation:$PYTHONPATH
|
|
|
|
mkdir -p $installLocation
|
|
rm -rf build
|
|
|
|
$python setup.py import_cldr build install \
|
|
--root=/ --prefix=$prefix
|
|
|
|
# Version suffix the script
|
|
mv $prefix/bin/pybabel $prefix/bin/pybabel-$pythonVersion
|
|
|
|
# And provide suffix-less symlink for the default version
|
|
if [ $pythonVersion = $defaultVersion ]; then
|
|
ln -sr $prefix/bin/pybabel-$pythonVersion $prefix/bin/pybabel
|
|
fi
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python* \
|
|
$prefix/bin
|
|
done
|
|
}
|