Skip to content

Rework the protobuf ecosystem #28321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions R/R-RProtoBuf/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@
PortSystem 1.0
PortGroup R 1.0

R.setup cran eddelbuettel RProtoBuf 0.4.22
revision 1
R.setup cran eddelbuettel RProtoBuf 0.4.24
revision 0
categories-append devel
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
license GPL-2+
description R interface to the Protocol Buffers API
long_description {*}${description}
homepage-append https://dirk.eddelbuettel.com/code/rprotobuf.html
checksums rmd160 e9f6d049b1f696a17c9179190400d36fa0c78d23 \
sha256 75b802176722052d1ef2c6b36adff9204ee86fb8f2e1fcecd897571bd8ed8d7e \
size 1010658
checksums rmd160 98732fea1e3f14f8fb36984b1f9aa7ace895bfe8 \
sha256 f22c16013d8cbedf5a09bb854ce092466434db740092fc0d7554fb5d33896168 \
size 1013085

if {${os.platform} eq "darwin" && ${os.major} < 16} {
if {${os.platform} eq "darwin" && ${configure.cxx_stdlib} ne "libc++"} {
# Symbol not found: __ZN6google8protobuf8compiler10SourceTree19GetLastErrorMessageB5cxx11Ev
patchfiles-append \
patch-cxx11.diff
}

depends_build-append \
port:pkgconfig
depends_lib-append port:protobuf3-cpp \
path:bin/pkg-config:pkgconfig

depends_lib-append port:protobuf \
port:R-Rcpp

compiler.cxx_standard 2017
Expand Down
4 changes: 2 additions & 2 deletions R/R-cld3/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortGroup R 1.0

# GitHub version is old.
R.setup cran ropensci cld3 1.6.1
revision 0
revision 1
categories-append devel
maintainers nomaintainer
license Apache-2
Expand All @@ -19,7 +19,7 @@ checksums rmd160 60afb8f5c37a0ecf1d418977c0226d74f4bd4e3c \
depends_build-append \
path:bin/pkg-config:pkgconfig

depends_lib-append port:protobuf3-cpp \
depends_lib-append port:protobuf \
port:R-Rcpp

if {${os.platform} eq "darwin" && ${configure.cxx_stdlib} ne "libc++"} {
Expand Down
4 changes: 2 additions & 2 deletions R/R-protolite/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PortGroup R 1.0

# GitHub version lags behind.
R.setup cran jeroen protolite 2.3.1
revision 0
revision 1
categories-append devel
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
license MIT
Expand All @@ -27,7 +27,7 @@ if {${os.platform} eq "darwin" && ${configure.cxx_stdlib} ne "libc++"} {
depends_build-append \
path:bin/pkg-config:pkgconfig

depends_lib-append port:protobuf3-cpp \
depends_lib-append port:protobuf \
port:R-jsonlite \
port:R-Rcpp

Expand Down
2 changes: 1 addition & 1 deletion databases/mysql57/Portfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in databases/mysql57/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint mysql57-server: Warning: Unnecessary platforms line as darwin is the default

Check warning on line 1 in databases/mysql57/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint mysql57: Warning: Unnecessary platforms line as darwin is the default

Check warning on line 1 in databases/mysql57/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint mysql57-server: Warning: Unnecessary platforms line as darwin is the default

Check warning on line 1 in databases/mysql57/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint mysql57: Warning: Unnecessary platforms line as darwin is the default

Check warning on line 1 in databases/mysql57/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint mysql57-server: Warning: Unnecessary platforms line as darwin is the default

Check warning on line 1 in databases/mysql57/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint mysql57: Warning: Unnecessary platforms line as darwin is the default

PortSystem 1.0
PortGroup conflicts_build 1.0
Expand Down Expand Up @@ -43,7 +43,7 @@
# poll-emulator breaks the build, if active:
# xcom/task.c:744:37: error: 'POLLRDNORM' undeclared (first use in this function)
# See also: https://trac.macports.org/ticket/38558
conflicts_build boost protobuf3-cpp protobuf-cpp poll-emulator
conflicts_build boost protobuf poll-emulator

distfiles ${distname}${extract.suffix}:mysql \
${boost_distname}${extract.suffix}:boost
Expand Down
6 changes: 3 additions & 3 deletions databases/percona/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ set name_package ${name}-server
set version_mysql 8.0.16
set release 7
# Please set revision_client and revision_server to 0 if you bump version_mysql or release.
set revision_client 9
set revision_server 2
set revision_client 10
set revision_server 3
set boost_version 1.69.0
version ${version_mysql}-${release}
categories databases
Expand Down Expand Up @@ -64,7 +64,7 @@ if {$subport eq $name} {
path:lib/pkgconfig/icu-uc.pc:icu \
port:libevent \
port:lz4 \
port:protobuf3-cpp \
port:protobuf \
port:re2 \
port:zlib \
port:tcp_wrappers
Expand Down
7 changes: 4 additions & 3 deletions devel/Bear/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ legacysupport.use_mp_libcxx yes

github.setup rizsotto Bear 3.1.6
github.tarball_from archive
revision 0
revision 1

checksums rmd160 41ff322cdbc0c5f15adf17193b586c3dad441230 \
sha256 99cd891eec6e89b734d7cafe0e623dd8c2f27d8cbf3ee9bc4807e69e5c8fb55c \
Expand Down Expand Up @@ -46,8 +46,9 @@ depends_build-append \
depends_lib-append port:abseil \
port:grpc \
port:${port_libfmt} \
port:protobuf3-cpp
port:protobuf

configure.args-append \
-DENABLE_UNIT_TESTS=Off \
-DENABLE_FUNC_TESTS=Off
-DENABLE_FUNC_TESTS=Off \
-DCMAKE_EXE_LINKER_FLAGS="-lgrpc -lgpr"
52 changes: 28 additions & 24 deletions devel/grpc/Portfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint py312-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint py311-grpcio-tools: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint py311-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint py310-grpcio-tools: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint py310-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint py39-grpcio-tools: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint py39-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-14

port lint grpc: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint py312-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint py311-grpcio-tools: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint py311-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint py310-grpcio-tools: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint py310-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint py39-grpcio-tools: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint py39-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-15

port lint grpc: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint py312-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint py311-grpcio-tools: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint py311-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint py310-grpcio-tools: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint py310-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint py39-grpcio-tools: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint py39-grpcio: Error: Line 181 repeats inclusion of PortGroup python

Check warning on line 1 in devel/grpc/Portfile

View workflow job for this annotation

GitHub Actions / macos-13

port lint grpc: Error: Line 181 repeats inclusion of PortGroup python

PortSystem 1.0
PortGroup cmake 1.1
PortGroup compiler_blacklist_versions 1.0
PortGroup github 1.0
PortGroup legacysupport 1.1
PortGroup compiler_blacklist_versions 1.0
PortGroup openssl 1.0

# NOTE: Also rev-bump 'apache-arrow' when updating this port
github.setup grpc grpc 1.48.4 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision 11
github.setup grpc grpc 1.72.0 v
github.tarball_from releases
revision 0
categories devel
maintainers nomaintainer
license Apache-2
Expand All @@ -30,19 +30,14 @@

set name_io ${name}io

patchfiles-append patch-unbreak-port_platform.diff
patchfiles-append patch-python-respect-cc-variable.diff
patchfiles-append patch-use-cxx17.diff
patchfiles-append patch-avoid-overlinking-abseil.diff

patchfiles-append patch-src-core-ext-xds-xds_api.cc.diff

# abseil and re2 require c++17 support
compiler.cxx_standard 2017

# https://github.com/grpc/grpc/commit/f15ba1ffc73c5d0b63754df72fc47c567b9c7252
if {[vercmp ${version} >= 1.51.0]} {
compiler.thread_local_storage yes
}

depends_build-append \
path:bin/pkg-config:pkgconfig
Expand All @@ -52,8 +47,7 @@
port:c-ares \
port:lbzip2 \
path:lib/pkgconfig/libuv.pc:libuv \
path:lib/libssl.dylib:openssl \
port:protobuf3-cpp \
port:protobuf \
port:re2 \
port:zlib

Expand Down Expand Up @@ -87,7 +81,9 @@
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_RE2_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
-DgRPC_ZLIB_PROVIDER=package
-DgRPC_ZLIB_PROVIDER=package \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-undefined,dynamic_lookup" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-undefined,dynamic_lookup,-rpath,${prefix}/lib,-rpath,${prefix}/lib"

# https://github.com/grpc/grpc/pull/32159
configure.cppflags-append \
Expand Down Expand Up @@ -162,7 +158,7 @@
}

# create Python subports
set python_versions {39 310}
set python_versions {39 310 311 312 313}

# Python modules grpcio and grpcio-tools
foreach v ${python_versions} {
Expand Down Expand Up @@ -254,34 +250,42 @@
if {[string match "py*${name_io}" ${subport}]} {
depends_build-append \
port:py${python.version}-coverage \
port:py${python.version}-cython-compat \
port:py${python.version}-setuptools

depends_lib-append \
port:py${python.version}-cython \
port:py${python.version}-protobuf3 \
port:py${python.version}-protobuf \
port:py${python.version}-six

depends_test-append \
port:py${python.version}-twisted

# Not yet compatible with Cython 3
set compat_path [string replace ${python.pkgd} 0 [string length ${python.prefix}]-1 ${prefix}/lib/py${python.version}-cython-compat]
build.env-append PYTHONPATH=${compat_path}
destroot.env-append PYTHONPATH=${compat_path}
if {${python.version} >= 313} {
depends_build-append \
port:py${python.version}-cython
} else {
depends_build-append \
port:py${python.version}-cython-compat
# Not yet compatible with Cython 3
set compat_path [string replace ${python.pkgd} 0 [string length ${python.prefix}]-1 ${prefix}/lib/py${python.version}-cython-compat]
build.env-append PYTHONPATH=${compat_path}
destroot.env-append PYTHONPATH=${compat_path}
}
}

# Python bindings for grpcio-tools
if {[string match "py*-${name_io}-tools" ${subport}]} {
set grpc_submodules \
protobuf
set grpc_submodules [list \
abseil-cpp \
protobuf \
]

depends_build-append \
port:py${python.version}-setuptools

depends_lib-append \
port:py${python.version}-${name_io} \
port:py${python.version}-protobuf3
port:py${python.version}-protobuf

# Build instructions:
# https://github.com/grpc/grpc/tree/master/tools/distrib/python/grpcio_tools
Expand Down
8 changes: 4 additions & 4 deletions devel/grpc/files/patch-avoid-overlinking-abseil.diff
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ in linking.
[2]: https://stackoverflow.com/a/61674208

Upstream-Status: Pending
--- ./cmake/pkg-config-template.pc.in.orig 2023-08-26 21:55:00.000000000 +0200
+++ ./cmake/pkg-config-template.pc.in 2023-08-26 21:59:26.000000000 +0200
@@ -7,6 +7,6 @@
--- ./cmake/pkg-config-template.pc.in.orig 2025-05-08 11:14:03
+++ ./cmake/pkg-config-template.pc.in 2025-05-08 11:14:17
@@ -7,7 +7,6 @@
Description: @PC_DESCRIPTION@
Version: @PC_VERSION@
Cflags: -I${includedir}
-Requires: @PC_REQUIRES@
+Requires.private: @PC_REQUIRES@
Requires.private: @PC_REQUIRES_PRIVATE@
Libs: -L${libdir} @PC_LIB@
Libs.private: @PC_LIBS_PRIVATE@
107 changes: 0 additions & 107 deletions devel/grpc/files/patch-python-respect-cc-variable.diff

This file was deleted.

10 changes: 0 additions & 10 deletions devel/grpc/files/patch-src-core-ext-xds-xds_api.cc.diff

This file was deleted.

15 changes: 0 additions & 15 deletions devel/grpc/files/patch-unbreak-port_platform.diff

This file was deleted.

Loading
Loading