Files
haikuports/dev-python/pycairo/pycairo-1.24.0.recipe
OscarL 70ac5cadda python3.8: bulk removal of now obsolete "_python38" packages. (#9328)
* python3.8: bulk removal of now obsolete "_python38" packages.

Done via scripting. No functional change intended or expected.

Some manual tweaks will follow.

* python3.8: further manual tweaks after bulk-3.8-removal.

Unlike the previous commit with automated changes,
I've tested builds for *these* recipes in beta4 64 bits.
2023-09-01 18:19:50 +00:00

88 lines
2.3 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="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="4"
SOURCE_URI="https://github.com/pygobject/pycairo/releases/download/v$portVersion/pycairo-$portVersion.tar.gz"
CHECKSUM_SHA256="1444d52f1bb4cc79a4a0c0fe2ccec4bd78ff885ab01ebe1c0f637d8392bcafb6"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
pycairo$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcairo$secondaryArchSuffix
devel:libcairo_gobject$secondaryArchSuffix
devel:libcairo_script_interpreter$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:meson
cmd:ninja
cmd:pkg_config$secondaryArchSuffix
"
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
\""
# Also provide "non _x86" package on x86 32 bits
if [ "$targetArchitecture" = "x86_gcc2" ]; then
eval "PROVIDES_${pythonPackage}+=\"
pycairo_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
cmd:python$pythonVersion
lib:libcairo$secondaryArchSuffix
lib:libcairo_gobject$secondaryArchSuffix
lib:libcairo_script_interpreter$secondaryArchSuffix
\""
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
meson build --buildtype=release \
--prefix=$prefix \
--includedir=$includeDir \
--libdir=$libDir \
--localedir=$dataDir/locale \
-Dpython=$python \
-Dtests=false
ninja -C build install
fixPkgconfig
packageEntries $pythonPackage \
$developDir \
$libDir
done
}