breathe, new python recipe (#8778)

This commit is contained in:
Schrijvers Luc
2023-06-02 21:16:54 +02:00
committed by GitHub
parent 4e3ab3ad66
commit 91ff2de43f

View File

@@ -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
}