opt/protobuf/Pkgfile

26 lines
790 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/
# Maintainer: Danny Rawlins, crux at romster dot me
2023-02-17 09:14:31 +01:00
# Depends on: abseil-cpp zlib
2017-10-22 05:03:52 +02:00
name=protobuf
2023-02-17 09:14:31 +01:00
version=22.0
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() {
2022-10-02 08:43:12 +02: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 \
2023-02-17 09:14:31 +01:00
-D protobuf_ABSL_PROVIDER=package \
2022-10-02 08:43:12 +02:00
-Wno-dev
2017-10-22 05:03:52 +02:00
2022-10-02 08:43:12 +02:00
cmake --build build
DESTDIR=$PKG cmake --install build
2017-10-22 05:03:52 +02:00
}