diff options
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/Manifest.gz | bin | 97325 -> 97337 bytes | |||
-rw-r--r-- | dev-libs/kosmindoormap/Manifest | 4 | ||||
-rw-r--r-- | dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-1.patch | 31 | ||||
-rw-r--r-- | dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-2.patch | 35 | ||||
-rw-r--r-- | dev-libs/kosmindoormap/kosmindoormap-23.04.3.ebuild | 2 | ||||
-rw-r--r-- | dev-libs/libksba/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/libksba/libksba-1.6.4-r1.ebuild | 62 | ||||
-rw-r--r-- | dev-libs/protobuf-c/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/protobuf-c/files/protobuf-c-1.4.1-protobuf-22.patch | 501 | ||||
-rw-r--r-- | dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild | 56 | ||||
-rw-r--r-- | dev-libs/protobuf/Manifest | 6 | ||||
-rw-r--r-- | dev-libs/protobuf/files/protobuf-23.3-disable-32-bit-tests.patch | 34 | ||||
-rw-r--r-- | dev-libs/protobuf/files/protobuf-23.3-static_assert-failure.patch | 11 | ||||
-rw-r--r-- | dev-libs/protobuf/protobuf-21.12.ebuild | 105 | ||||
-rw-r--r-- | dev-libs/protobuf/protobuf-23.3-r1.ebuild | 108 |
15 files changed, 957 insertions, 1 deletions
diff --git a/dev-libs/Manifest.gz b/dev-libs/Manifest.gz Binary files differindex 944f83d15b2d..ae554955c6ed 100644 --- a/dev-libs/Manifest.gz +++ b/dev-libs/Manifest.gz diff --git a/dev-libs/kosmindoormap/Manifest b/dev-libs/kosmindoormap/Manifest index 1b7f28f6188d..8a3fd3d56b30 100644 --- a/dev-libs/kosmindoormap/Manifest +++ b/dev-libs/kosmindoormap/Manifest @@ -1,3 +1,5 @@ +AUX kosmindoormap-23.04.3-protobuf-23-1.patch 949 BLAKE2B 0a751a22ab7195dfe4363daa90530fa8acb427251c79261b76f701b543c3bbd2aad20a4ecb5292bc05da5511d375d686e2d7c2e66e1d312cd206af4125b2aa49 SHA512 52425c325db0b2607050314b2a4364a6eeaadf18d27cb94cb2423b9008b1396f65c38c26ab0432f083e48d4f2882eeae3e6169f0efeb10edb1e1b8607d4df81a +AUX kosmindoormap-23.04.3-protobuf-23-2.patch 1300 BLAKE2B 47dcb7783f4c91201efd92be6ab12b855b6628f36e8b31e112a38e68702b438c49caaafac2a428a23e0d53a595a8b08d1b6e5a70d7d0a758c23b5e4e7869cacf SHA512 07ee39654ee74e467f81871c1cac501ff1bec5174f8437b7110bb7c788c88789dcd73b2646a56e5ba5155e15af726f097381c93aecd47298c8446469ef2b0e2d DIST kosmindoormap-23.04.3.tar.xz 375680 BLAKE2B 306336b33c7b03e67531f11163c579dab5b68614f4fd582eb14858a7c80e601e848aaf933c846a144d07e59c215b59f3a0021429f675a76750903144e02829d1 SHA512 1ad5acc7143842005cc02c146e90090d57d8fbafbac6a4401ab94ec966c709f66f7f832169982a808ab21911b16e6f837137c2fd9cf284c540ce03e6647c3405 -EBUILD kosmindoormap-23.04.3.ebuild 1053 BLAKE2B c64e91c277902a3fe8e6fe80636741e561872222b77612bc7d735ec7d920f7fe23cf305fe5e4cbb0e6ed1449e594c6ab5a8eac610705d2937498d1216dc82f8b SHA512 adf24e11048f6fffe005986807cebf8aef87ab1a9b4fd47dd74e95c99362f3504341c04298973f9f3867a66a572231a77da49364389e60bb22461de071e4f01f +EBUILD kosmindoormap-23.04.3.ebuild 1134 BLAKE2B e858475078f7c6a6d818c58f58269c70b747c685557ba6f09711b7a8cf57af54bccbfd7105ab755eebc71a3ceeacd6f2864b57f64708824eaf8ee3f77827d0fe SHA512 22f76f9c8468008793990c3c42c28e678f6d0d90068465de5f74db8fe0c74808f160d4aa2430912f3b238a1b87f6a8ef8c1407924e7a634dc15f61e3d414dfd2 MISC metadata.xml 436 BLAKE2B 7b97cad83675445e816a4f92d2e9c2c4167457df244fd166b6388be7c9336b4852c3873fff4e9d18bf1cccaaeaec849a1b340fa92a15e54180652e53cb023859 SHA512 312c58bb9ef49585287db38ff0f4e6cb6486477f4c84246610c443fb07ced2129017462ef91fab147dde7d69b0923605dc5b68fe71f6cd80f0ed1115b4a9ca6b diff --git a/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-1.patch b/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-1.patch new file mode 100644 index 000000000000..427abde08a81 --- /dev/null +++ b/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-1.patch @@ -0,0 +1,31 @@ +From eac8c57528b5ef8e694df4072ed7a60be799c270 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas <arojas@archlinux.org> +Date: Wed, 5 Jul 2023 16:16:02 +0200 +Subject: [PATCH] Use protobuf's cmake config if available + +--- + CMakeLists.txt | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 466c9add..da9881cd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -73,7 +73,13 @@ find_package(BISON REQUIRED) + set_package_properties(BISON PROPERTIES PURPOSE "MapCSS parser for indoor map rendering.") + + if (NOT WIN32) +- find_package(Protobuf) ++ # try upstream cmake config first ++ set(protobuf_MODULE_COMPATIBLE ON) ++ find_package(Protobuf CONFIG) ++ if(NOT Protobuf_FOUND) ++ # fall back to cmake's protobuf module ++ find_package(Protobuf) ++ endif() + set_package_properties(Protobuf PROPERTIES TYPE OPTIONAL PURPOSE "Parsing of OSM PBF files.") + endif() + +-- +GitLab + diff --git a/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-2.patch b/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-2.patch new file mode 100644 index 000000000000..965a8a9d82de --- /dev/null +++ b/dev-libs/kosmindoormap/files/kosmindoormap-23.04.3-protobuf-23-2.patch @@ -0,0 +1,35 @@ +From 6dfceab2bacef67ea27b4d1045100b6e0d2be430 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas <arojas@archlinux.org> +Date: Wed, 5 Jul 2023 14:00:29 +0200 +Subject: [PATCH] Use protobuf cmake targets instead of variables + +Makes it compatible with protobuf's upstream cmake config, which is required for protobuf>=22 as the cmake provided module is broken with it. +--- + src/osm/io/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/osm/io/CMakeLists.txt b/src/osm/io/CMakeLists.txt +index bf1d02c9..ec95f7e5 100644 +--- a/src/osm/io/CMakeLists.txt ++++ b/src/osm/io/CMakeLists.txt +@@ -1,7 +1,7 @@ + # SPDX-FileCopyrightText: 2020-2022 Volker Krause <vkrause@kde.org> + # SPDX-License-Identifier: BSD-2-Clause + +-if (Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE) ++if (Protobuf_FOUND AND TARGET protobuf::protoc) + PROTOBUF_GENERATE_CPP(pbf_srcs pbf_hdrs + ../pbf/fileformat.proto + ../pbf/osmformat.proto +@@ -19,7 +19,7 @@ if (Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE) + set_target_properties(KOSM_pbfioplugin PROPERTIES POSITION_INDEPENDENT_CODE ON) + target_link_libraries(KOSM_pbfioplugin + PUBLIC KOSM +- PRIVATE ${Protobuf_LIBRARIES} ZLIB::ZLIB ++ PRIVATE protobuf::libprotobuf ZLIB::ZLIB + ) + endif() + +-- +GitLab + diff --git a/dev-libs/kosmindoormap/kosmindoormap-23.04.3.ebuild b/dev-libs/kosmindoormap/kosmindoormap-23.04.3.ebuild index 7d84056f235e..a6f7915d7011 100644 --- a/dev-libs/kosmindoormap/kosmindoormap-23.04.3.ebuild +++ b/dev-libs/kosmindoormap/kosmindoormap-23.04.3.ebuild @@ -38,6 +38,8 @@ BDEPEND=" sys-devel/flex " +PATCHES=( "${FILESDIR}"/${P}-protobuf-23-{1,2}.patch ) # bug 909081, in 23.08.0 + src_configure() { local mycmakeargs=( -DCMAKE_DISABLE_FIND_PACKAGE_OsmTools=ON # we have no use for it diff --git a/dev-libs/libksba/Manifest b/dev-libs/libksba/Manifest index c2fc3fe11a89..819b8508fd47 100644 --- a/dev-libs/libksba/Manifest +++ b/dev-libs/libksba/Manifest @@ -4,5 +4,6 @@ DIST libksba-1.6.3.tar.bz2.sig 119 BLAKE2B c6ab01889e7d7efa6117b388c8bf8e1916a3d DIST libksba-1.6.4.tar.bz2 668445 BLAKE2B 639be954727e2c3a74e075c52090bc2d9998a149f168ede376520d83a7dfd776212ba2948270096b303803e9f41381747f73c8ec97117a4d743b8df49defef9a SHA512 07bc26584d1901b2975a02012d90084e3c247a7aeab56d7bcc7197ef0210ece0c4ffd5cb468b998ef696deadfcfdc5fa5dc367077863926503e8f7a8d06856a5 DIST libksba-1.6.4.tar.bz2.sig 119 BLAKE2B 5b9edcf65eb7b46182144a8d17a1656ada93a8a7ce3106ea5f525ab3e892b078f9c723544c13702d6d3b40fefd2bff78dc0cfbc3b1a3c156ba18740ecfc42ce6 SHA512 fbf75e03b9e0e771027acfef8cc702744a0d1fe37ef285fcf6475d4a58f7936d3bc890ee3ffe923195152bbcede807ba721ac3fdfdd6d05a1a523416f64ff8c1 EBUILD libksba-1.6.3.ebuild 1701 BLAKE2B 24f2400de001198cd1f0b0677df57c5e9eaf1c9f5c0fc42dea1b5f3cd572476fd096f2c16de5670806e6fee425bcd1f72c5292d98b8ea190cc82c6c7cdf55025 SHA512 59b4d9a3f7dfb92b5f58072acee93f975674dfee740e3302f4d4da2719352ee8f170c3768743f9b8f8d5ae89d6562934d903a1e21c042ec7a9436d938b10de5d +EBUILD libksba-1.6.4-r1.ebuild 1803 BLAKE2B 6a5f9048504233b690075a630e93b1bc5f92cb488b858dc7aca13d337f1a81eaa4e092b3e9ac018ee782bddaf3bec37801781abff1f20558c34432d9e175375e SHA512 c4b541ce26e806876091864b55b5838c4a3f828be23b5c257420052cfb2b86f8147e0f8bfdb6dc822d9d8541fb7914e45f2fafe922ca90f346f27f4167a1f871 EBUILD libksba-1.6.4.ebuild 1702 BLAKE2B 27f9377da79cb752ea0eb048f53bb5661af0cbd3d7bfa8fc094877bf870ab500fc35581a9549d5a97a773baa6508bb454030fd86e013066e2c548fd6831b4bb8 SHA512 d5d2908ca425023e18e004c62f198e4eaaabe4d49d3a5c007755bd3c57c974aded188fee2239d09795fce3b789e4deaac18905850ed979a3f1480ef1a07d8e72 MISC metadata.xml 258 BLAKE2B b3ebb9691cf2c860b26172c2fc7ead843959a83806b7c06f4eec2ea349a6d2f39afe2f4b08c09bc7f65d18bece520b8b6306c8c7c2075d653f04b09af43db8fd SHA512 02ab38ca1547c68e87cbcad1dd4bb121e90d1fcca941cbfd29583ea803ed50617aa6a29df11915af5e95d63fc817df2250c7b8189157d705ef86e477d6a1685e diff --git a/dev-libs/libksba/libksba-1.6.4-r1.ebuild b/dev-libs/libksba/libksba-1.6.4-r1.ebuild new file mode 100644 index 000000000000..d3944853b9a8 --- /dev/null +++ b/dev-libs/libksba/libksba-1.6.4-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Maintainers should: +# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ +# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 +# (find the one for the current release then subscribe to it + +# any subsequent ones linked within so you're covered for a while.) + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc +# in-source builds are not supported: https://dev.gnupg.org/T6313#166339 +inherit toolchain-funcs out-of-source verify-sig libtool + +DESCRIPTION="X.509 and CMS (PKCS#7) library" +HOMEPAGE="https://www.gnupg.org/related_software/libksba" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" +SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" + +LICENSE="LGPL-3+ GPL-2+ GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="static-libs" + +RDEPEND=">=dev-libs/libgpg-error-1.33" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/bison + verify-sig? ( sec-keys/openpgp-keys-gnupg ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.6.0-no-fgrep-ksba-config.patch +) + +src_prepare() { + default + + elibtoolize # necessary on Solaris for shared lib support +} + +my_src_configure() { + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + + local myeconfargs=( + --disable-valgrind-tests + $(use_enable static-libs static) + + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" + LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config" + ) + + econf "${myeconfargs[@]}" +} + +my_src_install() { + default + + # People need to use ksba-config for --cflags and --libs + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/dev-libs/protobuf-c/Manifest b/dev-libs/protobuf-c/Manifest index 29a0c0bac77d..9af79e8dcdf6 100644 --- a/dev-libs/protobuf-c/Manifest +++ b/dev-libs/protobuf-c/Manifest @@ -1,7 +1,9 @@ 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 DIST protobuf-c-1.4.0.tar.gz 505251 BLAKE2B 5f53238c064f82de87012eb739bf6a44c202d0dbf2fc5af394accdc52a9934d1fb9cea2bb4a4d529fdf98959546aaa672c1c991a9a7016803d16f65accc907cd SHA512 6a2e5031b85b5986e863661437dea002eba217257a50a27db88d29fa1a3db1014ed6ec7c21d89df700d181b18e169d1037146cb6475c10cd5a068a91e522e3c3 DIST protobuf-c-1.4.1.tar.gz 513596 BLAKE2B b5e87a3154863581b81790a26b6b522c2b3ad138e966053f20c6264b4a7677d6c5bff8e27faa7c6cfa9e982b72b06e2f518a3def9f6db13241c3cb3ee9afc8f6 SHA512 190a4aa5c607853e6bf860b0974deb21e4f7f6209e810251eaca9612b59ea676779b0ca217fb1572914ffb8de3315a7d24f162b14d447ee671a9adc5b1271e41 EBUILD protobuf-c-1.4.0-r1.ebuild 1140 BLAKE2B 0789c5324e6ea659307381050a63eb9e0ee33b5eab24f759dbf11be661f613820b9c3ca724ba4b4a7d234ac4545e96c1c8d2ca6f8fe0cc0c57c2a10e7599b182 SHA512 72a4d5a3c1d572ee3d8b946b97e99460868644d8400cf10c51dd161eab881307f54b53c00253fddf9db6a4faf0da453b7279656ed7f4ddc510daa19a074896e8 +EBUILD protobuf-c-1.4.1-r1.ebuild 1195 BLAKE2B 0bddbe7339106f394a4988a67a6e629b9d316174ae0f6fe21615444dc90928a59d7558c55bfddfa179e844ed620eebd916b776fe187d7de224bbdf18a937f946 SHA512 5eaf81919773b7b17434769c47d8c03604efffe4a5ecce6acb9bfb7bba157fb2abada46f721da74f74fffde8d68fd44c1b4c131d5862eec9c0e4a7c6dec9915a EBUILD protobuf-c-1.4.1.ebuild 1147 BLAKE2B a0250ab24396e95117b93fd1ca36bfba7d253f8f02e726278e45c695bdecef2b994b70c43328e60e649a4c3974915994ffe00b0c7840be8511ef044695b6ffa7 SHA512 a0555be30fe6a76d3a2d19b991730b0b028729e011219062a561cb73e89cf4c721a45cc3d2c3f72c2541116b81d09ecb3b05e5680b5bb9f727a8584d512c5865 MISC metadata.xml 259 BLAKE2B 650e53279ca9375b8dcdec83d1065b370b820ee770225c753fc93d8600781aa4c191fe2a8016e34f5a24b4f9a94b922bc48eb75550c25a2d85672674866c0b62 SHA512 12f8cbcc9bac27c99a9a80b6f9ae803a8cde6b765ce0487a08cf76e83347bf0ac9793d50cc00d692a6069906d0e98af684c7b060262ec95f57621850ca47677c diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.4.1-protobuf-22.patch b/dev-libs/protobuf-c/files/protobuf-c-1.4.1-protobuf-22.patch new file mode 100644 index 000000000000..5e53899aee3d --- /dev/null +++ b/dev-libs/protobuf-c/files/protobuf-c-1.4.1-protobuf-22.patch @@ -0,0 +1,501 @@ +https://bugs.gentoo.org/912775 +https://github.com/protobuf-c/protobuf-c/issues/679 +https://github.com/protobuf-c/protobuf-c/issues/544 +https://github.com/protobuf-c/protobuf-c/pull/673 + +From ad48868dfe77592c4bacf936ade208f384a26b09 Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Sun, 2 Jul 2023 17:48:18 -0400 +Subject: [PATCH 1/7] protoc-c: Remove GOOGLE_DISALLOW_EVIL_CONSTRUCTORS macro + invocations + +protobuf has removed the definition of this macro as of commit +1595417dd3859bbff7d3d61ad0b6e39044d47489, so the invocation of this +macro in protobuf-c breaks the build when building agaist the protobuf +22.x or 23.x series. + +Simply removing the macro invocations seems to be safe and doesn't break +the build on Debian's protobuf 3.21.12 nor Debian's protobuf 3.6.1.3. +--- + protoc-c/c_bytes_field.h | 2 -- + protoc-c/c_enum.h | 2 -- + protoc-c/c_enum_field.h | 2 -- + protoc-c/c_extension.h | 2 -- + protoc-c/c_field.h | 5 ----- + protoc-c/c_file.h | 2 -- + protoc-c/c_generator.h | 3 --- + protoc-c/c_message.h | 2 -- + protoc-c/c_message_field.h | 4 ---- + protoc-c/c_primitive_field.h | 4 ---- + protoc-c/c_service.h | 2 -- + protoc-c/c_string_field.h | 2 -- + 12 files changed, 32 deletions(-) + +diff --git a/protoc-c/c_bytes_field.h b/protoc-c/c_bytes_field.h +index bf873f0f..df91ef73 100644 +--- a/protoc-c/c_bytes_field.h ++++ b/protoc-c/c_bytes_field.h +@@ -87,8 +87,6 @@ class BytesFieldGenerator : public FieldGenerator { + + private: + std::map<std::string, std::string> variables_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(BytesFieldGenerator); + }; + + +diff --git a/protoc-c/c_enum.h b/protoc-c/c_enum.h +index 9c34b697..089c3366 100644 +--- a/protoc-c/c_enum.h ++++ b/protoc-c/c_enum.h +@@ -106,8 +106,6 @@ class EnumGenerator { + private: + const EnumDescriptor* descriptor_; + std::string dllexport_decl_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_enum_field.h b/protoc-c/c_enum_field.h +index 3f8c005d..e0c96adf 100644 +--- a/protoc-c/c_enum_field.h ++++ b/protoc-c/c_enum_field.h +@@ -85,8 +85,6 @@ class EnumFieldGenerator : public FieldGenerator { + + private: + std::map<std::string, std::string> variables_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); + }; + + +diff --git a/protoc-c/c_extension.h b/protoc-c/c_extension.h +index 95413885..bda0bc55 100644 +--- a/protoc-c/c_extension.h ++++ b/protoc-c/c_extension.h +@@ -98,8 +98,6 @@ class ExtensionGenerator { + const FieldDescriptor* descriptor_; + std::string type_traits_; + std::string dllexport_decl_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_field.h b/protoc-c/c_field.h +index 3cad35d3..623a872e 100644 +--- a/protoc-c/c_field.h ++++ b/protoc-c/c_field.h +@@ -103,9 +103,6 @@ class FieldGenerator { + const std::string &type_macro, + const std::string &descriptor_addr) const; + const FieldDescriptor *descriptor_; +- +- private: +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator); + }; + + // Convenience class which constructs FieldGenerators for a Descriptor. +@@ -121,8 +118,6 @@ class FieldGeneratorMap { + std::unique_ptr<std::unique_ptr<FieldGenerator>[]> field_generators_; + + static FieldGenerator* MakeGenerator(const FieldDescriptor* field); +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap); + }; + + } // namespace c +diff --git a/protoc-c/c_file.h b/protoc-c/c_file.h +index 8dfd8ba0..db1866cd 100644 +--- a/protoc-c/c_file.h ++++ b/protoc-c/c_file.h +@@ -103,8 +103,6 @@ class FileGenerator { + std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_; + std::unique_ptr<std::unique_ptr<ServiceGenerator>[]> service_generators_; + std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h +index ac1ffafe..b8b44aaa 100644 +--- a/protoc-c/c_generator.h ++++ b/protoc-c/c_generator.h +@@ -93,9 +93,6 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator { + const std::string& parameter, + OutputDirectory* output_directory, + std::string* error) const; +- +- private: +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_message.h b/protoc-c/c_message.h +index ea1c3ab3..0d8c6440 100644 +--- a/protoc-c/c_message.h ++++ b/protoc-c/c_message.h +@@ -136,8 +136,6 @@ class MessageGenerator { + std::unique_ptr<std::unique_ptr<MessageGenerator>[]> nested_generators_; + std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_; + std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_message_field.h b/protoc-c/c_message_field.h +index 39b8d999..e485921a 100644 +--- a/protoc-c/c_message_field.h ++++ b/protoc-c/c_message_field.h +@@ -82,10 +82,6 @@ class MessageFieldGenerator : public FieldGenerator { + void GenerateDescriptorInitializer(io::Printer* printer) const; + std::string GetDefaultValue(void) const; + void GenerateStaticInit(io::Printer* printer) const; +- +- private: +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); + }; + + +diff --git a/protoc-c/c_primitive_field.h b/protoc-c/c_primitive_field.h +index a9eb893b..aa7079f9 100644 +--- a/protoc-c/c_primitive_field.h ++++ b/protoc-c/c_primitive_field.h +@@ -82,10 +82,6 @@ class PrimitiveFieldGenerator : public FieldGenerator { + void GenerateDescriptorInitializer(io::Printer* printer) const; + std::string GetDefaultValue(void) const; + void GenerateStaticInit(io::Printer* printer) const; +- +- private: +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_service.h b/protoc-c/c_service.h +index 27125a60..b51472f9 100644 +--- a/protoc-c/c_service.h ++++ b/protoc-c/c_service.h +@@ -100,8 +100,6 @@ class ServiceGenerator { + + const ServiceDescriptor* descriptor_; + std::map<std::string, std::string> vars_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_string_field.h b/protoc-c/c_string_field.h +index 513cea75..b3a1a7ff 100644 +--- a/protoc-c/c_string_field.h ++++ b/protoc-c/c_string_field.h +@@ -87,8 +87,6 @@ class StringFieldGenerator : public FieldGenerator { + + private: + std::map<std::string, std::string> variables_; +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator); + }; + + + +From 7b90330bff40ab555bb3f0c5ee43ae208a275104 Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Sun, 2 Jul 2023 19:35:43 -0400 +Subject: [PATCH 2/7] Use GOOGLE_LOG(FATAL) instead of GOOGLE_LOG(DFATAL) + +Looking at where these identifiers are ultimately defined [0], it looks +like "DFATAL" means either "ERROR" or "FATAL" depending on whether +NDEBUG is defined. However, looking at the actual code sites in protoc-c +where DFATAL is used, it's not clear why we couldn't just use FATAL +unconditionally. + +This is aimed at supporting newer versions of protobuf where the DFATAL +identifier apparently no longer exists. + +[0] https://github.com/protocolbuffers/protobuf/blob/v21.12/src/google/protobuf/stubs/logging.h#L61-L65 +--- + protoc-c/c_message.cc | 4 ++-- + protoc-c/c_primitive_field.cc | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/protoc-c/c_message.cc b/protoc-c/c_message.cc +index 37e8bf8b..af2974ca 100755 +--- a/protoc-c/c_message.cc ++++ b/protoc-c/c_message.cc +@@ -499,7 +499,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) { + // NOTE: not supported by protobuf + vars["maybe_static"] = ""; + vars["field_dv_ctype"] = "{ ... }"; +- GOOGLE_LOG(DFATAL) << "Messages can't have default values!"; ++ GOOGLE_LOG(FATAL) << "Messages can't have default values!"; + break; + case FieldDescriptor::CPPTYPE_STRING: + if (fd->type() == FieldDescriptor::TYPE_BYTES || opt.string_as_bytes()) +@@ -521,7 +521,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) { + break; + } + default: +- GOOGLE_LOG(DFATAL) << "Unknown CPPTYPE"; ++ GOOGLE_LOG(FATAL) << "Unknown CPPTYPE"; + break; + } + if (!already_defined) +diff --git a/protoc-c/c_primitive_field.cc b/protoc-c/c_primitive_field.cc +index 6990893f..1727af38 100644 +--- a/protoc-c/c_primitive_field.cc ++++ b/protoc-c/c_primitive_field.cc +@@ -143,7 +143,7 @@ std::string PrimitiveFieldGenerator::GetDefaultValue() const + case FieldDescriptor::CPPTYPE_BOOL: + return descriptor_->default_value_bool() ? "1" : "0"; + default: +- GOOGLE_LOG(DFATAL) << "unexpected CPPTYPE in c_primitive_field"; ++ GOOGLE_LOG(FATAL) << "unexpected CPPTYPE in c_primitive_field"; + return "UNEXPECTED_CPPTYPE"; + } + } + +From 8d334a7204d98874cbf970cb96ab0c7b52e06695 Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Sun, 2 Jul 2023 19:42:19 -0400 +Subject: [PATCH 3/7] Work around GOOGLE_* changes in protobuf >= 22.0 + +According to the protobuf migration guide as of June 2023 [0], protobuf +22.0 (aka 4.22.0) took a dependency on something called "abseil" and as +a result the "stubs" have been removed. This apparently caused all the +uses of GOOGLE_* identifiers in protoc-c to fail when building against +newer versions of protobuf. + +This commit introduces compatibility definitions when building against +protobuf >= 4.22.0 so that protobuf-c can build against older and newer +versions of protobuf. + +[0] https://web.archive.org/web/20230611151200/https://protobuf.dev/support/migration/#abseil +--- + protoc-c/c_helpers.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/protoc-c/c_helpers.h b/protoc-c/c_helpers.h +index 7598a4e1..adc7ee21 100644 +--- a/protoc-c/c_helpers.h ++++ b/protoc-c/c_helpers.h +@@ -178,6 +178,16 @@ inline int FieldSyntax(const FieldDescriptor* field) { + #endif + } + ++// Work around changes in protobuf >= 22.x without breaking compilation against ++// older protobuf versions. ++#if GOOGLE_PROTOBUF_VERSION >= 4022000 ++# define GOOGLE_ARRAYSIZE ABSL_ARRAYSIZE ++# define GOOGLE_CHECK_EQ ABSL_CHECK_EQ ++# define GOOGLE_CHECK_EQ ABSL_CHECK_EQ ++# define GOOGLE_DCHECK_GE ABSL_DCHECK_GE ++# define GOOGLE_LOG ABSL_LOG ++#endif ++ + } // namespace c + } // namespace compiler + } // namespace protobuf + +From 23d2246e0f6ebfc69232ab29b6c6325d8009d1f7 Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Sun, 2 Jul 2023 19:48:17 -0400 +Subject: [PATCH 4/7] configure.ac: Require C++17 when building against + protobuf >= 4.22.0 + +It's unclear from looking at the online protobuf documentation whether +C++14 or C++17 is now required when building against newer versions of +protobuf (or perhaps I'm looking in the wrong place), but experimentally +it did not work for me with C++14. + +This commit rewrites the versioned PKG_CHECK_MODULES checks in +configure.ac to enforce the following policies: + + * Require protobuf >= 2.6.0. + * On protobuf >= 3.0.0, require C++11. + * On protobuf >= 4.22.0, require C++17. +--- + configure.ac | 26 ++++++++++++++++++++------ + 1 file changed, 20 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 94d01dca..fa024b6a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -76,12 +76,26 @@ AC_ARG_ENABLE([protoc], + if test "x$enable_protoc" != "xno"; then + AC_LANG_PUSH([C++]) + +- AX_CXX_COMPILE_STDCXX(11, noext, mandatory) +- +- PKG_CHECK_MODULES([protobuf], [protobuf >= 3.0.0], +- [proto3_supported=yes], +- [PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0])] +- ) ++ # PKG_CHECK_MODULES(prefix, list-of-modules, action-if-found, action-if-not-found) ++ PKG_CHECK_MODULES( ++ [protobuf], ++ [protobuf >= 4.22.0], ++ [ ++ proto3_supported=yes ++ AX_CXX_COMPILE_STDCXX(17, noext, mandatory) ++ ], ++ [ ++ PKG_CHECK_MODULES( ++ [protobuf], ++ [protobuf >= 3.0.0], ++ [ ++ proto3_supported=yes ++ AX_CXX_COMPILE_STDCXX(11, noext, mandatory) ++ ], ++ [ ++ PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0]) ++ ]) ++ ]) + + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$save_CPPFLAGS $protobuf_CFLAGS" + +From 1937ba946b0a7a62c0f534e60f4d4799d7e0daed Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Sun, 2 Jul 2023 22:57:57 -0400 +Subject: [PATCH 5/7] protoc-c: Use FileDescriptorLegacy to obtain proto syntax + version on protobuf >= 23.0 + +Use the newer "legacy" way of determining whether a file descriptor is +using proto2 or proto3 syntax on protobuf >= 23.0. + +Based on +https://github.com/protobuf-c/protobuf-c/pull/556/commits/66574f3fd85a205eb7c90b790477d5415364209e +but continues to support older versions of protobuf. + +Unfortunately, since this is a "deprecated", "legacy" API it'll probably +disappear in about five seconds. +--- + protoc-c/c_file.cc | 4 ++++ + protoc-c/c_helpers.h | 8 ++++++++ + 2 files changed, 12 insertions(+) + +diff --git a/protoc-c/c_file.cc b/protoc-c/c_file.cc +index 59c1824e..d211a3da 100644 +--- a/protoc-c/c_file.cc ++++ b/protoc-c/c_file.cc +@@ -119,7 +119,11 @@ void FileGenerator::GenerateHeader(io::Printer* printer) { + + int min_header_version = 1000000; + #if defined(HAVE_PROTO3) ++# if GOOGLE_PROTOBUF_VERSION >= 4023000 ++ if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) { ++# else + if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) { ++#endif + min_header_version = 1003000; + } + #endif +diff --git a/protoc-c/c_helpers.h b/protoc-c/c_helpers.h +index adc7ee21..055528bf 100644 +--- a/protoc-c/c_helpers.h ++++ b/protoc-c/c_helpers.h +@@ -70,6 +70,10 @@ + #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 { +@@ -172,7 +176,11 @@ int compare_name_indices_by_name(const void*, const void*); + // This wrapper is needed to be able to compile against protobuf2. + inline int FieldSyntax(const FieldDescriptor* field) { + #ifdef HAVE_PROTO3 ++# 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 + #else + return 2; + #endif + +From 7582b6e7d640636bf24c0f9dd2b386ed6fd41919 Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Sun, 2 Jul 2023 22:58:48 -0400 +Subject: [PATCH 6/7] cmake: Require C++17 + +Newer versions of protobuf apparently don't build with older versions of +the C++ standard. +--- + build-cmake/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build-cmake/CMakeLists.txt b/build-cmake/CMakeLists.txt +index 95f561c0..c71dd899 100644 +--- a/build-cmake/CMakeLists.txt ++++ b/build-cmake/CMakeLists.txt +@@ -96,7 +96,7 @@ if (MSVC AND NOT BUILD_SHARED_LIBS) + endif (MSVC AND NOT BUILD_SHARED_LIBS) + + IF(BUILD_PROTOC) +-SET(CMAKE_CXX_STANDARD 11) ++SET(CMAKE_CXX_STANDARD 17) + SET(CMAKE_CXX_STANDARD_REQUIRED ON) + SET(CMAKE_CXX_EXTENSIONS OFF) + ADD_CUSTOM_COMMAND(OUTPUT protobuf-c/protobuf-c.pb.cc protobuf-c/protobuf-c.pb.h + +From 5b0661f1e8a0e03f75cc6f53b8d42507e95403c9 Mon Sep 17 00:00:00 2001 +From: Robert Edmonds <edmonds@users.noreply.github.com> +Date: Mon, 3 Jul 2023 01:10:28 -0400 +Subject: [PATCH 7/7] configure.ac: Require C++17 + +There are some recent reports of strange build failures that might have +been fixed by compiling in C++17 mode, so it might be a good idea to use +C++17 in general, and not just when building against very recent +protobuf versions. + +Since it looks like we've lost protobuf < 3.0.0 support, configure.ac +can be simplified a bit if we just use C++17 by default. +--- + configure.ac | 23 ++--------------------- + 1 file changed, 2 insertions(+), 21 deletions(-) + +diff --git a/configure.ac b/configure.ac +index fa024b6a..586ac3c0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -75,27 +75,8 @@ AC_ARG_ENABLE([protoc], + AS_HELP_STRING([--disable-protoc], [Disable building protoc_c (also disables tests)])) + if test "x$enable_protoc" != "xno"; then + AC_LANG_PUSH([C++]) +- +- # PKG_CHECK_MODULES(prefix, list-of-modules, action-if-found, action-if-not-found) +- PKG_CHECK_MODULES( +- [protobuf], +- [protobuf >= 4.22.0], +- [ +- proto3_supported=yes +- AX_CXX_COMPILE_STDCXX(17, noext, mandatory) +- ], +- [ +- PKG_CHECK_MODULES( +- [protobuf], +- [protobuf >= 3.0.0], +- [ +- proto3_supported=yes +- AX_CXX_COMPILE_STDCXX(11, noext, mandatory) +- ], +- [ +- PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0]) +- ]) +- ]) ++ AX_CXX_COMPILE_STDCXX(17, noext, mandatory) ++ PKG_CHECK_MODULES([protobuf], [protobuf >= 3.0.0], [proto3_supported=yes]) + + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$save_CPPFLAGS $protobuf_CFLAGS" diff --git a/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild new file mode 100644 index 000000000000..edb57577cfd9 --- /dev/null +++ b/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2023 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 test" +RESTRICT="!test? ( test )" + +BDEPEND=" + >=dev-libs/protobuf-3:0 + virtual/pkgconfig +" +DEPEND=">=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.4.0-include-path.patch + "${FILESDIR}"/${P}-protobuf-22.patch +) + +src_prepare() { + default + + if ! use test; then + eapply "${FILESDIR}"/${PN}-1.3.0-no-build-tests.patch + fi + + eautoreconf +} + +multilib_src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + ) + + 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 482ba703cadd..465ab4674378 100644 --- a/dev-libs/protobuf/Manifest +++ b/dev-libs/protobuf/Manifest @@ -1,9 +1,15 @@ AUX 70protobuf-gentoo.el 170 BLAKE2B 6d9a92bd3310ca09d18dd762bc0bbd4b0b36184c17f95c80c02183c457fe4ff1142ca1e3207e5a77c078fe5f768cb3e85abc712abc1f4c85774ca1ebf178059b SHA512 ed73cd6b1bf6c0019e4da73c3a480b0f917e949dfad2696336e805263c81610b2a8a0514840e389db0f0e78252cf053d754c5e07731dc5e9c93c9e88f0b2923c AUX proto.vim 49 BLAKE2B 9b6d31105811a8f8cbcf76328172fda5b66b33351bb16573ed1ed08d4c553af2805962a6d6609fbdad4a2644bf9cecd1e771a557f138111ad2c0be959b497ee9 SHA512 65c1f49887c17973d1dfce07fa86d04c5079d2382826eaeb22e128570717f181c53d22ba50905252021f7e476a90ecd29f9d18799c1ccea64b01f4638323538e AUX protobuf-21.9-disable-32-bit-tests.patch 5942 BLAKE2B dcc1d5474c704358287a5033aaae3474b57324e853aa670aa723dc1d3d8b8cdb14ac588e3d3b3c998878d9f346fc91347379bbc3d88057b761b02515582ebcbd SHA512 97d60343e96fe03fefae621b70787fa284e38db5f94b7d205927d0852e9d20e9176e07182caa0ffca704bc08e439854ae3d109c3eca61c3101ae178a0426624d +AUX protobuf-23.3-disable-32-bit-tests.patch 1261 BLAKE2B 95adb955991b3c181e15c985996d1d136bc6586a885987c526b3f83feb4afad7553e585f4281fd0928913284cc9251fce089ab79400af3a3e9e75f31db5c8e9c SHA512 42d3121c215190c249dfd0b9e8e2ca59d49fce73a49f113b958d7b7f73708ee758bbeff2dbdbdf1c744352b7f49caab6fb4acd806089b37cf8690dc3cb298289 +AUX protobuf-23.3-static_assert-failure.patch 529 BLAKE2B 69452cf44106fdd7295bbb8d97011309c160f51fb30c233b9549d955d57c0a188b407b97ea7de7dc708a145bf76d5f15f1332bf641541a8830db96705a071701 SHA512 291d8cd318a0324e58c5dc83273ca67b55fd1446bd5111e3caaa9e2b08e3a2565de8030050df6555f300f7051668f5b8918e52009f826a653bb70f9931f12ebd 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 +DIST protobuf-21.12.tar.gz 5141166 BLAKE2B 33500612d103afb817062486a741e8e5503f82c42c70054d47d1899e6bb79f3fdde2666cad5b8eff6e1bc539c3b0cdf9f2b125ce7e5d3a459a69e84d67ab535e SHA512 2dc8f552388438268d8b9f7a9e84c6abf1736be3d5031438c789c317410c9f4b5cedd25bf7da6d67b3ba32ca890869f9ddaab2284d6ac0e734a5b135ffbb1346 DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1 +DIST protobuf-23.3.tar.gz 5043803 BLAKE2B ee2edee230969555c9ef95069c7b1d6c23c3d1f8ea1b2249fb3e9f6fcf63312c6e10e9da65b80629fb08d5fb08d05a19bb9c752c25b892c1e3fd6f18b9279eb3 SHA512 646af367dbc61b42e322cf0b335f360e428b272e2b1f5361b2f17c18d3dc9dddd615e1279436028b1a42275a0beadda37c2c934fc27d6c892131cc8d526d8b3b +EBUILD protobuf-21.12.ebuild 2509 BLAKE2B 874bbc828cfd622ab369286816329497a5272a7f3517b2cc01937fa4cc92f632599b7a8c4db53194450f6a42fbd41d9374d3f81114bbbed7eb49145a21315811 SHA512 88b58b7d16c3197ae1b8cdc927daba2077cc9b039ecfb14fb12e08274cf2ca9149981c6c2cebf98d2edee8f59e954144f1e19ba2f5aba5e2801af482f8351310 EBUILD protobuf-21.9.ebuild 4169 BLAKE2B 26d7458698701fc08d93a7fde27933b34d39975ae403531af31a7dfd8471e2ca20d9f471875ba15a88388616c353bb7b6fd29ed1a6d4b94391fccee2f448d4c5 SHA512 32699153aaf64ece98cd694826b6ba01e32af8a278143e8dacbe05a9eb23f37017a40807247eb1809a5be5e6300a922c8758f3e53be166a1d2e5d48735a63fad +EBUILD protobuf-23.3-r1.ebuild 2626 BLAKE2B d3bbdda4be22865cbd8bc5db58060b9dab1a36fda600d7ca071c81e835ff9474fc4001fc71c1b1e633ba3037cb763b9d14af3651f64afe2644054bf5b9cd0f9a SHA512 7e8e93af26fdee65719376a40a1750b146e3befb492e22d24417b74f5139af83680ea570d16760856d87d0235845e41024b353a981ba22283321ea9791c9497d MISC metadata.xml 595 BLAKE2B ba1b916e26b1e53f68e660f03d2e53fea8d22db04e8241ebec3ec20fbb251c2b164cf25d5fb6118423ce7721a822ae2302aab137b0748730e9a6860bf8e65668 SHA512 785e2550621b79b6350e1a6b52ed9992610769885fb29a9e92ee45a35158cc08707a3590dfcbece9ee9a5e16e1abfb614e8186132da7b942f2761b5e6ecfa827 diff --git a/dev-libs/protobuf/files/protobuf-23.3-disable-32-bit-tests.patch b/dev-libs/protobuf/files/protobuf-23.3-disable-32-bit-tests.patch new file mode 100644 index 000000000000..1e49bc981d8e --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-23.3-disable-32-bit-tests.patch @@ -0,0 +1,34 @@ +https://github.com/protocolbuffers/protobuf/issues/8460 +--- a/src/google/protobuf/any_test.cc ++++ b/src/google/protobuf/any_test.cc +@@ -63,6 +63,8 @@ TEST(AnyTest, TestPackAndUnpack) { + } + + TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) { ++ // Filter out this test on 32-bit architectures. ++ if(sizeof(void*) < 8) return; + protobuf_unittest::TestAny submessage; + submessage.mutable_text()->resize(INT_MAX, 'a'); + protobuf_unittest::TestAny message; + +https://github.com/protocolbuffers/protobuf/issues/8459 +--- a/src/google/protobuf/arena_unittest.cc ++++ b/src/google/protobuf/arena_unittest.cc +@@ -1373,6 +1373,8 @@ TEST(ArenaTest, MessageLiteOnArena) { + uint64_t Align8(uint64_t n) { return (n + 7) & -8; } + + TEST(ArenaTest, SpaceAllocated_and_Used) { ++ // Filter out this test on 32-bit architectures. ++ if(sizeof(void*) < 8) return; + Arena arena_1; + EXPECT_EQ(0, arena_1.SpaceAllocated()); + EXPECT_EQ(0, arena_1.SpaceUsed()); +@@ -1453,6 +1455,8 @@ TEST(ArenaTest, Alignment) { + } + + TEST(ArenaTest, BlockSizeSmallerThanAllocation) { ++ // Filter out this test on 32-bit architectures. ++ if(sizeof(void*) < 8) return; + for (size_t i = 0; i <= 8; ++i) { + ArenaOptions opt; + opt.start_block_size = opt.max_block_size = i; diff --git a/dev-libs/protobuf/files/protobuf-23.3-static_assert-failure.patch b/dev-libs/protobuf/files/protobuf-23.3-static_assert-failure.patch new file mode 100644 index 000000000000..53ca65814251 --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-23.3-static_assert-failure.patch @@ -0,0 +1,11 @@ +https://github.com/protocolbuffers/protobuf/issues/9433 +--- a/src/google/protobuf/descriptor.cc ++++ b/src/google/protobuf/descriptor.cc +@@ -384,7 +384,6 @@ class FlatAllocatorImpl { + ABSL_CHECK(!has_allocated()); + if (std::is_trivially_destructible<U>::value) { + // Trivial types are aligned to 8 bytes. +- static_assert(alignof(U) <= 8, ""); + total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U)); + } else { + // Since we can't use `if constexpr`, just make the expression compile diff --git a/dev-libs/protobuf/protobuf-21.12.ebuild b/dev-libs/protobuf/protobuf-21.12.ebuild new file mode 100644 index 000000000000..6fe34f584e4c --- /dev/null +++ b/dev-libs/protobuf/protobuf-21.12.ebuild @@ -0,0 +1,105 @@ +# Copyright 2008-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common toolchain-funcs + +if [[ "${PV}" == *9999 ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + 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 ~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/3.$(ver_cut 1-2).0" +IUSE="emacs examples test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND=" + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-23.3-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=ON + -Dprotobuf_BUILD_EXAMPLES=$(usex examples) + -Dprotobuf_WITH_ZLIB=$(usex zlib) + -Dprotobuf_BUILD_TESTS=$(usex test) + ) + 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 +} + +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-r1.ebuild b/dev-libs/protobuf/protobuf-23.3-r1.ebuild new file mode 100644 index 000000000000..409cace39f18 --- /dev/null +++ b/dev-libs/protobuf/protobuf-23.3-r1.ebuild @@ -0,0 +1,108 @@ +# Copyright 2008-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common toolchain-funcs + +if [[ "${PV}" == *9999 ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + 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 ~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:* )" +DEPEND=" + dev-cpp/abseil-cpp:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + dev-cpp/abseil-cpp:=[${MULTILIB_USEDEP}] + emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-23.3-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=ON + -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 +} + +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 +} |