Skip to content

Commit

Permalink
Add conf-protoc-dev virtual conf package
Browse files Browse the repository at this point in the history
  • Loading branch information
andersfugmann committed Mar 3, 2024
1 parent 58f9e61 commit d1e98bd
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
38 changes: 38 additions & 0 deletions conf-protoc-dev.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
opam-version: "2.0"
maintainer: "Anders Fugmann"
authors: "Google"
license: "BSD-3-Clause"
homepage: "https://developers.google.com/protocol-buffers/"
bug-reports: "https://github.com/protocolbuffers/protobuf/issues"
dev-repo: "git+https://github.com/protocolbuffers/protobuf.git"
build: [ make ]

depends: [
"conf-pkg-config"
]

depexts: [
["libprotoc-dev"] {os-family = "debian"}
["libprotoc-dev"] {os-family = "ubuntu"}
["lib64protobuf-devel"] {os-distribution = "mageia"}
["protobuf-devel"] {os-distribution = "centos"}
["protobuf-devel"] {os-distribution = "fedora"}
["protobuf-devel"] {os-distribution = "rhel"}
["protobuf-dev"] {os-family = "alpine"}
["protobuf"] {os-family = "arch"}
["protobuf-devel"] {os-family = "suse"}
["protobuf"] {os = "freebsd"}
["protobuf"] {os = "macos" & os-distribution = "homebrew"}
]

x-ci-accept-failures: [
"oraclelinux-7" # Package not available by default
"oraclelinux-8" # Package not available by default
"oraclelinux-9" # Package not available by default
]

available: (os-distribution != "ubuntu" | os-version >= "18.04") & (os-distribution != "centos" | os-version >= "8")
synopsis: "Virtual package to install protobuf cpp headers"
description:
"This package will install c header files and libaries for google protocol buffers via `opam depext`"
flags: conf
2 changes: 2 additions & 0 deletions files/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build:
c++ `pkg-config protobuf --cflags` -c -o test.o test.c
1 change: 1 addition & 0 deletions files/test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include <google/protobuf/compiler/importer.h>

0 comments on commit d1e98bd

Please sign in to comment.