56 lines
1.3 KiB
Bash
56 lines
1.3 KiB
Bash
# Template file for 'protobuf'
|
|
pkgname=protobuf
|
|
version=3.6.1.1
|
|
revision=1
|
|
build_style=gnu-configure
|
|
hostmakedepends="automake libtool pkg-config"
|
|
makedepends="zlib-devel"
|
|
short_desc="Google's data interchange format"
|
|
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://developers.google.com/protocol-buffers/"
|
|
changelog="https://raw.githubusercontent.com/google/protobuf/master/CHANGES.txt"
|
|
distfiles="https://github.com/google/protobuf/archive/v${version}.tar.gz"
|
|
checksum=1ade182f91f0fa6c6116195def5d22270e01b9d03fe91319e4c6215022d0d24b
|
|
|
|
CXXFLAGS="-std=c++14"
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
# needs host protoc
|
|
hostmakedepends+=" protobuf"
|
|
configure_args+=" --with-protoc=/usr/bin/protoc"
|
|
fi
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
armv[56]*|mips*|ppc|ppc-musl)
|
|
makedepends+=" libatomic-devel"
|
|
LDFLAGS+=" -latomic"
|
|
;;
|
|
esac
|
|
|
|
pre_configure() {
|
|
autoreconf -fi
|
|
}
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
}
|
|
|
|
protobuf-devel_package() {
|
|
depends="zlib-devel protobuf-${version}_${revision}
|
|
protobuf-lite-${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|
|
|
|
protobuf-lite_package() {
|
|
short_desc+=" - Lite version"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotobuf-lite.so.*"
|
|
}
|
|
}
|