Skip to content

Commit 0d14571

Browse files
committed
Temp commit to make CI work
py-protobuf3: conflict with py-protobuf{,2} py-protobuf: new port py-protobuf2: new port grpc: update to 1.72.0 protobuf: new port protobuf-cpp: replace by protobuf2-cpp protobuf2-cpp: new port
1 parent 64afdd6 commit 0d14571

File tree

13 files changed

+360
-267
lines changed

13 files changed

+360
-267
lines changed

devel/grpc/Portfile

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ PortGroup legacysupport 1.1
77
PortGroup compiler_blacklist_versions 1.0
88

99
# NOTE: Also rev-bump 'apache-arrow' when updating this port
10-
github.setup grpc grpc 1.48.4 v
11-
# Change github.tarball_from to 'releases' or 'archive' next update
12-
github.tarball_from tarball
13-
revision 11
10+
github.setup grpc grpc 1.72.0 v
11+
github.tarball_from releases
12+
revision 0
1413
categories devel
1514
maintainers nomaintainer
1615
license Apache-2
@@ -30,12 +29,9 @@ github.livecheck.regex {([0-9.]+)}
3029

3130
set name_io ${name}io
3231

33-
patchfiles-append patch-unbreak-port_platform.diff
34-
patchfiles-append patch-python-respect-cc-variable.diff
32+
patchfiles-append patch-use-cxx17.diff
3533
patchfiles-append patch-avoid-overlinking-abseil.diff
3634

37-
patchfiles-append patch-src-core-ext-xds-xds_api.cc.diff
38-
3935
# abseil and re2 require c++17 support
4036
compiler.cxx_standard 2017
4137

@@ -53,7 +49,7 @@ depends_lib-append \
5349
port:lbzip2 \
5450
path:lib/pkgconfig/libuv.pc:libuv \
5551
path:lib/libssl.dylib:openssl \
56-
port:protobuf3-cpp \
52+
port:protobuf \
5753
port:re2 \
5854
port:zlib
5955

@@ -87,7 +83,9 @@ configure.args-append \
8783
-DgRPC_PROTOBUF_PROVIDER=package \
8884
-DgRPC_RE2_PROVIDER=package \
8985
-DgRPC_SSL_PROVIDER=package \
90-
-DgRPC_ZLIB_PROVIDER=package
86+
-DgRPC_ZLIB_PROVIDER=package \
87+
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-undefined,dynamic_lookup" \
88+
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-undefined,dynamic_lookup,-rpath,${prefix}/lib,-rpath,${prefix}/lib"
9189

9290
# https://github.com/grpc/grpc/pull/32159
9391
configure.cppflags-append \
@@ -162,7 +160,7 @@ variant test description {Build and run unit testing framework} {
162160
}
163161

164162
# create Python subports
165-
set python_versions {39 310}
163+
set python_versions {39 310 311 312 313}
166164

167165
# Python modules grpcio and grpcio-tools
168166
foreach v ${python_versions} {
@@ -254,34 +252,42 @@ if {[string match "py*" ${subport}]} {
254252
if {[string match "py*${name_io}" ${subport}]} {
255253
depends_build-append \
256254
port:py${python.version}-coverage \
257-
port:py${python.version}-cython-compat \
258255
port:py${python.version}-setuptools
259256

260257
depends_lib-append \
261258
port:py${python.version}-cython \
262-
port:py${python.version}-protobuf3 \
259+
port:py${python.version}-protobuf \
263260
port:py${python.version}-six
264261

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

268-
# Not yet compatible with Cython 3
269-
set compat_path [string replace ${python.pkgd} 0 [string length ${python.prefix}]-1 ${prefix}/lib/py${python.version}-cython-compat]
270-
build.env-append PYTHONPATH=${compat_path}
271-
destroot.env-append PYTHONPATH=${compat_path}
265+
if {${python.version} >= 313} {
266+
depends_build-append \
267+
port:py${python.version}-cython
268+
} else {
269+
depends_build-append \
270+
port:py${python.version}-cython-compat
271+
# Not yet compatible with Cython 3
272+
set compat_path [string replace ${python.pkgd} 0 [string length ${python.prefix}]-1 ${prefix}/lib/py${python.version}-cython-compat]
273+
build.env-append PYTHONPATH=${compat_path}
274+
destroot.env-append PYTHONPATH=${compat_path}
275+
}
272276
}
273277

274278
# Python bindings for grpcio-tools
275279
if {[string match "py*-${name_io}-tools" ${subport}]} {
276-
set grpc_submodules \
277-
protobuf
280+
set grpc_submodules [list \
281+
abseil-cpp \
282+
protobuf \
283+
]
278284

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

282288
depends_lib-append \
283289
port:py${python.version}-${name_io} \
284-
port:py${python.version}-protobuf3
290+
port:py${python.version}-protobuf
285291

286292
# Build instructions:
287293
# https://github.com/grpc/grpc/tree/master/tools/distrib/python/grpcio_tools

devel/grpc/files/patch-avoid-overlinking-abseil.diff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ in linking.
1414
[2]: https://stackoverflow.com/a/61674208
1515

1616
Upstream-Status: Pending
17-
--- ./cmake/pkg-config-template.pc.in.orig 2023-08-26 21:55:00.000000000 +0200
18-
+++ ./cmake/pkg-config-template.pc.in 2023-08-26 21:59:26.000000000 +0200
19-
@@ -7,6 +7,6 @@
17+
--- ./cmake/pkg-config-template.pc.in.orig 2025-05-08 11:14:03
18+
+++ ./cmake/pkg-config-template.pc.in 2025-05-08 11:14:17
19+
@@ -7,7 +7,6 @@
2020
Description: @PC_DESCRIPTION@
2121
Version: @PC_VERSION@
2222
Cflags: -I${includedir}
2323
-Requires: @PC_REQUIRES@
24-
+Requires.private: @PC_REQUIRES@
24+
Requires.private: @PC_REQUIRES_PRIVATE@
2525
Libs: -L${libdir} @PC_LIB@
2626
Libs.private: @PC_LIBS_PRIVATE@

devel/grpc/files/patch-python-respect-cc-variable.diff

Lines changed: 0 additions & 107 deletions
This file was deleted.

devel/grpc/files/patch-src-core-ext-xds-xds_api.cc.diff

Lines changed: 0 additions & 10 deletions
This file was deleted.

devel/grpc/files/patch-unbreak-port_platform.diff

Lines changed: 0 additions & 15 deletions
This file was deleted.

devel/grpc/files/patch-use-cxx17.diff

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Use C++17 instead of C++14.
2+
https://github.com/grpc/grpc/issues/34256
3+
https://github.com/grpc/grpc/commit/93b29607ccaa2545e2b3a5a8016f765333f1b38f
4+
--- tools/distrib/gen_compilation_database.py.orig 2025-05-08 11:16:19
5+
+++ tools/distrib/gen_compilation_database.py 2025-05-08 11:16:24
6+
@@ -98,7 +98,7 @@
7+
# Workaround for bazel added C++14 options, those doesn't affect build itself but
8+
# clang-tidy will misinterpret them.
9+
options = options.replace("-std=c++0x ", "")
10+
- options = options.replace("-std=c++14 ", "")
11+
+ options = options.replace("-std=c++17 ", "")
12+
13+
# Add -DNDEBUG so that editors show the correct size information for structs.
14+
options += " -DNDEBUG"

devel/protobuf-cpp/Portfile

Lines changed: 3 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,10 @@
11
# -*- 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
22

33
PortSystem 1.0
4-
PortGroup github 1.0
4+
PortGroup obsolete 1.0
55

66
name protobuf-cpp
7+
replaced_by protobuf2-cpp
78
version 2.6.1
9+
revision 1
810
categories devel
9-
maintainers nomaintainer
10-
license BSD
11-
description Encode data in an efficient yet extensible format.
12-
conflicts protobuf3-cpp
13-
14-
long_description \
15-
Google Protocol Buffers are a flexible, efficient, \
16-
automated mechanism for serializing structured data -- \
17-
think XML, but smaller, faster, and simpler. You \
18-
define how you want your data to be structured once, \
19-
then you can use special generated source code to \
20-
easily write and read your structured data to and from \
21-
a variety of data streams and using a variety of \
22-
languages. You can even update your data structure \
23-
without breaking deployed programs that are compiled \
24-
against the "old" format. You specify how you want \
25-
the information you're serializing to be structured by \
26-
defining protocol buffer message types in .proto \
27-
files. Each protocol buffer message is a small \
28-
logical record of information, containing a series of \
29-
name-value pairs.
30-
31-
github.setup google protobuf ${version} v
32-
github.tarball_from releases
33-
homepage https://github.com/google/protobuf
34-
master_sites https://github.com/google/protobuf/releases/download/v${version}
35-
distfiles protobuf-${version}.tar.bz2
36-
worksrcdir protobuf-${version}
37-
38-
use_bzip2 yes
39-
checksums sha1 6421ee86d8fb4e39f21f56991daa892a3e8d314b \
40-
sha256 ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910
41-
42-
platforms darwin
43-
44-
depends_lib port:zlib
45-
46-
# 2.6.1's glibtool doesn't pass -stdlib=libc++ to the linker
47-
use_autoreconf yes
48-
autoreconf.args -fvi
49-
50-
configure.cflags-append -g
51-
configure.cppflags-append -g
52-
53-
post-destroot {
54-
set docdir ${destroot}${prefix}/share/doc/${name}
55-
56-
xinstall -d -m 755 ${docdir}
57-
58-
foreach f {CHANGES.txt CONTRIBUTORS.txt INSTALL.txt LICENSE README.md editors examples} {
59-
file copy ${worksrcpath}/${f} ${docdir}
60-
}
61-
}
62-
63-
test.run yes
64-
test.cmd "ulimit -c 0; make"
65-
test.target check

0 commit comments

Comments
 (0)