mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
haiku-pyapi: Release 0.4 (#13604)
This commit is contained in:
85
dev-python/haiku-pyapi/haiku_pyapi-0.4.recipe
Normal file
85
dev-python/haiku-pyapi/haiku_pyapi-0.4.recipe
Normal file
@@ -0,0 +1,85 @@
|
||||
SUMMARY="Python bindings for the Haiku API"
|
||||
DESCRIPTION="This lets you build apps for Haiku using the Haiku API directly from Python.
|
||||
|
||||
Haiku-PyAPI follows the C++ API as closely as possible. We also provide \
|
||||
variants of some of the functions that are more natural to use in Python.
|
||||
|
||||
Currently the library is unstable and has plenty of bugs."
|
||||
HOMEPAGE="https://github.com/coolcoder613eb/Haiku-PyAPI/"
|
||||
COPYRIGHT="2023-2025 Elozor Bruce
|
||||
2023-2026 Zardshard
|
||||
2023-2026 TmTFx
|
||||
2023 OscarL"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/coolcoder613eb/Haiku-PyAPI/archive/refs/tags/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="3a03afdb89bc0b43ee861c62c5fe093a13d62698a59dd33296789ee69451fe4d"
|
||||
SOURCE_DIR="Haiku-PyAPI-$portVersion"
|
||||
# Haiku-PyAPI needs smart_holder support from pybind11
|
||||
pybindVersion="3.0.1"
|
||||
SOURCE_URI_2="https://github.com/pybind/pybind11/archive/refs/tags/v$pybindVersion.tar.gz"
|
||||
CHECKSUM_SHA256_2="741633da746b7c738bb71f1854f957b9da660bcd2dce68d71949037f0969d0ca"
|
||||
|
||||
|
||||
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-$pybindVersion/* \
|
||||
./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
|
||||
}
|
||||
Reference in New Issue
Block a user