1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/py3-pybind11/APKBUILD

57 lines
1.4 KiB
Text

# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=py3-pybind11
_pkgname=pybind11
pkgver=2.5.0
pkgrel=0
pkgdesc="Seamless operability between C++11 and Python"
url="https://github.com/pybind/pybind11"
arch="noarch"
license="MPL-2.0"
makedepends="
python3-dev
py3-setuptools
cmake
boost-dev
"
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
cmake -B build . \
-DCMAKE_BUILD_TYPE=None \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DUSE_PYTHON_INCLUDE_DIR=FALSE
make -C build
}
check() {
make -C build check
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir" \
--install-headers=/usr/include/pybind11 --skip-build
make -C build DESTDIR="$pkgdir" install
}
dev() {
depends_dev="$pkgname"
default_dev
}
sha512sums="7f3a9c71916749436898d1844ef6b112baf0817a386308b5df8dec2a912ef4b6a932b94965e98f227c49fa77312f131972a6039f23b84a3daf6442a8ab0be7c2 py3-pybind11-2.5.0.tar.gz"