mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 08:55:07 +03:00
+protobuf
This commit is contained in:
parent
3aef1cf21b
commit
541a94533b
1 changed files with 46 additions and 0 deletions
46
projects/protobuf.dev/package.yml
Normal file
46
projects/protobuf.dev/package.yml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/protocolbuffers/protobuf/releases/download/v{{version.raw}}/protobuf-all-{{version.raw}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: protocolbuffers/protobuf/tags
|
||||||
|
# v22 requires bazel for builds and is quite different
|
||||||
|
ignore: v22.x
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
zlib.net: ^1
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
cmake.org: ^3
|
||||||
|
working-directory: build
|
||||||
|
script: |
|
||||||
|
cmake .. $ARGS
|
||||||
|
make --jobs {{ hw.concurrency }} install
|
||||||
|
env:
|
||||||
|
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
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
Loading…
Reference in a new issue