mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
pycairo: add recipe (#8895)
This commit is contained in:
80
dev-python/pycairo/pycairo-1.24.0.recipe
Normal file
80
dev-python/pycairo/pycairo-1.24.0.recipe
Normal file
@@ -0,0 +1,80 @@
|
||||
SUMMARY="A Python module providing bindings for the cairo library"
|
||||
DESCRIPTION="The Pycairo bindings are designed to match the cairo C API as closely as possible, \
|
||||
and to deviate only in cases which are clearly better implemented in a more ‘Pythonic’ way."
|
||||
HOMEPAGE="https://pypi.org/project/pycairo/"
|
||||
COPYRIGHT="2023 pycairo developers"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/pygobject/pycairo/releases/download/v$portVersion/pycairo-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="1444d52f1bb4cc79a4a0c0fe2ccec4bd78ff885ab01ebe1c0f637d8392bcafb6"
|
||||
PATCHES="$portName-$portVersion.patchset"
|
||||
ARCHITECTURES="?all x86_64 ?x86_gcc2 ?x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
lib:libcairo$secondaryArchSuffix
|
||||
lib:libcairo_gobject$secondaryArchSuffix
|
||||
lib:libcairo_script_interpreter$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
devel:libcairo$secondaryArchSuffix
|
||||
devel:libcairo_gobject$secondaryArchSuffix
|
||||
devel:libcairo_script_interpreter$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python38 python39 python310)
|
||||
PYTHON_VERSIONS=(3.8 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
|
||||
setuptools_$pythonPackage
|
||||
toml_$pythonPackage
|
||||
cmd:git
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
packaging_$pythonPackage
|
||||
setuptools_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:python$pythonVersion
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user