diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/Manifest index 02133b74f7..67c0bf1539 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/Manifest @@ -5,3 +5,4 @@ DIST protobuf-29.5.tar.gz 9338935 BLAKE2B cfffcab9e240047c1759f8304b0c2f553bf73c DIST protobuf-30.2.tar.gz 9506934 BLAKE2B 3a7d6bfa38500b16b1ce52b244fd9448fe7be2933a77224a1423a67e3ae3155846c0974ee1b6c579f6050f60b7784ace21b149b3cbdff2ef1e6bf954acbb1b51 SHA512 555d1b18d175eeaf17f3879f124d33080f490367840d35b34bfc4e4a5b383bf6a1d09f1570acb6af9c53ac4940a14572d46423b6e3dd0c712e7802c986fb6be6 DIST protobuf-31.1.tar.gz 9583956 BLAKE2B cd15fc6d25bee71681602cf97c19dc04de9900594b0c0648decf418bdcc0cf787315b2238c18cb0b1eaf7b163ddbbfb7853cc5cff635b4841fcb8b20d94825fd SHA512 5bf730e37183defcb29cf4831128f536ad8bcdce2b2b46b297d95f3de4a037b9ff3b6c57df66a039256dcefd828ba9d43c32b01a7a82aa5c881a9ae12cadb643 DIST protobuf-32.1.tar.gz 9676391 BLAKE2B f6c1faa260ecb57c0a1a5d4be7d56e431cac9e325a02b86d9eecd0318a0964618063db218a4720fcb1121614016f112ba00880a5b743a5c34f19f79ea4420735 SHA512 e7f8fe01912ba30cc7ce101beac1cfbd089bcb57b159a57d4d90cabd1b29d978ad322f0607e1b955617f035a6b68d4e7bc940fa4afa67d255a21f513a2c62172 +DIST protobuf-33.0.tar.gz 6872665 BLAKE2B 5d456c000117b590dea5b7e721a8b8d00d9e7067ba2156f082e4959a17fcf8d4f2e306f90335aad97e1a94dfd2491544d67cb29670f0022034fde574140a8066 SHA512 2956270a81631895ab6ed8c3c2a22b353a461b0827ee17a1c569b24374307a8e2525a06db6728140bff759a40e47a1d2a291cfb34293b364fe279f10468f3cb9 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-21.12.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-21.12.ebuild index 7c343d581c..7912dd34f6 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-21.12.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-21.12.ebuild @@ -25,12 +25,12 @@ RESTRICT="!test? ( test )" BDEPEND="emacs? ( app-editors/emacs:* )" DEPEND=" - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) " RDEPEND=" emacs? ( app-editors/emacs:* ) - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) " PATCHES=( diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.6.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.6.ebuild index 1024552e92..10e05a1724 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.6.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.6.ebuild @@ -45,7 +45,7 @@ BDEPEND=" COMMON_DEPEND=" >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) " DEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-28.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-28.0.ebuild index 2d93cc7ee2..2a1b6d8e44 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-28.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-28.0.ebuild @@ -50,7 +50,7 @@ BDEPEND=" COMMON_DEPEND=" dev-libs/jsoncpp[${MULTILIB_USEDEP}] >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) " DEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-29.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-29.5.ebuild index dbfa1f7872..d504a4e7e9 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-29.5.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-29.5.ebuild @@ -43,7 +43,7 @@ BDEPEND=" COMMON_DEPEND=" >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) " DEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-30.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-30.2.ebuild index d56bfbf2d6..485bb045d2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-30.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-30.2.ebuild @@ -43,7 +43,7 @@ BDEPEND=" COMMON_DEPEND=" >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) " DEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-31.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-31.1.ebuild index 2cfbce9de2..00904e6739 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-31.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-31.1.ebuild @@ -43,7 +43,7 @@ BDEPEND=" COMMON_DEPEND=" >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) " DEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-32.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-32.1.ebuild index 8c53aec067..c8f1615d65 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-32.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-32.1.ebuild @@ -44,7 +44,7 @@ BDEPEND=" COMMON_DEPEND=" >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) " DEPEND=" @@ -65,7 +65,6 @@ RDEPEND=" PATCHES=( "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" - # "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" # applied manually "${FILESDIR}/${PN}-30.0-findJsonCpp.patch" ) @@ -74,22 +73,18 @@ DOCS=( CONTRIBUTORS.txt README.md ) src_prepare() { cmake_src_prepare -# if tc-is-lto; then -# eapply "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" -# fi - cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die } multilib_src_configure() { + # bug #963340 (seems to only happen when upgrading from older pb, + # possibly w/o tests too). use libupb && filter-lto # Currently, the only static library is libupb (and there is no # USE=static-libs), so optimize away the fat-lto build time penalty. use libupb && lto-guarantee-fat - use libupb && filter-lto - local mycmakeargs=( -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" @@ -144,10 +139,6 @@ multilib_src_test() { src_test() { local -x srcdir="${S}/src" -# local CMAKE_SKIP_TESTS=( -# "^full-test$" -# ) - local GTEST_SKIP_TESTS=( "PackedTest/12.DecodeEmptyPackedField" ) @@ -169,13 +160,6 @@ src_test() { [[ -n ${GTEST_SKIP_TESTS[*]} ]] && GTEST_FILTER+="${GTEST_FILTER+:}-$(IFS=':' ; echo "${GTEST_SKIP_TESTS[*]}")" cmake-multilib_src_test - -# if tc-is-lto; then -# # GTEST_FILTER="${GTEST_FILTER//-/}" -# GTEST_FILTER="$(IFS=':' ; echo "${GTEST_SKIP_TESTS[*]}")" -# -# cmake-multilib_src_test -# fi } multilib_src_install_all() { diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-33.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-33.0.ebuild new file mode 100644 index 0000000000..c8f1615d65 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-33.0.ebuild @@ -0,0 +1,200 @@ +# Copyright 2008-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib dot-a elisp-common flag-o-matic multilib toolchain-funcs + +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/cmake/dependencies.cmake +ABSEIL_MIN_VER="20250127.0" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + SLOT="0/9999" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + SLOT="0/$(ver_cut 1-2).0" +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +IUSE="conformance debug emacs examples +libprotoc +libupb +protobuf +protoc test zlib" + +# Require protobuf for the time being +REQUIRED_USE=" + protobuf + protobuf? ( protoc ) + examples? ( protobuf ) + libprotoc? ( protobuf ) + libupb? ( protobuf ) + protoc? ( libupb ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) +" + +COMMON_DEPEND=" + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + conformance? ( dev-libs/jsoncpp[${MULTILIB_USEDEP}] ) + test? ( + || ( + dev-cpp/abseil-cpp[test-helpers(-)] + dev-cpp/abseil-cpp[test] + ) + dev-cpp/gtest[${MULTILIB_USEDEP}] + ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-30.0-findJsonCpp.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + cmake_src_prepare + + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die +} + +multilib_src_configure() { + # bug #963340 (seems to only happen when upgrading from older pb, + # possibly w/o tests too). + use libupb && filter-lto + + # Currently, the only static library is libupb (and there is no + # USE=static-libs), so optimize away the fat-lto build time penalty. + use libupb && lto-guarantee-fat + + local mycmakeargs=( + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -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_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" + + -Dprotobuf_LOCAL_DEPENDENCIES_ONLY="yes" + # -Dprotobuf_FORCE_FETCH_DEPENDENCIES="no" + ) + if use protobuf ; then + if use examples ; then + mycmakeargs+=( + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + ) + fi + fi + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +# we override here to inject env vars +multilib_src_test() { + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -p -m 770 "${TEST_TMPDIR}" || die + + ln -srf "${S}/src" "${BUILD_DIR}/include" || die + + cmake_src_test "${_cmake_args[@]}" +} + +src_test() { + local -x srcdir="${S}/src" + + local GTEST_SKIP_TESTS=( + "PackedTest/12.DecodeEmptyPackedField" + ) + + if tc-is-lto; then + # Do headstands for LTO # 942985 + GTEST_SKIP_TESTS+=( + "FileDescriptorSetSource/EncodeDecodeTest*" + "LazilyBuildDependenciesTest.GeneratedFile" + "PythonGeneratorTest/PythonGeneratorTest.PythonWithCppFeatures/*" + ) + fi + + if [[ ! -v GTEST_FILTER ]]; then + local -x GTEST_FILTER + fi + + [[ -n ${GTEST_RUN_TESTS[*]} ]] && GTEST_FILTER+="$(IFS=':' ; echo "${GTEST_SKIP_TESTS[*]}")" + [[ -n ${GTEST_SKIP_TESTS[*]} ]] && GTEST_FILTER+="${GTEST_FILTER+:}-$(IFS=':' ; echo "${GTEST_SKIP_TESTS[*]}")" + + cmake-multilib_src_test +} + +multilib_src_install_all() { + use libupb && strip-lto-bytecode + + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname "${SLOT#*/}")" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname "${SLOT#*/}")" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-9999.ebuild index 1df6a650e0..c8f1615d65 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-9999.ebuild @@ -44,7 +44,7 @@ BDEPEND=" COMMON_DEPEND=" >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) + zlib? ( virtual/zlib:=[${MULTILIB_USEDEP}] ) " DEPEND=" @@ -65,7 +65,6 @@ RDEPEND=" PATCHES=( "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" - # "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" # applied manually "${FILESDIR}/${PN}-30.0-findJsonCpp.patch" ) @@ -74,10 +73,6 @@ DOCS=( CONTRIBUTORS.txt README.md ) src_prepare() { cmake_src_prepare -# if tc-is-lto; then -# eapply "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" -# fi - cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die } @@ -160,20 +155,16 @@ src_test() { if [[ ! -v GTEST_FILTER ]]; then local -x GTEST_FILTER fi + [[ -n ${GTEST_RUN_TESTS[*]} ]] && GTEST_FILTER+="$(IFS=':' ; echo "${GTEST_SKIP_TESTS[*]}")" [[ -n ${GTEST_SKIP_TESTS[*]} ]] && GTEST_FILTER+="${GTEST_FILTER+:}-$(IFS=':' ; echo "${GTEST_SKIP_TESTS[*]}")" cmake-multilib_src_test - -# if tc-is-lto; then -# GTEST_FILTER="${GTEST_FILTER//-/}" -# -# cmake-multilib_src_test -# fi } multilib_src_install_all() { use libupb && strip-lto-bytecode + find "${ED}" -name "*.la" -delete || die if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname "${SLOT#*/}")" ]]; then