Skip to content

Commit 3142585

Browse files
suhailskhanchris-nielsen-wgu
authored andcommitted
protobuf3-cpp-upstream: replace by protobuf-cpp
1 parent 4e7b3fe commit 3142585

File tree

1 file changed

+4
-132
lines changed

1 file changed

+4
-132
lines changed

devel/protobuf3-cpp-upstream/Portfile

Lines changed: 4 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +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 compiler_blacklist_versions 1.0
5-
PortGroup github 1.0
6-
PortGroup cmake 1.1
7-
PortGroup legacysupport 1.1
4+
PortGroup obsolete 1.0
85

9-
# clock_gettime needed for abseil
10-
# https://github.com/macports/macports-ports/pull/19905#issuecomment-1680281240
11-
legacysupport.newest_darwin_requires_legacy 15
12-
13-
set release_version \
14-
29.2
15-
16-
# This is a development version of protobuf3-cpp.
176
name protobuf3-cpp-upstream
18-
github.setup protocolbuffers protobuf 3.${release_version} v
19-
git.branch v${release_version}
20-
revision 0
21-
7+
replaced_by protobuf-cpp
8+
version 29.2
9+
revision 1
2210
categories devel
23-
maintainers {mascguy @mascguy} openmaintainer
24-
license BSD
25-
26-
description Encode data in an efficient yet extensible format.
27-
long_description \
28-
Google Protocol Buffers are a flexible, efficient, \
29-
automated mechanism for serializing structured data -- \
30-
think XML, but smaller, faster, and simpler. You \
31-
define how you want your data to be structured once, \
32-
then you can use special generated source code to \
33-
easily write and read your structured data to and from \
34-
a variety of data streams and using a variety of \
35-
languages. You can even update your data structure \
36-
without breaking deployed programs that are compiled \
37-
against the "old" format. You specify how you want \
38-
the information you're serializing to be structured by \
39-
defining protocol buffer message types in .proto \
40-
files. Each protocol buffer message is a small \
41-
logical record of information, containing a series of \
42-
name-value pairs.
43-
homepage https://protobuf.dev
44-
45-
checksums rmd160 6d7cf2f0693eae34f3488f0f773fd29d24f6a05f \
46-
sha256 63150aba23f7a90fd7d87bdf514e459dd5fe7023fdde01b56ac53335df64d4bd \
47-
size 9348408
48-
49-
github.tarball_from releases
50-
distname protobuf-${release_version}
51-
dist_subdir protobuf3-cpp
52-
worksrcdir protobuf-${release_version}
53-
54-
# Upstream adds zlib include - which is ${prefix}/include - before search path
55-
# of 3rd-party components, like gtest, gmock, etc. That causes the external
56-
# versions of those to be pulled in, and the build fails.
57-
# So don't let the project cmake add zlib; already added (last) by base.
58-
patchfiles-append cmake-zlib-include.diff
59-
60-
# Revert a breakage from dropping mach_time in:
61-
# https://github.com/protocolbuffers/protobuf/commit/a8a9bd2e4990fd5e0f0098bdfbe62bc00783eab7
62-
patchfiles-append patch-unbreak-time.diff
63-
64-
compiler.cxx_standard 2017
65-
compiler.thread_local_storage yes
66-
# error: constexpr constructor never produces a constant expression [-Winvalid-constexpr]
67-
compiler.blacklist {clang < 900}
68-
69-
if { [string match *clang* ${configure.compiler}] } {
70-
# Quiet deprecation warnings
71-
configure.cxxflags-append \
72-
-Wno-deprecated-declarations \
73-
-Wno-error=unknown-warning-option \
74-
-Wno-unknown-warning-option
75-
}
76-
77-
# Clear optflags; controlled by project, via cmake build type
78-
configure.optflags
79-
80-
if {[variant_isset debug]} {
81-
cmake.build_type Debug
82-
} else {
83-
cmake.build_type RelWithDebInfo
84-
}
85-
86-
cmake.install_prefix \
87-
${prefix}/libexec/${name}
88-
89-
depends_lib-append \
90-
port:abseil \
91-
port:zlib
92-
93-
configure.args-append \
94-
-DBUILD_SHARED_LIBS:BOOL=ON \
95-
-Dprotobuf_ABSL_PROVIDER=package \
96-
-Dprotobuf_BUILD_LIBPROTOC:BOOL=ON \
97-
-Dprotobuf_BUILD_PROTOC_BINARIES:BOOL=ON \
98-
-Dprotobuf_BUILD_TESTS:BOOL=OFF
99-
100-
post-destroot {
101-
set docdir ${destroot}${cmake.install_prefix}/share/doc
102-
103-
xinstall -d -m 755 ${docdir}
104-
105-
foreach f {CONTRIBUTING.md CONTRIBUTORS.txt LICENSE README.md SECURITY.md editors examples} {
106-
file copy ${worksrcpath}/${f} ${docdir}
107-
}
108-
}
109-
110-
proc port_test_ver_check {p_name p_ver p_rev} {
111-
if { [catch {set port_ver_info [lindex [registry_active ${p_name}] 0]}] } {
112-
error "Tests require that ${p_name} be active; install, then re-run tests"
113-
} else {
114-
set test_ver ${p_ver}_${p_rev}
115-
set port_ver [lindex ${port_ver_info} 1]_[lindex ${port_ver_info} 2]
116-
ui_info "port_test_ver_check: ${p_name}: test_ver: ${test_ver}; port_ver: ${port_ver}"
117-
118-
if { [vercmp ${port_ver} ${test_ver}] != 0 } {
119-
error "Tests require installed version of ${p_name} to match port; update, then re-run tests"
120-
}
121-
}
122-
}
123-
124-
variant tests description {Build with tests enabled} {
125-
pre-configure {
126-
port_test_ver_check ${subport} ${version} ${revision}
127-
}
128-
129-
configure.args-replace \
130-
-Dprotobuf_BUILD_TESTS:BOOL=OFF \
131-
-Dprotobuf_BUILD_TESTS:BOOL=ON
132-
133-
test.run yes
134-
test.target check
135-
}
136-
137-
livecheck.version ${release_version}
138-
github.livecheck.regex {([0-9.]+)}

0 commit comments

Comments
 (0)