93 lines
2.6 KiB
Bash
93 lines
2.6 KiB
Bash
# Template file for 'protobuf'
|
|
pkgname=protobuf
|
|
version=24.1
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="-Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_USE_EXTERNAL_GTEST=ON
|
|
-Dprotobuf_BUILD_LIBPROTOC=ON -Dprotobuf_ABSL_PROVIDER=package
|
|
-Dprotobuf_BUILD_TESTS=OFF"
|
|
# XXX: Tests require that the abseil-cpp provides absl::scoped_mock_log
|
|
hostmakedepends="pkg-config"
|
|
makedepends="zlib-devel gtest-devel abseil-cpp-devel"
|
|
short_desc="Protocol buffers compiler"
|
|
maintainer="Orphaned <orphan@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/protocolbuffers/protobuf/archive/v${version}.tar.gz"
|
|
checksum=0930b1a6eb840a2295dfcb13bb5736d1292c3e0d61a90391181399327be7d8f1
|
|
|
|
# Switch to versioned package
|
|
conflicts="protobuf18>=0 protobuf23>=0 protobuf24>=0
|
|
protobuf25>=0 protobuf26>=0 protobuf28>=0"
|
|
replaces="${conflicts}"
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
# needs host protoc
|
|
hostmakedepends+=" ${pkgname}"
|
|
configure_args+=" -Dprotobuf_PROTOC_EXE=/usr/bin/protoc"
|
|
fi
|
|
|
|
post_install() {
|
|
rm -rf "${DESTDIR}/usr/lib/cmake"
|
|
vlicense LICENSE
|
|
}
|
|
|
|
libprotobuf_package() {
|
|
short_desc="Protocol buffers C++ library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotobuf.so.*"
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
|
|
libprotobuf-lite_package() {
|
|
short_desc="Protocol buffers C++ library (lite version)"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotobuf-lite.so.*"
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
|
|
libprotoc_package() {
|
|
short_desc="Protocol buffers compiler library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotoc.so.*"
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
|
|
libprotoc-devel_package() {
|
|
depends="libprotoc-${version}_${revision}"
|
|
short_desc="Protocol buffers compiler library - development files"
|
|
# Switch to versioned package
|
|
conflicts="libprotoc18-devel>=0 libprotoc23-devel>=0
|
|
libprotoc24-devel>=0 libprotoc25-devel>=0
|
|
libprotoc26-devel>=0 libprotoc28-devel>=0"
|
|
replaces="${conflicts}"
|
|
pkg_install() {
|
|
vmove usr/lib/libprotoc.so
|
|
vmove usr/include/google/protobuf/compiler
|
|
}
|
|
}
|
|
|
|
protobuf-devel_package() {
|
|
depends="zlib-devel
|
|
libprotobuf-${version}_${revision}
|
|
libprotobuf-lite-${version}_${revision}
|
|
abseil-cpp-devel"
|
|
short_desc="Protocol buffers C++ library - development files"
|
|
# Switch to versioned package
|
|
conflicts="protobuf18-devel>=0 protobuf23-devel>=0
|
|
protobuf24-devel>=0 protobuf25-devel>=0
|
|
protobuf26-devel>=0 protobuf28-devel>=0"
|
|
replaces="${conflicts}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/libprotobuf.so
|
|
vmove usr/lib/libprotobuf-lite.so
|
|
vmove usr/lib/pkgconfig
|
|
vmove "usr/lib/*.a"
|
|
}
|
|
}
|