SUMMARY="Python bindings for the Haiku API" DESCRIPTION="This lets you build apps for Haiku using the Haiku API directly \ from Python. \ \ For the most part, Haiku-PyAPI tries to copy the C++ API. There are some \ places where we have had to deviate from the C++ API, however. \ \ Currently the library is unstable and has plenty of bugs." HOMEPAGE="https://github.com/coolcoder613eb/Haiku-PyAPI/" COPYRIGHT="2023-2024 Elozor Bruce 2023-2024 Zardshard 2023-2024 TmTFx 2023 OscarL" LICENSE="MIT" REVISION="1" SOURCE_URI="https://github.com/coolcoder613eb/Haiku-PyAPI/archive/refs/tags/v$portVersion.tar.gz" CHECKSUM_SHA256="3c78f37fc64bd9fbdfedf033f57136dc4f8f05f6872bb60d21c182c1ceddf330" SOURCE_DIR="Haiku-PyAPI-$portVersion" # pybind11 needs smart_holder branch srcGitRev="d8b1541168e58444597f25e85e78356de9b67d34" SOURCE_URI_2="https://github.com/pybind/pybind11/archive/$srcGitRev.zip" CHECKSUM_SHA256_2="6c6ce8f70f6973f4c128b93f1911d14178cc1ea9e7558f01c8aec6e567a00163" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" cmd:gcc$secondaryArchSuffix cmd:jam " PYTHON_VERSIONS=(3.10) for i in "${!PYTHON_VERSIONS[@]}"; do pythonVersion=${PYTHON_VERSIONS[$i]} pythonPackage=python${pythonVersion//.} eval "PROVIDES_${pythonPackage}=\" ${portName}_$pythonPackage = $portVersion \"" if [ "$targetArchitecture" = x86_gcc2 ]; then eval "PROVIDES_$pythonPackage+=\" haiku_pyapi_$pythonPackage = $portVersion \"" fi eval "REQUIRES_$pythonPackage=\" haiku$secondaryArchSuffix cmd:python$pythonVersion \"" BUILD_PREREQUIRES+=" cmd:python$pythonVersion " done BUILD() { cp -rd $sourceDir2/pybind11-$srcGitRev/* \ ./pybind11/ } INSTALL() { for i in "${!PYTHON_VERSIONS[@]}"; do pythonVersion=${PYTHON_VERSIONS[$i]} pythonPackage=python${pythonVersion//.} installLocation=$prefix/lib/python$pythonVersion/vendor-packages jam -q $jobArgs -spython_version="$pythonVersion" \ -sinstall_location="$installLocation" install packageEntries $pythonPackage \ $prefix/lib/python* done }