Skip to content

Commit 2ae29be

Browse files
committed
dev-libs/protobuf: fix abseil problems
Closes: https://git.edevau.net/onkelbeh/HomeAssistantRepository/issues/3503 Signed-off-by: Andreas Billmeier <[email protected]>
1 parent aca9e63 commit 2ae29be

File tree

4 files changed

+218
-2
lines changed

4 files changed

+218
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,14 +606,14 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E
606606

607607
## Licenses
608608
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.
609-
There are 1950 Ebuilds in total, 1939 of them have in total 1963 (42 different) licenses assigned.
609+
There are 1952 Ebuilds in total, 1941 of them have in total 1965 (42 different) licenses assigned.
610610

611611
|License| Ebuilds using it|
612612
|-------|-----|
613613
|MIT|1122|
614614
|Apache-2.0|437|
615615
|GPL-3|114|
616-
|BSD|111|
616+
|BSD|113|
617617
|LGPL-3|25|
618618
|GPL-2|23|
619619
|GPL-3+|16|

dev-libs/protobuf/Manifest

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ DIST protobuf-25.1.tar.gz 5878124 BLAKE2B a0b917e4518b07b221afd01e801e45b5b6fa35
77
DIST protobuf-25.2.tar.gz 5878387 BLAKE2B 1ee7a48d3a481f523ff240c79e8cacb39b6a7e2c671279812cbffd5ce9be595034461fba41f03bed363133118c1b92bd14bcfd8c4e46ac6368e6407a23fb02ea SHA512 66f0b177eae0e2e40b8b17c8f411cd9dec5355dcfc145b8a79426e6367babcc28b9a8078bbe4ba2de47a82811a2e1a89d36955d6fa0c8d391cfeada4eb160fdb
88
EBUILD protobuf-24.2.ebuild 2499 BLAKE2B d20fc60b8ee0c13339074e3c5669baea5dc5f30004f2a6ebb958dbe9f21c66c257e6441c9a1ecfe96e1ea97b70684917a89419f7b85bf03d47b15a1e931c1336 SHA512 f40a776398989d120b6a28e59f4d6b56e5bb1f4441f72982fd24ccaa194a10f0d3dcda7cca7481a62f7eb3d60034a4fef2cc33d0454e40dab7ee696381228645
99
EBUILD protobuf-24.3.ebuild 2525 BLAKE2B 56715d3d86d843bd41bfa1e105f0ee57df8bedf465061a28337b148be8a7f693a4f97cd64ec5d365b61797394fbddd760c86c8990055a252dc23a98333cb20c6 SHA512 4294d66c9a9096017543a08972f0689159545efad0e4e6b33e66073d429ed272ee93187832b2d6aa64a189e15f205f8d02f69b0c9c633d5fe28410ceccc81a72
10+
EBUILD protobuf-25.1-r1.ebuild 2525 BLAKE2B 5c544165afffc4669c2fa236cfbcfa299c74f01fa944e9f29d789b44eff2451a4adfef0ce99aa6cf950fd410ea8cad2cf6788ff2945a00aa7c698a3628d3da99 SHA512 8df88dc07b6a21e7573a4ee48c2cfff569462e1373d9653146bf7dec63dd1071f3b83b27a01a7d174ae24f55485008fb76f667f5b317b172a58049f58c83e2a3
1011
EBUILD protobuf-25.1.ebuild 2525 BLAKE2B 56715d3d86d843bd41bfa1e105f0ee57df8bedf465061a28337b148be8a7f693a4f97cd64ec5d365b61797394fbddd760c86c8990055a252dc23a98333cb20c6 SHA512 4294d66c9a9096017543a08972f0689159545efad0e4e6b33e66073d429ed272ee93187832b2d6aa64a189e15f205f8d02f69b0c9c633d5fe28410ceccc81a72
12+
EBUILD protobuf-25.2-r1.ebuild 2525 BLAKE2B 5c544165afffc4669c2fa236cfbcfa299c74f01fa944e9f29d789b44eff2451a4adfef0ce99aa6cf950fd410ea8cad2cf6788ff2945a00aa7c698a3628d3da99 SHA512 8df88dc07b6a21e7573a4ee48c2cfff569462e1373d9653146bf7dec63dd1071f3b83b27a01a7d174ae24f55485008fb76f667f5b317b172a58049f58c83e2a3
1113
EBUILD protobuf-25.2.ebuild 2525 BLAKE2B 56715d3d86d843bd41bfa1e105f0ee57df8bedf465061a28337b148be8a7f693a4f97cd64ec5d365b61797394fbddd760c86c8990055a252dc23a98333cb20c6 SHA512 4294d66c9a9096017543a08972f0689159545efad0e4e6b33e66073d429ed272ee93187832b2d6aa64a189e15f205f8d02f69b0c9c633d5fe28410ceccc81a72
1214
MISC metadata.xml 595 BLAKE2B ba1b916e26b1e53f68e660f03d2e53fea8d22db04e8241ebec3ec20fbb251c2b164cf25d5fb6118423ce7721a822ae2302aab137b0748730e9a6860bf8e65668 SHA512 785e2550621b79b6350e1a6b52ed9992610769885fb29a9e92ee45a35158cc08707a3590dfcbece9ee9a5e16e1abfb614e8186132da7b942f2761b5e6ecfa827
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Copyright 1999-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
inherit cmake-multilib elisp-common toolchain-funcs
7+
8+
if [[ "${PV}" == *9999 ]]; then
9+
inherit git-r3
10+
11+
EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
12+
EGIT_SUBMODULES=()
13+
else
14+
SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15+
KEYWORDS="amd64 arm arm64 x86"
16+
fi
17+
18+
DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
19+
HOMEPAGE="https://protobuf.dev/"
20+
21+
LICENSE="BSD"
22+
SLOT="0/$(ver_cut 1-2).0"
23+
IUSE="emacs examples test zlib"
24+
RESTRICT="!test? ( test )"
25+
26+
BDEPEND="emacs? ( app-editors/emacs:* )"
27+
DEPEND="
28+
>=dev-cpp/abseil-cpp-20230802.0:=[${MULTILIB_USEDEP}]
29+
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
30+
test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
31+
"
32+
RDEPEND="
33+
>=dev-cpp/abseil-cpp-20230802.0:=[${MULTILIB_USEDEP}]
34+
emacs? ( app-editors/emacs:* )
35+
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
36+
"
37+
38+
PATCHES=(
39+
"${FILESDIR}/${PN}-23.3-static_assert-failure.patch"
40+
)
41+
42+
DOCS=( CONTRIBUTORS.txt README.md )
43+
44+
src_configure() {
45+
if tc-ld-is-gold; then
46+
# https://sourceware.org/bugzilla/show_bug.cgi?id=24527
47+
tc-ld-disable-gold
48+
fi
49+
50+
cmake-multilib_src_configure
51+
}
52+
53+
multilib_src_configure() {
54+
local mycmakeargs=(
55+
-Dprotobuf_DISABLE_RTTI=ON
56+
-Dprotobuf_BUILD_EXAMPLES=$(usex examples)
57+
-Dprotobuf_WITH_ZLIB=$(usex zlib)
58+
-Dprotobuf_BUILD_TESTS=$(usex test)
59+
-Dprotobuf_ABSL_PROVIDER=package
60+
)
61+
use test && mycmakeargs+=(-Dprotobuf_USE_EXTERNAL_GTEST=ON)
62+
63+
cmake_src_configure
64+
}
65+
66+
src_compile() {
67+
cmake-multilib_src_compile
68+
69+
if use emacs; then
70+
elisp-compile editors/protobuf-mode.el
71+
fi
72+
}
73+
74+
multilib_src_install_all() {
75+
find "${ED}" -name "*.la" -delete || die
76+
77+
if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then
78+
eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \
79+
"Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}"
80+
die "Please update SLOT variable"
81+
fi
82+
83+
insinto /usr/share/vim/vimfiles/syntax
84+
doins editors/proto.vim
85+
insinto /usr/share/vim/vimfiles/ftdetect
86+
doins "${FILESDIR}/proto.vim"
87+
88+
if use emacs; then
89+
elisp-install ${PN} editors/protobuf-mode.el*
90+
elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
91+
fi
92+
93+
if use examples; then
94+
DOCS+=(examples)
95+
docompress -x /usr/share/doc/${PF}/examples
96+
fi
97+
98+
einstalldocs
99+
}
100+
101+
pkg_postinst() {
102+
use emacs && elisp-site-regen
103+
}
104+
105+
pkg_postrm() {
106+
use emacs && elisp-site-regen
107+
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Copyright 1999-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
inherit cmake-multilib elisp-common toolchain-funcs
7+
8+
if [[ "${PV}" == *9999 ]]; then
9+
inherit git-r3
10+
11+
EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
12+
EGIT_SUBMODULES=()
13+
else
14+
SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15+
KEYWORDS="amd64 arm arm64 x86"
16+
fi
17+
18+
DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
19+
HOMEPAGE="https://protobuf.dev/"
20+
21+
LICENSE="BSD"
22+
SLOT="0/$(ver_cut 1-2).0"
23+
IUSE="emacs examples test zlib"
24+
RESTRICT="!test? ( test )"
25+
26+
BDEPEND="emacs? ( app-editors/emacs:* )"
27+
DEPEND="
28+
>=dev-cpp/abseil-cpp-20230802.0:=[${MULTILIB_USEDEP}]
29+
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
30+
test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
31+
"
32+
RDEPEND="
33+
>=dev-cpp/abseil-cpp-20230802.0:=[${MULTILIB_USEDEP}]
34+
emacs? ( app-editors/emacs:* )
35+
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
36+
"
37+
38+
PATCHES=(
39+
"${FILESDIR}/${PN}-23.3-static_assert-failure.patch"
40+
)
41+
42+
DOCS=( CONTRIBUTORS.txt README.md )
43+
44+
src_configure() {
45+
if tc-ld-is-gold; then
46+
# https://sourceware.org/bugzilla/show_bug.cgi?id=24527
47+
tc-ld-disable-gold
48+
fi
49+
50+
cmake-multilib_src_configure
51+
}
52+
53+
multilib_src_configure() {
54+
local mycmakeargs=(
55+
-Dprotobuf_DISABLE_RTTI=ON
56+
-Dprotobuf_BUILD_EXAMPLES=$(usex examples)
57+
-Dprotobuf_WITH_ZLIB=$(usex zlib)
58+
-Dprotobuf_BUILD_TESTS=$(usex test)
59+
-Dprotobuf_ABSL_PROVIDER=package
60+
)
61+
use test && mycmakeargs+=(-Dprotobuf_USE_EXTERNAL_GTEST=ON)
62+
63+
cmake_src_configure
64+
}
65+
66+
src_compile() {
67+
cmake-multilib_src_compile
68+
69+
if use emacs; then
70+
elisp-compile editors/protobuf-mode.el
71+
fi
72+
}
73+
74+
multilib_src_install_all() {
75+
find "${ED}" -name "*.la" -delete || die
76+
77+
if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then
78+
eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \
79+
"Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}"
80+
die "Please update SLOT variable"
81+
fi
82+
83+
insinto /usr/share/vim/vimfiles/syntax
84+
doins editors/proto.vim
85+
insinto /usr/share/vim/vimfiles/ftdetect
86+
doins "${FILESDIR}/proto.vim"
87+
88+
if use emacs; then
89+
elisp-install ${PN} editors/protobuf-mode.el*
90+
elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
91+
fi
92+
93+
if use examples; then
94+
DOCS+=(examples)
95+
docompress -x /usr/share/doc/${PF}/examples
96+
fi
97+
98+
einstalldocs
99+
}
100+
101+
pkg_postinst() {
102+
use emacs && elisp-site-regen
103+
}
104+
105+
pkg_postrm() {
106+
use emacs && elisp-site-regen
107+
}

0 commit comments

Comments
 (0)