Files
haikuports/dev-python/tinycss2/tinycss2-1.4.0.recipe
Gerasim Troeglazov aecc875e4d tinycss2: add recipe
2025-09-18 08:20:02 +10:00

72 lines
1.7 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
SUMMARY="Low-level CSS parser and generator"
DESCRIPTION="tinycss2 is a low-level CSS parser and generator written in Python: \
it can parse strings, return objects representing tokens and blocks, and \
generate CSS strings corresponding to these objects.
Based on the CSS Syntax Level 3 specification, tinycss2 knows the grammar of CSS \
but doesnt know specific rules, properties or values supported in various CSS modules."
HOMEPAGE="https://www.courtbouillon.org/tinycss2/"
COPYRIGHT="2013-2025, Kozea"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/Kozea/tinycss2/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="c8f0ea1b2bf55ceb5db60a5b4d7c151b584aade43353d2a44e8e55459ea735f4"
SOURCE_DIR="tinycss2-$portVersion"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
defaultVersion=3.10
defaultTestVersion=$defaultVersion
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
packaging_$pythonPackage
webencodings_$pythonPackage
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
flit_core_$pythonPackage
installer_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer -p $prefix dist/*.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}