diff options
Diffstat (limited to 'dev-libs')
28 files changed, 1455 insertions, 3 deletions
diff --git a/dev-libs/Manifest.gz b/dev-libs/Manifest.gz Binary files differindex 9f0ce77bda66..cd4c830ec586 100644 --- a/dev-libs/Manifest.gz +++ b/dev-libs/Manifest.gz diff --git a/dev-libs/c-siphash/Manifest b/dev-libs/c-siphash/Manifest new file mode 100644 index 000000000000..905e904afc26 --- /dev/null +++ b/dev-libs/c-siphash/Manifest @@ -0,0 +1,3 @@ +DIST c-siphash-1.1.0.gh.tar.gz 8278 BLAKE2B b8bf9c58efbfc9ea83c4d4f1c260bf96f395b929a158cbac516dcb30bfce662c97bb533d5d36e00aaa86643fc748e06b5ddcfce8e4ef0eca33ad0fa01d84a75d SHA512 22194a162fe048aaf9929e0fc770ce90cca574ee3a2784ac6e270add33c8b3dd6726279c3af380927e9703035f9dc303d647c33335f52f87197a82f5bd403842 +EBUILD c-siphash-1.1.0.ebuild 493 BLAKE2B 0d7821d8fb336aacb6c389488377157b5b291db7b6d5981071ef870d4f73d319452b7429c47a4477090a31a60912a1edcf0ee754b0c2958ad03ced9c6ad0175b SHA512 164c6f1d99dd46b9d434b8c9a6b091ef2c0b69a65c3f8d43bc24cb5c18856d474acdf71dd1e05ff9732278583d52ec945c887d197bdea74851e79361fcd7841c +MISC metadata.xml 329 BLAKE2B a5fd0c95bd16813c1e64e976addea64bd047481d0bc2dd7633cc0fc01f6291b1ddefa757d3e162b90959d0e8034e0ef3a0a2e4e3f7d0ed3e13cef74bebf68eaf SHA512 add5f119cec674d09abc228a23f9f3a99ccf393b8448f037685c72106086f63112116c4c8ba0bc83fec5fe5291d7063c3e6ecab62a95c97216be33078ff7aa95 diff --git a/dev-libs/c-siphash/c-siphash-1.1.0.ebuild b/dev-libs/c-siphash/c-siphash-1.1.0.ebuild new file mode 100644 index 000000000000..5f8d92d5783f --- /dev/null +++ b/dev-libs/c-siphash/c-siphash-1.1.0.ebuild @@ -0,0 +1,27 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson + +DESCRIPTION="Streaming-capable SipHash Implementation" +HOMEPAGE=" + https://c-util.github.io/c-siphash/ + https://github.com/c-util/c-siphash/ +" +SRC_URI=" + https://github.com/c-util/c-siphash/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="|| ( Apache-2.0 LGPL-2.1+ )" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + >=dev-libs/c-stdaux-1.5.0 +" +BDEPEND=" + virtual/pkgconfig +" diff --git a/dev-libs/c-siphash/metadata.xml b/dev-libs/c-siphash/metadata.xml new file mode 100644 index 000000000000..a24a6514f9ed --- /dev/null +++ b/dev-libs/c-siphash/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</name> + </maintainer> + <upstream> + <remote-id type="github">c-util/c-siphash</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-libs/c-stdaux/Manifest b/dev-libs/c-stdaux/Manifest new file mode 100644 index 000000000000..0ad355e8af4a --- /dev/null +++ b/dev-libs/c-stdaux/Manifest @@ -0,0 +1,3 @@ +DIST c-stdaux-1.5.0.gh.tar.gz 24272 BLAKE2B 414713314bc773d800c4c3150e6de09a9b0d25c33a75f75ab3f766b63caf7c626bd617df155143579acac1aaf4e9027d41b9c0f99f6ed99ebfc31d752ea6a80d SHA512 30e2cc3ff8df40b2c3dc1409d47fa0f65467a853c75e500f1f973f6f2108e036601032620e40409fde58e2239b751f2736b326c11b45f2e43cc1064f341aa7b7 +EBUILD c-stdaux-1.5.0.ebuild 469 BLAKE2B c42b735b0ea5858e4695634f26f8a01ec6370128a10e11d095ffdacca6ab6a992daef0170e4e467b10e5963e58e8a5416746f37764081547f8c955d9063636b4 SHA512 626235829d2c509ba27cedd8d0cbd9cd983df3abf581ae288e8d4d3b74856074afbb08da0b8d8b4cf09e37af35d54d373414b250e601ae043135bada0859dfce +MISC metadata.xml 328 BLAKE2B 519a6b711b1d53cd2eaefdca6dd737649f1f18b115bd76439a16496447992792def2fb109aa2bf5f11c44414116765f2c9af5bfccb4dd55ea90647f90c48f984 SHA512 a5f155761476e7a4949cd31ab113f21f80398afbdc345db9b17abb07d525878155d57adfd03748f6d908dc2e23f93524623eec7ee97f8cdd47d115184f377d91 diff --git a/dev-libs/c-stdaux/c-stdaux-1.5.0.ebuild b/dev-libs/c-stdaux/c-stdaux-1.5.0.ebuild new file mode 100644 index 000000000000..6aee88c6a062 --- /dev/null +++ b/dev-libs/c-stdaux/c-stdaux-1.5.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson + +DESCRIPTION="Auxiliary macros and functions for the C standard library" +HOMEPAGE=" + https://c-util.github.io/c-stdaux/ + https://github.com/c-util/c-stdaux/ +" +SRC_URI=" + https://github.com/c-util/c-stdaux/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="|| ( Apache-2.0 LGPL-2.1+ )" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND=" + virtual/pkgconfig +" diff --git a/dev-libs/c-stdaux/metadata.xml b/dev-libs/c-stdaux/metadata.xml new file mode 100644 index 000000000000..7e9ad66652f7 --- /dev/null +++ b/dev-libs/c-stdaux/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>mgorny@gentoo.org</email> + <name>Michał Górny</name> + </maintainer> + <upstream> + <remote-id type="github">c-util/c-stdaux</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-libs/ktextaddons/Manifest b/dev-libs/ktextaddons/Manifest index aa51298cb7c4..1d7670633cdd 100644 --- a/dev-libs/ktextaddons/Manifest +++ b/dev-libs/ktextaddons/Manifest @@ -1,5 +1,5 @@ DIST ktextaddons-1.2.1.tar.xz 392132 BLAKE2B 63a3dcbca0e49fab246f6a76266529e90ec73209e5dd2464884b9b0071867d10ff017b91faa321a8738e63c90c6bd6c4c8ad708a4a944595eba4a7f0aa4934d2 SHA512 44a0aa56a92594031576d2e37e7bc526444f64cebd9b5add8bd382e72fc30b222075bee4d61cc358da61f4db266cd0a339717bd9d90b21e38993371cb1408db9 DIST ktextaddons-1.5.4.tar.xz 471052 BLAKE2B 9f2730d0e1f71606b60c2469bd06790a8a1fadd7e30526ed94125d8eb897a08be549ac05bd9af9651dadf5ef95fa71249c5802e40fce43f28c82c2cd8f121e04 SHA512 76829c265c68e374fc7012c270a0328bb9d724d78165f0bda8da126994a5eb692af0b66b93e1151af3fc3e1755bbedfabcae73b60bb47c871181d2d50530e243 EBUILD ktextaddons-1.2.1.ebuild 1085 BLAKE2B 1957d45ad80a6bfd8edf0bb2dcbf190d15954fb87a5312caaf6ea2a06c0c72c508aa9d42dc9134d3b3bd10db8ad1425abe78a78fed472b29b6551ae9f28f05ec SHA512 b8ad187f2c16bb46ba617bf3d54f2405003f603066ee956183bba4315a213a7fca171c81076fb7e481e6d81302766951aad80dd693b40ef6282f71ec8d64a870 -EBUILD ktextaddons-1.5.4.ebuild 1148 BLAKE2B 738ca6808063cde560269ac6883890fc939eae0148795484110358cb6a9476333813e92f9ac679b2656631c11953472a7ac6faa460f911be56bf3d7de02f29b8 SHA512 5283a311115142b678aa099ae1f62684e1661b6727db5f985def46ee24cdaf402b0da821cd7a7996024c0753feb8fa4ebaa6a939ef4211fdb9da317f4062d59a +EBUILD ktextaddons-1.5.4.ebuild 1192 BLAKE2B e6cbc23e140df299ff799bca3b1ee0e0b5aad326b0eeb3de1535b95bdb89ec77cb0b3e0fa35bd8adc32897412b88d8ef238a5cac8e13b042f87e7bb6e4a580b0 SHA512 be67057f36eb7515127bbec204e3b0230c7b6ce271b8122b7b2122856ed07a7f7d09f78541a3391b838b41a59c93e64830cd3e62ad70e868c0edfd82ce8f4746 MISC metadata.xml 474 BLAKE2B 5ac8ffc46a5da22bb89002f8962745272bfa6060df178a1a784b22ad56bacaa92e32e3c421459c17b4054c4678ec1c173e6ff234bd3ad5b736208b64fd19f02e SHA512 479c76d5e955d8dfecdb44aafa0d4bfb1b62c951afbd98fece030da9076c2b7787d5435f8d2f66a1ebef918cd8e9e9f231370d45cec288deaaab729e975b09d7 diff --git a/dev-libs/ktextaddons/ktextaddons-1.5.4.ebuild b/dev-libs/ktextaddons/ktextaddons-1.5.4.ebuild index c59bc67f77cd..91e82c8d59c3 100644 --- a/dev-libs/ktextaddons/ktextaddons-1.5.4.ebuild +++ b/dev-libs/ktextaddons/ktextaddons-1.5.4.ebuild @@ -34,6 +34,7 @@ DEPEND=" >=kde-frameworks/kcoreaddons-${KFMIN}:6 >=kde-frameworks/ki18n-${KFMIN}:6 >=kde-frameworks/kio-${KFMIN}:6 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:6 >=kde-frameworks/sonnet-${KFMIN}:6 >=kde-frameworks/syntax-highlighting-${KFMIN}:6 speech? ( >=dev-qt/qtspeech-${QTMIN}:6 ) diff --git a/dev-libs/protobuf-c/Manifest b/dev-libs/protobuf-c/Manifest index 20cfe1dfc24d..2490b2ac01cd 100644 --- a/dev-libs/protobuf-c/Manifest +++ b/dev-libs/protobuf-c/Manifest @@ -1,9 +1,11 @@ AUX protobuf-c-1.3.0-no-build-tests.patch 1020 BLAKE2B adda0e4764283d00093709bc97500187521c1d099c6a057513cd4c4ab3b595479f62e7f90bc28ee062f7cae8a760445c78334468f25291320b74d46a5bb454cc SHA512 c6b6f37d8d0fb1ac14e650cc521034267b0af06525249078cc81fc8a3d551dc446bb5285228ca349ce18581979ea88eb9765233154cfbbedd8c4a937987d2684 AUX protobuf-c-1.4.0-include-path.patch 8092 BLAKE2B d1abcadbaf41789a882427cbae6d34e481f4bb66af95d95f0e33909bf25978b6adf80ba33094688e8a56ab51a7c0ee2b7aaba02ec591c286e824358ce671c212 SHA512 162b23bfd165c1dadaeb0f6c9eddc68819b5454c856def2d7a09d50d5694eaf5174ee6402197ff0d2e4465eb8f3130e0ef009f7f4d6de9fdbbd7af5fcf937ffb AUX protobuf-c-1.4.1-protobuf-22.patch 17194 BLAKE2B 711d3913f391775501f823af7ffd25fb5bffe748d255d88ebab7be406b2165e57d3197d15d3f08774745c4615a9a54fb8b051d3e801563a1ceeca1b8a5101175 SHA512 745e012a553c84a379a1c047147ba4fc9b06882561876a594546144d88d79cac9ff4327480a67808949957d158b5bc18aa7f94960856d07da43b2027d76a3067 +AUX protobuf-c-1.5.0-Clean-CMake.patch 6833 BLAKE2B 3862c80c58402aa678cf3fc73e740469e3280f7c6862b337b8a48be3e686074e269d4d6724a1f77d298e8f53b63d35bc2fb50db53cb8dc0a0343a9fbc5c0f1f9 SHA512 d0680357d7d6989f6444eb86afa40fe5b9e781547f7e51b9897e4d369b49737d9db5e63c3ac8dd7b5dff7043868fc402a14f3c6e8ea7b19b3aab74b0f3d1ddfa DIST protobuf-c-1.4.1.tar.gz 513596 BLAKE2B b5e87a3154863581b81790a26b6b522c2b3ad138e966053f20c6264b4a7677d6c5bff8e27faa7c6cfa9e982b72b06e2f518a3def9f6db13241c3cb3ee9afc8f6 SHA512 190a4aa5c607853e6bf860b0974deb21e4f7f6209e810251eaca9612b59ea676779b0ca217fb1572914ffb8de3315a7d24f162b14d447ee671a9adc5b1271e41 DIST protobuf-c-1.5.0.tar.gz 507251 BLAKE2B 7b428655901f4fd74b67b75419552e7c02065a5291aed4dcc1d55b98c986caa9ccf846eb5e98e0954420c3e5bea559b0078843e00daa7b5c63465eec21e28204 SHA512 175c9fc901cab88308730eea982dd62b1e0decdceb80aa53be163f17a440b4acecb834a784beab5cd71186413a322a323f4539758a8727ca51801cf92f9bd3da EBUILD protobuf-c-1.4.1-r1.ebuild 1188 BLAKE2B cd4cacd395c9a68da33f18adcbe3bbd803766b84f1379524bb70c5aa86a6084249aa5d8c9c868f3f7c91fc5241b3731fb2d03d115fdbe90c988b1e9ed19992de SHA512 e12c2aa93e5cae530dfd6cf2fc0ed3e01cdf6b182455c10f705a84e2a37734ce599c9f6101be4008772dee195e2b0d19bf404102ce0a9487923c1e2580798bd8 EBUILD protobuf-c-1.4.1.ebuild 1147 BLAKE2B a0250ab24396e95117b93fd1ca36bfba7d253f8f02e726278e45c695bdecef2b994b70c43328e60e649a4c3974915994ffe00b0c7840be8511ef044695b6ffa7 SHA512 a0555be30fe6a76d3a2d19b991730b0b028729e011219062a561cb73e89cf4c721a45cc3d2c3f72c2541116b81d09ecb3b05e5680b5bb9f727a8584d512c5865 +EBUILD protobuf-c-1.5.0-r1.ebuild 1063 BLAKE2B 6c5b3cd62fb4d236af5aedb54c7b48a82885b73f99ac1cbad5563954dd40536a9cea325a0b2a4603d4cefee1080c29a7148d5b0691a7a2b9978223b63a0c1c74 SHA512 9cfbb0b702e1b9733c9fd50d2f8f158af0cd4019e3d0a9c35a240d5bf24a423923584208052a4ecf48b1af0d3be5b95fb3f89689b14a5208c2d2ee1e8a5a3ac4 EBUILD protobuf-c-1.5.0.ebuild 983 BLAKE2B a538a1a533434b62d07b4ff1c6f944f920fb3a253b097fc5b24c1fb9ed262efa1ec122f1dd522512721e777ca8ded2ba6910194e9d6aea4d36e365773b5bc7c6 SHA512 2ad440ff9e50b8f808e33e8aa7f2b3632b06a4b15024619b000428f540f0a17cf1ecf3a404908d0b42eac8193b956a44502f15e5b16669e53a1aba867d8962d5 MISC metadata.xml 334 BLAKE2B faf0bb965591d515842465979c2c5224d21f7cc820d529ffc6dd8081b9c6d9bb80118f7c9767844b3c855f324054463a65880bd8851a95835c70246dfa8ae1c9 SHA512 6ba2fd30a13dca3180099c390f5b715062b0b082eb977ffa9b582f29693ea1b9c00870ebf4f5783261e5f05358a9b1ccf8ed5c9b35325432721099db4676a9aa diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch b/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch new file mode 100644 index 000000000000..f3e55a9c89cc --- /dev/null +++ b/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch @@ -0,0 +1,169 @@ +From a6cf1aa386067e26d582cc1d1e327787595c9f13 Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Wed, 20 Mar 2024 21:48:10 -0400 +Subject: [PATCH 01/11] FileGenerator::GenerateHeader(): Set + `min_header_version` unconditionally + +Previously, we were conditionally trying to set `min_header_version` to +the lowest possible value, and relying on a "legacy" Google interface to +determine the file descriptor's syntax version as part of that +determination. + +Instead, simply bump the minimum version to 1003000 (1.3.0). This +release was almost 7 years ago. In practice protobuf-c users should not +be shipping pre-compiled .pb-c.c/.pb-c.h files, anyway. +--- + protoc-c/c_file.cc | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/protoc-c/c_file.cc b/protoc-c/c_file.cc +index ca0ad34e..c6d8a240 100644 +--- a/protoc-c/c_file.cc ++++ b/protoc-c/c_file.cc +@@ -117,14 +117,7 @@ FileGenerator::~FileGenerator() {} + void FileGenerator::GenerateHeader(io::Printer* printer) { + std::string filename_identifier = FilenameIdentifier(file_->name()); + +- int min_header_version = 1000000; +-#if GOOGLE_PROTOBUF_VERSION >= 4023000 +- if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) { +-#else +- if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) { +-#endif +- min_header_version = 1003000; +- } ++ const int min_header_version = 1003000; + + // Generate top of header. + printer->Print( + +From ee3d9e5423c93ee6b828fdda8e7fef13a77634eb Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Wed, 20 Mar 2024 22:25:54 -0400 +Subject: [PATCH 02/11] Reimplement FieldSyntax() to maximize compatibility + across protobuf versions + +Recent versions of Google protobuf have broken the interfaces for +determining the syntax version of a .proto file. The current protobuf-c +1.5.0 release does not compile with Google protobuf 26.0 due to the most +recentage breakage. There is a possible workaround involving the Google +protobuf `FileDescriptorLegacy` class, which is documented as: + +// TODO Remove this deprecated API entirely. + +So we probably shouldn't rely on it. + +Instead, this commit obtains the `FileDescriptorProto` corresponding +to the passed in `FieldDescriptor` and interrogates the `syntax` field +directly. This is a single implementation with no version-specific +workarounds. Hopefully this won't break in the next Google protobuf +release. + +I tested the `FieldSyntax()` implementation in this commit across a +number of different Google protobuf releases and found that it worked +(`make && make check`) on all of them: + +- Google protobuf 3.6.1.3 (Ubuntu 20.04) +- Google protobuf 3.12.4 (Ubuntu 22.04) +- Google protobuf 3.21.12 (Debian 12 + Debian unstable) +- Google protobuf 3.25.2 (Debian experimental) +- Google protobuf 26.1-dev +--- + protoc-c/c_helpers.h | 24 ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) + +diff --git a/protoc-c/c_helpers.h b/protoc-c/c_helpers.h +index 062d330b..be28b601 100644 +--- a/protoc-c/c_helpers.h ++++ b/protoc-c/c_helpers.h +@@ -70,10 +70,6 @@ + #include <protobuf-c/protobuf-c.pb.h> + #include <google/protobuf/io/printer.h> + +-#if GOOGLE_PROTOBUF_VERSION >= 4023000 +-# include <google/protobuf/descriptor_legacy.h> +-#endif +- + namespace google { + namespace protobuf { + namespace compiler { +@@ -173,13 +169,21 @@ struct NameIndex + int compare_name_indices_by_name(const void*, const void*); + + // Return the syntax version of the file containing the field. +-// This wrapper is needed to be able to compile against protobuf2. + inline int FieldSyntax(const FieldDescriptor* field) { +-#if GOOGLE_PROTOBUF_VERSION >= 4023000 +- return FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3 ? 3 : 2; +-#else +- return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? 3 : 2; +-#endif ++ auto proto = FileDescriptorProto(); ++ field->file()->CopyTo(&proto); ++ ++ if (proto.has_syntax()) { ++ auto syntax = proto.syntax(); ++ assert(syntax == "proto2" || syntax == "proto3"); ++ if (syntax == "proto2") { ++ return 2; ++ } else if (syntax == "proto3") { ++ return 3; ++ } ++ } ++ ++ return 2; + } + + // Work around changes in protobuf >= 22.x without breaking compilation against + +From 2480f4d9d2fa97e5511ed0914ee529a344e969a7 Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Wed, 20 Mar 2024 22:43:30 -0400 +Subject: [PATCH 03/11] CGenerator: Protect against being invoked against + "edition" syntax .proto files + +The Google protobuf project is currently experimenting with a new syntax +for .proto files called "editions". Since protobuf-c is a proto2/proto3 +compiler, after the previous commit reimplementing `FieldSyntax()`, the +protobuf compiler will abort like this if presented with an "editions" +syntax .proto file due to the safety check in `FieldSyntax()`: + + $ protoc --experimental_editions --c_out=. test.proto + protoc-gen-c: ./protoc-c/c_helpers.h:178: int google::protobuf::compiler::c::FieldSyntax(const google::protobuf::FieldDescriptor*): Assertion `syntax == "proto2" || syntax == "proto3"' failed. + --c_out: protoc-gen-c: Plugin killed by signal 6. + +On protobuf 26, our `CodeGenerator` can implement certain methods to +declare that we "support" editions, and then reject any other edition +except proto2 and proto3, which have apparently been retroactively +declared to be "editions". Of course this needs to be wrapped in a +version guard. + +With this protection in place, the protobuf compiler cleanly exits with +a nice error message like this: + + $ protoc --experimental_editions --c_out=. test.proto + WARNING: All log messages before absl::InitializeLog() is called are written to STDERR + E0000 00:00:1710988958.296200 20022 descriptor.cc:4620] Invalid proto descriptor for file "test.proto": + E0000 00:00:1710988958.296239 20022 descriptor.cc:4623] test.proto: Edition 2023 is later than the maximum supported edition PROTO3 + --c_out: protoc-gen-c: Plugin failed with status code 1. +--- + protoc-c/c_generator.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h +index b8b44aaa..4aeb5790 100644 +--- a/protoc-c/c_generator.h ++++ b/protoc-c/c_generator.h +@@ -93,6 +93,12 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator { + const std::string& parameter, + OutputDirectory* output_directory, + std::string* error) const; ++ ++#if GOOGLE_PROTOBUF_VERSION >= 5026000 ++ uint64_t GetSupportedFeatures() const { return CodeGenerator::FEATURE_SUPPORTS_EDITIONS; } ++ Edition GetMinimumEdition() const { return Edition::EDITION_PROTO2; } ++ Edition GetMaximumEdition() const { return Edition::EDITION_PROTO3; } ++#endif + }; + + } // namespace c diff --git a/dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild new file mode 100644 index 000000000000..842e911beb9e --- /dev/null +++ b/dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools multilib-minimal + +MY_PV="${PV/_/-}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Protocol Buffers implementation in C" +HOMEPAGE="https://github.com/protobuf-c/protobuf-c" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD-2" +# Subslot == SONAME version +SLOT="0/1.0.0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="static-libs" + +BDEPEND=" + >=dev-libs/protobuf-3:0 + virtual/pkgconfig +" +DEPEND=" + >=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-1.5.0-Clean-CMake.patch" +) + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + --enable-year2038 + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_install_all() { + find "${ED}" -name '*.la' -type f -delete || die + einstalldocs +} diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest index b30eae5ef70b..7c132b6fb832 100644 --- a/dev-libs/protobuf/Manifest +++ b/dev-libs/protobuf/Manifest @@ -14,10 +14,21 @@ 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-26.1.tar.gz 5957903 BLAKE2B 1a7faab2f56aa0995801a80f73a812c7fc38a00af0bf25bdd5eecf7aec27a86a575ea2fb8484787d19c9ac6e46007c9864e79464f529c446f31af732981feed1 SHA512 0363ac09f92d8e040491425d444c8dca0b9b430e02d2dff6e2b28a0c2b2bea0d33a47f50bc9e2e2d4e8e22b65a02009a20c0066fb89c75df93a7b703dda42ed4 +DIST protobuf-27.2.tar.gz 6282174 BLAKE2B 86d12e9f87e8e1c2961ad517115c8689a8dd984722513816d8d626e59a76f5e7a698a90cbf6007daacf66c6053c9ff28108ff113579a442ce61cd221178bda44 SHA512 664c66b62cf1ed0c65d9b910d8e67d4d5d471113697f1b8edf1573cd5c0fc8e850ac53ce984e48e6c6b9cbbefa12f8530058384e7388e65a59c1e46d03772397 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-22.5-r2.ebuild 3159 BLAKE2B 493ce3e4e49606d2b7dfcb0e4f5aab4868cbf9d4f82b37f3e2aae8fc690358537b37dabf45ae4af3da00e262badc75403931ecc453a762d7f330a50c6aa425b4 SHA512 7596d14f23989b3c07fb1a260d73003163b57b98e875631d7bb9c2375e0530ae9d1a989cc124cb1ee47dad07505577ce68bbaf2c7224832b00dde3b8119a2f7b EBUILD protobuf-23.3-r4.ebuild 2899 BLAKE2B 42978fed39321f2a49835a698b7da09a90ba1413a41fc94540fd6a501354171e3ae8621ee30790ae45d68517aea0fdde9f6f65e857b4781b7cae0495305fa471 SHA512 463f2232375d62a27f4467d8e29987146a4300504e215b918ea993483eb0df3bfe0ab6fa2e09dbbb82dfe40d85e8454b4f865805951233b118ac74fdb307fbf4 +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 2915 BLAKE2B 75df59e6ca105a529cf582cda4371c26f0b9bf1df94fb11c3b409e1b01fcde43e0705e05212ea630839446aba819c4b8132514383f94fa2aa455b232a3f64eae SHA512 8daaf04ef736d389f634f2366e833e7c6ce40a9e60b022a31df31868b01a282f948d583270827b1714cc7cfacac4cdd0e9971944dc5b3dd823afa4696c4cf1c7 EBUILD protobuf-26.1-r1.ebuild 2722 BLAKE2B 2b4a648933fe23621fdbc67d5a6a7783d7716c1f4cbf72eec5292c3f87006a426a7444744a83d77700e94c2b411c0b5c1983cb1bb1dedd4fe8e4b3ea58b8452b SHA512 7b8cfc2fa64f4dd633ad93da7428ffaeae2cef9aea78f7032c5506abad91ab8f2da91a5598eab47f065419210686afc2a54bc49b3edbaa2801d419857de810e4 -MISC metadata.xml 380 BLAKE2B 5f2f89127d56c14c18bc9ae1957bea29c56ff6663060ea7408842a9b17504418a363fafc93bdb75db5d308c08b5706d4325a5a37c517f29e3ff70a7a8d4a21c7 SHA512 e6f4bbba0b3cf42667a27900c517b2dfff7538b397347adc2a7a9e7b6b55dcc95f6469f85feed795fe02b41dd7adde0e3e40e9f313b978d9a2f60a3522ed1efe +EBUILD protobuf-26.1-r2.ebuild 2915 BLAKE2B 75df59e6ca105a529cf582cda4371c26f0b9bf1df94fb11c3b409e1b01fcde43e0705e05212ea630839446aba819c4b8132514383f94fa2aa455b232a3f64eae SHA512 8daaf04ef736d389f634f2366e833e7c6ce40a9e60b022a31df31868b01a282f948d583270827b1714cc7cfacac4cdd0e9971944dc5b3dd823afa4696c4cf1c7 +EBUILD protobuf-27.2.ebuild 3693 BLAKE2B 2b069ca4cc38b05606192e9b70065bfb0eee9f2e90259ba0e86b60ceff5252f2699da233408d41d55ae1835c9b82806c6f5228da2196deb2126a33f69b913fbb SHA512 451a13a957a2629aa6c4cdc01bd673189ed52b4019b5b08b4f70c4683be161b6ac139c7aecef0bb42b9b5c56d167b58b8439d8d010987c9499cb44e9cd8c12f4 +EBUILD protobuf-9999.ebuild 3693 BLAKE2B 8afae42032a489c92a8c4c1accd66b8e43a023d431ce0f4e280f05803bcab2bb313e242507284df0cfcc6dd9756a02d78b543dec66891a4165cefb09842cb7b3 SHA512 971352e81516941cbbd7287834cc06d885d358845622ebc69521d76bae82128aec25d207c9a52a97642ea623ff22ea90f67408d0b3ccc4ecf7550a999df1eb36 +MISC metadata.xml 917 BLAKE2B c25c810e47e764843ad71be5eb5ebe617d881e7363ce3206401eb59c6df12969bc22bbedc34f08b0a2fbcf955de5b85aa8e4d3a964c1349f07ed1d0eb344a915 SHA512 baa5737981669f1b28ce32884698a4d91e0f1fbdde6056779307e1a6c85dde8ca36ee47ca3ce8794b996934dfafc5482afbe9532a7f3e17c833c3aef0a330376 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-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.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-24.4.ebuild b/dev-libs/protobuf/protobuf-24.4.ebuild new file mode 100644 index 000000000000..c3681d98ce72 --- /dev/null +++ b/dev-libs/protobuf/protobuf-24.4.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_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}-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.3.ebuild b/dev-libs/protobuf/protobuf-25.3.ebuild new file mode 100644 index 000000000000..422310009a83 --- /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-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..d9b11f9f0d6a --- /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 + +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 ~sparc ~x86 ~amd64-linux ~x86-linux ~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.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-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild new file mode 100644 index 000000000000..c2a90ff0480c --- /dev/null +++ b/dev-libs/protobuf/protobuf-9999.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 + +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="28.0" + + 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" + 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.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/tlsh/Manifest b/dev-libs/tlsh/Manifest index acdfdc647014..8fe21c5fbd42 100644 --- a/dev-libs/tlsh/Manifest +++ b/dev-libs/tlsh/Manifest @@ -1,5 +1,7 @@ +AUX tlsh-4.8.2-big-endian.patch 598 BLAKE2B 5a0502f5061f665619a72291610bf9131572a661068cc6d93678b26a1dc000d92dae3a6fa0ba401b0ffb3a4272ee513964a6367c30d9eac6ce7de4d297e0c883 SHA512 86e3a3b00669256a3c54e22100cfa0f27574dad7f7f7c8ca0b000630c9b5dffd490c5764906eee1b7b6e24bdf721aade243e90f209d9b114e6fb47372c41c47c AUX tlsh-4.8.2-gnuinstalldirs.patch 1244 BLAKE2B 1369902e03db4837e02c01d63262545725b241a02f02462fd4fb41e7204dee9bae668bf16daf0990b083ced13d4234348ba3df220eab6d69fd77a1e3979b71f3 SHA512 68cf688a8587a301299efb5779ab47473a508e0f0cf6dc90e3ada21bda3cae25142da7d83b67098adef0f03cfbbea40952acffffcaf75c18842efeacb5bcfda8 AUX tlsh-4.8.2-respect-flags.patch 820 BLAKE2B 9159f50d554168497ad9f416e4e002fd757a88543529fe6e2a180f6250399956bb6d967b06bc458e71b9dcf7f01cbb5d98d762ee65d9fd61392fd59b81dd25c4 SHA512 4b90021f2a01992d68d52f11b20a2ce9c4900216c8a6cd7c6fb95cfad20b44fbe37ab118ceee2811e65da7380e12960b5ddbf883198573491c2cf40f25b0fed1 DIST tlsh-4.8.2.tar.gz 3345458 BLAKE2B 27d5eece16bb36225b9ae8b3d3a9d055a0f214fffae08a58c39211c3d918dd842497315a62237b291ee1055dfadad78826bbd24f7b9d88f510e9a31f74654039 SHA512 5355c7734f5356a3a7a31ccc078254835871fc0369f1889a34131a0f810735201c68f674eb18e975b6a03a32e5c284899ca9ffdc1f583e42192188c172d2aad0 +EBUILD tlsh-4.8.2-r2.ebuild 936 BLAKE2B 13f574c3fb3908b3e3e15b7554bb16c76b8ae49e849ca940dd96ba3fbb0535d4327f2ae3a74bfff226cc04970cc83cb2f72c90dd3c732e3c35f28964633c37d9 SHA512 dc0fa537db9a6c405f71833bce6cc1776fd8cbf9df4db0aa0e7477742a3f72f6c7ee9a9e2254e6e7321b74391c9cf7494d6e0dff8b304a5aa11b8d34c85002ee EBUILD tlsh-4.8.2.ebuild 892 BLAKE2B 6e047ece79f3f11ab2b989e6b175592ea4369ba8de1f315370a2f636768f44d86d411d3d550541662f9e186230180baf23c65533f5090a8d1dd0fa4b1e05fea6 SHA512 a669bdefb8c20f10e69b27888c3e646dba7d1170842b06abc1104914897c284ab2ece48f6f41078a8f2d21ccc2c36d7b4e62e8916912e178dafa800a38ecbb10 MISC metadata.xml 471 BLAKE2B 2e17c59829f15d1439933fef59fd14a8525723aae1de1c640c8a83a9df612776ff33d24904a30ffcf27eddcd9c778af09d6d65c3b4e66542288810f416ca0ec4 SHA512 e8a8759d526e1d0b9607f84df503440a650f5835c864c0c5c89c5f978b58839620e2ed7e0bc39af51e38e1da1fe86fac1a398394069f4b3820219db40254a284 diff --git a/dev-libs/tlsh/files/tlsh-4.8.2-big-endian.patch b/dev-libs/tlsh/files/tlsh-4.8.2-big-endian.patch new file mode 100644 index 000000000000..0c9b859f2a34 --- /dev/null +++ b/dev-libs/tlsh/files/tlsh-4.8.2-big-endian.patch @@ -0,0 +1,15 @@ +__SPARC is defined on big endian platforms to fix bug 861710, but upstream +disables use of default linkage visibility on SPARC systems. This causes +symbols to not be exported, causing issues such as bug 934445. + +--- tlsh-4.8.2/include/tlsh.h.old 2021-09-09 05:56:28.000000000 +0000 ++++ tlsh-4.8.2/include/tlsh.h 2024-06-17 05:48:17.206665205 +0000 +@@ -110,7 +110,7 @@ + // #include <WinFunctions.h> + #define TLSH_API + #else +- #if defined(__SPARC) || defined(_AS_MK_OS_RH73) ++ #if defined(_AS_MK_OS_RH73) + #define TLSH_API + #else + #define TLSH_API __attribute__ ((visibility("default"))) diff --git a/dev-libs/tlsh/tlsh-4.8.2-r2.ebuild b/dev-libs/tlsh/tlsh-4.8.2-r2.ebuild new file mode 100644 index 000000000000..a6fbd70ae4c4 --- /dev/null +++ b/dev-libs/tlsh/tlsh-4.8.2-r2.ebuild @@ -0,0 +1,40 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CMAKE_IN_SOURCE_BUILD=1 +inherit cmake toolchain-funcs flag-o-matic + +DESCRIPTION="Fuzzy matching library" +HOMEPAGE="https://github.com/trendmicro/tlsh" +SRC_URI="https://github.com/trendmicro/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="|| ( Apache-2.0 BSD )" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86" + +PATCHES=( + "${FILESDIR}"/${P}-big-endian.patch + "${FILESDIR}"/${P}-gnuinstalldirs.patch + "${FILESDIR}"/${P}-respect-flags.patch +) + +src_prepare() { + # https://github.com/trendmicro/tlsh/issues/131 + [[ "$(tc-endian)" == "big" ]] && append-flags "-D__SPARC" + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DTLSH_CHECKSUM_1B=1 + -DTLSH_SHARED_LIBRARY=1 + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + find "${ED}" -name '*.a' -delete || die # Remove the static lib +} diff --git a/dev-libs/yyjson/Manifest b/dev-libs/yyjson/Manifest index 9a8483349a0f..548509b67325 100644 --- a/dev-libs/yyjson/Manifest +++ b/dev-libs/yyjson/Manifest @@ -1,4 +1,6 @@ AUX yyjson-0.7.0-disable-werror.patch 303 BLAKE2B 18a7ed6a7a054be4a89a42597926ff7ed5bd1f0ed0e5cb51287d1e43b507f7d7781f9ba78d4942fc1381b8f2dc0bbeac9ec106a9b8e8a2e461d6a6993af52056 SHA512 59e91c71eb214c0e2579a0c170199ed26f6f9bbce3cf110653fafbfe059743033948108d3d895b11bd4d43d05881d13e446981a6711b22107909e3d4647be739 +DIST yyjson-0.10.0.tar.gz 1538409 BLAKE2B 84dbed32579a56a6051b7360d2ddec5b1d8991d1b6e818dcca943ee2a3b26d534c1a911995ae1b0c13fc1cdbfd45aab52e36327529405aa3d39622caa0eb75a9 SHA512 d0274bfdae6291cc54d7c306f7f9064333d3e0fd8d235428148fa5695e151e0fdd0982247a5e82fe60b27e9182ba27d5704aca4546a8dc9545117bd3a017bfb5 DIST yyjson-0.9.0.tar.gz 1531794 BLAKE2B 070b9921dbe897d345bae4fa653b48ec38a0d7a0b27a7dba476b7c62d18f0d0b79484d7a66e1fb80b0885a6ebf78a9e3a21240407736ae5106cbbc5a9bc5a677 SHA512 4b9ca85096ccfe2f513a5869eb63b175f44c67785940e02414f6a586d7dd7b772fed77a1775d9416a5f1bf17f20e18a31f0dc4e65be263019d9b95bf95366219 +EBUILD yyjson-0.10.0.ebuild 863 BLAKE2B ee20b1c59d7f7ce50eff2b1788cebac41afb74130aa9ec8314135cdb3799b131f0ce09a19ea909d2d71308dde67e8344b5d7dc7f9e80c5b873ccce7c60b55b39 SHA512 7db686d7b9e9a2ffacb83b0059fc9908faebbee5928b42eea7d7c2bcb8cf9ca4b7b7ad29a3f556339a5e7d0ccf706b4a6faab21ce4f59f667d5dd4663297c310 EBUILD yyjson-0.9.0.ebuild 860 BLAKE2B c07355accd4ea5c98027f793115fbb5d357ae64e5e2fb8643e9c2aea972b6611b6feb83a5ca80f802ba0f786b77b7806486afcbdde120364f91a21c6980c9c94 SHA512 f373cf22f5751845bf52c1fc0c67c3f0dece8a30858c7dfb33dee01998fa0a226db342fd262bd5630e87c8e54790b119f706419144031dfc1d0b2c693c051567 MISC metadata.xml 297 BLAKE2B a5ac4375cfb73215475fbcdc7dcfd5edde21a0696761230679afa8ca7cbd520a684b6b96641d8c61104dc3dbde5d9ac9fd66a24c217aced8a6bcce79fd9926c6 SHA512 2c347d6f55a7e970387ca0e30c2064e53e64eb64ef2e7b615bca747fd83834064fd7ae1566a9353f5eedc32c606aca1f425b13573b8fe5c519c6cca2c4b4e495 diff --git a/dev-libs/yyjson/yyjson-0.10.0.ebuild b/dev-libs/yyjson/yyjson-0.10.0.ebuild new file mode 100644 index 000000000000..d9b3e44def4d --- /dev/null +++ b/dev-libs/yyjson/yyjson-0.10.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Fast JSON library in C" +HOMEPAGE="https://github.com/ibireme/yyjson https://ibireme.github.io/yyjson/doc/doxygen/html/" +SRC_URI="https://github.com/ibireme/yyjson/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT test? ( BSD )" +SLOT="0/0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE="doc test" + +RESTRICT="!test? ( test )" + +BDEPEND="doc? ( app-text/doxygen )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.7.0-disable-werror.patch +) + +src_configure() { + local mycmakeargs=( + -DYYJSON_BUILD_DOC=$(usex doc) + -DYYJSON_BUILD_TESTS=$(usex test) + -DYYJSON_ENABLE_VALGRIND=OFF + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + use doc && dodoc -r "${BUILD_DIR}"/doxygen/html +} diff --git a/dev-libs/zziplib/Manifest b/dev-libs/zziplib/Manifest index 779b6f274196..09d6b3745171 100644 --- a/dev-libs/zziplib/Manifest +++ b/dev-libs/zziplib/Manifest @@ -4,7 +4,9 @@ DIST zziplib-0.13.72.tar.gz 1162175 BLAKE2B ff5617645e25040e4666e5440651fbb2b04c DIST zziplib-0.13.74-testdata.tar.xz 166188 BLAKE2B f3cc98495542fb95e8bd9cfb98ecd22c9e6206fd13c1d0607ee8b7640ddb3d3c4b9cb7bc7ca7a95a787ffef4e5a8c2b4ab1bc0c5890811ab21c681239840dcdb SHA512 d4545f770c4f00658ec69a7f393f38d0c649704adb30b6a25f2c0b48711829416985258d34911d48b9bd394d9334ab89c8deda719f2aae509a75441f8a8d8902 DIST zziplib-0.13.74.tar.gz 1177162 BLAKE2B fc093b731406101086e59ff54b4378190c88821c4349d75e35c9595b45695b5f91a20e99a9689f7ebbc8d8951f2c4e1132d670e3827f5329977de1f85c9ce5d2 SHA512 7dd27247cbc475e2c6beb3a96c620f9938ade0dff6f4e088f9c28432fc4cc01df9d6771ec3d5e07baabe27033f4764d60e31c4c54588559de64e894d0557c94f DIST zziplib-0.13.76.tar.gz 1185716 BLAKE2B c04743fc47e6a0e102a01d0473d88b9f9cb044a3a021119d16533949d0a1f132fb73f957714a840b0474590bc98f62132e89ce890c5c9097a77d8f007c3f1e5a SHA512 d4b327530fc2681df1705b24d5de697d3c3829e299c28e047849444c7aeaf87e188d96782a2009dc7ae216f82f744a32a94fc7962fb12b3a62b28d7ecf12a7d6 +DIST zziplib-0.13.77.tar.gz 1190133 BLAKE2B 30ab10a440dbef6a9d37e75652734ed6c51fa902f6106d864b923a2d5d0ad170bcb279681e05f613ab8c20ade374ce1f8be21575b1b5f27cb9c7e7da9441c16a SHA512 63071f1ea7290d7658ff4cfdb2aaef5d07f319e12077365ddef6c57c671fcc66efa10e40c6885879063bb8c724524e04264ebfcdc9493e0299f03e3637a1b1d9 EBUILD zziplib-0.13.72-r4.ebuild 1577 BLAKE2B d52d3777e8be065ee571c6bbda759aa993d5a84f5d4122016f541a85fb72932e045d5d63c4a25fb86a7885125fb3e7ec7f61843e3ec529516f2da4131fe806f2 SHA512 bdaad58efe6ed6ef6b82605e40a41b7cb67dc2a59cbff76d6e8b2b0e41835c05e95b99e134c8893de24795d0099d03b7981fb271602d76fb34f9de206ff1b9fe EBUILD zziplib-0.13.74.ebuild 1963 BLAKE2B ba2799b6028a222854945a06c52e661e0762b252ee1962d2a885c19a5cc36fdfb483e9d8e41de5711c6c50743dec87df2bf6c792602d43e8776fe55267d54f4e SHA512 49359e857a318714f0c18334b7b4f3622f24ddc01920fc7e0c6cf68a1d8e98b9a56775cc284104b707af41ab6004bb5b74b30b74d3899e02da999ee5a391a022 EBUILD zziplib-0.13.76.ebuild 1963 BLAKE2B ba2799b6028a222854945a06c52e661e0762b252ee1962d2a885c19a5cc36fdfb483e9d8e41de5711c6c50743dec87df2bf6c792602d43e8776fe55267d54f4e SHA512 49359e857a318714f0c18334b7b4f3622f24ddc01920fc7e0c6cf68a1d8e98b9a56775cc284104b707af41ab6004bb5b74b30b74d3899e02da999ee5a391a022 +EBUILD zziplib-0.13.77.ebuild 1964 BLAKE2B 1d43471b2815d87ac073d2861b800e33166307dba26b59ffd6c7831bbd512932920525fb2361d18a88c9f5d194d0e600f528bc311070a6e52a4aeccc672196ca SHA512 695a5d6c74152746107a8066605e8e5d7be6b6e846de3ea25ec6f642381651aeb4ed46f5c980625579ec92c90eb65df7d3e30c02272f3a07e340f709892342fd MISC metadata.xml 300 BLAKE2B 5bd0efee346b2d954d36b1dd83e1d8ef54944ec7f7fb3a88bdcba73b2f85d0236cd638f763388ed43a30c44f9db5b83223310d66232731e6d37ef57315c04129 SHA512 0a233cbfe081cd55c76d8229261f1d8d8a8bf1435886c36e938a3a059a2db9b44bed165b7aeddbe568756a3e19e3cbd12dbee659a5a8eb2feea21c5f2ab35d22 diff --git a/dev-libs/zziplib/zziplib-0.13.77.ebuild b/dev-libs/zziplib/zziplib-0.13.77.ebuild new file mode 100644 index 000000000000..ad5170c0585a --- /dev/null +++ b/dev-libs/zziplib/zziplib-0.13.77.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +# Needed for docs, bug #8357553 +PYTHON_REQ_USE="xml(+)" +inherit cmake flag-o-matic python-any-r1 + +TEST_PV="0.13.74" +DESCRIPTION="Lightweight library for extracting data from files archived in a single zip file" +HOMEPAGE="https://github.com/gdraheim/zziplib https://zziplib.sourceforge.net" +# Test data tarball generated with python ./zziptests.py -D -d /tmp/zziplib -v +SRC_URI=" + https://github.com/gdraheim/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_PV}-testdata.tar.xz ) +" + +LICENSE="|| ( LGPL-2.1 MPL-1.1 )" +SLOT="0/13" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="sdl test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${PYTHON_DEPS} + test? ( + app-arch/unzip + app-arch/zip + ) +" +DEPEND=" + sys-libs/zlib + sdl? ( >=media-libs/libsdl-1.2.6 ) +" +RDEPEND="${DEPEND}" + +src_prepare() { + # This test assumes being built with automake (checks for .libs/x). + sed -i -e 's/test_91000_zzshowme_check_sfx/skip_&/' test/zziptests.py || die + cmake_src_prepare +} + +src_configure() { + # https://github.com/gdraheim/zziplib/commit/f3bfc0dd6663b7df272cc0cf17f48838ad724a2f#diff-b7b1e314614cf326c6e2b6eba1540682R100 + append-flags -fno-strict-aliasing + + local mycmakeargs=( + -DZZIPSDL=$(usex sdl) + -DBUILD_TESTS=$(usex test) + -DZZIPTEST=$(usex test) + -DZZIPDOCS=ON + -DZZIPWRAP=OFF + ) + + cmake_src_configure +} + +src_test() { + cd "${S}" || die + "${EPYTHON}" "${S}"/test/zziptests.py \ + --downloads=no \ + --verbose \ + --topsrcdir "${S}" \ + --bindir "$(realpath --relative-to="${S}" "${BUILD_DIR}"/bins)" \ + --downloaddir "${WORKDIR}"/${PN}-${TEST_PV}-testdata \ + --testdatadir "${T}"/testdata.d \ + || die "Tests failed with ${EPYTHON}" +} |