diff options
Diffstat (limited to 'dev-libs/protobuf')
18 files changed, 1499 insertions, 26 deletions
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest index b30eae5ef70b..0f7680357daa 100644 --- a/dev-libs/protobuf/Manifest +++ b/dev-libs/protobuf/Manifest @@ -1,4 +1,5 @@ AUX 70protobuf-gentoo.el 170 BLAKE2B 6d9a92bd3310ca09d18dd762bc0bbd4b0b36184c17f95c80c02183c457fe4ff1142ca1e3207e5a77c078fe5f768cb3e85abc712abc1f4c85774ca1ebf178059b SHA512 ed73cd6b1bf6c0019e4da73c3a480b0f917e949dfad2696336e805263c81610b2a8a0514840e389db0f0e78252cf053d754c5e07731dc5e9c93c9e88f0b2923c +AUX FindJsonCpp.cmake 1663 BLAKE2B 778e2cda806bd3a73389ef683523ec0b8c264626051395ba9042bb837207464b74c9cb0097e9dac2833cb23efc921b9d60644aede630c9612d8f76ffa24990b7 SHA512 4a824ac0a73eebf622f999c4a78add515fea92eb44e6a1bc754343567e747f5258ca0d1c600644c67691583779a9cad814a6daf983e666c389fcaa90a2ec0aa6 AUX proto.vim 49 BLAKE2B 9b6d31105811a8f8cbcf76328172fda5b66b33351bb16573ed1ed08d4c553af2805962a6d6609fbdad4a2644bf9cecd1e771a557f138111ad2c0be959b497ee9 SHA512 65c1f49887c17973d1dfce07fa86d04c5079d2382826eaeb22e128570717f181c53d22ba50905252021f7e476a90ecd29f9d18799c1ccea64b01f4638323538e AUX protobuf-21.9-disable-32-bit-tests.patch 5942 BLAKE2B dcc1d5474c704358287a5033aaae3474b57324e853aa670aa723dc1d3d8b8cdb14ac588e3d3b3c998878d9f346fc91347379bbc3d88057b761b02515582ebcbd SHA512 97d60343e96fe03fefae621b70787fa284e38db5f94b7d205927d0852e9d20e9176e07182caa0ffca704bc08e439854ae3d109c3eca61c3101ae178a0426624d AUX protobuf-22.5-Use-the-same-ABI-for-static-and-shared-libraries-on-.patch 4737 BLAKE2B e5e5d1fcf16f3e33b0ee6d83452cf471b9460e74b2d9152407ff140af3fe891c46a3592a55426234898d812594abc5af55bd356e1357043bf60932fc05620dd9 SHA512 93f9982bd2d92a4e222a2a1e596e044462b838062e941d7bf18d4ce4518b32f2b736ca5551aec59a46c321f3359a78d0e0a94728af7151387eb6d626e9d04d02 @@ -7,6 +8,8 @@ AUX protobuf-23.3-disable-32-bit-tests.patch 1261 BLAKE2B 95adb955991b3c181e15c9 AUX protobuf-23.3-messages_lite-template-instances.patch 3385 BLAKE2B 35ce706c808ec4c11466f7ef54ccf88c311ac3ef8307976c5f2889b8171d1ea869f25ea5fb6476a2ec5c485ddc3a30feb73ecfb812e1871d6b2129dce8785e47 SHA512 4326ff0a39ab96b208fe6a6e6b29fd0bf6709ad4260545189a2472ddeb9572c032eba849e757dc28cc9a089843bff902caa030eb0d997ef16ee489ad4ff8f06e AUX protobuf-23.3-static_assert-failure.patch 529 BLAKE2B 69452cf44106fdd7295bbb8d97011309c160f51fb30c233b9549d955d57c0a188b407b97ea7de7dc708a145bf76d5f15f1332bf641541a8830db96705a071701 SHA512 291d8cd318a0324e58c5dc83273ca67b55fd1446bd5111e3caaa9e2b08e3a2565de8030050df6555f300f7051668f5b8918e52009f826a653bb70f9931f12ebd AUX protobuf-26.1-disable-32-bit-tests.patch 1382 BLAKE2B ef85af7bf53c3ea2876e7a4a51dff56e7ac2665a36dad61eba91e8e864f22e10dd055eb8b4b8e03d17b53d45585f064676eae6bb893f10bd95cdccc604f9fe9e SHA512 ac6ab37d852d9ebcaa1f2f21ec7eaa70d44a45e15f9e3d2f7faa35646e61f3222897c2d77e23ff655cc0e2e48ffb420f9bf54113d8d8ab1b985ed8a2b6defb1b +AUX protobuf-27.4-findJsonCpp.patch 1113 BLAKE2B 13799ee49f9d6ebc634bad2add520b31bcc53dfb94089cc7f0b6d1a2f6b053877fd409870aab037ccdf6ee72de9b4dd90fde9b7ac4f2f95e0af73b2db6dc2ef6 SHA512 c010d71de354bd89344ce3113445bc4b5d31157ae00bc56d1b14594eef09c18c203d85e319901641e4af196f60a9987b5ddce780083274d5b02324ca5c98ae9c +AUX protobuf-28.0-disable-test_upb-lto.patch 747 BLAKE2B 7312584dfd1efef28e41c025ae3c00279579144245c7749de5f00300ae8d1ceca4671bc7102cb437aae8c7e1bd11fa7d9878a5e0d7982b1c1875ad3e5b65666c SHA512 fbbb96d29eea5399708d09231d1b1dba8825db0abdce1a81d9fe249f2eec85c1130e32bc75ebaedfb1d86fe7ed82b9f84a9de4e9fb4018857c97ff92cfbf2efd AUX protobuf-3.19.0-disable_no-warning-test.patch 1620 BLAKE2B e4f324ed59b2c31662cc625e9d3f1fdb20ee2a25769dbf86093e5000f73a01e11f05459989aaefeaf0414648cd52f1f1025b9d4f1423cdca4844e42e96f54836 SHA512 8c4bc72976a7eb3418b51e7a1c45b49d7ffaeb91a86f440008e6f162773b1db7afed4a6ae1d0b3510d49361c369b6552a9ba4976d104d804d825227aa7113d95 AUX protobuf-3.19.0-system_libraries.patch 7514 BLAKE2B 1ff5c226232c325ed48cf16e2c47652615c4bd1503f1be8560e7f2e8658ffefeffeef72a6baf4368f758e30a4a81d582769b61dd0b3e383c8188cd03bf409c01 SHA512 b6a58e483dbb1f6151c2f7c735fbd55f34bcf98d6370eabb425dbd96e10cb87e8dfbf5024ad8f888cb80a095bc26598aceb55d576d37166550ee62db41c51a44 AUX protobuf-3.20.2-protoc_input_output_files.patch 10080 BLAKE2B f52ea613b1104aa703e5e10eb5f968e33e46f05523e13fe84369a24ccbc16cecbcce3221b64b1acd624500864d224ccb59d1ce626157a0d0d77870f79ea64bd8 SHA512 dcf5dbd7be4a025d9ee96ed9be4566452ae4f946d0e1ae4c411a0dc3b7071fc156aca796497c0f2b67563a8ee884bded1a931d712cd7a3727301bbe37ec646f0 @@ -14,10 +17,26 @@ DIST protobuf-21.12.tar.gz 5141166 BLAKE2B 33500612d103afb817062486a741e8e5503f8 DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1 DIST protobuf-22.5.tar.gz 4924661 BLAKE2B d69c73f4ebfddf45fd94b4f5f898faf00256fe674f2cbc0443c60a88d7a0f47fb96f2f6262879927c6da88095b4ea3ee7fd4c471c100bf42a2bae9edf48c07f1 SHA512 058ab2fec5b11007972e6043071056d1944c3b6fe1d31246cddba8eb57686e3b5280f6ad3d58e78940ca63005e74a8de3c72237f9f7c5066548c5a2513ddc584 DIST protobuf-23.3.tar.gz 5043803 BLAKE2B ee2edee230969555c9ef95069c7b1d6c23c3d1f8ea1b2249fb3e9f6fcf63312c6e10e9da65b80629fb08d5fb08d05a19bb9c752c25b892c1e3fd6f18b9279eb3 SHA512 646af367dbc61b42e322cf0b335f360e428b272e2b1f5361b2f17c18d3dc9dddd615e1279436028b1a42275a0beadda37c2c934fc27d6c892131cc8d526d8b3b +DIST protobuf-23.4.tar.gz 5043507 BLAKE2B bf6a50771eb977ef92b779a32fd909693faae6394254c73e3c9b2729bce643f8cbfb5a1bd18b30abf3003b9fbfd24c074cea4085a6ccf14fdb6a3aeac9efcb89 SHA512 b93a4e0339ecbe085796de5b6c61feae35229d40db9019c043090bcaa483a1cce78a99487c5638482c68832fcede5579a0e5ec731221a88359b80db9bb6dc566 +DIST protobuf-24.4.tar.gz 5180235 BLAKE2B 1c7e9035d9f3810886baaea7d679414c882463c79828c99dd8895a9549638c1ca17f9ab3b38d461019f3e1412d9cb9584b995b1da99866eb6fdbb8bdeb063e6f SHA512 52b6ab5587d03cbd1f35cf3cdc388e1710fa50f3031559ac53cf754965407ded7602cdead56080444ab695588112cc3391a1d7fdd5e565d90d0af7ad08706315 +DIST protobuf-25.3.tar.gz 5878962 BLAKE2B 9268f9bd993a1cfd6d3937a2ad56ba4cfe3d84923756513841cbf13039d4a07acb260468745cb1294f30334cb34b45c6fde272f5c40d9de63ac6a4ce5c263077 SHA512 1f73e237c919082e5423ae9e2ea8813dccf672c059051d1531fe89ffaa45872d3cf3052b8c3af26f674296ec17d7dc861c67b8f0834ed80261ce4a6a14ed7115 +DIST protobuf-25.4.tar.gz 5878444 BLAKE2B 9b40985bda31a84dd3ab7a1d18f746d5f88660d9e036a20234cbc85e79322005d2ffd4e60d72c55a8b5f624d7cc50522771f0804f203f2eabca7b0b8ace0545e SHA512 1b3ba1a1575bcc9d52ddce93d466912863d600dfbb40f64845b8e66c8000047d05508b8f1baba8d5eef42a7ff90eb778f7c8a553c9ec2778fd3a9a18122c67ab DIST protobuf-26.1.tar.gz 5957903 BLAKE2B 1a7faab2f56aa0995801a80f73a812c7fc38a00af0bf25bdd5eecf7aec27a86a575ea2fb8484787d19c9ac6e46007c9864e79464f529c446f31af732981feed1 SHA512 0363ac09f92d8e040491425d444c8dca0b9b430e02d2dff6e2b28a0c2b2bea0d33a47f50bc9e2e2d4e8e22b65a02009a20c0066fb89c75df93a7b703dda42ed4 +DIST protobuf-27.2.tar.gz 6282174 BLAKE2B 86d12e9f87e8e1c2961ad517115c8689a8dd984722513816d8d626e59a76f5e7a698a90cbf6007daacf66c6053c9ff28108ff113579a442ce61cd221178bda44 SHA512 664c66b62cf1ed0c65d9b910d8e67d4d5d471113697f1b8edf1573cd5c0fc8e850ac53ce984e48e6c6b9cbbefa12f8530058384e7388e65a59c1e46d03772397 +DIST protobuf-27.4.tar.gz 9156456 BLAKE2B 004427f4923e523bf77298600bf91a8fe4ca8be4bd6da5b7efcfe9186a032155e525426f83f683e1bed1e799ed1e62d250053386c1463cbd0c062bd05da786d0 SHA512 d076ce7e075096d0dba7ee2314b12e3223c4239c019e25670636a0ef812ddf0ce3f1fd9b9fe8517319db87b14bbdb2653cc4e06023f90032dfedb014457b2863 +DIST protobuf-28.0.tar.gz 9259114 BLAKE2B 328e09ebffb296d838557ea72a4fc4da8e0ad5f1edfccebcc8ee7c9e0e74d06e5e6dbad741fd89f6a4502c1cb246a973fd60c035ccdbf89700b7baff49e2a65e SHA512 8745f625ac781f3bbefe9494cbf570143d38aecc1521edef7a52ffb403b8be24df2c71f4f2410b5a5b78a0f3e8a38a7d19be2cf916b1b9125349d2da18262cd1 EBUILD protobuf-21.12.ebuild 2504 BLAKE2B b90c7eb65835f98825faf41fb70b7edcd40030c5c430be7faf13308a74cbc3576a910b83a73dcf593ebb248392900536b96152ba18d05f532b0632ad637b2ad8 SHA512 454f7104106edd5cbc9c1897cdc57fcef337fef51239d5e8832064a9a049b238bb3d4d549df88369098b26a350b4828131ecda74a65c832cf4aa9b1128445d7b -EBUILD protobuf-21.9.ebuild 4169 BLAKE2B 26d7458698701fc08d93a7fde27933b34d39975ae403531af31a7dfd8471e2ca20d9f471875ba15a88388616c353bb7b6fd29ed1a6d4b94391fccee2f448d4c5 SHA512 32699153aaf64ece98cd694826b6ba01e32af8a278143e8dacbe05a9eb23f37017a40807247eb1809a5be5e6300a922c8758f3e53be166a1d2e5d48735a63fad -EBUILD protobuf-22.5-r1.ebuild 3100 BLAKE2B 61d746f3ee129f4344f171084cb1d7a4891bdc1d44aa2b33f514ae13a58e8b22fe75a98957f4d7c17fe10c8c29ccf7c69415de2198ae9226394e6f47c1a93b26 SHA512 f89421853764065671682b05e1f37fc7e5ecbccc46a9e7ff70b24712645254dd67a6174915ba691f43c76f6122bf4246a556016f2f60b7cf5e30834245ce3e83 -EBUILD protobuf-23.3-r4.ebuild 2899 BLAKE2B 42978fed39321f2a49835a698b7da09a90ba1413a41fc94540fd6a501354171e3ae8621ee30790ae45d68517aea0fdde9f6f65e857b4781b7cae0495305fa471 SHA512 463f2232375d62a27f4467d8e29987146a4300504e215b918ea993483eb0df3bfe0ab6fa2e09dbbb82dfe40d85e8454b4f865805951233b118ac74fdb307fbf4 -EBUILD protobuf-26.1-r1.ebuild 2722 BLAKE2B 2b4a648933fe23621fdbc67d5a6a7783d7716c1f4cbf72eec5292c3f87006a426a7444744a83d77700e94c2b411c0b5c1983cb1bb1dedd4fe8e4b3ea58b8452b SHA512 7b8cfc2fa64f4dd633ad93da7428ffaeae2cef9aea78f7032c5506abad91ab8f2da91a5598eab47f065419210686afc2a54bc49b3edbaa2801d419857de810e4 -MISC metadata.xml 380 BLAKE2B 5f2f89127d56c14c18bc9ae1957bea29c56ff6663060ea7408842a9b17504418a363fafc93bdb75db5d308c08b5706d4325a5a37c517f29e3ff70a7a8d4a21c7 SHA512 e6f4bbba0b3cf42667a27900c517b2dfff7538b397347adc2a7a9e7b6b55dcc95f6469f85feed795fe02b41dd7adde0e3e40e9f313b978d9a2f60a3522ed1efe +EBUILD protobuf-21.9.ebuild 4163 BLAKE2B 8c4897218ecde9eab2ab95d68c613d4e0990de5570f51f2d3d8e5367f83887be37d3aff6412f961aeb8db27d08380dd5df8845cd144afe841524150a38c8c23f SHA512 160efd25da58ca8dc6cfa68f8a50e8ca98b682d4e21b1e38bdaf4a6ebb3bd7810c657fe7f06bf931358d30a2f2c524658628200444e89f2bf6a6532e51e05d86 +EBUILD protobuf-22.5-r1.ebuild 3094 BLAKE2B 6bcee931b6cd9a85365b59fd5f3ce58378918c248d12e5c6793c2a5afacc2596c8f3985a59bb790d17449085f9581b908db26025bc120676df65ce6a34c90453 SHA512 5b09aa886dcc68070f77bb836a271580bd88ea8c8945700bc57e19c814a38cb33db87aa0f233aa6537a70a0b92071eb546d68f745c05dc1eae8d16a1e70f8487 +EBUILD protobuf-22.5-r2.ebuild 3159 BLAKE2B 493ce3e4e49606d2b7dfcb0e4f5aab4868cbf9d4f82b37f3e2aae8fc690358537b37dabf45ae4af3da00e262badc75403931ecc453a762d7f330a50c6aa425b4 SHA512 7596d14f23989b3c07fb1a260d73003163b57b98e875631d7bb9c2375e0530ae9d1a989cc124cb1ee47dad07505577ce68bbaf2c7224832b00dde3b8119a2f7b +EBUILD protobuf-23.3-r4.ebuild 2893 BLAKE2B 14f3335d3a99930174c543665e49c042fe18e0bfce21871aef3e036f8ddee4217412c0636d98922398e89b5f27104ba1c0d892c56415d4a1edf6abfc9e857eaf SHA512 c4d0e6bda73bd7934680030d67b3d07e1e3b35d48d05b358c22d43f6363b6947c09c0e2b690fef81420b1c9173c3be65f78a4d5d444d8a8b1289de48c1942a51 +EBUILD protobuf-23.4.ebuild 2980 BLAKE2B ffd3be624f60c7b8a9f0780a4b5d3fc55a05ef2dd30ddaa627d407efeaf898f4cbba219640123afe4a6faf17bc8da8f641792fdac648342c5a3d53fada16921c SHA512 b3cfac2b3fedc6aff77735cc70b09081d4c70484079dbeeb374676a6ba8ea0f7c65ccff69d407536f953f3f442000a8e0f9c86590d05985c78d310e1e1589ecb +EBUILD protobuf-24.4.ebuild 2915 BLAKE2B 2fd3f84bf7e86b64393fd39962080809ef4d65b9b06928abe03d3755360ac5768ffad5bb132c205e25f5bd3829b09b1b14e7e3e1840895edd99229d5dafa4807 SHA512 91ddec809ffb71f23f5884d37e46dcb3a98c48423712ffe6e45607a114b6054c959dc59990c9c1c5a3b709b21653eb38f05b767bb3fe040740905f29a28bedcb +EBUILD protobuf-25.3.ebuild 2914 BLAKE2B 4ddc5b0263ce920a014c805cd0bbb5c7f2e436c7e0185e1aa80e58f47610ae83ed55f64183d7ced81badc1e002ab3d60bd236df8da8d8111f19a03d3b236f451 SHA512 9e401d708de3865310db104d8a61ea763a24997b36e31e3770a1cf038772f12d3b8d956f11e62330ba2bb6ace0abc38576312015d16dadcad1966d3528c9b0db +EBUILD protobuf-25.4.ebuild 3888 BLAKE2B 92e102f7dc8925101f54bc8bc9b51d57f0f4881f5acfa32940370889949526001ffc613d292e5960ac3f0fc3cd20bb6fef03cd64f29eae01108a59860dfb9c5d SHA512 683bd2e998acb32705d7c120503ed9d7b09559eb2267e238dac9284ad920de2bf4c17fc487906e5a1eca88a4ed44e0ade46e5aff44fab3b55ec8727aec8dc266 +EBUILD protobuf-26.1-r2.ebuild 2915 BLAKE2B 75df59e6ca105a529cf582cda4371c26f0b9bf1df94fb11c3b409e1b01fcde43e0705e05212ea630839446aba819c4b8132514383f94fa2aa455b232a3f64eae SHA512 8daaf04ef736d389f634f2366e833e7c6ce40a9e60b022a31df31868b01a282f948d583270827b1714cc7cfacac4cdd0e9971944dc5b3dd823afa4696c4cf1c7 +EBUILD protobuf-27.2.ebuild 3739 BLAKE2B f93b87963a5c0e5d78c21817ac657e02b1869a36679eb0501d06ce3523518260e6a55e65de5f2b251ebff3a36e4006cf9eaa8fd18f186dbf7a46c4fb416e4bd9 SHA512 f801b662ce4a47c137f061ca17010481cfe40f87bca22f7c895fe42e85c7e33a7a865092aa2db21aaf5e78177a7127902cfdabfd969bca6c567045790a8fcb0f +EBUILD protobuf-27.4.ebuild 3942 BLAKE2B 6f5050e4120d890fdf88c743c8fb214862f8ea23c6105094242a41f9146acb325bb815d6edc0ce877b0bb4d866ebfdb14b24d9321e213fb90480a1af805cea37 SHA512 23cc67686171e88490bc604236fe8d5b204a0ad6583b01cf9fd4c86a35e6503f1e53db90d02d86759f7ef67bd221aa255b086badc02d89979d8f3100d58b0490 +EBUILD protobuf-28.0.ebuild 3942 BLAKE2B 6f5050e4120d890fdf88c743c8fb214862f8ea23c6105094242a41f9146acb325bb815d6edc0ce877b0bb4d866ebfdb14b24d9321e213fb90480a1af805cea37 SHA512 23cc67686171e88490bc604236fe8d5b204a0ad6583b01cf9fd4c86a35e6503f1e53db90d02d86759f7ef67bd221aa255b086badc02d89979d8f3100d58b0490 +EBUILD protobuf-9999.ebuild 3942 BLAKE2B 6f5050e4120d890fdf88c743c8fb214862f8ea23c6105094242a41f9146acb325bb815d6edc0ce877b0bb4d866ebfdb14b24d9321e213fb90480a1af805cea37 SHA512 23cc67686171e88490bc604236fe8d5b204a0ad6583b01cf9fd4c86a35e6503f1e53db90d02d86759f7ef67bd221aa255b086badc02d89979d8f3100d58b0490 +MISC metadata.xml 917 BLAKE2B c25c810e47e764843ad71be5eb5ebe617d881e7363ce3206401eb59c6df12969bc22bbedc34f08b0a2fbcf955de5b85aa8e4d3a964c1349f07ed1d0eb344a915 SHA512 baa5737981669f1b28ce32884698a4d91e0f1fbdde6056779307e1a6c85dde8ca36ee47ca3ce8794b996934dfafc5482afbe9532a7f3e17c833c3aef0a330376 diff --git a/dev-libs/protobuf/files/FindJsonCpp.cmake b/dev-libs/protobuf/files/FindJsonCpp.cmake new file mode 100644 index 000000000000..8fff5336ce46 --- /dev/null +++ b/dev-libs/protobuf/files/FindJsonCpp.cmake @@ -0,0 +1,40 @@ +find_path(JsonCpp_INCLUDE_DIR "json/json.h" + PATH_SUFFIXES "jsoncpp" + DOC "jsoncpp include directory") +mark_as_advanced(JsonCpp_INCLUDE_DIR) + +find_library(JsonCpp_LIBRARY + NAMES jsoncpp + DOC "jsoncpp library") +mark_as_advanced(JsonCpp_LIBRARY) + +if (JsonCpp_INCLUDE_DIR AND EXISTS "${JsonCpp_INCLUDE_DIR}/json/version.h") + file(STRINGS "${JsonCpp_INCLUDE_DIR}/json/version.h" _JsonCpp_version_lines + REGEX "JSONCPP_VERSION_[A-Z]+") + string(REGEX REPLACE ".*# *define +JSONCPP_VERSION_MAJOR +([0-9]+).*" "\\1" _JsonCpp_version_major "${_JsonCpp_version_lines}") + string(REGEX REPLACE ".*# *define +JSONCPP_VERSION_MINOR +([0-9]+).*" "\\1" _JsonCpp_version_minor "${_JsonCpp_version_lines}") + string(REGEX REPLACE ".*# *define +JSONCPP_VERSION_PATCH +([0-9]+).*" "\\1" _JsonCpp_version_patch "${_JsonCpp_version_lines}") + set(JsonCpp_VERSION "${_JsonCpp_version_major}.${_JsonCpp_version_minor}.${_JsonCpp_version_patch}") + unset(_JsonCpp_version_major) + unset(_JsonCpp_version_minor) + unset(_JsonCpp_version_patch) + unset(_JsonCpp_version_lines) +endif () + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(JsonCpp + REQUIRED_VARS JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR + VERSION_VAR JsonCpp_VERSION) + +if (JsonCpp_FOUND) + set(JsonCpp_INCLUDE_DIRS "${JsonCpp_INCLUDE_DIR}") + set(JsonCpp_LIBRARIES "${JsonCpp_LIBRARY}") + + if (NOT TARGET JsonCpp::JsonCpp) + add_library(JsonCpp::JsonCpp SHARED IMPORTED) + set_target_properties(JsonCpp::JsonCpp PROPERTIES + IMPORTED_LOCATION "${JsonCpp_LIBRARY}" + IMPORTED_IMPLIB "${JsonCpp_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${JsonCpp_INCLUDE_DIR}") + endif () +endif () diff --git a/dev-libs/protobuf/files/protobuf-27.4-findJsonCpp.patch b/dev-libs/protobuf/files/protobuf-27.4-findJsonCpp.patch new file mode 100644 index 000000000000..6ce98f758ec8 --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-27.4-findJsonCpp.patch @@ -0,0 +1,33 @@ +From e3138533bf97e1133371944b28e65bae5e8ae95c Mon Sep 17 00:00:00 2001 +From: Paul Zander <negril.nx+gentoo@gmail.com> +Date: Sat, 10 Aug 2024 13:43:28 +0200 +Subject: [PATCH] fix JsonCPP name + +Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> +--- + cmake/conformance.cmake | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/conformance.cmake b/cmake/conformance.cmake +index c5d8c7c..2e059ea 100644 +--- a/cmake/conformance.cmake ++++ b/cmake/conformance.cmake +@@ -9,7 +9,7 @@ if (protobuf_JSONCPP_PROVIDER STREQUAL "module") + " cmake -Dprotobuf_BUILD_CONFORMANCE=OFF\n") + endif() + elseif(protobuf_JSONCPP_PROVIDER STREQUAL "package") +- find_package(jsoncpp REQUIRED) ++ find_package(JsonCpp REQUIRED) + endif() + + file(MAKE_DIRECTORY ${protobuf_BINARY_DIR}/conformance) +@@ -140,5 +140,5 @@ if(protobuf_JSONCPP_PROVIDER STREQUAL "module") + target_link_libraries(conformance_test_runner jsoncpp_static) + endif() + else() +- target_link_libraries(conformance_test_runner jsoncpp) ++ target_link_libraries(conformance_test_runner JsonCpp::JsonCpp) + endif() +-- +2.46.0 + diff --git a/dev-libs/protobuf/files/protobuf-28.0-disable-test_upb-lto.patch b/dev-libs/protobuf/files/protobuf-28.0-disable-test_upb-lto.patch new file mode 100644 index 000000000000..0a9ed5e8e67c --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-28.0-disable-test_upb-lto.patch @@ -0,0 +1,23 @@ +From 14fe043db8162df9ddc2308437cace6434c67bd9 Mon Sep 17 00:00:00 2001 +From: Paul Zander <negril.nx+gentoo@gmail.com> +Date: Fri, 30 Aug 2024 03:22:16 +0200 +Subject: [PATCH] disable test_upb + +Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> + +diff --git a/cmake/tests.cmake b/cmake/tests.cmake +index c8ae114..eac821c 100644 +--- a/cmake/tests.cmake ++++ b/cmake/tests.cmake +@@ -175,7 +175,7 @@ add_test(NAME full-test + COMMAND tests ${protobuf_GTEST_ARGS} + WORKING_DIRECTORY ${protobuf_SOURCE_DIR}) + +-if (protobuf_BUILD_LIBUPB) ++if (protobuf_BUILD_LIBUPB AND FALSE) + set(upb_test_proto_genfiles) + foreach(proto_file ${upb_test_protos_files} ${descriptor_proto_proto_srcs}) + foreach(generator upb upbdefs upb_minitable) +-- +2.46.0 + diff --git a/dev-libs/protobuf/metadata.xml b/dev-libs/protobuf/metadata.xml index 8549a8aa96f0..8d3f48cb805e 100644 --- a/dev-libs/protobuf/metadata.xml +++ b/dev-libs/protobuf/metadata.xml @@ -1,7 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person" proxied="yes"> + <email>negril.nx+gentoo@gmail.com</email> + <name>Paul Zander</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> <slots> <subslots>Soname version number</subslots> </slots> @@ -9,4 +16,11 @@ <remote-id type="cpe">cpe:/a:google:protobuf</remote-id> <remote-id type="github">protocolbuffers/protobuf</remote-id> </upstream> + <use> + <flag name="conformance">Build conformance tests</flag> + <flag name="libprotoc">Build libprotoc</flag> + <flag name="libupb">Build libupb</flag> + <flag name="protobuf">Build protobuf libraries and protoc compiler</flag> + <flag name="protoc">Build libprotoc and protoc compiler</flag> + </use> </pkgmetadata> diff --git a/dev-libs/protobuf/protobuf-21.9.ebuild b/dev-libs/protobuf/protobuf-21.9.ebuild index 68b9207ab7b4..46fb355327c3 100644 --- a/dev-libs/protobuf/protobuf-21.9.ebuild +++ b/dev-libs/protobuf/protobuf-21.9.ebuild @@ -12,7 +12,7 @@ if [[ "${PV}" == *9999 ]]; then EGIT_SUBMODULES=() else SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" fi DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" diff --git a/dev-libs/protobuf/protobuf-22.5-r1.ebuild b/dev-libs/protobuf/protobuf-22.5-r1.ebuild index ff2783d5e7ce..ca830b5f58c8 100644 --- a/dev-libs/protobuf/protobuf-22.5-r1.ebuild +++ b/dev-libs/protobuf/protobuf-22.5-r1.ebuild @@ -12,7 +12,7 @@ if [[ "${PV}" == *9999 ]]; then EGIT_SUBMODULES=() else SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~mips ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" + KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" fi DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" diff --git a/dev-libs/protobuf/protobuf-22.5-r2.ebuild b/dev-libs/protobuf/protobuf-22.5-r2.ebuild new file mode 100644 index 000000000000..b8dbe905360c --- /dev/null +++ b/dev-libs/protobuf/protobuf-22.5-r2.ebuild @@ -0,0 +1,133 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common flag-o-matic toolchain-funcs + +ABSEIL_BRANCH="lts_2023_01_25" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-2).0" +IUSE="emacs examples test zlib" +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-23.3-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${P}-fix-missing-PROTOBUF_EXPORT-for-public-symbols.patch" + "${FILESDIR}/${P}-Use-the-same-ABI-for-static-and-shared-libraries-on-.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + eapply_user + append-cxxflags -std=c++17 + cmake_src_prepare +} + +src_configure() { + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + cmake-multilib_src_configure +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_DISABLE_RTTI="yes" # TODO why? + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_BUILD_TESTS="$(usex test)" + -Dprotobuf_ABSL_PROVIDER="package" + ) + use test && mycmakeargs+=(-Dprotobuf_USE_EXTERNAL_GTEST=ON) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}"/src + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-23.3-r4.ebuild b/dev-libs/protobuf/protobuf-23.3-r4.ebuild index 17092c5a48c6..6a47828975bb 100644 --- a/dev-libs/protobuf/protobuf-23.3-r4.ebuild +++ b/dev-libs/protobuf/protobuf-23.3-r4.ebuild @@ -12,7 +12,7 @@ if [[ "${PV}" == *9999 ]]; then EGIT_SUBMODULES=() else SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos" + KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos" fi DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" diff --git a/dev-libs/protobuf/protobuf-23.4.ebuild b/dev-libs/protobuf/protobuf-23.4.ebuild new file mode 100644 index 000000000000..87f127940ad0 --- /dev/null +++ b/dev-libs/protobuf/protobuf-23.4.ebuild @@ -0,0 +1,126 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common toolchain-funcs + +ABSEIL_BRANCH="lts_2023_01_25" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-2).0" +IUSE="emacs examples test zlib" +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-23.3-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-23.3-messages_lite-template-instances.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_configure() { + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + cmake-multilib_src_configure +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_DISABLE_RTTI="yes" # TODO why? + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_BUILD_TESTS="$(usex test)" + -Dprotobuf_ABSL_PROVIDER="package" + ) + use test && mycmakeargs+=(-Dprotobuf_USE_EXTERNAL_GTEST=ON) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}"/src + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-26.1-r1.ebuild b/dev-libs/protobuf/protobuf-24.4.ebuild index 534834edca75..c3681d98ce72 100644 --- a/dev-libs/protobuf/protobuf-26.1-r1.ebuild +++ b/dev-libs/protobuf/protobuf-24.4.ebuild @@ -5,11 +5,16 @@ EAPI=8 inherit cmake-multilib elisp-common toolchain-funcs -if [[ "${PV}" == *9999 ]]; then - inherit git-r3 +ABSEIL_BRANCH="lts_2023_01_25" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" - EGIT_SUBMODULES=() + EGIT_SUBMODULES=( '-*' ) + + inherit git-r3 else SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" @@ -23,20 +28,27 @@ SLOT="0/$(ver_cut 1-2).0" IUSE="emacs examples test zlib" RESTRICT="!test? ( test )" -BDEPEND="emacs? ( app-editors/emacs:* )" -DEPEND=" - >=dev-cpp/abseil-cpp-20230125.3:=[${MULTILIB_USEDEP}] +BDEPEND=" + emacs? ( app-editors/emacs:* ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) " RDEPEND=" - >=dev-cpp/abseil-cpp-20230125.3:=[${MULTILIB_USEDEP}] - emacs? ( app-editors/emacs:* ) - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + ${COMMON_DEPEND} + ${BDEPEND} " PATCHES=( - "${FILESDIR}/${P}-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" ) @@ -53,11 +65,11 @@ src_configure() { multilib_src_configure() { local mycmakeargs=( - -Dprotobuf_DISABLE_RTTI=ON - -Dprotobuf_BUILD_EXAMPLES=$(usex examples) - -Dprotobuf_WITH_ZLIB=$(usex zlib) - -Dprotobuf_BUILD_TESTS=$(usex test) - -Dprotobuf_ABSL_PROVIDER=package + -Dprotobuf_DISABLE_RTTI="yes" # TODO why? + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_BUILD_TESTS="$(usex test)" + -Dprotobuf_ABSL_PROVIDER="package" ) use test && mycmakeargs+=(-Dprotobuf_USE_EXTERNAL_GTEST=ON) @@ -92,13 +104,13 @@ multilib_src_install_all() { doins "${FILESDIR}/proto.vim" if use emacs; then - elisp-install ${PN} editors/protobuf-mode.el* + elisp-install "${PN}" editors/protobuf-mode.el* elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" fi if use examples; then DOCS+=(examples) - docompress -x /usr/share/doc/${PF}/examples + docompress -x "/usr/share/doc/${PF}/examples" fi einstalldocs diff --git a/dev-libs/protobuf/protobuf-25.3.ebuild b/dev-libs/protobuf/protobuf-25.3.ebuild new file mode 100644 index 000000000000..d878a5ea4e79 --- /dev/null +++ b/dev-libs/protobuf/protobuf-25.3.ebuild @@ -0,0 +1,125 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common toolchain-funcs + +ABSEIL_BRANCH="lts_2023_08_02" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-2).0" +IUSE="emacs examples test zlib" +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_configure() { + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + cmake-multilib_src_configure +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_DISABLE_RTTI="yes" # TODO why? + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_BUILD_TESTS="$(usex test)" + -Dprotobuf_ABSL_PROVIDER="package" + ) + use test && mycmakeargs+=(-Dprotobuf_USE_EXTERNAL_GTEST=ON) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}"/src + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-25.4.ebuild b/dev-libs/protobuf/protobuf-25.4.ebuild new file mode 100644 index 000000000000..158b36af6308 --- /dev/null +++ b/dev-libs/protobuf/protobuf-25.4.ebuild @@ -0,0 +1,165 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common multilib + +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_BRANCH="lts_2023_08_02" + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + MY_SLOT="28.0" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + MY_SLOT=$(ver_cut 1-2) +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/${MY_SLOT}.0" +IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" + +REQUIRED_USE=" + || ( + libprotoc + libupb + protobuf + protoc + ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) + !protobuf? ( + >=dev-libs/protobuf-${PV} + ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp[${MULTILIB_USEDEP}] + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-27.4-findJsonCpp.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + cmake_src_prepare + + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_ABSL_PROVIDER="package" + -Dprotobuf_JSONCPP_PROVIDER="package" + + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" + -Dprotobuf_BUILD_LIBUPB="$(usex libupb)" + -Dprotobuf_BUILD_PROTOBUF_BINARIES="$(usex protobuf)" + -Dprotobuf_BUILD_PROTOC_BINARIES="$(usex protoc)" + -Dprotobuf_BUILD_SHARED_LIBS="yes" + -Dprotobuf_BUILD_TESTS="$(usex test)" + + -Dprotobuf_DISABLE_RTTI="no" + + -Dprotobuf_INSTALL="yes" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" + ) + use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}/src" + + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -m 777 "${TEST_TMPDIR}" || die + + setup_test_env() { + ln -sr "${S}/src" "${BUILD_DIR}/include" || die + } + + multilib_foreach_abi setup_test_env + + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-26.1-r2.ebuild b/dev-libs/protobuf/protobuf-26.1-r2.ebuild new file mode 100644 index 000000000000..422310009a83 --- /dev/null +++ b/dev-libs/protobuf/protobuf-26.1-r2.ebuild @@ -0,0 +1,125 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common toolchain-funcs + +ABSEIL_BRANCH="lts_2023_08_02" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1-2).0" +IUSE="emacs examples test zlib" +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_configure() { + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + cmake-multilib_src_configure +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_DISABLE_RTTI="yes" # TODO why? + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_BUILD_TESTS="$(usex test)" + -Dprotobuf_ABSL_PROVIDER="package" + ) + use test && mycmakeargs+=(-Dprotobuf_USE_EXTERNAL_GTEST=ON) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}"/src + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-27.2.ebuild b/dev-libs/protobuf/protobuf-27.2.ebuild new file mode 100644 index 000000000000..5fab1016050e --- /dev/null +++ b/dev-libs/protobuf/protobuf-27.2.ebuild @@ -0,0 +1,160 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common toolchain-funcs multilib + +ABSEIL_BRANCH="lts_2023_08_02" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + MY_SLOT="27.2" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha amd64 ~arm arm64 ~loong ~mips ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + MY_SLOT=$(ver_cut 1-2) +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/${MY_SLOT}.0" +IUSE="conformance emacs examples +libprotoc libupb +protobuf +protoc test zlib" + +REQUIRED_USE=" + || ( + libprotoc + libupb + protobuf + protoc + ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) + !protobuf? ( + >=dev-libs/protobuf-${PV} + ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +# src_prepare() { +# rm "${S}/third_party/utf8_range/" -rf || die +# cmake_src_prepare +# } + +src_configure() { + if tc-ld-is-gold; then + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527 + tc-ld-disable-gold + fi + + cmake-multilib_src_configure +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_ABSL_PROVIDER="package" + -Dprotobuf_JSONCPP_PROVIDER="package" + + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" + -Dprotobuf_BUILD_LIBUPB="$(usex libupb)" + -Dprotobuf_BUILD_PROTOBUF_BINARIES="$(usex protobuf)" + -Dprotobuf_BUILD_PROTOC_BINARIES="$(usex protoc)" + -Dprotobuf_BUILD_SHARED_LIBS="yes" + -Dprotobuf_BUILD_TESTS="$(usex test)" + + -Dprotobuf_DISABLE_RTTI="no" + + -Dprotobuf_INSTALL="yes" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="yes" + ) + use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}"/src + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-27.4.ebuild b/dev-libs/protobuf/protobuf-27.4.ebuild new file mode 100644 index 000000000000..30ab416efd86 --- /dev/null +++ b/dev-libs/protobuf/protobuf-27.4.ebuild @@ -0,0 +1,166 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common multilib + +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_BRANCH="lts_2023_08_02" + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + MY_SLOT="28.0" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + MY_SLOT=$(ver_cut 1-2) +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/${MY_SLOT}.0" +IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" + +REQUIRED_USE=" + || ( + libprotoc + libupb + protobuf + protoc + ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) + !protobuf? ( + >=dev-libs/protobuf-${PV} + ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp[${MULTILIB_USEDEP}] + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.11[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-27.4-findJsonCpp.patch" + "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + cmake_src_prepare + + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_ABSL_PROVIDER="package" + -Dprotobuf_JSONCPP_PROVIDER="package" + + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" + -Dprotobuf_BUILD_LIBUPB="$(usex libupb)" + -Dprotobuf_BUILD_PROTOBUF_BINARIES="$(usex protobuf)" + -Dprotobuf_BUILD_PROTOC_BINARIES="$(usex protoc)" + -Dprotobuf_BUILD_SHARED_LIBS="yes" + -Dprotobuf_BUILD_TESTS="$(usex test)" + + -Dprotobuf_DISABLE_RTTI="no" + + -Dprotobuf_INSTALL="yes" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" + ) + use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}/src" + + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -m 777 "${TEST_TMPDIR}" || die + + setup_test_env() { + ln -sr "${S}/src" "${BUILD_DIR}/include" || die + } + + multilib_foreach_abi setup_test_env + + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-28.0.ebuild b/dev-libs/protobuf/protobuf-28.0.ebuild new file mode 100644 index 000000000000..30ab416efd86 --- /dev/null +++ b/dev-libs/protobuf/protobuf-28.0.ebuild @@ -0,0 +1,166 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common multilib + +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_BRANCH="lts_2023_08_02" + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + MY_SLOT="28.0" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + MY_SLOT=$(ver_cut 1-2) +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/${MY_SLOT}.0" +IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" + +REQUIRED_USE=" + || ( + libprotoc + libupb + protobuf + protoc + ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) + !protobuf? ( + >=dev-libs/protobuf-${PV} + ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp[${MULTILIB_USEDEP}] + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.11[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-27.4-findJsonCpp.patch" + "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + cmake_src_prepare + + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_ABSL_PROVIDER="package" + -Dprotobuf_JSONCPP_PROVIDER="package" + + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" + -Dprotobuf_BUILD_LIBUPB="$(usex libupb)" + -Dprotobuf_BUILD_PROTOBUF_BINARIES="$(usex protobuf)" + -Dprotobuf_BUILD_PROTOC_BINARIES="$(usex protoc)" + -Dprotobuf_BUILD_SHARED_LIBS="yes" + -Dprotobuf_BUILD_TESTS="$(usex test)" + + -Dprotobuf_DISABLE_RTTI="no" + + -Dprotobuf_INSTALL="yes" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" + ) + use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}/src" + + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -m 777 "${TEST_TMPDIR}" || die + + setup_test_env() { + ln -sr "${S}/src" "${BUILD_DIR}/include" || die + } + + multilib_foreach_abi setup_test_env + + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild new file mode 100644 index 000000000000..30ab416efd86 --- /dev/null +++ b/dev-libs/protobuf/protobuf-9999.ebuild @@ -0,0 +1,166 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common multilib + +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_BRANCH="lts_2023_08_02" + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + MY_SLOT="28.0" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + MY_SLOT=$(ver_cut 1-2) +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/${MY_SLOT}.0" +IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" + +REQUIRED_USE=" + || ( + libprotoc + libupb + protobuf + protoc + ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) + !protobuf? ( + >=dev-libs/protobuf-${PV} + ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp[${MULTILIB_USEDEP}] + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.11[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-27.4-findJsonCpp.patch" + "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + cmake_src_prepare + + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_ABSL_PROVIDER="package" + -Dprotobuf_JSONCPP_PROVIDER="package" + + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" + -Dprotobuf_BUILD_LIBUPB="$(usex libupb)" + -Dprotobuf_BUILD_PROTOBUF_BINARIES="$(usex protobuf)" + -Dprotobuf_BUILD_PROTOC_BINARIES="$(usex protoc)" + -Dprotobuf_BUILD_SHARED_LIBS="yes" + -Dprotobuf_BUILD_TESTS="$(usex test)" + + -Dprotobuf_DISABLE_RTTI="no" + + -Dprotobuf_INSTALL="yes" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" + ) + use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}/src" + + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -m 777 "${TEST_TMPDIR}" || die + + setup_test_env() { + ln -sr "${S}/src" "${BUILD_DIR}/include" || die + } + + multilib_foreach_abi setup_test_env + + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |