mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
* cmake/debuginfo: Mass fix packages with broken debuginfo * rtl_sdr: Fix trailing whitespace * meson/debuginfo: Mass fix packages with broken debuginfo * clean up conflicts --------- Co-authored-by: Luc Schrijvers <begasus@gmail.com>
85 lines
2.0 KiB
Bash
85 lines
2.0 KiB
Bash
SUMMARY="Memory efficient serialization library"
|
|
DESCRIPTION="FlatBuffers is an efficient cross platform serialization library \
|
|
for C++, C#, C, Go, Java, JavaScript, Lobster, Lua, TypeScript, PHP, Python, \
|
|
and Rust. It was originally created at Google for game development and other \
|
|
performance-critical applications."
|
|
HOMEPAGE="https://google.github.io/flatbuffers/"
|
|
COPYRIGHT="2014 Google Inc."
|
|
LICENSE="Apache v2"
|
|
REVISION="2"
|
|
SOURCE_URI="https://github.com/google/flatbuffers/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="4157c5cacdb59737c5d627e47ac26b140e9ee28b1102f812b36068aab728c1ed"
|
|
SOURCE_FILENAME="flatbuffers-$portVersion.tar.gz"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
flatbuffers$secondaryArchSuffix = $portVersion
|
|
lib:libflatbuffers$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
flatbuffers${secondaryArchSuffix}_devel = $portVersion
|
|
cmd:flatc$secondaryArchSuffix = $portVersion
|
|
devel:libflatbuffers$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
haiku$secondaryArchSuffix
|
|
flatbuffers$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
defineDebugInfoPackage flatbuffers$secondaryArchSuffix \
|
|
"$libDir"/libflatbuffers.so.$portVersion
|
|
|
|
BUILD()
|
|
{
|
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
$cmakeDirArgs \
|
|
-DFLATBUFFERS_BUILD_SHAREDLIB=ON \
|
|
-DFLATBUFFERS_BUILD_FLATLIB=OFF \
|
|
-DFLATBUFFERS_BUILD_FLATC=ON \
|
|
-DFLATBUFFERS_BUILD_FLATHASH=ON \
|
|
-DFLATBUFFERS_BUILD_TESTS=OFF \
|
|
-DFLATBUFFERS_INSTALL=ON
|
|
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
# prepare develop/lib
|
|
prepareInstalledDevelLib \
|
|
libflatbuffers
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$binDir \
|
|
$developDir \
|
|
$libDir/cmake
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
ctest --test-dir build --output-on-failure
|
|
}
|