mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
68 lines
1.6 KiB
Bash
68 lines
1.6 KiB
Bash
SUMMARY="Open, modern and actively maintained alternative to Chardet"
|
|
DESCRIPTION="A library that helps you read text from an unknown charset encoding.
|
|
|
|
Motivated by chardet, I'm trying to resolve the issue by taking a new approach.
|
|
All IANA character set names for which the Python core library provides codecs are supported."
|
|
HOMEPAGE="https://pypi.org/project/charset-normalizer/"
|
|
COPYRIGHT="2019-2022 Ahmed TAHRI"
|
|
LICENSE="MIT"
|
|
REVISION="4"
|
|
SOURCE_URI="https://files.pythonhosted.org/packages/source/c/charset-normalizer/charset-normalizer-$portVersion.tar.gz"
|
|
SOURCE_DIR="charset-normalizer-$portVersion"
|
|
CHECKSUM_SHA256="5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
cmd:normalizer
|
|
"
|
|
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
|
|
\""
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku
|
|
cmd:python$pythonVersion
|
|
\""
|
|
BUILD_REQUIRES+="
|
|
setuptools_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
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 build install \
|
|
--root=/ --prefix=$prefix
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|