Files
haikuports/dev-python/pycairo/pycairo-1.27.0.recipe
Schrijvers Luc fb3512079c pycairo, bump version, fixes resolving symbol 'cairo_xlib_surface_get… (#11436)
* pycairo, bump version, fixes resolving symbol 'cairo_xlib_surface_get_width'

* Update dev-python/pycairo/pycairo-1.27.0.recipe

Co-authored-by: Joachim Mairböck <j.mairboeck@gmail.com>

---------

Co-authored-by: Joachim Mairböck <j.mairboeck@gmail.com>
2024-12-13 11:49:39 +01: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="1"
SOURCE_URI="https://github.com/pygobject/pycairo/releases/download/v$portVersion/pycairo-$portVersion.tar.gz"
CHECKSUM_SHA256="5cb21e7a00a2afcafea7f14390235be33497a2cce53a98a19389492a60628430"
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=(python310)
PYTHON_VERSIONS=(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
}