126 lines
3.3 KiB
Bash
126 lines
3.3 KiB
Bash
# Template file for 'protobuf28'
|
|
pkgname=protobuf28
|
|
version=3.17.3
|
|
revision=2
|
|
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=c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db
|
|
# Checks rely on googletest
|
|
make_check=no
|
|
|
|
# Switch to versioned package
|
|
conflicts="protobuf18>=0 protobuf23>=0 protobuf24>=0 protobuf25>=0 protobuf26>=0"
|
|
replaces="protobuf<=3.11.4_1 ${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
|
|
}
|
|
|
|
do_configure() {
|
|
# configure doesn't set proper linker flags when discovering pthread
|
|
PTHREAD_LIBS="-pthread" PTHREAD_CFLAGS="-pthread" ./configure ${configure_args}
|
|
}
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
}
|
|
|
|
libprotobuf28_package() {
|
|
short_desc="Protocol buffers C++ library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotobuf.so.*"
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
|
|
libprotobuf28-lite_package() {
|
|
short_desc="Protocol buffers C++ library (lite version)"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotobuf-lite.so.*"
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
|
|
libprotoc28_package() {
|
|
short_desc="Protocol buffers compiler library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotoc.so.*"
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
|
|
libprotoc28-devel_package() {
|
|
depends="libprotoc28-${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"
|
|
replaces="libprotoc-devel<=3.11.4_1 ${conflicts}"
|
|
pkg_install() {
|
|
vmove usr/lib/libprotoc.a
|
|
vmove usr/lib/libprotoc.so
|
|
vmove usr/include/google/protobuf/compiler
|
|
}
|
|
}
|
|
|
|
protobuf28-devel_package() {
|
|
depends="zlib-devel
|
|
libprotobuf28-${version}_${revision}
|
|
libprotobuf28-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"
|
|
replaces="protobuf-devel<=3.11.4_1 ${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
|
|
}
|
|
}
|
|
|
|
protobuf_package() {
|
|
build_style=meta
|
|
short_desc="Protocol buffers compiler (meta package)"
|
|
depends="protobuf28"
|
|
}
|
|
|
|
protobuf-devel_package() {
|
|
build_style=meta
|
|
short_desc="Protocol buffers C++ library - development files (meta package)"
|
|
depends="protobuf28-devel"
|
|
}
|
|
|
|
protobuf-lite_package() {
|
|
build_style=meta
|
|
short_desc="Protocol buffers C++ library - lite version (meta package)"
|
|
depends="libprotobuf28-lite"
|
|
}
|
|
|
|
libprotoc-devel_package() {
|
|
build_style=meta
|
|
short_desc="Protocol buffers compiler library - development files (meta package)"
|
|
depends="libprotoc28-devel"
|
|
}
|