Skip to content

Commit 7e1f2b0

Browse files
protobuf ports: take ownership; cleanup
1 parent 9f2fec9 commit 7e1f2b0

File tree

7 files changed

+87
-77
lines changed

7 files changed

+87
-77
lines changed

devel/protobuf-cpp/Portfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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 cmake 1.1
45
PortGroup compiler_blacklist_versions 1.0
56
PortGroup github 1.0
6-
PortGroup cmake 1.1
77
PortGroup legacysupport 1.1
88

99
# clock_gettime needed for abseil
@@ -15,14 +15,13 @@ set release_version \
1515

1616
name protobuf-cpp
1717
github.setup protocolbuffers protobuf 5.${release_version} v
18+
github.tarball_from releases
1819
git.branch v${release_version}
1920
revision 0
2021

21-
dist_subdir ${name}/${version}
22-
2322
categories devel
24-
maintainers nomaintainer
2523
license BSD
24+
maintainers {mascguy @mascguy} openmaintainer
2625

2726
description Encode data in an efficient yet extensible format.
2827
long_description \
@@ -43,14 +42,13 @@ long_description \
4342
name-value pairs.
4443
homepage https://protobuf.dev
4544

45+
distname protobuf-${release_version}
46+
worksrcdir protobuf-${release_version}
47+
4648
checksums rmd160 3a8a4c815f22f23c5d8363d5fd7972b005d971a9 \
4749
sha256 6bd9dcc91b17ef25c26adf86db71c67ec02431dc92e9589eaf82e22889230496 \
4850
size 9350942
4951

50-
github.tarball_from releases
51-
distname protobuf-${release_version}
52-
worksrcdir protobuf-${release_version}
53-
5452
# Upstream adds zlib include - which is ${prefix}/include - before search path
5553
# of 3rd-party components, like gtest, gmock, etc. That causes the external
5654
# versions of those to be pulled in, and the build fails.
@@ -64,7 +62,8 @@ patchfiles-append patch-unbreak-time.diff
6462
compiler.cxx_standard 2017
6563
compiler.thread_local_storage yes
6664
# error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]
67-
compiler.blacklist {clang < 900}
65+
compiler.blacklist-append \
66+
{clang < 900}
6867

6968
if { [string match *clang* ${configure.compiler}] } {
7069
# Quiet deprecation warnings
@@ -97,10 +96,10 @@ configure.args-append \
9796
post-destroot {
9897
set docdir ${destroot}${prefix}/share/doc/${name}
9998

100-
xinstall -d -m 755 ${docdir}
99+
xinstall -d ${docdir}
101100

102101
foreach f {CONTRIBUTING.md CONTRIBUTORS.txt LICENSE README.md SECURITY.md editors examples} {
103-
file copy ${worksrcpath}/${f} ${docdir}
102+
copy ${worksrcpath}/${f} ${docdir}
104103
}
105104
}
106105

devel/protobuf-java/Portfile

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1+
# -*- 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
2+
13
PortSystem 1.0
2-
PortGroup github 1.0
4+
PortGroup github 1.0
35

46
name protobuf-java
57
version 2.6.1
68
revision 1
9+
github.setup google protobuf ${version} v
10+
github.tarball_from releases
11+
12+
conflicts protobuf3-java
13+
platforms any
14+
supported_archs noarch
15+
716
categories devel
8-
maintainers nomaintainer
917
license BSD
10-
description Encode data in an efficient yet extensible format.
11-
conflicts protobuf3-java
18+
maintainers {mascguy @mascguy} openmaintainer
1219

20+
description Encode data in an efficient yet extensible format.
1321
long_description \
1422
Google Protocol Buffers are a flexible, efficient, \
1523
automated mechanism for serializing structured data -- \
@@ -26,27 +34,27 @@ long_description \
2634
files. Each protocol buffer message is a small \
2735
logical record of information, containing a series of \
2836
name-value pairs.
29-
30-
github.setup google protobuf ${version} v
31-
github.tarball_from releases
3237
homepage https://github.com/google/protobuf
38+
3339
master_sites https://github.com/google/protobuf/releases/download/v${version}
3440
distfiles protobuf-${version}.tar.bz2
3541
dist_subdir protobuf-cpp
3642
worksrcdir protobuf-${version}/java
37-
3843
use_bzip2 yes
39-
checksums sha1 6421ee86d8fb4e39f21f56991daa892a3e8d314b \
40-
sha256 ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910
4144

42-
platforms any
43-
supported_archs noarch
45+
checksums rmd160 654acfce84b4ba738a0332d0c967d1399ff6e4c2 \
46+
sha256 ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 \
47+
size 2021416
48+
49+
depends_build-append \
50+
port:apache-ant
4451

45-
depends_lib port:zlib port:protobuf2-cpp
46-
depends_build port:apache-ant
52+
depends_lib-append \
53+
port:protobuf2-cpp \
54+
port:zlib
4755

48-
patch {
49-
file copy ${filespath}/build.xml ${worksrcpath}/
56+
post-patch {
57+
copy ${filespath}/build.xml ${worksrcpath}/
5058
}
5159

5260
use_configure no
@@ -59,9 +67,9 @@ destroot {
5967
set javadir ${destroot}${prefix}/share/java
6068
set docdir ${destroot}${prefix}/share/doc/${name}
6169

62-
xinstall -d -m 755 ${javadir}
63-
xinstall -d -m 755 ${docdir}
70+
xinstall -d ${javadir}
71+
xinstall -d ${docdir}
6472

65-
file copy ${worksrcpath}/protobuf.jar ${javadir}
66-
file copy ${worksrcpath}/api ${docdir}/api
73+
copy ${worksrcpath}/protobuf.jar ${javadir}
74+
copy ${worksrcpath}/api ${docdir}/api
6775
}

devel/protobuf2-cpp/Portfile

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
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

3-
PortSystem 1.0
4-
PortGroup github 1.0
3+
PortSystem 1.0
4+
PortGroup github 1.0
55

66
name protobuf2-cpp
77
version 2.6.1
88
revision 1
9+
github.setup google protobuf ${version} v
10+
github.tarball_from releases
11+
912
categories devel
10-
maintainers nomaintainer
1113
license BSD
12-
description Encode data in an efficient yet extensible format.
14+
maintainers {mascguy @mascguy} openmaintainer
1315

16+
description Encode data in an efficient yet extensible format.
1417
long_description \
1518
Google Protocol Buffers are a flexible, efficient, \
1619
automated mechanism for serializing structured data -- \
@@ -27,23 +30,19 @@ long_description \
2730
files. Each protocol buffer message is a small \
2831
logical record of information, containing a series of \
2932
name-value pairs.
33+
homepage https://github.com/google/protobuf
3034

31-
github.setup google protobuf ${version} v
32-
github.tarball_from releases
3335
distname protobuf-${version}
3436
dist_subdir protobuf-cpp
35-
homepage https://github.com/google/protobuf
36-
master_sites https://github.com/google/protobuf/releases/download/v${version}
37-
distfiles protobuf-${version}.tar.bz2
3837
worksrcdir protobuf-${version}
39-
4038
use_bzip2 yes
41-
checksums sha1 6421ee86d8fb4e39f21f56991daa892a3e8d314b \
42-
sha256 ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910
4339

44-
platforms darwin
40+
checksums rmd160 654acfce84b4ba738a0332d0c967d1399ff6e4c2 \
41+
sha256 ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 \
42+
size 2021416
4543

46-
depends_lib port:zlib
44+
depends_lib-append \
45+
port:zlib
4746

4847
# 2.6.1's glibtool doesn't pass -stdlib=libc++ to the linker
4948
use_autoreconf yes
@@ -56,10 +55,10 @@ configure.args-append --prefix=${prefix}/libexec/${name}
5655
post-destroot {
5756
set docdir ${destroot}${prefix}/share/doc/${name}
5857

59-
xinstall -d -m 755 ${docdir}
58+
xinstall -d ${docdir}
6059

6160
foreach f {CHANGES.txt CONTRIBUTORS.txt INSTALL.txt LICENSE README.md editors examples} {
62-
file copy ${worksrcpath}/${f} ${docdir}
61+
copy ${worksrcpath}/${f} ${docdir}
6362
}
6463
}
6564

devel/protobuf3-cpp/Portfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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 cmake 1.1
45
PortGroup compiler_blacklist_versions 1.0
56
PortGroup github 1.0
6-
PortGroup cmake 1.1
77

88
# NOTE: For any version number change, also
99
# NOTE: Update py-protobuf3 version's number to match
@@ -13,13 +13,15 @@ set release_version \
1313
21.12
1414

1515
name protobuf3-cpp
16-
github.setup protocolbuffers protobuf 3.${release_version} v
17-
git.branch v${release_version}
16+
version 3.${release_version}
1817
revision 3
18+
github.setup protocolbuffers protobuf ${version} v
19+
github.tarball_from releases
20+
git.branch v${release_version}
1921

2022
categories devel
21-
maintainers {mascguy @mascguy} openmaintainer
2223
license BSD
24+
maintainers {mascguy @mascguy} openmaintainer
2325

2426
description Encode data in an efficient yet extensible format.
2527
long_description \
@@ -44,7 +46,6 @@ checksums rmd160 f7c2879e427160c2a5055a2ab5d5ab231304fd31 \
4446
sha256 4eab9b524aa5913c6fffb20b2a8abf5ef7f95a80bc0701f3a6dbb4c607f73460 \
4547
size 4842303
4648

47-
github.tarball_from releases
4849
distname protobuf-cpp-${version}
4950
dist_subdir protobuf-cpp
5051
worksrcdir protobuf-${version}
@@ -58,7 +59,8 @@ patchfiles-append cmake-zlib-include.diff
5859
compiler.cxx_standard 2011
5960
compiler.thread_local_storage yes
6061
# error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]
61-
compiler.blacklist {clang < 900}
62+
compiler.blacklist-append \
63+
{clang < 900}
6264

6365
if { [string match *clang* ${configure.compiler}] } {
6466
# Quiet deprecation warnings
@@ -91,10 +93,10 @@ configure.args-append \
9193
post-destroot {
9294
set docdir ${destroot}${prefix}/share/doc/${name}
9395

94-
xinstall -d -m 755 ${docdir}
96+
xinstall -d ${docdir}
9597

9698
foreach f {CHANGES.txt CONTRIBUTORS.txt LICENSE README.md editors examples} {
97-
file copy ${worksrcpath}/${f} ${docdir}
99+
copy ${worksrcpath}/${f} ${docdir}
98100
}
99101
}
100102

devel/protobuf3-cpp/files/cmake-zlib-include.diff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- CMakeLists.txt.orig 2023-06-01 13:13:50.000000000 -0400
2-
+++ CMakeLists.txt 2023-06-01 13:14:05.000000000 -0400
1+
--- CMakeLists.txt.orig 2025-05-06 12:13:56.211941690 -0400
2+
+++ CMakeLists.txt 2025-05-06 12:14:10.546404659 -0400
33
@@ -296,7 +296,6 @@
44
endif (MSVC)
55

devel/protobuf5-cpp/Portfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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 cmake 1.1
45
PortGroup compiler_blacklist_versions 1.0
56
PortGroup github 1.0
6-
PortGroup cmake 1.1
77
PortGroup legacysupport 1.1
88

99
# clock_gettime needed for abseil
@@ -63,8 +63,10 @@ patchfiles-append patch-unbreak-time.diff
6363

6464
compiler.cxx_standard 2017
6565
compiler.thread_local_storage yes
66+
6667
# error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]
67-
compiler.blacklist {clang < 900}
68+
compiler.blacklist-append \
69+
{clang < 900}
6870

6971
if { [string match *clang* ${configure.compiler}] } {
7072
# Quiet deprecation warnings
@@ -100,10 +102,10 @@ configure.args-append \
100102
post-destroot {
101103
set docdir ${destroot}${prefix}/share/doc/${name}
102104

103-
xinstall -d -m 755 ${docdir}
105+
xinstall -d ${docdir}
104106

105107
foreach f {CONTRIBUTING.md CONTRIBUTORS.txt LICENSE README.md SECURITY.md editors examples} {
106-
file copy ${worksrcpath}/${f} ${docdir}
108+
copy ${worksrcpath}/${f} ${docdir}
107109
}
108110
}
109111

@@ -134,5 +136,4 @@ variant tests description {Build with tests enabled} {
134136
test.target check
135137
}
136138

137-
livecheck.version ${release_version}
138-
github.livecheck.regex {(2[6-9]\.[0-9]+)}
139+
livecheck.version ${release_version}

0 commit comments

Comments
 (0)