diff options
Diffstat (limited to 'community/py3-pybind11/APKBUILD')
-rw-r--r-- | community/py3-pybind11/APKBUILD | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/community/py3-pybind11/APKBUILD b/community/py3-pybind11/APKBUILD index 0629b90dee0..5a8ee1817da 100644 --- a/community/py3-pybind11/APKBUILD +++ b/community/py3-pybind11/APKBUILD @@ -1,22 +1,26 @@ # Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org> pkgname=py3-pybind11 _pkgname=pybind11 -pkgver=2.6.2 -pkgrel=2 +pkgver=2.12.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 + cmake + py3-gpep517 + py3-setuptools + py3-wheel + python3-dev + samurai " checkdepends=" + catch2 py3-pytest " -subpackages="$pkgname-dev" +subpackages="$pkgname-dev $pkgname-pyc" source="$pkgname-$pkgver.tar.gz::https://github.com/pybind/pybind11/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" @@ -24,8 +28,7 @@ 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 + # fails with lto due to fortify-headers export CXXFLAGS="$CXXFLAGS -U_FORTIFY_SOURCE" python3 setup.py build @@ -33,32 +36,37 @@ build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi - cmake -B build . \ + 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 . - make -C build + $CMAKE_CROSSOPTS + cmake --build build + + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 } check() { - make -C build check + ctest --test-dir build --output-on-failure } package() { - python3 setup.py install --prefix=/usr --root="$pkgdir" \ - --install-headers=/usr/include/pybind11 --skip-build - - make -C build DESTDIR="$pkgdir" install + python3 -m installer -d "$pkgdir" \ + .dist/*.whl - mkdir -p "$pkgdir"/usr/lib - mv "$pkgdir"/usr/share/cmake "$pkgdir"/usr/lib + DESTDIR="$pkgdir" cmake --install build } dev() { - depends_dev="$pkgname" + depends_dev="$pkgname=$pkgver-r$pkgrel" + amove usr/share/cmake default_dev } -sha512sums="1eb346ff6b8f827053265340925e2c8038b1e2a89c352fc09f15ebe86128e7ba1f48c4368b193941f034b30bee7f72a94343e05d4841fdbbd0e4d91ed3d32025 py3-pybind11-2.6.2.tar.gz" +sha512sums=" +c20247a4dccec310307174a26a79f9a98dd7ae7c84a48ad61c61589b02ef74caac26c2945de602cbe38b0bea65fc9985f1cc37f9e2322cae2f824dee98d602f1 py3-pybind11-2.12.0.tar.gz +" |