mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
73 lines
1.6 KiB
Plaintext
73 lines
1.6 KiB
Plaintext
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
|
|
pkgname=py3-pybind11
|
|
_pkgname=pybind11
|
|
pkgver=2.13.5
|
|
pkgrel=0
|
|
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-gpep517
|
|
py3-setuptools
|
|
py3-wheel
|
|
python3-dev
|
|
samurai
|
|
"
|
|
checkdepends="
|
|
catch2
|
|
py3-pytest
|
|
"
|
|
subpackages="$pkgname-dev $pkgname-pyc"
|
|
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 with lto due to fortify-headers
|
|
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
|
|
CXXFLAGS="$CXXFLAGS -flto=auto" \
|
|
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
|
|
|
|
gpep517 build-wheel \
|
|
--wheel-dir .dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
ctest --test-dir build --output-on-failure
|
|
}
|
|
|
|
package() {
|
|
python3 -m installer -d "$pkgdir" \
|
|
.dist/*.whl
|
|
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
dev() {
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel"
|
|
amove usr/share/cmake
|
|
default_dev
|
|
}
|
|
|
|
sha512sums="
|
|
bf9ebfbd8e694fbb421d8bdb5362a207a3782685d48988e77aed98363b2fa302e7384b570b02b117d45d5509b1633b096d4fc1ef16f65e6cc8c888b863c1e2cb py3-pybind11-2.13.5.tar.gz
|
|
"
|