mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 15:20:07 +02:00
pybind11: cleanup, provide "non _x86" package name. (#8822)
This commit is contained in:
@@ -8,7 +8,7 @@ by inferring type information using compile-time introspection."
|
||||
HOMEPAGE="https://pypi.org/project/pybind11/"
|
||||
COPYRIGHT="2015-2019 Wenzel Jakob"
|
||||
LICENSE="BSD (2-clause)"
|
||||
REVISION="3"
|
||||
REVISION="4"
|
||||
SOURCE_URI="https://github.com/pybind/pybind11/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="8ff2fff22df038f5cd02cea8af56622bc67f5b64534f1b83b9f133b8366acff2"
|
||||
SOURCE_FILENAME="pybind11-v$portVersion.tar.gz"
|
||||
@@ -26,25 +26,33 @@ REQUIRES="
|
||||
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\n\
|
||||
cmd:pybind11_config$pythonVersion\n\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
setuptools_$pythonPackage
|
||||
devel:eigen$secondaryArchSuffix"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:python$pythonVersion"
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
cmd:pybind11_config_$pythonVersion
|
||||
\""
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
eval "PROVIDES_$pythonPackage+=\"
|
||||
pybind11_$pythonPackage = $portVersion
|
||||
\""
|
||||
fi
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
BUILD_REQUIRES+="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
setuptools_$pythonPackage
|
||||
devel:eigen$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
INSTALL()
|
||||
@@ -56,11 +64,14 @@ INSTALL()
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
|
||||
mkdir -p $installLocation #$prefix/lib/cmake
|
||||
rm -rf build
|
||||
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
mv $prefix/bin/pybind11-config $prefix/bin/pybind11-config$pythonVersion
|
||||
|
||||
mv $prefix/bin/pybind11-config $prefix/bin/pybind11-config-$pythonVersion
|
||||
|
||||
# Not sure we want to run cmake build
|
||||
# this will install the headers and cmake files double
|
||||
|
||||
Reference in New Issue
Block a user