@@ -16,24 +16,41 @@ class Protobuf(CMakePackage):
1616
1717 license ("BSD-3-Clause" )
1818
19+ # note:
20+ # https://protobuf.dev/support/version-support/
21+ #
22+ # protobuf versioning scheme changed: after 3.20 there is 21.0.
23+ #
24+ # Prior to this change, all languages had major version "3" and 3 components. Now, protobuf
25+ # versions follow the protoc versioning, with 2 components.
26+ #
27+ # What about language versions? language runtimes still have a version which is composed as
28+ #
29+ # <lang-runtime-version>.<protobuf-major>.<protobuf-minor>
30+ #
31+ # Hence language runtime version has explicted also the protobuf version it is compatible with.
32+
1933 version ("33.1" , sha256 = "0c98bb704ceb4e68c92f93907951ca3c36130bc73f87264e8c0771a80362ac97" )
34+ version ("33.0" , sha256 = "b6b03fbaa3a90f3d4f2a3fa4ecc41d7cd0326f92fcc920a7843f12206c8d52cd" )
2035 version ("32.1" , sha256 = "d2081ab9528292f7980ef2d88d2be472453eea4222141046ad4f660874d5f24e" )
21- version ("3.29.3" , sha256 = "c8d0ed0085f559444f70311791cf7aef414246b9942441443963184b534dbf9e" )
22- version ("3.28.2" , sha256 = "1b6b6a7a7894f509f099c4469b5d4df525c2f3c9e4009e5b2db5b0f66cb8ee0e" )
23- version ("3.27.5" , sha256 = "a4aa92d0a207298149bf553d9a3192f3562eb91740086f50fa52331e60fa480c" )
24- version ("3.26.1" , sha256 = "f3c0830339eaa5036eba8ff8ce7fca5aa3088f7d616f7c3713d946f611ae92bf" )
25- version ("3.25.3" , sha256 = "da82be8acc5347c7918ef806ebbb621b24988f7e1a19b32cd7fc73bc29b59186" )
26- version ("3.24.3" , sha256 = "2c23dee0bdbc36bd43ee457083f8f5560265d0815cc1c56033de3932843262fe" )
27- version ("3.23.3" , sha256 = "5e4b555f72a7e3f143a7aff7262292500bb02c49b174351684bb70fc7f2a6d33" )
28- version ("3.22.2" , sha256 = "2118051b4fb3814d59d258533a4e35452934b1ddb41230261c9543384cbb4dfc" )
29- version ("3.21.12" , sha256 = "930c2c3b5ecc6c9c12615cf5ad93f1cd6e12d0aba862b572e076259970ac3a53" )
30- version ("3.21.9" , sha256 = "1add10f9bd92775b91f326da259f243881e904dd509367d5031d4c782ba82810" )
31- version ("3.21.7" , sha256 = "ce2fbea3c78147a41b2a922485d283137845303e5e1b6cbd7ece94b96ade7031" )
32- version ("3.21.5" , sha256 = "d7d204a59fd0d2d2387bd362c2155289d5060f32122c4d1d922041b61191d522" )
33- version ("3.21.4" , sha256 = "85d42d4485f36f8cec3e475a3b9e841d7d78523cd775de3a86dba77081f4ca25" )
34- version ("3.21.3" , sha256 = "c29d8b4b79389463c546f98b15aa4391d4ed7ec459340c47bffe15db63eb9126" )
35- version ("3.21.2" , sha256 = "66e1156ac78290db81335c79d1fc5a54123ebb62a43eb2e5b42a44ca23087517" )
36- version ("3.21.1" , sha256 = "a295dd3b9551d3e2749a9969583dea110c6cdcc39d02088f7c7bb1100077e081" )
36+ version ("31.1" , sha256 = "c3a0a9ece8932e31c3b736e2db18b1c42e7070cd9b881388b26d01aa71e24ca2" )
37+ version ("30.2" , sha256 = "07a43d88fe5a38e434c7f94129cad56a4c43a51f99336074d0799c2f7d4e44c5" )
38+ version ("29.3" , sha256 = "c8d0ed0085f559444f70311791cf7aef414246b9942441443963184b534dbf9e" )
39+ version ("28.2" , sha256 = "1b6b6a7a7894f509f099c4469b5d4df525c2f3c9e4009e5b2db5b0f66cb8ee0e" )
40+ version ("27.5" , sha256 = "a4aa92d0a207298149bf553d9a3192f3562eb91740086f50fa52331e60fa480c" )
41+ version ("26.1" , sha256 = "f3c0830339eaa5036eba8ff8ce7fca5aa3088f7d616f7c3713d946f611ae92bf" )
42+ version ("25.3" , sha256 = "da82be8acc5347c7918ef806ebbb621b24988f7e1a19b32cd7fc73bc29b59186" )
43+ version ("24.3" , sha256 = "2c23dee0bdbc36bd43ee457083f8f5560265d0815cc1c56033de3932843262fe" )
44+ version ("23.3" , sha256 = "5e4b555f72a7e3f143a7aff7262292500bb02c49b174351684bb70fc7f2a6d33" )
45+ version ("22.2" , sha256 = "2118051b4fb3814d59d258533a4e35452934b1ddb41230261c9543384cbb4dfc" )
46+ version ("21.12" , sha256 = "930c2c3b5ecc6c9c12615cf5ad93f1cd6e12d0aba862b572e076259970ac3a53" )
47+ version ("21.9" , sha256 = "1add10f9bd92775b91f326da259f243881e904dd509367d5031d4c782ba82810" )
48+ version ("21.7" , sha256 = "ce2fbea3c78147a41b2a922485d283137845303e5e1b6cbd7ece94b96ade7031" )
49+ version ("21.5" , sha256 = "d7d204a59fd0d2d2387bd362c2155289d5060f32122c4d1d922041b61191d522" )
50+ version ("21.4" , sha256 = "85d42d4485f36f8cec3e475a3b9e841d7d78523cd775de3a86dba77081f4ca25" )
51+ version ("21.3" , sha256 = "c29d8b4b79389463c546f98b15aa4391d4ed7ec459340c47bffe15db63eb9126" )
52+ version ("21.2" , sha256 = "66e1156ac78290db81335c79d1fc5a54123ebb62a43eb2e5b42a44ca23087517" )
53+ version ("21.1" , sha256 = "a295dd3b9551d3e2749a9969583dea110c6cdcc39d02088f7c7bb1100077e081" )
3754 version ("3.20.3" , sha256 = "9c0fd39c7a08dff543c643f0f4baf081988129a411b977a07c46221793605638" )
3855 version ("3.20.2" , sha256 = "88231778cffebf93bc905e76ea757fae0f2ef497cc00f64973e41f1acd4fc781" )
3956 version ("3.20.1" , sha256 = "8b28fdd45bab62d15db232ec404248901842e5340299a57765e48abe8a80d930" )
@@ -95,9 +112,9 @@ class Protobuf(CMakePackage):
95112 depends_on ("cxx" , type = "build" )
96113
97114 depends_on ("abseil-cpp cxxstd=17" , when = "@32.1:" )
98- depends_on (
"[email protected] :" ,
when = "@3. 22.5:" )
115+ depends_on (
"[email protected] :" ,
when = "@22.5:" )
99116 # https://github.com/protocolbuffers/protobuf/issues/11828#issuecomment-1433557509
100- depends_on ("abseil-cpp@20230125:" , when = "@3. 22:" )
117+ depends_on ("abseil-cpp@20230125:" , when = "@22:" )
101118 depends_on ("zlib-api" )
102119
103120 conflicts ("%gcc@:4.6" , when = "@3.6.0:" ) # Requires c++11
@@ -121,25 +138,25 @@ class Protobuf(CMakePackage):
121138 # fix build on Centos 8, see also https://github.com/protocolbuffers/protobuf/issues/5144
122139 patch (
123140 "https://github.com/protocolbuffers/protobuf/commit/462964ed322503af52638d54c00a0a67d7133349.patch?full_index=1" ,
124- when = "@3.4:3. 21" ,
141+ when = "@3.4:21" ,
125142 sha256 = "9b6dcfa30dd3ae0abb66ab0f252a4fc1e1cc82a9820d2bdb72da35c4f80c3603" ,
126143 )
127144
128- patch ("msvc-abseil-target-namespace.patch" , when = "@3. 22 %msvc" )
145+ patch ("msvc-abseil-target-namespace.patch" , when = "@22 %msvc" )
129146
130147 # Misisng #include "absl/container/internal/layout.h"
131148 # See https://github.com/protocolbuffers/protobuf/pull/14042
132149 patch (
133150 "https://github.com/protocolbuffers/protobuf/commit/e052928c94f5a9a6a6cbdb82e09ab4ee92b7815f.patch?full_index=1" ,
134- when = "@3. 22:3. 24.3 ^abseil-cpp@20240116:" ,
151+ when = "@22:24.3 ^abseil-cpp@20240116:" ,
135152 sha256 = "20e3cc99a9513b256e219653abe1bfc7d6b6a5413e269676e3d442830f99a1af" ,
136153 )
137154
138155 # Missing #include "absl/strings/str_cat.h"
139156 # See https://github.com/protocolbuffers/protobuf/pull/14054
140157 patch (
141158 "https://github.com/protocolbuffers/protobuf/commit/38a24729ec94e6576a1425951c898ad0b91ad2d2.patch?full_index=1" ,
142- when = "@3. 22:3. 24.3 ^abseil-cpp@20240116:" ,
159+ when = "@22:24.3 ^abseil-cpp@20240116:" ,
143160 sha256 = "c061356db31cdce29c8cdd98a3a8219ef048ebc2318d0dec26c1f2c5e5dae29b" ,
144161 )
145162
@@ -158,7 +175,7 @@ def cmake_args(self):
158175 self .define ("CMAKE_POSITION_INDEPENDENT_CODE" , True ),
159176 ]
160177
161- if self .spec .satisfies ("@3. 22:" ):
178+ if self .spec .satisfies ("@22:" ):
162179 cxxstd = self .spec ["abseil-cpp" ].variants ["cxxstd" ].value
163180 args .extend (
164181 [
0 commit comments