mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
66 lines
1.6 KiB
Plaintext
66 lines
1.6 KiB
Plaintext
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
|
|
pkgname=py3-pybind11
|
|
_pkgname=pybind11
|
|
pkgver=2.10.4
|
|
pkgrel=1
|
|
pkgdesc="Seamless operability between C++11 and Python"
|
|
url="https://github.com/pybind/pybind11"
|
|
arch="noarch"
|
|
license="MPL-2.0"
|
|
makedepends="
|
|
boost-dev
|
|
cmake
|
|
py3-setuptools
|
|
python3-dev
|
|
samurai
|
|
"
|
|
checkdepends="
|
|
py3-pytest
|
|
"
|
|
subpackages="$pkgname-dev"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/pybind/pybind11/archive/v$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
|
|
replaces="py-pybind11" # Backwards compatibility
|
|
provides="py-pybind11=$pkgver-r$pkgrel" # Backwards compatibility
|
|
|
|
build() {
|
|
# fails to build with fortify headers enabled
|
|
# https://github.com/pybind/pybind11/issues/1650
|
|
export CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE"
|
|
|
|
python3 setup.py build
|
|
|
|
if [ "$CBUILD" != "$CHOST" ]; then
|
|
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
|
fi
|
|
cmake -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=None \
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DUSE_PYTHON_INCLUDE_DIR=FALSE \
|
|
$CMAKE_CROSSOPTS
|
|
cmake --build build
|
|
}
|
|
|
|
check() {
|
|
ctest --test-dir build --output-on-failure
|
|
}
|
|
|
|
package() {
|
|
python3 setup.py install --root="$pkgdir" \
|
|
--install-headers=/usr/include/pybind11 --skip-build
|
|
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
dev() {
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel"
|
|
amove usr/share/cmake
|
|
default_dev
|
|
}
|
|
|
|
sha512sums="
|
|
7970defbb6d057a44468ed707c80bfa6ef8c9578528fbc084b03aeea20a52dbd681581f82d55ff90af11ee89693379bd79e2ab6603239ba05b0aa8da29dd93c7 py3-pybind11-2.10.4.tar.gz
|
|
"
|