Skip to content

Commit

Permalink
dev-libs/protobuf: add 28.2
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Billmeier <[email protected]>
  • Loading branch information
onkelbeh committed Nov 3, 2024
1 parent bd490e1 commit 553203d
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,14 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E

## Licenses
This repository itself is released under GPL-3 (like most Gentoo repositories), all work on the depending components under the licenses they came from. Perhaps you came here because I filed an issue at your component about a bad or missing license. It is easy to [assign a license](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository). During cleanups and license investigations I have been asked often which license to choose. I am not a lawyer, but I can offer the following table, counted over this repository, perhaps this helps your decision. If a package has more than one license listed, all of them are counted.
There are 2319 Ebuilds in total, 2305 of them have in total 2343 (43 different) licenses assigned.
There are 2321 Ebuilds in total, 2307 of them have in total 2345 (43 different) licenses assigned.

|License| Ebuilds using it|
|-------|-----|
|MIT|1317|
|Apache-2.0|545|
|GPL-3|143|
|BSD|125|
|BSD|127|
|GPL-2|26|
|LGPL-3|23|
|BSD-2|19|
Expand Down
4 changes: 3 additions & 1 deletion dev-libs/protobuf/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ DIST protobuf-24.2.tar.gz 5179130 BLAKE2B a1e3da4e95072391fa4abf671a9eb77806f1b3
DIST protobuf-24.3.tar.gz 5179711 BLAKE2B 9473a1a9489d4cb92fb7ee56ac51a891cd6de005607be3f5a385957318045d2d8e6bdaa9ffa3c3f88d376b1d9a499ba9560054ae87fe031afffb62b3292ef365 SHA512 2c1a381f81bb2c0afa3a2ff6681f9f37bc7aef3a3882c371eea7284f4e9524c2a0c834de6c7f681706890eee2220a42442367b8f8dc8370f182fab9e2c37cfd2
DIST protobuf-25.1.tar.gz 5878124 BLAKE2B a0b917e4518b07b221afd01e801e45b5b6fa35c7ccf8c21120d6a63f7174e53cc37d0516b1802d9243f8bb37b72b7f460a36dcbf0fffb09e011b05315c53efc3 SHA512 d2fad2188118ced2cd951bdb472d72cc9e9b2158c88eeca652c76332a884b5b5b4b58628f7777272fa693140753823584ea9c7924f1655b1d5a363f59bdf7a4c
DIST protobuf-25.2.tar.gz 5878387 BLAKE2B 1ee7a48d3a481f523ff240c79e8cacb39b6a7e2c671279812cbffd5ce9be595034461fba41f03bed363133118c1b92bd14bcfd8c4e46ac6368e6407a23fb02ea SHA512 66f0b177eae0e2e40b8b17c8f411cd9dec5355dcfc145b8a79426e6367babcc28b9a8078bbe4ba2de47a82811a2e1a89d36955d6fa0c8d391cfeada4eb160fdb
DIST protobuf-28.2.tar.gz 9255285 BLAKE2B 2c8d3e2655fb8a6ffb7bb112e3ee298c596ddff9d8955580a48297ebd9e45245817c679bc2ccb1bf0786b00f3824499c78a97b99011d5a53d36f2f1fa3df7021 SHA512 4ce79dd4fce384e4d6b7234ad4b25b5b5abeb4c2a122aa226c903b9b83d576f4b105b0d29f1cf4606c6a265d84fbfff2436edb2a9279360e84da9ac98ad1106c
EBUILD protobuf-24.2.ebuild 2499 BLAKE2B d20fc60b8ee0c13339074e3c5669baea5dc5f30004f2a6ebb958dbe9f21c66c257e6441c9a1ecfe96e1ea97b70684917a89419f7b85bf03d47b15a1e931c1336 SHA512 f40a776398989d120b6a28e59f4d6b56e5bb1f4441f72982fd24ccaa194a10f0d3dcda7cca7481a62f7eb3d60034a4fef2cc33d0454e40dab7ee696381228645
EBUILD protobuf-24.3.ebuild 2525 BLAKE2B 56715d3d86d843bd41bfa1e105f0ee57df8bedf465061a28337b148be8a7f693a4f97cd64ec5d365b61797394fbddd760c86c8990055a252dc23a98333cb20c6 SHA512 4294d66c9a9096017543a08972f0689159545efad0e4e6b33e66073d429ed272ee93187832b2d6aa64a189e15f205f8d02f69b0c9c633d5fe28410ceccc81a72
EBUILD protobuf-25.1-r1.ebuild 2525 BLAKE2B 5c544165afffc4669c2fa236cfbcfa299c74f01fa944e9f29d789b44eff2451a4adfef0ce99aa6cf950fd410ea8cad2cf6788ff2945a00aa7c698a3628d3da99 SHA512 8df88dc07b6a21e7573a4ee48c2cfff569462e1373d9653146bf7dec63dd1071f3b83b27a01a7d174ae24f55485008fb76f667f5b317b172a58049f58c83e2a3
EBUILD protobuf-25.1.ebuild 2525 BLAKE2B 56715d3d86d843bd41bfa1e105f0ee57df8bedf465061a28337b148be8a7f693a4f97cd64ec5d365b61797394fbddd760c86c8990055a252dc23a98333cb20c6 SHA512 4294d66c9a9096017543a08972f0689159545efad0e4e6b33e66073d429ed272ee93187832b2d6aa64a189e15f205f8d02f69b0c9c633d5fe28410ceccc81a72
EBUILD protobuf-25.2-r1.ebuild 2525 BLAKE2B 5c544165afffc4669c2fa236cfbcfa299c74f01fa944e9f29d789b44eff2451a4adfef0ce99aa6cf950fd410ea8cad2cf6788ff2945a00aa7c698a3628d3da99 SHA512 8df88dc07b6a21e7573a4ee48c2cfff569462e1373d9653146bf7dec63dd1071f3b83b27a01a7d174ae24f55485008fb76f667f5b317b172a58049f58c83e2a3
EBUILD protobuf-25.2.ebuild 2525 BLAKE2B 56715d3d86d843bd41bfa1e105f0ee57df8bedf465061a28337b148be8a7f693a4f97cd64ec5d365b61797394fbddd760c86c8990055a252dc23a98333cb20c6 SHA512 4294d66c9a9096017543a08972f0689159545efad0e4e6b33e66073d429ed272ee93187832b2d6aa64a189e15f205f8d02f69b0c9c633d5fe28410ceccc81a72
MISC metadata.xml 595 BLAKE2B ba1b916e26b1e53f68e660f03d2e53fea8d22db04e8241ebec3ec20fbb251c2b164cf25d5fb6118423ce7721a822ae2302aab137b0748730e9a6860bf8e65668 SHA512 785e2550621b79b6350e1a6b52ed9992610769885fb29a9e92ee45a35158cc08707a3590dfcbece9ee9a5e16e1abfb614e8186132da7b942f2761b5e6ecfa827
EBUILD protobuf-28.2.ebuild 3597 BLAKE2B 92beec77700dadaa9422a99546ea2bd124f315737bae39b7baa8c76fd850a431e5d88bbdc037b1aa2b5df03a93974b5fe6fd12279744ea708b1d5edffc74fbd6 SHA512 249d953dde4412d5fa9723243b4cc2ae03e36cd5ac01b310455d8cc38b90ec27e5ccd525809ac8dadf746682a637bbe1e150a46570ca1ca2293b282b24640c36
MISC metadata.xml 917 BLAKE2B c25c810e47e764843ad71be5eb5ebe617d881e7363ce3206401eb59c6df12969bc22bbedc34f08b0a2fbcf955de5b85aa8e4d3a964c1349f07ed1d0eb344a915 SHA512 baa5737981669f1b28ce32884698a4d91e0f1fbdde6056779307e1a6c85dde8ca36ee47ca3ce8794b996934dfafc5482afbe9532a7f3e17c833c3aef0a330376
17 changes: 12 additions & 5 deletions dev-libs/protobuf/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>arfrever.fta@gmail.com</email>
<name>Arfrever Frehtes Taifersar Arahesis</name>
<email>negril.nx+gentoo@gmail.com</email>
<name>Paul Zander</name>
</maintainer>
<maintainer type="project">
<email>cjk@gentoo.org</email>
<name>Cjk</name>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<slots>
<subslots>Soname version number</subslots>
Expand All @@ -16,4 +16,11 @@
<remote-id type="cpe">cpe:/a:google:protobuf</remote-id>
<remote-id type="github">protocolbuffers/protobuf</remote-id>
</upstream>
<use>
<flag name="conformance">Build conformance tests</flag>
<flag name="libprotoc">Build libprotoc</flag>
<flag name="libupb">Build libupb</flag>
<flag name="protobuf">Build protobuf libraries and protoc compiler</flag>
<flag name="protoc">Build libprotoc and protoc compiler</flag>
</use>
</pkgmetadata>
157 changes: 157 additions & 0 deletions dev-libs/protobuf/protobuf-28.2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# Copyright 1999-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.2"

inherit git-r3
else
SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz"
KEYWORDS="amd64 arm arm64 x86"
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}-23.3-static_assert-failure.patch"
)

DOCS=( CONTRIBUTORS.txt README.md )

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
}

0 comments on commit 553203d

Please sign in to comment.