blob: 9e194fab77a0ca53a6dc5bd9764e49475e89a2a7 (
plain)
1 # Description: An efficient cross platform serialization library for C++, with support for Java, C# and Go
2 # URL: https://google.github.io/flatbuffers/
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: cmake python3-setuptools
5
6 name=flatbuffers
7 version=2.0.0
8 release=1
9 source=(https://github.com/google/flatbuffers/archive/v$version/$name-$version.tar.gz)
10
11 build() {
12 [[ -e /usr/bin/ninja ]] && PKGMK_FLATBUFFERS+=' -G Ninja'
13 cmake -S $name-$version -B build $PKGMK_FLATBUFFERS \
14 -D CMAKE_INSTALL_PREFIX=/usr \
15 -D CMAKE_INSTALL_LIBDIR=lib \
16 -D CMAKE_BUILD_TYPE=Release \
17 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
18 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
19 -D FLATBUFFERS_BUILD_FLATLIB=OFF \
20 -D FLATBUFFERS_BUILD_SHAREDLIB=ON \
21 -Wno-dev
22 cmake --build build
23 DESTDIR=$PKG cmake --install build
24 }
|