2023-02-24 01:30:56 +03:00
|
|
|
distributable:
|
2024-01-23 02:52:26 +03:00
|
|
|
url: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v{{version.raw}}.tar.gz
|
|
|
|
strip-components: 1
|
2023-02-24 01:30:56 +03:00
|
|
|
|
|
|
|
versions:
|
2023-05-08 23:41:50 +03:00
|
|
|
github: protocolbuffers/protobuf
|
2023-02-24 01:30:56 +03:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
zlib.net: ^1
|
2024-06-26 17:30:56 +03:00
|
|
|
abseil.io: ^20240116 # FIXME: how? it links to e.g. libabsl_bad_any_cast_impl.so.2308.0.0
|
2023-02-24 01:30:56 +03:00
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
cmake.org: ^3
|
|
|
|
working-directory: build
|
|
|
|
script: |
|
|
|
|
cmake .. $ARGS
|
|
|
|
make --jobs {{ hw.concurrency }} install
|
|
|
|
env:
|
2024-03-08 00:39:01 +03:00
|
|
|
linux:
|
|
|
|
# likely needs bumping to an unreleased abseil.io version
|
|
|
|
# ld.lld: error: undefined reference due to --no-allow-shlib-undefined: absl::lts_20240116::log_internal::LogMessage& absl::lts_20240116::log_internal::LogMessage::operator<<<int, 0>(int const&)
|
|
|
|
LDFLAGS: $LDFLAGS -Wl,--allow-shlib-undefined
|
2023-02-24 01:30:56 +03:00
|
|
|
ARGS:
|
|
|
|
- -Dprotobuf_BUILD_LIBPROTOC=ON
|
|
|
|
- -Dprotobuf_BUILD_SHARED_LIBS=ON
|
|
|
|
- -Dprotobuf_INSTALL_EXAMPLES=OFF
|
|
|
|
- -Dprotobuf_BUILD_TESTS=OFF
|
|
|
|
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
|
|
|
- -DCMAKE_BUILD_TYPE=Release
|
2023-05-08 23:41:50 +03:00
|
|
|
- -Dprotobuf_ABSL_PROVIDER=package
|
|
|
|
- -DCMAKE_PREFIX_PATH={{deps.abseil.io.prefix}}
|
2023-02-24 01:30:56 +03:00
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/protoc
|
|
|
|
|
|
|
|
test:
|
|
|
|
script: |
|
|
|
|
mv $FIXTURE test.proto
|
|
|
|
protoc test.proto --cpp_out=.
|
|
|
|
fixture: |
|
|
|
|
syntax = "proto3";
|
|
|
|
package test;
|
|
|
|
message TestCase {
|
|
|
|
string name = 4;
|
|
|
|
}
|
|
|
|
message Test {
|
|
|
|
repeated TestCase case = 1;
|
|
|
|
}
|