aboutsummaryrefslogtreecommitdiff
path: root/srcpkgs/flatbuffers/template
blob: 86c89090cc94da46f7a040932a1f941529e2c363 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Template file for 'flatbuffers'
pkgname=flatbuffers
version=1.12.0
revision=1
build_style=cmake
short_desc="Memory efficient serialization library"
maintainer="Elie ROUDNINSKI <xademax@gmail.com>"
license="Apache-2.0"
homepage="https://google.github.io/flatbuffers/"
distfiles="https://github.com/google/${pkgname}/archive/v${version}.tar.gz"
checksum=62f2223fb9181d1d6338451375628975775f7522185266cd5296571ac152bc45

if [ "$CROSS_BUILD" ]; then
	# Disable tests to prevent executing target binaries on host
	configure_args+=" -DFLATBUFFERS_BUILD_TESTS=OFF"
fi

case "$XBPS_TARGET_MACHINE" in
	*-musl) configure_args+=" -DFLATBUFFERS_LOCALE_INDEPENDENT=0";;
esac

CXXFLAGS="-Wno-class-memaccess -Wno-stringop-overflow"

flatbuffers-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/cmake
		vmove usr/lib/libflatbuffers.a
	}
}