blob: 405ea9f9794419b689a2e62f4cda3d0f95ca643a (
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=1.12.0
8 _commit=a402b3abaea6490d8aad1fe90d8bafe2a6396fe8
9 release=1
10 source=(#https://github.com/google/flatbuffers/archive/v$version/$name-$version.tar.gz
11 https://github.com/google/flatbuffers/archive/$_commit/$name-$version-1.tar.gz)
12
13 build() {
14 [[ -e /usr/bin/ninja ]] && PKGMK_FLATBUFFERS+=' -G Ninja'
15 cmake -S $name-$_commit -B build $PKGMK_FLATBUFFERS \
16 -D CMAKE_INSTALL_PREFIX=/usr \
17 -D CMAKE_INSTALL_LIBDIR=lib \
18 -D CMAKE_BUILD_TYPE=Release \
19 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
20 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
21 -D FLATBUFFERS_BUILD_FLATLIB=OFF \
22 -D FLATBUFFERS_BUILD_SHAREDLIB=ON \
23 -Wno-dev
24 cmake --build build
25 DESTDIR=$PKG cmake --install build
26 }
|