diff --git a/dev-python/pycairo/patches/pycairo-1.24.0.patchset b/dev-python/pycairo/patches/pycairo-1.24.0.patchset new file mode 100644 index 000000000..ecc69bdc7 --- /dev/null +++ b/dev-python/pycairo/patches/pycairo-1.24.0.patchset @@ -0,0 +1,33 @@ +From e34815392264061a90515bec7abb880ff1dee15a Mon Sep 17 00:00:00 2001 +From: hfsfox +Date: Wed, 28 Jun 2023 15:41:57 +0000 +Subject: fix headers path + + +diff --git a/setup.py b/setup.py +old mode 100755 +new mode 100644 +index b91fb5c..40ea407 +--- a/setup.py ++++ b/setup.py +@@ -380,7 +380,7 @@ class install_pycairo_header(Command): + source = self.get_inputs()[0] + + # for things using get_include() +- lib_hdir = os.path.join(self.install_lib, "cairo", "include") ++ lib_hdir = os.path.join(self.install_lib, "cairo", "develop/headers") + self.mkpath(lib_hdir) + lib_header_path = os.path.join(lib_hdir, hname) + (out, _) = self.copy_file(source, lib_header_path) +@@ -394,7 +394,7 @@ class install_pycairo_header(Command): + return + + # for things using pkg-config +- data_hdir = os.path.join(self.install_data, "include", "pycairo") ++ data_hdir = os.path.join(self.install_data, "develop/headers", "pycairo") + self.mkpath(data_hdir) + header_path = os.path.join(data_hdir, hname) + (out, _) = self.copy_file(source, header_path) +-- +2.37.3 + diff --git a/dev-python/pycairo/pycairo-1.24.0.recipe b/dev-python/pycairo/pycairo-1.24.0.recipe new file mode 100644 index 000000000..e2d788311 --- /dev/null +++ b/dev-python/pycairo/pycairo-1.24.0.recipe @@ -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 +}