# Contributor: Leo # Maintainer: Natanael Copa pkgname=flatbuffers pkgver=23.3.3 pkgrel=5 pkgdesc="Memory Efficient Serialization Library" url="https://google.github.io/flatbuffers/" # armhf: blocked by bus error in tests # s390x: segfaults in tests # x86: fails trivial tests arch="all !x86 !armhf !s390x" license="Apache-2.0" depends_dev="flatc=$pkgver-r$pkgrel" makedepends=" cmake py3-gpep517 py3-setuptools py3-wheel samurai " subpackages="$pkgname-dev flatc py3-$pkgname-pyc py3-$pkgname:py3" source="flatbuffers-$pkgver.tar.gz::https://github.com/google/flatbuffers/archive/v$pkgver.tar.gz locale-headers.patch " # Bus error in armv7 as well but it has downstream users case "$CARCH" in armv7) options="!check" esac # secfixes: # 0: # - CVE-2020-35864 build() { cmake -B . -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DFLATBUFFERS_BUILD_SHAREDLIB=ON \ -DFLATBUFFERS_BUILD_FLATLIB=OFF cmake --build . cd python gpep517 build-wheel \ --wheel-dir ../build/dist \ --output-fd 3 3>&1 >&2 } check() { CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { DESTDIR="$pkgdir" cmake --install . python3 -m installer -d "$pkgdir" \ build/.dist/*.whl } flatc() { pkgdesc="$pkgdesc (compiler)" amove usr/bin } py3() { pkgdesc="$pkgdesc (python bindings)" amove usr/lib/python3* } sha512sums=" 4066c94f2473c7ea16917d29a613e16f840a329089c88e0bdbdb999aef3442ba00abfd2aa92266fa9c067e399dc88e6f0ccac40dc151378857e665638e78bbf0 flatbuffers-23.3.3.tar.gz a5460ec027f2884f5801e01d3ef7f831be3ecd92fc9586ab33764467e3de79855f87c4b639806ad6884ec8eac41d6d6f6204644c84ddbcea9fba3798943b1e57 locale-headers.patch "