summaryrefslogtreecommitdiff
path: root/dev-libs/protobuf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-10 12:25:06 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-10 12:25:06 +0100
commite810ac4a0e6af9f763f4433863042b34609075a7 (patch)
tree6fe0b3ff24f3b875be1564e273049c1e301d205b /dev-libs/protobuf
parentc218398bbbe70a616790cf146c28c1066b9284bf (diff)
gentoo auto-resync : 10:07:2024 - 12:25:06
Diffstat (limited to 'dev-libs/protobuf')
-rw-r--r--dev-libs/protobuf/Manifest13
-rw-r--r--dev-libs/protobuf/metadata.xml16
-rw-r--r--dev-libs/protobuf/protobuf-22.5-r2.ebuild133
-rw-r--r--dev-libs/protobuf/protobuf-23.4.ebuild126
-rw-r--r--dev-libs/protobuf/protobuf-24.4.ebuild125
-rw-r--r--dev-libs/protobuf/protobuf-25.3.ebuild125
-rw-r--r--dev-libs/protobuf/protobuf-26.1-r2.ebuild125
-rw-r--r--dev-libs/protobuf/protobuf-27.2.ebuild160
-rw-r--r--dev-libs/protobuf/protobuf-9999.ebuild160
9 files changed, 981 insertions, 2 deletions
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index b30eae5ef70b..7c132b6fb832 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -14,10 +14,21 @@ DIST protobuf-21.12.tar.gz 5141166 BLAKE2B 33500612d103afb817062486a741e8e5503f8
DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1
DIST protobuf-22.5.tar.gz 4924661 BLAKE2B d69c73f4ebfddf45fd94b4f5f898faf00256fe674f2cbc0443c60a88d7a0f47fb96f2f6262879927c6da88095b4ea3ee7fd4c471c100bf42a2bae9edf48c07f1 SHA512 058ab2fec5b11007972e6043071056d1944c3b6fe1d31246cddba8eb57686e3b5280f6ad3d58e78940ca63005e74a8de3c72237f9f7c5066548c5a2513ddc584
DIST protobuf-23.3.tar.gz 5043803 BLAKE2B ee2edee230969555c9ef95069c7b1d6c23c3d1f8ea1b2249fb3e9f6fcf63312c6e10e9da65b80629fb08d5fb08d05a19bb9c752c25b892c1e3fd6f18b9279eb3 SHA512 646af367dbc61b42e322cf0b335f360e428b272e2b1f5361b2f17c18d3dc9dddd615e1279436028b1a42275a0beadda37c2c934fc27d6c892131cc8d526d8b3b
+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-26.1.tar.gz 5957903 BLAKE2B 1a7faab2f56aa0995801a80f73a812c7fc38a00af0bf25bdd5eecf7aec27a86a575ea2fb8484787d19c9ac6e46007c9864e79464f529c446f31af732981feed1 SHA512 0363ac09f92d8e040491425d444c8dca0b9b430e02d2dff6e2b28a0c2b2bea0d33a47f50bc9e2e2d4e8e22b65a02009a20c0066fb89c75df93a7b703dda42ed4
+DIST protobuf-27.2.tar.gz 6282174 BLAKE2B 86d12e9f87e8e1c2961ad517115c8689a8dd984722513816d8d626e59a76f5e7a698a90cbf6007daacf66c6053c9ff28108ff113579a442ce61cd221178bda44 SHA512 664c66b62cf1ed0c65d9b910d8e67d4d5d471113697f1b8edf1573cd5c0fc8e850ac53ce984e48e6c6b9cbbefa12f8530058384e7388e65a59c1e46d03772397
EBUILD protobuf-21.12.ebuild 2504 BLAKE2B b90c7eb65835f98825faf41fb70b7edcd40030c5c430be7faf13308a74cbc3576a910b83a73dcf593ebb248392900536b96152ba18d05f532b0632ad637b2ad8 SHA512 454f7104106edd5cbc9c1897cdc57fcef337fef51239d5e8832064a9a049b238bb3d4d549df88369098b26a350b4828131ecda74a65c832cf4aa9b1128445d7b
EBUILD protobuf-21.9.ebuild 4169 BLAKE2B 26d7458698701fc08d93a7fde27933b34d39975ae403531af31a7dfd8471e2ca20d9f471875ba15a88388616c353bb7b6fd29ed1a6d4b94391fccee2f448d4c5 SHA512 32699153aaf64ece98cd694826b6ba01e32af8a278143e8dacbe05a9eb23f37017a40807247eb1809a5be5e6300a922c8758f3e53be166a1d2e5d48735a63fad
EBUILD protobuf-22.5-r1.ebuild 3100 BLAKE2B 61d746f3ee129f4344f171084cb1d7a4891bdc1d44aa2b33f514ae13a58e8b22fe75a98957f4d7c17fe10c8c29ccf7c69415de2198ae9226394e6f47c1a93b26 SHA512 f89421853764065671682b05e1f37fc7e5ecbccc46a9e7ff70b24712645254dd67a6174915ba691f43c76f6122bf4246a556016f2f60b7cf5e30834245ce3e83
+EBUILD protobuf-22.5-r2.ebuild 3159 BLAKE2B 493ce3e4e49606d2b7dfcb0e4f5aab4868cbf9d4f82b37f3e2aae8fc690358537b37dabf45ae4af3da00e262badc75403931ecc453a762d7f330a50c6aa425b4 SHA512 7596d14f23989b3c07fb1a260d73003163b57b98e875631d7bb9c2375e0530ae9d1a989cc124cb1ee47dad07505577ce68bbaf2c7224832b00dde3b8119a2f7b
EBUILD protobuf-23.3-r4.ebuild 2899 BLAKE2B 42978fed39321f2a49835a698b7da09a90ba1413a41fc94540fd6a501354171e3ae8621ee30790ae45d68517aea0fdde9f6f65e857b4781b7cae0495305fa471 SHA512 463f2232375d62a27f4467d8e29987146a4300504e215b918ea993483eb0df3bfe0ab6fa2e09dbbb82dfe40d85e8454b4f865805951233b118ac74fdb307fbf4
+EBUILD protobuf-23.4.ebuild 2980 BLAKE2B ffd3be624f60c7b8a9f0780a4b5d3fc55a05ef2dd30ddaa627d407efeaf898f4cbba219640123afe4a6faf17bc8da8f641792fdac648342c5a3d53fada16921c SHA512 b3cfac2b3fedc6aff77735cc70b09081d4c70484079dbeeb374676a6ba8ea0f7c65ccff69d407536f953f3f442000a8e0f9c86590d05985c78d310e1e1589ecb
+EBUILD protobuf-24.4.ebuild 2915 BLAKE2B 2fd3f84bf7e86b64393fd39962080809ef4d65b9b06928abe03d3755360ac5768ffad5bb132c205e25f5bd3829b09b1b14e7e3e1840895edd99229d5dafa4807 SHA512 91ddec809ffb71f23f5884d37e46dcb3a98c48423712ffe6e45607a114b6054c959dc59990c9c1c5a3b709b21653eb38f05b767bb3fe040740905f29a28bedcb
+EBUILD protobuf-25.3.ebuild 2915 BLAKE2B 75df59e6ca105a529cf582cda4371c26f0b9bf1df94fb11c3b409e1b01fcde43e0705e05212ea630839446aba819c4b8132514383f94fa2aa455b232a3f64eae SHA512 8daaf04ef736d389f634f2366e833e7c6ce40a9e60b022a31df31868b01a282f948d583270827b1714cc7cfacac4cdd0e9971944dc5b3dd823afa4696c4cf1c7
EBUILD protobuf-26.1-r1.ebuild 2722 BLAKE2B 2b4a648933fe23621fdbc67d5a6a7783d7716c1f4cbf72eec5292c3f87006a426a7444744a83d77700e94c2b411c0b5c1983cb1bb1dedd4fe8e4b3ea58b8452b SHA512 7b8cfc2fa64f4dd633ad93da7428ffaeae2cef9aea78f7032c5506abad91ab8f2da91a5598eab47f065419210686afc2a54bc49b3edbaa2801d419857de810e4
-MISC metadata.xml 380 BLAKE2B 5f2f89127d56c14c18bc9ae1957bea29c56ff6663060ea7408842a9b17504418a363fafc93bdb75db5d308c08b5706d4325a5a37c517f29e3ff70a7a8d4a21c7 SHA512 e6f4bbba0b3cf42667a27900c517b2dfff7538b397347adc2a7a9e7b6b55dcc95f6469f85feed795fe02b41dd7adde0e3e40e9f313b978d9a2f60a3522ed1efe
+EBUILD protobuf-26.1-r2.ebuild 2915 BLAKE2B 75df59e6ca105a529cf582cda4371c26f0b9bf1df94fb11c3b409e1b01fcde43e0705e05212ea630839446aba819c4b8132514383f94fa2aa455b232a3f64eae SHA512 8daaf04ef736d389f634f2366e833e7c6ce40a9e60b022a31df31868b01a282f948d583270827b1714cc7cfacac4cdd0e9971944dc5b3dd823afa4696c4cf1c7
+EBUILD protobuf-27.2.ebuild 3693 BLAKE2B 2b069ca4cc38b05606192e9b70065bfb0eee9f2e90259ba0e86b60ceff5252f2699da233408d41d55ae1835c9b82806c6f5228da2196deb2126a33f69b913fbb SHA512 451a13a957a2629aa6c4cdc01bd673189ed52b4019b5b08b4f70c4683be161b6ac139c7aecef0bb42b9b5c56d167b58b8439d8d010987c9499cb44e9cd8c12f4
+EBUILD protobuf-9999.ebuild 3693 BLAKE2B 8afae42032a489c92a8c4c1accd66b8e43a023d431ce0f4e280f05803bcab2bb313e242507284df0cfcc6dd9756a02d78b543dec66891a4165cefb09842cb7b3 SHA512 971352e81516941cbbd7287834cc06d885d358845622ebc69521d76bae82128aec25d207c9a52a97642ea623ff22ea90f67408d0b3ccc4ecf7550a999df1eb36
+MISC metadata.xml 917 BLAKE2B c25c810e47e764843ad71be5eb5ebe617d881e7363ce3206401eb59c6df12969bc22bbedc34f08b0a2fbcf955de5b85aa8e4d3a964c1349f07ed1d0eb344a915 SHA512 baa5737981669f1b28ce32884698a4d91e0f1fbdde6056779307e1a6c85dde8ca36ee47ca3ce8794b996934dfafc5482afbe9532a7f3e17c833c3aef0a330376
diff --git a/dev-libs/protobuf/metadata.xml b/dev-libs/protobuf/metadata.xml
index 8549a8aa96f0..8d3f48cb805e 100644
--- a/dev-libs/protobuf/metadata.xml
+++ b/dev-libs/protobuf/metadata.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>negril.nx+gentoo@gmail.com</email>
+ <name>Paul Zander</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<slots>
<subslots>Soname version number</subslots>
</slots>
@@ -9,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>
diff --git a/dev-libs/protobuf/protobuf-22.5-r2.ebuild b/dev-libs/protobuf/protobuf-22.5-r2.ebuild
new file mode 100644
index 000000000000..b8dbe905360c
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-22.5-r2.ebuild
@@ -0,0 +1,133 @@
+# Copyright 2008-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib elisp-common flag-o-matic toolchain-funcs
+
+ABSEIL_BRANCH="lts_2023_01_25" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules
+
+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=( '-*' )
+
+ 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"
+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:* )
+"
+
+COMMON_DEPEND="
+ dev-libs/jsoncpp
+ >=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}-23.3-disable-32-bit-tests.patch"
+ "${FILESDIR}/${PN}-23.3-static_assert-failure.patch"
+ "${FILESDIR}/${P}-fix-missing-PROTOBUF_EXPORT-for-public-symbols.patch"
+ "${FILESDIR}/${P}-Use-the-same-ABI-for-static-and-shared-libraries-on-.patch"
+)
+
+DOCS=( CONTRIBUTORS.txt README.md )
+
+src_prepare() {
+ eapply_user
+ append-cxxflags -std=c++17
+ 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
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -Dprotobuf_DISABLE_RTTI="yes" # TODO why?
+ -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/dev-libs/protobuf/protobuf-23.4.ebuild b/dev-libs/protobuf/protobuf-23.4.ebuild
new file mode 100644
index 000000000000..87f127940ad0
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-23.4.ebuild
@@ -0,0 +1,126 @@
+# 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
+
+ABSEIL_BRANCH="lts_2023_01_25" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules
+
+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=( '-*' )
+
+ 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"
+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:* )
+"
+
+COMMON_DEPEND="
+ dev-libs/jsoncpp
+ >=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}-23.3-disable-32-bit-tests.patch"
+ "${FILESDIR}/${PN}-23.3-static_assert-failure.patch"
+ "${FILESDIR}/${PN}-23.3-messages_lite-template-instances.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="yes" # TODO why?
+ -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/dev-libs/protobuf/protobuf-24.4.ebuild b/dev-libs/protobuf/protobuf-24.4.ebuild
new file mode 100644
index 000000000000..c3681d98ce72
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-24.4.ebuild
@@ -0,0 +1,125 @@
+# 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
+
+ABSEIL_BRANCH="lts_2023_01_25" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules
+
+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=( '-*' )
+
+ 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"
+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:* )
+"
+
+COMMON_DEPEND="
+ dev-libs/jsoncpp
+ >=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"
+)
+
+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="yes" # TODO why?
+ -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/dev-libs/protobuf/protobuf-25.3.ebuild b/dev-libs/protobuf/protobuf-25.3.ebuild
new file mode 100644
index 000000000000..422310009a83
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-25.3.ebuild
@@ -0,0 +1,125 @@
+# 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
+
+ABSEIL_BRANCH="lts_2023_08_02" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules
+
+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=( '-*' )
+
+ 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"
+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:* )
+"
+
+COMMON_DEPEND="
+ dev-libs/jsoncpp
+ >=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"
+)
+
+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="yes" # TODO why?
+ -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/dev-libs/protobuf/protobuf-26.1-r2.ebuild b/dev-libs/protobuf/protobuf-26.1-r2.ebuild
new file mode 100644
index 000000000000..422310009a83
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-26.1-r2.ebuild
@@ -0,0 +1,125 @@
+# 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
+
+ABSEIL_BRANCH="lts_2023_08_02" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules
+
+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=( '-*' )
+
+ 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"
+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:* )
+"
+
+COMMON_DEPEND="
+ dev-libs/jsoncpp
+ >=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"
+)
+
+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="yes" # TODO why?
+ -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/dev-libs/protobuf/protobuf-27.2.ebuild b/dev-libs/protobuf/protobuf-27.2.ebuild
new file mode 100644
index 000000000000..d9b11f9f0d6a
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-27.2.ebuild
@@ -0,0 +1,160 @@
+# 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
+
+ABSEIL_BRANCH="lts_2023_08_02" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules
+
+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="27.2"
+
+ 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"
+ 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 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
+ >=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"
+)
+
+DOCS=( CONTRIBUTORS.txt README.md )
+
+# src_prepare() {
+# rm "${S}/third_party/utf8_range/" -rf || die
+# 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
+}
+
+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="yes"
+ )
+ 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
+ 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/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild
new file mode 100644
index 000000000000..c2a90ff0480c
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-9999.ebuild
@@ -0,0 +1,160 @@
+# 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
+
+ABSEIL_BRANCH="lts_2023_08_02" # NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules
+
+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/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"
+ 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 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
+ >=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"
+)
+
+DOCS=( CONTRIBUTORS.txt README.md )
+
+# src_prepare() {
+# rm "${S}/third_party/utf8_range/" -rf || die
+# 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
+}
+
+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="yes"
+ )
+ 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
+ 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
+}