101 lines
2.6 KiB
Bash
101 lines
2.6 KiB
Bash
# Template file for 'protobuf'
|
|
pkgname=protobuf
|
|
version=21.5
|
|
revision=1
|
|
wrksrc="protobuf-${version}"
|
|
build_style=gnu-configure
|
|
hostmakedepends="pkg-config automake libtool"
|
|
makedepends="zlib-devel"
|
|
short_desc="Protocol buffers compiler"
|
|
maintainer="Andrew J. Hesford <ajh@sideband.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=4a7e87e4166c358c63342dddcde6312faee06ea9d5bb4e2fa87d3478076f6639
|
|
# Checks rely on googletest
|
|
make_check=no
|
|
|
|
# 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+=" --with-protoc=/usr/bin/protoc"
|
|
fi
|
|
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
makedepends+=" libatomic-devel"
|
|
LDFLAGS+=" -latomic"
|
|
fi
|
|
|
|
pre_configure() {
|
|
autoreconf -fi
|
|
}
|
|
|
|
post_install() {
|
|
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.a
|
|
vmove usr/lib/libprotoc.so
|
|
vmove usr/include/google/protobuf/compiler
|
|
}
|
|
}
|
|
|
|
protobuf-devel_package() {
|
|
depends="zlib-devel
|
|
libprotobuf-${version}_${revision}
|
|
libprotobuf-lite-${version}_${revision}"
|
|
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.a
|
|
vmove usr/lib/libprotobuf-lite.a
|
|
vmove usr/lib/libprotobuf.so
|
|
vmove usr/lib/libprotobuf-lite.so
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|