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 af1849aaaf..00ff3f3c13 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,5 +5,8 @@ DIST protobuf-23.3.tar.gz 5043803 BLAKE2B ee2edee230969555c9ef95069c7b1d6c23c3d1 DIST protobuf-23.4.tar.gz 5043507 BLAKE2B bf6a50771eb977ef92b779a32fd909693faae6394254c73e3c9b2729bce643f8cbfb5a1bd18b30abf3003b9fbfd24c074cea4085a6ccf14fdb6a3aeac9efcb89 SHA512 b93a4e0339ecbe085796de5b6c61feae35229d40db9019c043090bcaa483a1cce78a99487c5638482c68832fcede5579a0e5ec731221a88359b80db9bb6dc566 DIST protobuf-24.4.tar.gz 5180235 BLAKE2B 1c7e9035d9f3810886baaea7d679414c882463c79828c99dd8895a9549638c1ca17f9ab3b38d461019f3e1412d9cb9584b995b1da99866eb6fdbb8bdeb063e6f SHA512 52b6ab5587d03cbd1f35cf3cdc388e1710fa50f3031559ac53cf754965407ded7602cdead56080444ab695588112cc3391a1d7fdd5e565d90d0af7ad08706315 DIST protobuf-25.3.tar.gz 5878962 BLAKE2B 9268f9bd993a1cfd6d3937a2ad56ba4cfe3d84923756513841cbf13039d4a07acb260468745cb1294f30334cb34b45c6fde272f5c40d9de63ac6a4ce5c263077 SHA512 1f73e237c919082e5423ae9e2ea8813dccf672c059051d1531fe89ffaa45872d3cf3052b8c3af26f674296ec17d7dc861c67b8f0834ed80261ce4a6a14ed7115 +DIST protobuf-25.4.tar.gz 5878444 BLAKE2B 9b40985bda31a84dd3ab7a1d18f746d5f88660d9e036a20234cbc85e79322005d2ffd4e60d72c55a8b5f624d7cc50522771f0804f203f2eabca7b0b8ace0545e SHA512 1b3ba1a1575bcc9d52ddce93d466912863d600dfbb40f64845b8e66c8000047d05508b8f1baba8d5eef42a7ff90eb778f7c8a553c9ec2778fd3a9a18122c67ab DIST protobuf-26.1.tar.gz 5957903 BLAKE2B 1a7faab2f56aa0995801a80f73a812c7fc38a00af0bf25bdd5eecf7aec27a86a575ea2fb8484787d19c9ac6e46007c9864e79464f529c446f31af732981feed1 SHA512 0363ac09f92d8e040491425d444c8dca0b9b430e02d2dff6e2b28a0c2b2bea0d33a47f50bc9e2e2d4e8e22b65a02009a20c0066fb89c75df93a7b703dda42ed4 DIST protobuf-27.2.tar.gz 6282174 BLAKE2B 86d12e9f87e8e1c2961ad517115c8689a8dd984722513816d8d626e59a76f5e7a698a90cbf6007daacf66c6053c9ff28108ff113579a442ce61cd221178bda44 SHA512 664c66b62cf1ed0c65d9b910d8e67d4d5d471113697f1b8edf1573cd5c0fc8e850ac53ce984e48e6c6b9cbbefa12f8530058384e7388e65a59c1e46d03772397 +DIST protobuf-27.4.tar.gz 9156456 BLAKE2B 004427f4923e523bf77298600bf91a8fe4ca8be4bd6da5b7efcfe9186a032155e525426f83f683e1bed1e799ed1e62d250053386c1463cbd0c062bd05da786d0 SHA512 d076ce7e075096d0dba7ee2314b12e3223c4239c019e25670636a0ef812ddf0ce3f1fd9b9fe8517319db87b14bbdb2653cc4e06023f90032dfedb014457b2863 +DIST protobuf-28.0.tar.gz 9259114 BLAKE2B 328e09ebffb296d838557ea72a4fc4da8e0ad5f1edfccebcc8ee7c9e0e74d06e5e6dbad741fd89f6a4502c1cb246a973fd60c035ccdbf89700b7baff49e2a65e SHA512 8745f625ac781f3bbefe9494cbf570143d38aecc1521edef7a52ffb403b8be24df2c71f4f2410b5a5b78a0f3e8a38a7d19be2cf916b1b9125349d2da18262cd1 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/files/FindJsonCpp.cmake b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/files/FindJsonCpp.cmake new file mode 100644 index 0000000000..8fff5336ce --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/files/FindJsonCpp.cmake @@ -0,0 +1,40 @@ +find_path(JsonCpp_INCLUDE_DIR "json/json.h" + PATH_SUFFIXES "jsoncpp" + DOC "jsoncpp include directory") +mark_as_advanced(JsonCpp_INCLUDE_DIR) + +find_library(JsonCpp_LIBRARY + NAMES jsoncpp + DOC "jsoncpp library") +mark_as_advanced(JsonCpp_LIBRARY) + +if (JsonCpp_INCLUDE_DIR AND EXISTS "${JsonCpp_INCLUDE_DIR}/json/version.h") + file(STRINGS "${JsonCpp_INCLUDE_DIR}/json/version.h" _JsonCpp_version_lines + REGEX "JSONCPP_VERSION_[A-Z]+") + string(REGEX REPLACE ".*# *define +JSONCPP_VERSION_MAJOR +([0-9]+).*" "\\1" _JsonCpp_version_major "${_JsonCpp_version_lines}") + string(REGEX REPLACE ".*# *define +JSONCPP_VERSION_MINOR +([0-9]+).*" "\\1" _JsonCpp_version_minor "${_JsonCpp_version_lines}") + string(REGEX REPLACE ".*# *define +JSONCPP_VERSION_PATCH +([0-9]+).*" "\\1" _JsonCpp_version_patch "${_JsonCpp_version_lines}") + set(JsonCpp_VERSION "${_JsonCpp_version_major}.${_JsonCpp_version_minor}.${_JsonCpp_version_patch}") + unset(_JsonCpp_version_major) + unset(_JsonCpp_version_minor) + unset(_JsonCpp_version_patch) + unset(_JsonCpp_version_lines) +endif () + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(JsonCpp + REQUIRED_VARS JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR + VERSION_VAR JsonCpp_VERSION) + +if (JsonCpp_FOUND) + set(JsonCpp_INCLUDE_DIRS "${JsonCpp_INCLUDE_DIR}") + set(JsonCpp_LIBRARIES "${JsonCpp_LIBRARY}") + + if (NOT TARGET JsonCpp::JsonCpp) + add_library(JsonCpp::JsonCpp SHARED IMPORTED) + set_target_properties(JsonCpp::JsonCpp PROPERTIES + IMPORTED_LOCATION "${JsonCpp_LIBRARY}" + IMPORTED_IMPLIB "${JsonCpp_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${JsonCpp_INCLUDE_DIR}") + endif () +endif () diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/files/protobuf-27.4-findJsonCpp.patch b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/files/protobuf-27.4-findJsonCpp.patch new file mode 100644 index 0000000000..6ce98f758e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/files/protobuf-27.4-findJsonCpp.patch @@ -0,0 +1,33 @@ +From e3138533bf97e1133371944b28e65bae5e8ae95c Mon Sep 17 00:00:00 2001 +From: Paul Zander +Date: Sat, 10 Aug 2024 13:43:28 +0200 +Subject: [PATCH] fix JsonCPP name + +Signed-off-by: Paul Zander +--- + cmake/conformance.cmake | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/conformance.cmake b/cmake/conformance.cmake +index c5d8c7c..2e059ea 100644 +--- a/cmake/conformance.cmake ++++ b/cmake/conformance.cmake +@@ -9,7 +9,7 @@ if (protobuf_JSONCPP_PROVIDER STREQUAL "module") + " cmake -Dprotobuf_BUILD_CONFORMANCE=OFF\n") + endif() + elseif(protobuf_JSONCPP_PROVIDER STREQUAL "package") +- find_package(jsoncpp REQUIRED) ++ find_package(JsonCpp REQUIRED) + endif() + + file(MAKE_DIRECTORY ${protobuf_BINARY_DIR}/conformance) +@@ -140,5 +140,5 @@ if(protobuf_JSONCPP_PROVIDER STREQUAL "module") + target_link_libraries(conformance_test_runner jsoncpp_static) + endif() + else() +- target_link_libraries(conformance_test_runner jsoncpp) ++ target_link_libraries(conformance_test_runner JsonCpp::JsonCpp) + endif() +-- +2.46.0 + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/files/protobuf-28.0-disable-test_upb-lto.patch b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/files/protobuf-28.0-disable-test_upb-lto.patch new file mode 100644 index 0000000000..0a9ed5e8e6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/files/protobuf-28.0-disable-test_upb-lto.patch @@ -0,0 +1,23 @@ +From 14fe043db8162df9ddc2308437cace6434c67bd9 Mon Sep 17 00:00:00 2001 +From: Paul Zander +Date: Fri, 30 Aug 2024 03:22:16 +0200 +Subject: [PATCH] disable test_upb + +Signed-off-by: Paul Zander + +diff --git a/cmake/tests.cmake b/cmake/tests.cmake +index c8ae114..eac821c 100644 +--- a/cmake/tests.cmake ++++ b/cmake/tests.cmake +@@ -175,7 +175,7 @@ add_test(NAME full-test + COMMAND tests ${protobuf_GTEST_ARGS} + WORKING_DIRECTORY ${protobuf_SOURCE_DIR}) + +-if (protobuf_BUILD_LIBUPB) ++if (protobuf_BUILD_LIBUPB AND FALSE) + set(upb_test_proto_genfiles) + foreach(proto_file ${upb_test_protos_files} ${descriptor_proto_proto_srcs}) + foreach(generator upb upbdefs upb_minitable) +-- +2.46.0 + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-21.9.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-21.9.ebuild index 68b9207ab7..46fb355327 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-21.9.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-21.9.ebuild @@ -12,7 +12,7 @@ if [[ "${PV}" == *9999 ]]; then EGIT_SUBMODULES=() else SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" fi DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-22.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-22.5-r1.ebuild index ff2783d5e7..ca830b5f58 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-22.5-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-22.5-r1.ebuild @@ -12,7 +12,7 @@ if [[ "${PV}" == *9999 ]]; then EGIT_SUBMODULES=() else SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~mips ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" + KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" fi DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-23.3-r4.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-23.3-r4.ebuild index 17092c5a48..6a47828975 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-23.3-r4.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-23.3-r4.ebuild @@ -12,7 +12,7 @@ if [[ "${PV}" == *9999 ]]; then EGIT_SUBMODULES=() else SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos" + KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos" fi DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.3.ebuild index 422310009a..d878a5ea4e 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.3.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.3.ebuild @@ -17,7 +17,7 @@ if [[ "${PV}" == *9999 ]]; then 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" + 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" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.4.ebuild new file mode 100644 index 0000000000..158b36af63 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.4.ebuild @@ -0,0 +1,165 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common multilib + +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_BRANCH="lts_2023_08_02" + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + MY_SLOT="28.0" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + MY_SLOT=$(ver_cut 1-2) +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/${MY_SLOT}.0" +IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" + +REQUIRED_USE=" + || ( + libprotoc + libupb + protobuf + protoc + ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) + !protobuf? ( + >=dev-libs/protobuf-${PV} + ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp[${MULTILIB_USEDEP}] + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-27.4-findJsonCpp.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + cmake_src_prepare + + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_ABSL_PROVIDER="package" + -Dprotobuf_JSONCPP_PROVIDER="package" + + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" + -Dprotobuf_BUILD_LIBUPB="$(usex libupb)" + -Dprotobuf_BUILD_PROTOBUF_BINARIES="$(usex protobuf)" + -Dprotobuf_BUILD_PROTOC_BINARIES="$(usex protoc)" + -Dprotobuf_BUILD_SHARED_LIBS="yes" + -Dprotobuf_BUILD_TESTS="$(usex test)" + + -Dprotobuf_DISABLE_RTTI="no" + + -Dprotobuf_INSTALL="yes" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" + ) + use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}/src" + + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -m 777 "${TEST_TMPDIR}" || die + + setup_test_env() { + ln -sr "${S}/src" "${BUILD_DIR}/include" || die + } + + multilib_foreach_abi setup_test_env + + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-26.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-26.1-r1.ebuild deleted file mode 100644 index 534834edca..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-26.1-r1.ebuild +++ /dev/null @@ -1,113 +0,0 @@ -# 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 - -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 ~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:* )" -DEPEND=" - >=dev-cpp/abseil-cpp-20230125.3:=[${MULTILIB_USEDEP}] - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) - test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) -" -RDEPEND=" - >=dev-cpp/abseil-cpp-20230125.3:=[${MULTILIB_USEDEP}] - emacs? ( app-editors/emacs:* ) - zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) -" - -PATCHES=( - "${FILESDIR}/${P}-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 -} - -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/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.2.ebuild index 1e406912d8..5fab101605 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.2.ebuild @@ -18,7 +18,7 @@ if [[ "${PV}" == *9999 ]]; then inherit git-r3 else SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + KEYWORDS="~alpha amd64 ~arm arm64 ~loong ~mips ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" MY_SLOT=$(ver_cut 1-2) fi diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.4.ebuild new file mode 100644 index 0000000000..30ab416efd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.4.ebuild @@ -0,0 +1,166 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common multilib + +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_BRANCH="lts_2023_08_02" + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + MY_SLOT="28.0" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + MY_SLOT=$(ver_cut 1-2) +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/${MY_SLOT}.0" +IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" + +REQUIRED_USE=" + || ( + libprotoc + libupb + protobuf + protoc + ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) + !protobuf? ( + >=dev-libs/protobuf-${PV} + ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp[${MULTILIB_USEDEP}] + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.11[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-27.4-findJsonCpp.patch" + "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + cmake_src_prepare + + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_ABSL_PROVIDER="package" + -Dprotobuf_JSONCPP_PROVIDER="package" + + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" + -Dprotobuf_BUILD_LIBUPB="$(usex libupb)" + -Dprotobuf_BUILD_PROTOBUF_BINARIES="$(usex protobuf)" + -Dprotobuf_BUILD_PROTOC_BINARIES="$(usex protoc)" + -Dprotobuf_BUILD_SHARED_LIBS="yes" + -Dprotobuf_BUILD_TESTS="$(usex test)" + + -Dprotobuf_DISABLE_RTTI="no" + + -Dprotobuf_INSTALL="yes" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" + ) + use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}/src" + + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -m 777 "${TEST_TMPDIR}" || die + + setup_test_env() { + ln -sr "${S}/src" "${BUILD_DIR}/include" || die + } + + multilib_foreach_abi setup_test_env + + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/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 new file mode 100644 index 0000000000..30ab416efd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-28.0.ebuild @@ -0,0 +1,166 @@ +# Copyright 2008-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common multilib + +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_BRANCH="lts_2023_08_02" + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + MY_SLOT="28.0" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + MY_SLOT=$(ver_cut 1-2) +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/${MY_SLOT}.0" +IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" + +REQUIRED_USE=" + || ( + libprotoc + libupb + protobuf + protoc + ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) + !protobuf? ( + >=dev-libs/protobuf-${PV} + ) +" + +COMMON_DEPEND=" + dev-libs/jsoncpp[${MULTILIB_USEDEP}] + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + test? ( >=dev-cpp/gtest-1.11[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-27.4-findJsonCpp.patch" + "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + cmake_src_prepare + + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_ABSL_PROVIDER="package" + -Dprotobuf_JSONCPP_PROVIDER="package" + + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" + -Dprotobuf_BUILD_LIBUPB="$(usex libupb)" + -Dprotobuf_BUILD_PROTOBUF_BINARIES="$(usex protobuf)" + -Dprotobuf_BUILD_PROTOC_BINARIES="$(usex protoc)" + -Dprotobuf_BUILD_SHARED_LIBS="yes" + -Dprotobuf_BUILD_TESTS="$(usex test)" + + -Dprotobuf_DISABLE_RTTI="no" + + -Dprotobuf_INSTALL="yes" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" + ) + use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}/src" + + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -m 777 "${TEST_TMPDIR}" || die + + setup_test_env() { + ln -sr "${S}/src" "${BUILD_DIR}/include" || die + } + + multilib_foreach_abi setup_test_env + + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/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 9988631acc..30ab416efd 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 @@ -3,9 +3,10 @@ EAPI=8 -inherit cmake-multilib elisp-common toolchain-funcs multilib +inherit cmake-multilib elisp-common multilib -ABSEIL_BRANCH="lts_2023_08_02" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_BRANCH="lts_2023_08_02" ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" @@ -17,8 +18,8 @@ if [[ "${PV}" == *9999 ]]; then 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" + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" MY_SLOT=$(ver_cut 1-2) fi @@ -27,7 +28,7 @@ HOMEPAGE="https://protobuf.dev/" LICENSE="BSD" SLOT="0/${MY_SLOT}.0" -IUSE="conformance emacs examples +libprotoc libupb +protobuf +protoc test zlib" +IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" REQUIRED_USE=" || ( @@ -48,14 +49,14 @@ BDEPEND=" " COMMON_DEPEND=" - dev-libs/jsoncpp + dev-libs/jsoncpp[${MULTILIB_USEDEP}] >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) " DEPEND=" ${COMMON_DEPEND} - test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + test? ( >=dev-cpp/gtest-1.11[${MULTILIB_USEDEP}] ) " RDEPEND=" ${COMMON_DEPEND} @@ -65,22 +66,16 @@ RDEPEND=" PATCHES=( "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-27.4-findJsonCpp.patch" + "${FILESDIR}/${PN}-28.0-disable-test_upb-lto.patch" ) DOCS=( CONTRIBUTORS.txt README.md ) -# src_prepare() { -# rm "${S}/third_party/utf8_range/" -rf || die -# cmake_src_prepare -# } +src_prepare() { + 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 + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die } multilib_src_configure() { @@ -104,7 +99,8 @@ multilib_src_configure() { -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" -Dprotobuf_WITH_ZLIB="$(usex zlib)" - -Dprotobuf_VERBOSE="yes" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" ) use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) @@ -120,7 +116,17 @@ src_compile() { } src_test() { - local -x srcdir="${S}"/src + local -x srcdir="${S}/src" + + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -m 777 "${TEST_TMPDIR}" || die + + setup_test_env() { + ln -sr "${S}/src" "${BUILD_DIR}/include" || die + } + + multilib_foreach_abi setup_test_env + cmake-multilib_src_test }