From 91ff2de43fd2b4aebe3d797027b82cb29b33e02f Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Fri, 2 Jun 2023 21:16:54 +0200 Subject: [PATCH] breathe, new python recipe (#8778) --- dev-python/breathe/breathe-4.35.0.recipe | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 dev-python/breathe/breathe-4.35.0.recipe diff --git a/dev-python/breathe/breathe-4.35.0.recipe b/dev-python/breathe/breathe-4.35.0.recipe new file mode 100644 index 000000000..61765d018 --- /dev/null +++ b/dev-python/breathe/breathe-4.35.0.recipe @@ -0,0 +1,86 @@ +SUMMARY="A Sphinx Doxygen renderer" +DESCRIPTION="Breathe is an extension to reStructuredText and Sphinx to be able to read and render \ +Doxygen xml output." +HOMEPAGE="https://github.com/michaeljones/breathe" +COPYRIGHT="2009, Michael Jones" +LICENSE="BSD (2-clause)" +REVISION="1" +SOURCE_URI="https://files.pythonhosted.org/packages/source/b/breathe/breathe-$portVersion.tar.gz" +CHECKSUM_SHA256="5165541c3c67b6c7adde8b3ecfe895c6f7844783c4076b6d8d287e4f33d62386" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python39 python310) +PYTHON_VERSIONS=(3.9 3.10) +defaultVersion=3.9 +for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + eval "PROVIDES_$pythonPackage=\" + ${portName}_$pythonPackage = $portVersion + cmd:breathe_apidoc_$pythonVersion.py = $portVersion + \"" + # Provide non-suffixed cmd only for the default Python version + if [ $pythonVersion = $defaultVersion ]; then + eval "PROVIDES_$pythonPackage+=\" + cmd:breathe_apidoc = $portVersion + \"" + fi + + eval "REQUIRES_$pythonPackage=\" + haiku + cmd:python$pythonVersion + \"" + BUILD_REQUIRES+=" + setuptools_$pythonPackage + " + 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 + + $python setup.py build install \ + --root=/ --prefix=$prefix + + # Version suffix all the scripts + for f in $binDir/*; do + mv $f ${f%.py}-${pythonVersion}.py + done + + # And provide suffix-less symlinks for the default version + if [ $pythonVersion = $defaultVersion ]; then + for f in $binDir/*; do + ln -sr $f ${f%-$pythonVersion.py} + done + fi + + packageEntries $pythonPackage \ + $prefix/lib/python* \ + $binDir + done +}