opt/protobuf/Pkgfile

26 lines
810 B
Plaintext
Raw Normal View History

2017-10-22 05:03:52 +02:00
# Description: Protocol Buffers are a way of encoding structured data in an efficient yet extensible format.
# URL: https://developers.google.com/protocol-buffers/
2023-03-10 18:02:01 +01:00
# Maintainer: Tim Biermann, tbier at posteo dot de
2023-02-17 09:14:31 +01:00
# Depends on: abseil-cpp zlib
2017-10-22 05:03:52 +02:00
name=protobuf
2023-03-12 12:24:16 +01:00
version=22.2
2017-10-22 05:03:52 +02:00
release=1
2023-02-17 09:14:31 +01:00
source=(https://github.com/protocolbuffers/protobuf/archive/v$version/$name-$version.tar.gz)
2017-10-22 05:03:52 +02:00
build() {
2023-03-10 18:02:01 +01:00
cmake -S $name-$version -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-D protobuf_BUILD_SHARED_LIBS=ON \
-D protobuf_BUILD_TESTS=OFF \
-D protobuf_ABSL_PROVIDER=package \
-Wno-dev
2017-10-22 05:03:52 +02:00
2023-03-10 18:02:01 +01:00
cmake --build build
DESTDIR=$PKG cmake --install build
2017-10-22 05:03:52 +02:00
}