* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/
@ 2016-04-07 11:29 Lars Wendler
0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2016-04-07 11:29 UTC (permalink / raw
To: gentoo-commits
commit: afaad641d4914a9abccf4b903e35c25d02dbab89
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 7 11:27:48 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Apr 7 11:29:10 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afaad641
dev-libs/protobuf-c: Bump to version 1.2.1
Package-Manager: portage-2.2.28
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
dev-libs/protobuf-c/Manifest | 1 +
.../files/protobuf-c-1.2.0-no-build-tests.patch | 30 +++++++++++++++++
dev-libs/protobuf-c/protobuf-c-1.2.1.ebuild | 39 ++++++++++++++++++++++
3 files changed, 70 insertions(+)
diff --git a/dev-libs/protobuf-c/Manifest b/dev-libs/protobuf-c/Manifest
index 71d7229..68f389d 100644
--- a/dev-libs/protobuf-c/Manifest
+++ b/dev-libs/protobuf-c/Manifest
@@ -1,3 +1,4 @@
DIST protobuf-c-0.15.tar.gz 500911 SHA256 8fcb538e13a5431c46168fc8f2e6ad2574e2db9b684c0c72b066e24f010a0036 SHA512 a51b9977ca4a6a73dffe92c7f8f5526f5dd3561b5139df290bafe5093d0fd6ace701d9fa1ee92a9dc8394960efd48f739c44ac17a74a7acd8c365d63e6312e9e WHIRLPOOL 3fd2ab0e0008dfabb7d21e30601422fee5b069981d015eff5ada5857621904f339c63f09eedeb6271a8b35a4570e4dad614f58888bfb708e43c5991f6af8568a
DIST protobuf-c-1.0.2.tar.gz 449923 SHA256 db771f7b0e76d5bb14140a50df4a32553288fd3e701b60e90e034e22f411ef76 SHA512 d748712f4216015802ffeff1072266da98ba9d9a4dfdaecd1c1b9d76f15403112b5cc2563a54390653c5eb82d7b51caf4c1f595cf1287bcbb123efb646e12f33 WHIRLPOOL 7a18446fc7ea27c10cbc0393f96859f237fcf29c962e982270b8f4cd10e27366b42cc38d418e973d4295e41e7da522fc577df296063e8f723a51415a6783d48d
DIST protobuf-c-1.1.1.tar.gz 454913 SHA256 09c5bb187b7a8e86bc0ff860f7df86370be9e8661cdb99c1072dcdab0763562c SHA512 9eeb3165ca53c57091503866e2600d675e03d79c22dbd41bd3c4ebf8e569ed147f0b832e8b68dcdaece2f151798e7e0589fdf975e9a04fae9904991e89ea0465 WHIRLPOOL 4e117812916d5f54432edc01437e5c4a35dd953f2da2a94d312ee8ebfba1523e74c13012120532cd1d7bd90a0f0717804e53366f128bd8fc909fffd271044e4f
+DIST protobuf-c-1.2.1.tar.gz 458614 SHA256 846eb4846f19598affdc349d817a8c4c0c68fd940303e6934725c889f16f00bd SHA512 032b82dde333e286a3aff1a621be9e497122d38ce8f337275842a55be083232605387a516cfd4b9a09f8f7caf8817c14e596570352bc6ae495c3a3f15ac00959 WHIRLPOOL f87dc4dd6b7c6a5de964790369aeb88ac4c97f27aaad131b817771374f767cd2967bbf71c91910fe962a8d009fab52d5777b0096ecc0818f720550f3ffdeb06e
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch b/dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch
new file mode 100644
index 0000000..c11e98d
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/518440
+
+avoid compiling tests when we aren't actually testing, especially since it
+requires a compiler to execute which fails when cross-compiling
+
+--- protobuf-c-1.2.0/Makefile.am
++++ protobuf-c-1.2.0/Makefile.am
+@@ -142,7 +142,7 @@
+ t_generated_code2_test_generated_code2_LDADD = \
+ protobuf-c/libprotobuf-c.la
+
+-noinst_PROGRAMS += \
++check_PROGRAMS += \
+ t/generated-code2/cxx-generate-packed-data
+
+ t_generated_code2_cxx_generate_packed_data_SOURCES = \
+@@ -170,13 +170,6 @@
+ t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
+ $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
+
+-BUILT_SOURCES += \
+- t/test.pb-c.c t/test.pb-c.h \
+- t/test-full.pb-c.c t/test-full.pb-c.h \
+- t/test-optimized.pb-c.c t/test-optimized.pb-c.h \
+- t/test-full.pb.cc t/test-full.pb.h \
+- t/generated-code2/test-full-cxx-output.inc
+-
+ t_version_version_SOURCES = \
+ t/version/version.c
+ t_version_version_LDADD = \
diff --git a/dev-libs/protobuf-c/protobuf-c-1.2.1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.2.1.ebuild
new file mode 100644
index 0000000..92b6f73
--- /dev/null
+++ b/dev-libs/protobuf-c/protobuf-c-1.2.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="code generator and runtime libraries to use Protocol Buffers (protobuf) from pure C"
+HOMEPAGE="https://github.com/protobuf-c/protobuf-c/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static-libs test"
+
+RDEPEND=">=dev-libs/protobuf-2.6.0[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? ( ${AUTOTOOLS_DEPEND} )
+ virtual/pkgconfig[${MULTILIB_USEDEP}]"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ default
+ if ! use test ; then
+ eapply "${FILESDIR}"/${PN}-1.2.0-no-build-tests.patch
+ eautoreconf
+ fi
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf "${myeconfargs[@]}"
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/
@ 2017-08-10 7:26 Lars Wendler
0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2017-08-10 7:26 UTC (permalink / raw
To: gentoo-commits
commit: f3c576bdbd7d59250f9316b090a4339e5aa6b4ce
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 10 07:07:34 2017 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Aug 10 07:26:18 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3c576bd
dev-libs/protobuf-c: Bump to version 1.3.0
Package-Manager: Portage-2.3.6, Repoman-2.3.3
dev-libs/protobuf-c/Manifest | 1 +
.../files/protobuf-c-1.3.0-no-build-tests.patch | 30 +++++++++++++++++
dev-libs/protobuf-c/protobuf-c-1.3.0.ebuild | 39 ++++++++++++++++++++++
3 files changed, 70 insertions(+)
diff --git a/dev-libs/protobuf-c/Manifest b/dev-libs/protobuf-c/Manifest
index 517b3d7789f..b4c38ffda63 100644
--- a/dev-libs/protobuf-c/Manifest
+++ b/dev-libs/protobuf-c/Manifest
@@ -1,3 +1,4 @@
DIST protobuf-c-1.0.2.tar.gz 449923 SHA256 db771f7b0e76d5bb14140a50df4a32553288fd3e701b60e90e034e22f411ef76 SHA512 d748712f4216015802ffeff1072266da98ba9d9a4dfdaecd1c1b9d76f15403112b5cc2563a54390653c5eb82d7b51caf4c1f595cf1287bcbb123efb646e12f33 WHIRLPOOL 7a18446fc7ea27c10cbc0393f96859f237fcf29c962e982270b8f4cd10e27366b42cc38d418e973d4295e41e7da522fc577df296063e8f723a51415a6783d48d
DIST protobuf-c-1.1.1.tar.gz 454913 SHA256 09c5bb187b7a8e86bc0ff860f7df86370be9e8661cdb99c1072dcdab0763562c SHA512 9eeb3165ca53c57091503866e2600d675e03d79c22dbd41bd3c4ebf8e569ed147f0b832e8b68dcdaece2f151798e7e0589fdf975e9a04fae9904991e89ea0465 WHIRLPOOL 4e117812916d5f54432edc01437e5c4a35dd953f2da2a94d312ee8ebfba1523e74c13012120532cd1d7bd90a0f0717804e53366f128bd8fc909fffd271044e4f
DIST protobuf-c-1.2.1.tar.gz 458614 SHA256 846eb4846f19598affdc349d817a8c4c0c68fd940303e6934725c889f16f00bd SHA512 032b82dde333e286a3aff1a621be9e497122d38ce8f337275842a55be083232605387a516cfd4b9a09f8f7caf8817c14e596570352bc6ae495c3a3f15ac00959 WHIRLPOOL f87dc4dd6b7c6a5de964790369aeb88ac4c97f27aaad131b817771374f767cd2967bbf71c91910fe962a8d009fab52d5777b0096ecc0818f720550f3ffdeb06e
+DIST protobuf-c-1.3.0.tar.gz 488443 SHA256 5dc9ad7a9b889cf7c8ff6bf72215f1874a90260f60ad4f88acf21bb15d2752a1 SHA512 ba49bf45a9ae93d41f200f4f18c4f9469c63fcc2a2392b3b45f083c378a6876891890448ceba216083ad351aa35f4669cd920973f53e5780de9ec4c8f61279bb WHIRLPOOL 915cb9ace5254721ab0dce009505d0c093032f28d7501fe5cfa4051a7a0b901cfbea8a81bba20c63962514196b24175b9854f27a1a614ac71bc0cdf3f4b22df6
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.3.0-no-build-tests.patch b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-no-build-tests.patch
new file mode 100644
index 00000000000..55116c67e41
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-no-build-tests.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/518440
+
+avoid compiling tests when we aren't actually testing, especially since it
+requires a compiler to execute which fails when cross-compiling
+
+--- protobuf-c-1.3.0/Makefile.am
++++ protobuf-c-1.3.0/Makefile.am
+@@ -150,7 +150,7 @@
+ t_generated_code2_test_generated_code2_LDADD = \
+ protobuf-c/libprotobuf-c.la
+
+-noinst_PROGRAMS += \
++check_PROGRAMS += \
+ t/generated-code2/cxx-generate-packed-data
+
+ t_generated_code2_cxx_generate_packed_data_SOURCES = \
+@@ -178,13 +178,6 @@
+ t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
+ $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
+
+-BUILT_SOURCES += \
+- t/test.pb-c.c t/test.pb-c.h \
+- t/test-full.pb-c.c t/test-full.pb-c.h \
+- t/test-optimized.pb-c.c t/test-optimized.pb-c.h \
+- t/test-full.pb.cc t/test-full.pb.h \
+- t/generated-code2/test-full-cxx-output.inc
+-
+ if BUILD_PROTO3
+
+ check_PROGRAMS += \
diff --git a/dev-libs/protobuf-c/protobuf-c-1.3.0.ebuild b/dev-libs/protobuf-c/protobuf-c-1.3.0.ebuild
new file mode 100644
index 00000000000..4e24a882515
--- /dev/null
+++ b/dev-libs/protobuf-c/protobuf-c-1.3.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Protocol Buffers implementation in C"
+HOMEPAGE="https://github.com/protobuf-c/protobuf-c/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="BSD-2"
+# Subslot == SONAME version
+SLOT="0/1.0.0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static-libs test"
+
+RDEPEND=">=dev-libs/protobuf-2.6.0:0=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? ( ${AUTOTOOLS_DEPEND} )
+ virtual/pkgconfig[${MULTILIB_USEDEP}]"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+ if ! use test ; then
+ eapply "${FILESDIR}"/${PN}-1.3.0-no-build-tests.patch
+ eautoreconf
+ fi
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf "${myeconfargs[@]}"
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/
@ 2018-04-26 15:14 Mike Gilbert
0 siblings, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2018-04-26 15:14 UTC (permalink / raw
To: gentoo-commits
commit: 49f1fe910e68c61e6bc4683ffedb29e4471f4075
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Apr 25 18:25:36 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Apr 26 15:12:17 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49f1fe91
dev-libs/protobuf-c: Delete old versions (<1.3.0-r1).
dev-libs/protobuf-c/Manifest | 3 --
.../files/protobuf-c-1.1.0-no-build-tests.patch | 29 ----------------
.../files/protobuf-c-1.2.0-no-build-tests.patch | 30 -----------------
dev-libs/protobuf-c/protobuf-c-1.0.2-r1.ebuild | 24 -------------
dev-libs/protobuf-c/protobuf-c-1.1.1.ebuild | 33 ------------------
dev-libs/protobuf-c/protobuf-c-1.2.1-r1.ebuild | 39 ----------------------
dev-libs/protobuf-c/protobuf-c-1.3.0.ebuild | 39 ----------------------
7 files changed, 197 deletions(-)
diff --git a/dev-libs/protobuf-c/Manifest b/dev-libs/protobuf-c/Manifest
index 82200c1d0ab..07df6d6f4ad 100644
--- a/dev-libs/protobuf-c/Manifest
+++ b/dev-libs/protobuf-c/Manifest
@@ -1,4 +1 @@
-DIST protobuf-c-1.0.2.tar.gz 449923 BLAKE2B 25db29683bc5129b0aaf015eee8ceea2aa16cf83318f2abc882bcdc51674a5e4ec9499be559cd9f8abaab5f4829d8346104fd4d957f5abca7de9b22f29e1e449 SHA512 d748712f4216015802ffeff1072266da98ba9d9a4dfdaecd1c1b9d76f15403112b5cc2563a54390653c5eb82d7b51caf4c1f595cf1287bcbb123efb646e12f33
-DIST protobuf-c-1.1.1.tar.gz 454913 BLAKE2B a8ac4df0880f3598eee01db2647a1701b47abbff479e311cbe48ea8b47da94a5770ceae6d290c086a21a8f42d77b7b48cc4af470ef43f6e176f3d487f03b0fc3 SHA512 9eeb3165ca53c57091503866e2600d675e03d79c22dbd41bd3c4ebf8e569ed147f0b832e8b68dcdaece2f151798e7e0589fdf975e9a04fae9904991e89ea0465
-DIST protobuf-c-1.2.1.tar.gz 458614 BLAKE2B f0fcb9e43729e6b95e9062f2e2ed86b10e3ba9b03f059d3cd4084787ffca383dbb7d495995ce47193cb3f10635932f015bcf8dbb3e874a04fe2d6ec8ff4a8018 SHA512 032b82dde333e286a3aff1a621be9e497122d38ce8f337275842a55be083232605387a516cfd4b9a09f8f7caf8817c14e596570352bc6ae495c3a3f15ac00959
DIST protobuf-c-1.3.0.tar.gz 488443 BLAKE2B 8eca559ad06aaa5cb09984b3d2e7c5767cd341c2e439b94c2d219226c612992808da091d01f5e0ad5f14e47292d4a621037953b58a5bea827e7c22837234ffe6 SHA512 ba49bf45a9ae93d41f200f4f18c4f9469c63fcc2a2392b3b45f083c378a6876891890448ceba216083ad351aa35f4669cd920973f53e5780de9ec4c8f61279bb
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.1.0-no-build-tests.patch b/dev-libs/protobuf-c/files/protobuf-c-1.1.0-no-build-tests.patch
deleted file mode 100644
index 4e611d71070..00000000000
--- a/dev-libs/protobuf-c/files/protobuf-c-1.1.0-no-build-tests.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://bugs.gentoo.org/518440
-
-avoid compiling tests when we aren't actually testing, especially since it
-requires a compiler to execute which fails when cross-compiling
-
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -135,7 +135,7 @@ t_generated_code2_test_generated_code2_SOURCES = \
- t_generated_code2_test_generated_code2_LDADD = \
- protobuf-c/libprotobuf-c.la
-
--noinst_PROGRAMS += \
-+check_PROGRAMS += \
- t/generated-code2/cxx-generate-packed-data
-
- t_generated_code2_cxx_generate_packed_data_SOURCES = \
-@@ -160,12 +160,6 @@ t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto
- t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
- $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
-
--BUILT_SOURCES += \
-- t/test.pb-c.c t/test.pb-c.h \
-- t/test-full.pb-c.c t/test-full.pb-c.h \
-- t/test-full.pb.cc t/test-full.pb.h \
-- t/generated-code2/test-full-cxx-output.inc
--
- t_version_version_SOURCES = \
- t/version/version.c
- t_version_version_LDADD = \
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch b/dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch
deleted file mode 100644
index c11e98df578..00000000000
--- a/dev-libs/protobuf-c/files/protobuf-c-1.2.0-no-build-tests.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://bugs.gentoo.org/518440
-
-avoid compiling tests when we aren't actually testing, especially since it
-requires a compiler to execute which fails when cross-compiling
-
---- protobuf-c-1.2.0/Makefile.am
-+++ protobuf-c-1.2.0/Makefile.am
-@@ -142,7 +142,7 @@
- t_generated_code2_test_generated_code2_LDADD = \
- protobuf-c/libprotobuf-c.la
-
--noinst_PROGRAMS += \
-+check_PROGRAMS += \
- t/generated-code2/cxx-generate-packed-data
-
- t_generated_code2_cxx_generate_packed_data_SOURCES = \
-@@ -170,13 +170,6 @@
- t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
- $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
-
--BUILT_SOURCES += \
-- t/test.pb-c.c t/test.pb-c.h \
-- t/test-full.pb-c.c t/test-full.pb-c.h \
-- t/test-optimized.pb-c.c t/test-optimized.pb-c.h \
-- t/test-full.pb.cc t/test-full.pb.h \
-- t/generated-code2/test-full-cxx-output.inc
--
- t_version_version_SOURCES = \
- t/version/version.c
- t_version_version_LDADD = \
diff --git a/dev-libs/protobuf-c/protobuf-c-1.0.2-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.0.2-r1.ebuild
deleted file mode 100644
index fc9d7452ffa..00000000000
--- a/dev-libs/protobuf-c/protobuf-c-1.0.2-r1.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit autotools-multilib
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Protocol Buffers implementation in C"
-HOMEPAGE="https://github.com/protobuf-c/protobuf-c/"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="amd64 arm ppc ppc64 x86"
-IUSE="static-libs"
-
-RDEPEND=">=dev-libs/protobuf-2.5.0-r2[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}
- virtual/pkgconfig[${MULTILIB_USEDEP}]"
-
-S=${WORKDIR}/${MY_P}
diff --git a/dev-libs/protobuf-c/protobuf-c-1.1.1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.1.1.ebuild
deleted file mode 100644
index 00dcc508cf7..00000000000
--- a/dev-libs/protobuf-c/protobuf-c-1.1.1.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-inherit autotools-multilib
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Protocol Buffers implementation in C"
-HOMEPAGE="https://github.com/protobuf-c/protobuf-c/"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86"
-IUSE="static-libs test"
-
-RDEPEND=">=dev-libs/protobuf-2.6.0[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}
- test? ( ${AUTOTOOLS_DEPEND} )
- virtual/pkgconfig[${MULTILIB_USEDEP}]"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- if ! use test ; then
- epatch "${FILESDIR}"/${PN}-1.1.0-no-build-tests.patch
- AUTOTOOLS_AUTORECONF=true
- fi
- autotools-multilib_src_prepare
-}
diff --git a/dev-libs/protobuf-c/protobuf-c-1.2.1-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.2.1-r1.ebuild
deleted file mode 100644
index 7004d26b7e1..00000000000
--- a/dev-libs/protobuf-c/protobuf-c-1.2.1-r1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools multilib-minimal
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="Protocol Buffers implementation in C"
-HOMEPAGE="https://github.com/protobuf-c/protobuf-c/"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
-
-LICENSE="BSD-2"
-# Subslot == SONAME version
-SLOT="0/1.0.0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="static-libs test"
-
-RDEPEND=">=dev-libs/protobuf-2.6.0:0=[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}
- test? ( ${AUTOTOOLS_DEPEND} )
- virtual/pkgconfig[${MULTILIB_USEDEP}]"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- default
- if ! use test ; then
- eapply "${FILESDIR}"/${PN}-1.2.0-no-build-tests.patch
- eautoreconf
- fi
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" \
- econf "${myeconfargs[@]}"
-}
diff --git a/dev-libs/protobuf-c/protobuf-c-1.3.0.ebuild b/dev-libs/protobuf-c/protobuf-c-1.3.0.ebuild
deleted file mode 100644
index 4e24a882515..00000000000
--- a/dev-libs/protobuf-c/protobuf-c-1.3.0.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools multilib-minimal
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="Protocol Buffers implementation in C"
-HOMEPAGE="https://github.com/protobuf-c/protobuf-c/"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
-
-LICENSE="BSD-2"
-# Subslot == SONAME version
-SLOT="0/1.0.0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="static-libs test"
-
-RDEPEND=">=dev-libs/protobuf-2.6.0:0=[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}
- test? ( ${AUTOTOOLS_DEPEND} )
- virtual/pkgconfig[${MULTILIB_USEDEP}]"
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
- default
- if ! use test ; then
- eapply "${FILESDIR}"/${PN}-1.3.0-no-build-tests.patch
- eautoreconf
- fi
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" \
- econf "${myeconfargs[@]}"
-}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/
@ 2018-07-07 2:03 Mike Gilbert
0 siblings, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2018-07-07 2:03 UTC (permalink / raw
To: gentoo-commits
commit: 8ddedb2a6194622a89c003dfdb9bb2a4452ca9e8
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Jul 6 21:19:50 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jul 7 02:02:56 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ddedb2a
dev-libs/protobuf-c: Fix building with >=dev-libs/protobuf-3.6.0.
.../files/protobuf-c-1.3.0-protobuf-3.6.patch | 202 +++++++++++++++++++++
dev-libs/protobuf-c/protobuf-c-1.3.0-r1.ebuild | 5 +-
2 files changed, 206 insertions(+), 1 deletion(-)
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.3.0-protobuf-3.6.patch b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-protobuf-3.6.patch
new file mode 100644
index 00000000000..d6d8ffe9325
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-protobuf-3.6.patch
@@ -0,0 +1,202 @@
+https://github.com/protobuf-c/protobuf-c/pull/309
+https://github.com/protobuf-c/protobuf-c/pull/328
+
+--- /protoc-c/c_field.cc
++++ /protoc-c/c_field.cc
+@@ -189,7 +189,7 @@
+ FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor)
+ : descriptor_(descriptor),
+ field_generators_(
+- new scoped_ptr<FieldGenerator>[descriptor->field_count()]) {
++ new std::unique_ptr<FieldGenerator>[descriptor->field_count()]) {
+ // Construct all the FieldGenerators.
+ for (int i = 0; i < descriptor->field_count(); i++) {
+ field_generators_[i].reset(MakeGenerator(descriptor->field(i)));
+--- /protoc-c/c_field.h
++++ /protoc-c/c_field.h
+@@ -117,7 +117,7 @@
+
+ private:
+ const Descriptor* descriptor_;
+- scoped_array<scoped_ptr<FieldGenerator> > field_generators_;
++ std::unique_ptr<std::unique_ptr<FieldGenerator>[] > field_generators_;
+
+ static FieldGenerator* MakeGenerator(const FieldDescriptor* field);
+
+--- /protoc-c/c_file.cc
++++ /protoc-c/c_file.cc
+@@ -83,13 +83,13 @@
+ const string& dllexport_decl)
+ : file_(file),
+ message_generators_(
+- new scoped_ptr<MessageGenerator>[file->message_type_count()]),
++ new std::unique_ptr<MessageGenerator>[file->message_type_count()]),
+ enum_generators_(
+- new scoped_ptr<EnumGenerator>[file->enum_type_count()]),
++ new std::unique_ptr<EnumGenerator>[file->enum_type_count()]),
+ service_generators_(
+- new scoped_ptr<ServiceGenerator>[file->service_count()]),
++ new std::unique_ptr<ServiceGenerator>[file->service_count()]),
+ extension_generators_(
+- new scoped_ptr<ExtensionGenerator>[file->extension_count()]) {
++ new std::unique_ptr<ExtensionGenerator>[file->extension_count()]) {
+
+ for (int i = 0; i < file->message_type_count(); i++) {
+ message_generators_[i].reset(
+--- /protoc-c/c_file.h
++++ /protoc-c/c_file.h
+@@ -98,13 +98,13 @@
+ private:
+ const FileDescriptor* file_;
+
+- scoped_array<scoped_ptr<MessageGenerator> > message_generators_;
+- scoped_array<scoped_ptr<EnumGenerator> > enum_generators_;
+- scoped_array<scoped_ptr<ServiceGenerator> > service_generators_;
+- scoped_array<scoped_ptr<ExtensionGenerator> > extension_generators_;
++ std::unique_ptr<std::unique_ptr<MessageGenerator>[] > message_generators_;
++ std::unique_ptr<std::unique_ptr<EnumGenerator>[] > enum_generators_;
++ std::unique_ptr<std::unique_ptr<ServiceGenerator>[] > service_generators_;
++ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[] > extension_generators_;
+
+ // E.g. if the package is foo.bar, package_parts_ is {"foo", "bar"}.
+- vector<string> package_parts_;
++ std::vector<string> package_parts_;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
+ };
+--- /protoc-c/c_generator.cc
++++ /protoc-c/c_generator.cc
+@@ -80,13 +80,13 @@
+ // "foo=bar,baz,qux=corge"
+ // parses to the pairs:
+ // ("foo", "bar"), ("baz", ""), ("qux", "corge")
+-void ParseOptions(const string& text, vector<pair<string, string> >* output) {
+- vector<string> parts;
++void ParseOptions(const string& text, std::vector<std::pair<string, string> >* output) {
++ std::vector<string> parts;
+ SplitStringUsing(text, ",", &parts);
+
+ for (unsigned i = 0; i < parts.size(); i++) {
+ string::size_type equals_pos = parts[i].find_first_of('=');
+- pair<string, string> value;
++ std::pair<string, string> value;
+ if (equals_pos == string::npos) {
+ value.first = parts[i];
+ value.second = "";
+@@ -105,7 +105,7 @@
+ const string& parameter,
+ OutputDirectory* output_directory,
+ string* error) const {
+- vector<pair<string, string> > options;
++ std::vector<std::pair<string, string> > options;
+ ParseOptions(parameter, &options);
+
+ // -----------------------------------------------------------------
+@@ -149,7 +149,7 @@
+
+ // Generate header.
+ {
+- scoped_ptr<io::ZeroCopyOutputStream> output(
++ std::unique_ptr<io::ZeroCopyOutputStream> output(
+ output_directory->Open(basename + ".h"));
+ io::Printer printer(output.get(), '$');
+ file_generator.GenerateHeader(&printer);
+@@ -157,7 +157,7 @@
+
+ // Generate cc file.
+ {
+- scoped_ptr<io::ZeroCopyOutputStream> output(
++ std::unique_ptr<io::ZeroCopyOutputStream> output(
+ output_directory->Open(basename + ".c"));
+ io::Printer printer(output.get(), '$');
+ file_generator.GenerateSource(&printer);
+--- /protoc-c/c_helpers.cc
++++ /protoc-c/c_helpers.cc
+@@ -177,7 +177,7 @@
+ }
+
+ string FullNameToLower(const string &full_name) {
+- vector<string> pieces;
++ std::vector<string> pieces;
+ SplitStringUsing(full_name, ".", &pieces);
+ string rv = "";
+ for (unsigned i = 0; i < pieces.size(); i++) {
+@@ -188,7 +188,7 @@
+ return rv;
+ }
+ string FullNameToUpper(const string &full_name) {
+- vector<string> pieces;
++ std::vector<string> pieces;
+ SplitStringUsing(full_name, ".", &pieces);
+ string rv = "";
+ for (unsigned i = 0; i < pieces.size(); i++) {
+@@ -199,7 +199,7 @@
+ return rv;
+ }
+ string FullNameToC(const string &full_name) {
+- vector<string> pieces;
++ std::vector<string> pieces;
+ SplitStringUsing(full_name, ".", &pieces);
+ string rv = "";
+ for (unsigned i = 0; i < pieces.size(); i++) {
+@@ -214,7 +214,7 @@
+ {
+ if (!comment.empty())
+ {
+- vector<string> comment_lines;
++ std::vector<string> comment_lines;
+ SplitStringUsing (comment, "\r\n", &comment_lines);
+ printer->Print ("/*\n");
+ for (int i = 0; i < comment_lines.size(); i++)
+@@ -503,8 +503,8 @@
+
+ void SplitStringUsing(const string& full,
+ const char* delim,
+- vector<string>* result) {
+- std::back_insert_iterator< vector<string> > it(*result);
++ std::vector<string>* result) {
++ std::back_insert_iterator< std::vector<string> > it(*result);
+ SplitStringToIteratorUsing(full, delim, it);
+ }
+
+@@ -559,7 +559,7 @@
+ }
+ string CEscape(const string& src) {
+ const int dest_length = src.size() * 4 + 1; // Maximum possible expansion
+- scoped_array<char> dest(new char[dest_length]);
++ std::unique_ptr<char[]> dest(new char[dest_length]);
+ const int len = CEscapeInternal(src.data(), src.size(),
+ dest.get(), dest_length, false);
+ GOOGLE_DCHECK_GE(len, 0);
+--- /protoc-c/c_message.cc
++++ /protoc-c/c_message.cc
+@@ -83,11 +83,11 @@
+ : descriptor_(descriptor),
+ dllexport_decl_(dllexport_decl),
+ field_generators_(descriptor),
+- nested_generators_(new scoped_ptr<MessageGenerator>[
++ nested_generators_(new std::unique_ptr<MessageGenerator>[
+ descriptor->nested_type_count()]),
+- enum_generators_(new scoped_ptr<EnumGenerator>[
++ enum_generators_(new std::unique_ptr<EnumGenerator>[
+ descriptor->enum_type_count()]),
+- extension_generators_(new scoped_ptr<ExtensionGenerator>[
++ extension_generators_(new std::unique_ptr<ExtensionGenerator>[
+ descriptor->extension_count()]) {
+
+ for (int i = 0; i < descriptor->nested_type_count(); i++) {
+--- /protoc-c/c_message.h
++++ /protoc-c/c_message.h
+@@ -126,9 +126,9 @@
+ const Descriptor* descriptor_;
+ string dllexport_decl_;
+ FieldGeneratorMap field_generators_;
+- scoped_array<scoped_ptr<MessageGenerator> > nested_generators_;
+- scoped_array<scoped_ptr<EnumGenerator> > enum_generators_;
+- scoped_array<scoped_ptr<ExtensionGenerator> > extension_generators_;
++ std::unique_ptr<std::unique_ptr<MessageGenerator>[] > nested_generators_;
++ std::unique_ptr<std::unique_ptr<EnumGenerator>[] > enum_generators_;
++ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[] > extension_generators_;
+
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
+ };
diff --git a/dev-libs/protobuf-c/protobuf-c-1.3.0-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.3.0-r1.ebuild
index 1d5c6ad3dce..260f81c9689 100644
--- a/dev-libs/protobuf-c/protobuf-c-1.3.0-r1.ebuild
+++ b/dev-libs/protobuf-c/protobuf-c-1.3.0-r1.ebuild
@@ -23,7 +23,10 @@ DEPEND="${RDEPEND}
test? ( ${AUTOTOOLS_DEPEND} )
virtual/pkgconfig[${MULTILIB_USEDEP}]"
-PATCHES=( "${FILESDIR}"/${PN}-1.3.0-restore-protobuf-2-compatibility.patch )
+PATCHES=(
+ "${FILESDIR}/${P}-restore-protobuf-2-compatibility.patch"
+ "${FILESDIR}/${P}-protobuf-3.6.patch"
+)
S="${WORKDIR}/${MY_P}"
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/
@ 2019-05-05 19:05 Mike Gilbert
0 siblings, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2019-05-05 19:05 UTC (permalink / raw
To: gentoo-commits
commit: 337f0097753cf1c23aadd57dff1a561f6c66f3ed
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sun May 5 02:09:12 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun May 5 19:04:01 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=337f0097
dev-libs/protobuf-c: Delete old version (1.3.0-r1).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/protobuf-c-1.3.0-protobuf-3.6.patch | 202 ---------------------
...-c-1.3.0-restore-protobuf-2-compatibility.patch | 33 ----
dev-libs/protobuf-c/protobuf-c-1.3.0-r1.ebuild | 45 -----
3 files changed, 280 deletions(-)
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.3.0-protobuf-3.6.patch b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-protobuf-3.6.patch
deleted file mode 100644
index d6d8ffe9325..00000000000
--- a/dev-libs/protobuf-c/files/protobuf-c-1.3.0-protobuf-3.6.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-https://github.com/protobuf-c/protobuf-c/pull/309
-https://github.com/protobuf-c/protobuf-c/pull/328
-
---- /protoc-c/c_field.cc
-+++ /protoc-c/c_field.cc
-@@ -189,7 +189,7 @@
- FieldGeneratorMap::FieldGeneratorMap(const Descriptor* descriptor)
- : descriptor_(descriptor),
- field_generators_(
-- new scoped_ptr<FieldGenerator>[descriptor->field_count()]) {
-+ new std::unique_ptr<FieldGenerator>[descriptor->field_count()]) {
- // Construct all the FieldGenerators.
- for (int i = 0; i < descriptor->field_count(); i++) {
- field_generators_[i].reset(MakeGenerator(descriptor->field(i)));
---- /protoc-c/c_field.h
-+++ /protoc-c/c_field.h
-@@ -117,7 +117,7 @@
-
- private:
- const Descriptor* descriptor_;
-- scoped_array<scoped_ptr<FieldGenerator> > field_generators_;
-+ std::unique_ptr<std::unique_ptr<FieldGenerator>[] > field_generators_;
-
- static FieldGenerator* MakeGenerator(const FieldDescriptor* field);
-
---- /protoc-c/c_file.cc
-+++ /protoc-c/c_file.cc
-@@ -83,13 +83,13 @@
- const string& dllexport_decl)
- : file_(file),
- message_generators_(
-- new scoped_ptr<MessageGenerator>[file->message_type_count()]),
-+ new std::unique_ptr<MessageGenerator>[file->message_type_count()]),
- enum_generators_(
-- new scoped_ptr<EnumGenerator>[file->enum_type_count()]),
-+ new std::unique_ptr<EnumGenerator>[file->enum_type_count()]),
- service_generators_(
-- new scoped_ptr<ServiceGenerator>[file->service_count()]),
-+ new std::unique_ptr<ServiceGenerator>[file->service_count()]),
- extension_generators_(
-- new scoped_ptr<ExtensionGenerator>[file->extension_count()]) {
-+ new std::unique_ptr<ExtensionGenerator>[file->extension_count()]) {
-
- for (int i = 0; i < file->message_type_count(); i++) {
- message_generators_[i].reset(
---- /protoc-c/c_file.h
-+++ /protoc-c/c_file.h
-@@ -98,13 +98,13 @@
- private:
- const FileDescriptor* file_;
-
-- scoped_array<scoped_ptr<MessageGenerator> > message_generators_;
-- scoped_array<scoped_ptr<EnumGenerator> > enum_generators_;
-- scoped_array<scoped_ptr<ServiceGenerator> > service_generators_;
-- scoped_array<scoped_ptr<ExtensionGenerator> > extension_generators_;
-+ std::unique_ptr<std::unique_ptr<MessageGenerator>[] > message_generators_;
-+ std::unique_ptr<std::unique_ptr<EnumGenerator>[] > enum_generators_;
-+ std::unique_ptr<std::unique_ptr<ServiceGenerator>[] > service_generators_;
-+ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[] > extension_generators_;
-
- // E.g. if the package is foo.bar, package_parts_ is {"foo", "bar"}.
-- vector<string> package_parts_;
-+ std::vector<string> package_parts_;
-
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
- };
---- /protoc-c/c_generator.cc
-+++ /protoc-c/c_generator.cc
-@@ -80,13 +80,13 @@
- // "foo=bar,baz,qux=corge"
- // parses to the pairs:
- // ("foo", "bar"), ("baz", ""), ("qux", "corge")
--void ParseOptions(const string& text, vector<pair<string, string> >* output) {
-- vector<string> parts;
-+void ParseOptions(const string& text, std::vector<std::pair<string, string> >* output) {
-+ std::vector<string> parts;
- SplitStringUsing(text, ",", &parts);
-
- for (unsigned i = 0; i < parts.size(); i++) {
- string::size_type equals_pos = parts[i].find_first_of('=');
-- pair<string, string> value;
-+ std::pair<string, string> value;
- if (equals_pos == string::npos) {
- value.first = parts[i];
- value.second = "";
-@@ -105,7 +105,7 @@
- const string& parameter,
- OutputDirectory* output_directory,
- string* error) const {
-- vector<pair<string, string> > options;
-+ std::vector<std::pair<string, string> > options;
- ParseOptions(parameter, &options);
-
- // -----------------------------------------------------------------
-@@ -149,7 +149,7 @@
-
- // Generate header.
- {
-- scoped_ptr<io::ZeroCopyOutputStream> output(
-+ std::unique_ptr<io::ZeroCopyOutputStream> output(
- output_directory->Open(basename + ".h"));
- io::Printer printer(output.get(), '$');
- file_generator.GenerateHeader(&printer);
-@@ -157,7 +157,7 @@
-
- // Generate cc file.
- {
-- scoped_ptr<io::ZeroCopyOutputStream> output(
-+ std::unique_ptr<io::ZeroCopyOutputStream> output(
- output_directory->Open(basename + ".c"));
- io::Printer printer(output.get(), '$');
- file_generator.GenerateSource(&printer);
---- /protoc-c/c_helpers.cc
-+++ /protoc-c/c_helpers.cc
-@@ -177,7 +177,7 @@
- }
-
- string FullNameToLower(const string &full_name) {
-- vector<string> pieces;
-+ std::vector<string> pieces;
- SplitStringUsing(full_name, ".", &pieces);
- string rv = "";
- for (unsigned i = 0; i < pieces.size(); i++) {
-@@ -188,7 +188,7 @@
- return rv;
- }
- string FullNameToUpper(const string &full_name) {
-- vector<string> pieces;
-+ std::vector<string> pieces;
- SplitStringUsing(full_name, ".", &pieces);
- string rv = "";
- for (unsigned i = 0; i < pieces.size(); i++) {
-@@ -199,7 +199,7 @@
- return rv;
- }
- string FullNameToC(const string &full_name) {
-- vector<string> pieces;
-+ std::vector<string> pieces;
- SplitStringUsing(full_name, ".", &pieces);
- string rv = "";
- for (unsigned i = 0; i < pieces.size(); i++) {
-@@ -214,7 +214,7 @@
- {
- if (!comment.empty())
- {
-- vector<string> comment_lines;
-+ std::vector<string> comment_lines;
- SplitStringUsing (comment, "\r\n", &comment_lines);
- printer->Print ("/*\n");
- for (int i = 0; i < comment_lines.size(); i++)
-@@ -503,8 +503,8 @@
-
- void SplitStringUsing(const string& full,
- const char* delim,
-- vector<string>* result) {
-- std::back_insert_iterator< vector<string> > it(*result);
-+ std::vector<string>* result) {
-+ std::back_insert_iterator< std::vector<string> > it(*result);
- SplitStringToIteratorUsing(full, delim, it);
- }
-
-@@ -559,7 +559,7 @@
- }
- string CEscape(const string& src) {
- const int dest_length = src.size() * 4 + 1; // Maximum possible expansion
-- scoped_array<char> dest(new char[dest_length]);
-+ std::unique_ptr<char[]> dest(new char[dest_length]);
- const int len = CEscapeInternal(src.data(), src.size(),
- dest.get(), dest_length, false);
- GOOGLE_DCHECK_GE(len, 0);
---- /protoc-c/c_message.cc
-+++ /protoc-c/c_message.cc
-@@ -83,11 +83,11 @@
- : descriptor_(descriptor),
- dllexport_decl_(dllexport_decl),
- field_generators_(descriptor),
-- nested_generators_(new scoped_ptr<MessageGenerator>[
-+ nested_generators_(new std::unique_ptr<MessageGenerator>[
- descriptor->nested_type_count()]),
-- enum_generators_(new scoped_ptr<EnumGenerator>[
-+ enum_generators_(new std::unique_ptr<EnumGenerator>[
- descriptor->enum_type_count()]),
-- extension_generators_(new scoped_ptr<ExtensionGenerator>[
-+ extension_generators_(new std::unique_ptr<ExtensionGenerator>[
- descriptor->extension_count()]) {
-
- for (int i = 0; i < descriptor->nested_type_count(); i++) {
---- /protoc-c/c_message.h
-+++ /protoc-c/c_message.h
-@@ -126,9 +126,9 @@
- const Descriptor* descriptor_;
- string dllexport_decl_;
- FieldGeneratorMap field_generators_;
-- scoped_array<scoped_ptr<MessageGenerator> > nested_generators_;
-- scoped_array<scoped_ptr<EnumGenerator> > enum_generators_;
-- scoped_array<scoped_ptr<ExtensionGenerator> > extension_generators_;
-+ std::unique_ptr<std::unique_ptr<MessageGenerator>[] > nested_generators_;
-+ std::unique_ptr<std::unique_ptr<EnumGenerator>[] > enum_generators_;
-+ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[] > extension_generators_;
-
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
- };
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.3.0-restore-protobuf-2-compatibility.patch b/dev-libs/protobuf-c/files/protobuf-c-1.3.0-restore-protobuf-2-compatibility.patch
deleted file mode 100644
index 962341b6540..00000000000
--- a/dev-libs/protobuf-c/files/protobuf-c-1.3.0-restore-protobuf-2-compatibility.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 4302266b45303094616685c7997a6e6015ddadba Mon Sep 17 00:00:00 2001
-From: Robert Edmonds <edmonds@users.noreply.github.com>
-Date: Mon, 7 Aug 2017 12:31:55 -0400
-Subject: [PATCH] Restore protobuf-2.x compatibility
-
-The change in commit 712154b912de824741381c0bb26c2fbed54515a3 ("Bump
-minimum required header version for proto3 syntax") uses functionality
-only exposed by protobuf-3.x, breaking the build when compiling against
-protobuf-2.x.
-
-Since we still want to support building against protobuf-2.x, this
-commit makes the proto3 syntax check in the file generator dependent on
-building against protobuf-3.x.
----
- protoc-c/c_file.cc | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/protoc-c/c_file.cc b/protoc-c/c_file.cc
-index 9851768..0f1d770 100644
---- a/protoc-c/c_file.cc
-+++ b/protoc-c/c_file.cc
-@@ -120,9 +120,11 @@ void FileGenerator::GenerateHeader(io::Printer* printer) {
- string filename_identifier = FilenameIdentifier(file_->name());
-
- int min_header_version = 1000000;
-+#if defined(HAVE_PROTO3)
- if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) {
- min_header_version = 1003000;
- }
-+#endif
-
- // Generate top of header.
- printer->Print(
diff --git a/dev-libs/protobuf-c/protobuf-c-1.3.0-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.3.0-r1.ebuild
deleted file mode 100644
index bed34d3628b..00000000000
--- a/dev-libs/protobuf-c/protobuf-c-1.3.0-r1.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools multilib-minimal
-
-MY_PV="${PV/_/-}"
-MY_P="${PN}-${MY_PV}"
-
-DESCRIPTION="Protocol Buffers implementation in C"
-HOMEPAGE="https://github.com/protobuf-c/protobuf-c"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
-
-LICENSE="BSD-2"
-# Subslot == SONAME version
-SLOT="0/1.0.0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86"
-IUSE="static-libs test"
-
-RDEPEND=">=dev-libs/protobuf-2.6.0:0=[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}
- virtual/pkgconfig[${MULTILIB_USEDEP}]"
-
-PATCHES=(
- "${FILESDIR}/${P}-restore-protobuf-2-compatibility.patch"
- "${FILESDIR}/${P}-protobuf-3.6.patch"
-)
-
-S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
- default
- if ! use test; then
- eapply "${FILESDIR}"/${PN}-1.3.0-no-build-tests.patch
- fi
-
- eautoreconf
-}
-
-multilib_src_configure() {
- ECONF_SOURCE="${S}" \
- econf \
- $(use_enable static-libs static)
-}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/
@ 2021-11-04 21:04 Sam James
0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2021-11-04 21:04 UTC (permalink / raw
To: gentoo-commits
commit: 636a457ddfdef16faef6d374298123bc4cee5438
Author: John Duncan <1i5t5.duncan <AT> cox <DOT> net>
AuthorDate: Thu Nov 4 21:03:22 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov 4 21:03:57 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=636a457d
dev-libs/protobuf-c: fix include path
Closes: https://bugs.gentoo.org/818775
Signed-off-by: John Duncan <1i5t5.duncan <AT> cox.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/protobuf-c-1.4.0-include-path.patch | 105 +++++++++++++++++++++
dev-libs/protobuf-c/protobuf-c-1.4.0-r1.ebuild | 4 +
2 files changed, 109 insertions(+)
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.4.0-include-path.patch b/dev-libs/protobuf-c/files/protobuf-c-1.4.0-include-path.patch
new file mode 100644
index 00000000000..ae3fa26e6ab
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.4.0-include-path.patch
@@ -0,0 +1,105 @@
+https://bugs.gentoo.org/818775
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -111,7 +111,7 @@ protoc_c_protoc_gen_c_LDADD = \
+ -lprotoc
+
+ protobuf-c/protobuf-c.pb.cc protobuf-c/protobuf-c.pb.h: @PROTOC@ $(top_srcdir)/protobuf-c/protobuf-c.proto
+- $(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/protobuf-c/protobuf-c.proto
++ $(AM_V_GEN)@PROTOC@ -I@includedir@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/protobuf-c/protobuf-c.proto
+
+ BUILT_SOURCES += \
+ protobuf-c/protobuf-c.pb.cc \
+@@ -174,16 +174,16 @@ t_generated_code2_cxx_generate_packed_da
+ $(protobuf_LIBS)
+
+ t/test.pb-c.c t/test.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto
+
+ t/test-optimized.pb-c.c t/test-optimized.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-optimized.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-optimized.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-optimized.proto
+
+ t/test-full.pb-c.c t/test-full.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-full.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
+
+ t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto
+- $(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
++ $(AM_V_GEN)@PROTOC@ -I@includedir@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto
+
+ t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT)
+ $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc
+@@ -214,7 +214,7 @@ t_generated_code3_test_generated_code3_S
+ t/test-proto3.pb-c.c
+
+ t/test-proto3.pb-c.c t/test-proto3.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-proto3.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-proto3.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-proto3.proto
+
+ BUILT_SOURCES += \
+ t/test-proto3.pb-c.c t/test-proto3.pb-c.h
+@@ -237,7 +237,7 @@ t_issue204_issue204_SOURCES = \
+ t_issue204_issue204_LDADD = \
+ protobuf-c/libprotobuf-c.la
+ t/issue204/issue204.pb-c.c t/issue204/issue204.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/issue204/issue204.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue204/issue204.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue204/issue204.proto
+ BUILT_SOURCES += \
+ t/issue204/issue204.pb-c.c t/issue204/issue204.pb-c.h
+ EXTRA_DIST += \
+@@ -254,7 +254,7 @@ t_issue220_issue220_SOURCES = \
+ t_issue220_issue220_LDADD = \
+ protobuf-c/libprotobuf-c.la
+ t/issue220/issue220.pb-c.c t/issue220/issue220.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/issue220/issue220.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue220/issue220.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue220/issue220.proto
+ BUILT_SOURCES += \
+ t/issue220/issue220.pb-c.c t/issue220/issue220.pb-c.h
+ EXTRA_DIST += \
+@@ -271,7 +271,7 @@ t_issue251_issue251_SOURCES = \
+ t_issue251_issue251_LDADD = \
+ protobuf-c/libprotobuf-c.la
+ t/issue251/issue251.pb-c.c t/issue251/issue251.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/issue251/issue251.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue251/issue251.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue251/issue251.proto
+ BUILT_SOURCES += \
+ t/issue251/issue251.pb-c.c t/issue251/issue251.pb-c.h
+ EXTRA_DIST += \
+@@ -289,14 +289,14 @@ t_issue330_issue330_SOURCES = \
+ t_issue330_issue330_LDADD = \
+ protobuf-c/libprotobuf-c.la
+ t/issue330/issue330.pb-c.c t/issue330/issue330.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/issue330/issue330.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue330/issue330.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue330/issue330.proto
+ BUILT_SOURCES += \
+ t/issue330/issue330.pb-c.c t/issue330/issue330.pb-c.h
+
+ t_issue330_issue330_SOURCES += \
+ t/issue389/issue389.pb-c.c # Tack onto issue330 since there is no need for a separate binary here
+ t/issue389/issue389.pb-c.c t/issue389/issue389.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/issue389/issue389.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue389/issue389.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue389/issue389.proto
+ BUILT_SOURCES += \
+ t/issue389/issue389.pb-c.c t/issue389/issue389.pb-c.h
+ EXTRA_DIST += \
+@@ -312,7 +312,7 @@ t_issue440_issue440_SOURCES = \
+ t_issue440_issue440_LDADD = \
+ protobuf-c/libprotobuf-c.la
+ t/issue440/issue440.pb-c.c t/issue440/issue440.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/issue440/issue440.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue440/issue440.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue440/issue440.proto
+ BUILT_SOURCES += \
+ t/issue440/issue440.pb-c.c t/issue440/issue440.pb-c.h
+ EXTRA_DIST += \
+@@ -332,7 +332,7 @@ t_issue375_issue375_SOURCES = \
+ t_issue375_issue375_LDADD = \
+ protobuf-c/libprotobuf-c.la
+ t/issue375/issue375.pb-c.c t/issue375/issue375.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/issue375/issue375.proto
+- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue375/issue375.proto
++ $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I@includedir@ -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/issue375/issue375.proto
+ BUILT_SOURCES += \
+ t/issue375/issue375.pb-c.c t/issue375/issue375.pb-c.h
+ EXTRA_DIST += \
diff --git a/dev-libs/protobuf-c/protobuf-c-1.4.0-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.4.0-r1.ebuild
index b14451d4492..7a7d74d82d1 100644
--- a/dev-libs/protobuf-c/protobuf-c-1.4.0-r1.ebuild
+++ b/dev-libs/protobuf-c/protobuf-c-1.4.0-r1.ebuild
@@ -24,6 +24,10 @@ DEPEND=">=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.0-include-path.patch
+)
+
src_prepare() {
default
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/
@ 2023-08-21 19:57 Sam James
0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2023-08-21 19:57 UTC (permalink / raw
To: gentoo-commits
commit: 08cd4cb67131e6cbd177a05b3a908f5b00716f33
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 21 19:57:26 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 21 19:57:26 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08cd4cb6
dev-libs/protobuf-c: fix build w/ new protobuf
Closes: https://bugs.gentoo.org/912775
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/protobuf-c-1.4.1-protobuf-22.patch | 501 +++++++++++++++++++++
dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild | 56 +++
2 files changed, 557 insertions(+)
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.4.1-protobuf-22.patch b/dev-libs/protobuf-c/files/protobuf-c-1.4.1-protobuf-22.patch
new file mode 100644
index 000000000000..5e53899aee3d
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.4.1-protobuf-22.patch
@@ -0,0 +1,501 @@
+https://bugs.gentoo.org/912775
+https://github.com/protobuf-c/protobuf-c/issues/679
+https://github.com/protobuf-c/protobuf-c/issues/544
+https://github.com/protobuf-c/protobuf-c/pull/673
+
+From ad48868dfe77592c4bacf936ade208f384a26b09 Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Sun, 2 Jul 2023 17:48:18 -0400
+Subject: [PATCH 1/7] protoc-c: Remove GOOGLE_DISALLOW_EVIL_CONSTRUCTORS macro
+ invocations
+
+protobuf has removed the definition of this macro as of commit
+1595417dd3859bbff7d3d61ad0b6e39044d47489, so the invocation of this
+macro in protobuf-c breaks the build when building agaist the protobuf
+22.x or 23.x series.
+
+Simply removing the macro invocations seems to be safe and doesn't break
+the build on Debian's protobuf 3.21.12 nor Debian's protobuf 3.6.1.3.
+---
+ protoc-c/c_bytes_field.h | 2 --
+ protoc-c/c_enum.h | 2 --
+ protoc-c/c_enum_field.h | 2 --
+ protoc-c/c_extension.h | 2 --
+ protoc-c/c_field.h | 5 -----
+ protoc-c/c_file.h | 2 --
+ protoc-c/c_generator.h | 3 ---
+ protoc-c/c_message.h | 2 --
+ protoc-c/c_message_field.h | 4 ----
+ protoc-c/c_primitive_field.h | 4 ----
+ protoc-c/c_service.h | 2 --
+ protoc-c/c_string_field.h | 2 --
+ 12 files changed, 32 deletions(-)
+
+diff --git a/protoc-c/c_bytes_field.h b/protoc-c/c_bytes_field.h
+index bf873f0f..df91ef73 100644
+--- a/protoc-c/c_bytes_field.h
++++ b/protoc-c/c_bytes_field.h
+@@ -87,8 +87,6 @@ class BytesFieldGenerator : public FieldGenerator {
+
+ private:
+ std::map<std::string, std::string> variables_;
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(BytesFieldGenerator);
+ };
+
+
+diff --git a/protoc-c/c_enum.h b/protoc-c/c_enum.h
+index 9c34b697..089c3366 100644
+--- a/protoc-c/c_enum.h
++++ b/protoc-c/c_enum.h
+@@ -106,8 +106,6 @@ class EnumGenerator {
+ private:
+ const EnumDescriptor* descriptor_;
+ std::string dllexport_decl_;
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_enum_field.h b/protoc-c/c_enum_field.h
+index 3f8c005d..e0c96adf 100644
+--- a/protoc-c/c_enum_field.h
++++ b/protoc-c/c_enum_field.h
+@@ -85,8 +85,6 @@ class EnumFieldGenerator : public FieldGenerator {
+
+ private:
+ std::map<std::string, std::string> variables_;
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator);
+ };
+
+
+diff --git a/protoc-c/c_extension.h b/protoc-c/c_extension.h
+index 95413885..bda0bc55 100644
+--- a/protoc-c/c_extension.h
++++ b/protoc-c/c_extension.h
+@@ -98,8 +98,6 @@ class ExtensionGenerator {
+ const FieldDescriptor* descriptor_;
+ std::string type_traits_;
+ std::string dllexport_decl_;
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_field.h b/protoc-c/c_field.h
+index 3cad35d3..623a872e 100644
+--- a/protoc-c/c_field.h
++++ b/protoc-c/c_field.h
+@@ -103,9 +103,6 @@ class FieldGenerator {
+ const std::string &type_macro,
+ const std::string &descriptor_addr) const;
+ const FieldDescriptor *descriptor_;
+-
+- private:
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator);
+ };
+
+ // Convenience class which constructs FieldGenerators for a Descriptor.
+@@ -121,8 +118,6 @@ class FieldGeneratorMap {
+ std::unique_ptr<std::unique_ptr<FieldGenerator>[]> field_generators_;
+
+ static FieldGenerator* MakeGenerator(const FieldDescriptor* field);
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_file.h b/protoc-c/c_file.h
+index 8dfd8ba0..db1866cd 100644
+--- a/protoc-c/c_file.h
++++ b/protoc-c/c_file.h
+@@ -103,8 +103,6 @@ class FileGenerator {
+ std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_;
+ std::unique_ptr<std::unique_ptr<ServiceGenerator>[]> service_generators_;
+ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_;
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h
+index ac1ffafe..b8b44aaa 100644
+--- a/protoc-c/c_generator.h
++++ b/protoc-c/c_generator.h
+@@ -93,9 +93,6 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator {
+ const std::string& parameter,
+ OutputDirectory* output_directory,
+ std::string* error) const;
+-
+- private:
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_message.h b/protoc-c/c_message.h
+index ea1c3ab3..0d8c6440 100644
+--- a/protoc-c/c_message.h
++++ b/protoc-c/c_message.h
+@@ -136,8 +136,6 @@ class MessageGenerator {
+ std::unique_ptr<std::unique_ptr<MessageGenerator>[]> nested_generators_;
+ std::unique_ptr<std::unique_ptr<EnumGenerator>[]> enum_generators_;
+ std::unique_ptr<std::unique_ptr<ExtensionGenerator>[]> extension_generators_;
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_message_field.h b/protoc-c/c_message_field.h
+index 39b8d999..e485921a 100644
+--- a/protoc-c/c_message_field.h
++++ b/protoc-c/c_message_field.h
+@@ -82,10 +82,6 @@ class MessageFieldGenerator : public FieldGenerator {
+ void GenerateDescriptorInitializer(io::Printer* printer) const;
+ std::string GetDefaultValue(void) const;
+ void GenerateStaticInit(io::Printer* printer) const;
+-
+- private:
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator);
+ };
+
+
+diff --git a/protoc-c/c_primitive_field.h b/protoc-c/c_primitive_field.h
+index a9eb893b..aa7079f9 100644
+--- a/protoc-c/c_primitive_field.h
++++ b/protoc-c/c_primitive_field.h
+@@ -82,10 +82,6 @@ class PrimitiveFieldGenerator : public FieldGenerator {
+ void GenerateDescriptorInitializer(io::Printer* printer) const;
+ std::string GetDefaultValue(void) const;
+ void GenerateStaticInit(io::Printer* printer) const;
+-
+- private:
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_service.h b/protoc-c/c_service.h
+index 27125a60..b51472f9 100644
+--- a/protoc-c/c_service.h
++++ b/protoc-c/c_service.h
+@@ -100,8 +100,6 @@ class ServiceGenerator {
+
+ const ServiceDescriptor* descriptor_;
+ std::map<std::string, std::string> vars_;
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator);
+ };
+
+ } // namespace c
+diff --git a/protoc-c/c_string_field.h b/protoc-c/c_string_field.h
+index 513cea75..b3a1a7ff 100644
+--- a/protoc-c/c_string_field.h
++++ b/protoc-c/c_string_field.h
+@@ -87,8 +87,6 @@ class StringFieldGenerator : public FieldGenerator {
+
+ private:
+ std::map<std::string, std::string> variables_;
+-
+- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator);
+ };
+
+
+
+From 7b90330bff40ab555bb3f0c5ee43ae208a275104 Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Sun, 2 Jul 2023 19:35:43 -0400
+Subject: [PATCH 2/7] Use GOOGLE_LOG(FATAL) instead of GOOGLE_LOG(DFATAL)
+
+Looking at where these identifiers are ultimately defined [0], it looks
+like "DFATAL" means either "ERROR" or "FATAL" depending on whether
+NDEBUG is defined. However, looking at the actual code sites in protoc-c
+where DFATAL is used, it's not clear why we couldn't just use FATAL
+unconditionally.
+
+This is aimed at supporting newer versions of protobuf where the DFATAL
+identifier apparently no longer exists.
+
+[0] https://github.com/protocolbuffers/protobuf/blob/v21.12/src/google/protobuf/stubs/logging.h#L61-L65
+---
+ protoc-c/c_message.cc | 4 ++--
+ protoc-c/c_primitive_field.cc | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/protoc-c/c_message.cc b/protoc-c/c_message.cc
+index 37e8bf8b..af2974ca 100755
+--- a/protoc-c/c_message.cc
++++ b/protoc-c/c_message.cc
+@@ -499,7 +499,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) {
+ // NOTE: not supported by protobuf
+ vars["maybe_static"] = "";
+ vars["field_dv_ctype"] = "{ ... }";
+- GOOGLE_LOG(DFATAL) << "Messages can't have default values!";
++ GOOGLE_LOG(FATAL) << "Messages can't have default values!";
+ break;
+ case FieldDescriptor::CPPTYPE_STRING:
+ if (fd->type() == FieldDescriptor::TYPE_BYTES || opt.string_as_bytes())
+@@ -521,7 +521,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) {
+ break;
+ }
+ default:
+- GOOGLE_LOG(DFATAL) << "Unknown CPPTYPE";
++ GOOGLE_LOG(FATAL) << "Unknown CPPTYPE";
+ break;
+ }
+ if (!already_defined)
+diff --git a/protoc-c/c_primitive_field.cc b/protoc-c/c_primitive_field.cc
+index 6990893f..1727af38 100644
+--- a/protoc-c/c_primitive_field.cc
++++ b/protoc-c/c_primitive_field.cc
+@@ -143,7 +143,7 @@ std::string PrimitiveFieldGenerator::GetDefaultValue() const
+ case FieldDescriptor::CPPTYPE_BOOL:
+ return descriptor_->default_value_bool() ? "1" : "0";
+ default:
+- GOOGLE_LOG(DFATAL) << "unexpected CPPTYPE in c_primitive_field";
++ GOOGLE_LOG(FATAL) << "unexpected CPPTYPE in c_primitive_field";
+ return "UNEXPECTED_CPPTYPE";
+ }
+ }
+
+From 8d334a7204d98874cbf970cb96ab0c7b52e06695 Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Sun, 2 Jul 2023 19:42:19 -0400
+Subject: [PATCH 3/7] Work around GOOGLE_* changes in protobuf >= 22.0
+
+According to the protobuf migration guide as of June 2023 [0], protobuf
+22.0 (aka 4.22.0) took a dependency on something called "abseil" and as
+a result the "stubs" have been removed. This apparently caused all the
+uses of GOOGLE_* identifiers in protoc-c to fail when building against
+newer versions of protobuf.
+
+This commit introduces compatibility definitions when building against
+protobuf >= 4.22.0 so that protobuf-c can build against older and newer
+versions of protobuf.
+
+[0] https://web.archive.org/web/20230611151200/https://protobuf.dev/support/migration/#abseil
+---
+ protoc-c/c_helpers.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/protoc-c/c_helpers.h b/protoc-c/c_helpers.h
+index 7598a4e1..adc7ee21 100644
+--- a/protoc-c/c_helpers.h
++++ b/protoc-c/c_helpers.h
+@@ -178,6 +178,16 @@ inline int FieldSyntax(const FieldDescriptor* field) {
+ #endif
+ }
+
++// Work around changes in protobuf >= 22.x without breaking compilation against
++// older protobuf versions.
++#if GOOGLE_PROTOBUF_VERSION >= 4022000
++# define GOOGLE_ARRAYSIZE ABSL_ARRAYSIZE
++# define GOOGLE_CHECK_EQ ABSL_CHECK_EQ
++# define GOOGLE_CHECK_EQ ABSL_CHECK_EQ
++# define GOOGLE_DCHECK_GE ABSL_DCHECK_GE
++# define GOOGLE_LOG ABSL_LOG
++#endif
++
+ } // namespace c
+ } // namespace compiler
+ } // namespace protobuf
+
+From 23d2246e0f6ebfc69232ab29b6c6325d8009d1f7 Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Sun, 2 Jul 2023 19:48:17 -0400
+Subject: [PATCH 4/7] configure.ac: Require C++17 when building against
+ protobuf >= 4.22.0
+
+It's unclear from looking at the online protobuf documentation whether
+C++14 or C++17 is now required when building against newer versions of
+protobuf (or perhaps I'm looking in the wrong place), but experimentally
+it did not work for me with C++14.
+
+This commit rewrites the versioned PKG_CHECK_MODULES checks in
+configure.ac to enforce the following policies:
+
+ * Require protobuf >= 2.6.0.
+ * On protobuf >= 3.0.0, require C++11.
+ * On protobuf >= 4.22.0, require C++17.
+---
+ configure.ac | 26 ++++++++++++++++++++------
+ 1 file changed, 20 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 94d01dca..fa024b6a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -76,12 +76,26 @@ AC_ARG_ENABLE([protoc],
+ if test "x$enable_protoc" != "xno"; then
+ AC_LANG_PUSH([C++])
+
+- AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
+-
+- PKG_CHECK_MODULES([protobuf], [protobuf >= 3.0.0],
+- [proto3_supported=yes],
+- [PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0])]
+- )
++ # PKG_CHECK_MODULES(prefix, list-of-modules, action-if-found, action-if-not-found)
++ PKG_CHECK_MODULES(
++ [protobuf],
++ [protobuf >= 4.22.0],
++ [
++ proto3_supported=yes
++ AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
++ ],
++ [
++ PKG_CHECK_MODULES(
++ [protobuf],
++ [protobuf >= 3.0.0],
++ [
++ proto3_supported=yes
++ AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
++ ],
++ [
++ PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0])
++ ])
++ ])
+
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$save_CPPFLAGS $protobuf_CFLAGS"
+
+From 1937ba946b0a7a62c0f534e60f4d4799d7e0daed Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Sun, 2 Jul 2023 22:57:57 -0400
+Subject: [PATCH 5/7] protoc-c: Use FileDescriptorLegacy to obtain proto syntax
+ version on protobuf >= 23.0
+
+Use the newer "legacy" way of determining whether a file descriptor is
+using proto2 or proto3 syntax on protobuf >= 23.0.
+
+Based on
+https://github.com/protobuf-c/protobuf-c/pull/556/commits/66574f3fd85a205eb7c90b790477d5415364209e
+but continues to support older versions of protobuf.
+
+Unfortunately, since this is a "deprecated", "legacy" API it'll probably
+disappear in about five seconds.
+---
+ protoc-c/c_file.cc | 4 ++++
+ protoc-c/c_helpers.h | 8 ++++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/protoc-c/c_file.cc b/protoc-c/c_file.cc
+index 59c1824e..d211a3da 100644
+--- a/protoc-c/c_file.cc
++++ b/protoc-c/c_file.cc
+@@ -119,7 +119,11 @@ void FileGenerator::GenerateHeader(io::Printer* printer) {
+
+ int min_header_version = 1000000;
+ #if defined(HAVE_PROTO3)
++# if GOOGLE_PROTOBUF_VERSION >= 4023000
++ if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) {
++# else
+ if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) {
++#endif
+ min_header_version = 1003000;
+ }
+ #endif
+diff --git a/protoc-c/c_helpers.h b/protoc-c/c_helpers.h
+index adc7ee21..055528bf 100644
+--- a/protoc-c/c_helpers.h
++++ b/protoc-c/c_helpers.h
+@@ -70,6 +70,10 @@
+ #include <protobuf-c/protobuf-c.pb.h>
+ #include <google/protobuf/io/printer.h>
+
++#if GOOGLE_PROTOBUF_VERSION >= 4023000
++# include <google/protobuf/descriptor_legacy.h>
++#endif
++
+ namespace google {
+ namespace protobuf {
+ namespace compiler {
+@@ -172,7 +176,11 @@ int compare_name_indices_by_name(const void*, const void*);
+ // This wrapper is needed to be able to compile against protobuf2.
+ inline int FieldSyntax(const FieldDescriptor* field) {
+ #ifdef HAVE_PROTO3
++# if GOOGLE_PROTOBUF_VERSION >= 4023000
++ return FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3 ? 3 : 2;
++# else
+ return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? 3 : 2;
++# endif
+ #else
+ return 2;
+ #endif
+
+From 7582b6e7d640636bf24c0f9dd2b386ed6fd41919 Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Sun, 2 Jul 2023 22:58:48 -0400
+Subject: [PATCH 6/7] cmake: Require C++17
+
+Newer versions of protobuf apparently don't build with older versions of
+the C++ standard.
+---
+ build-cmake/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build-cmake/CMakeLists.txt b/build-cmake/CMakeLists.txt
+index 95f561c0..c71dd899 100644
+--- a/build-cmake/CMakeLists.txt
++++ b/build-cmake/CMakeLists.txt
+@@ -96,7 +96,7 @@ if (MSVC AND NOT BUILD_SHARED_LIBS)
+ endif (MSVC AND NOT BUILD_SHARED_LIBS)
+
+ IF(BUILD_PROTOC)
+-SET(CMAKE_CXX_STANDARD 11)
++SET(CMAKE_CXX_STANDARD 17)
+ SET(CMAKE_CXX_STANDARD_REQUIRED ON)
+ SET(CMAKE_CXX_EXTENSIONS OFF)
+ ADD_CUSTOM_COMMAND(OUTPUT protobuf-c/protobuf-c.pb.cc protobuf-c/protobuf-c.pb.h
+
+From 5b0661f1e8a0e03f75cc6f53b8d42507e95403c9 Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Mon, 3 Jul 2023 01:10:28 -0400
+Subject: [PATCH 7/7] configure.ac: Require C++17
+
+There are some recent reports of strange build failures that might have
+been fixed by compiling in C++17 mode, so it might be a good idea to use
+C++17 in general, and not just when building against very recent
+protobuf versions.
+
+Since it looks like we've lost protobuf < 3.0.0 support, configure.ac
+can be simplified a bit if we just use C++17 by default.
+---
+ configure.ac | 23 ++---------------------
+ 1 file changed, 2 insertions(+), 21 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fa024b6a..586ac3c0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -75,27 +75,8 @@ AC_ARG_ENABLE([protoc],
+ AS_HELP_STRING([--disable-protoc], [Disable building protoc_c (also disables tests)]))
+ if test "x$enable_protoc" != "xno"; then
+ AC_LANG_PUSH([C++])
+-
+- # PKG_CHECK_MODULES(prefix, list-of-modules, action-if-found, action-if-not-found)
+- PKG_CHECK_MODULES(
+- [protobuf],
+- [protobuf >= 4.22.0],
+- [
+- proto3_supported=yes
+- AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
+- ],
+- [
+- PKG_CHECK_MODULES(
+- [protobuf],
+- [protobuf >= 3.0.0],
+- [
+- proto3_supported=yes
+- AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
+- ],
+- [
+- PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0])
+- ])
+- ])
++ AX_CXX_COMPILE_STDCXX(17, noext, mandatory)
++ PKG_CHECK_MODULES([protobuf], [protobuf >= 3.0.0], [proto3_supported=yes])
+
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$save_CPPFLAGS $protobuf_CFLAGS"
diff --git a/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild
new file mode 100644
index 000000000000..edb57577cfd9
--- /dev/null
+++ b/dev-libs/protobuf-c/protobuf-c-1.4.1-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multilib-minimal
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Protocol Buffers implementation in C"
+HOMEPAGE="https://github.com/protobuf-c/protobuf-c"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD-2"
+# Subslot == SONAME version
+SLOT="0/1.0.0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ >=dev-libs/protobuf-3:0
+ virtual/pkgconfig
+"
+DEPEND=">=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.0-include-path.patch
+ "${FILESDIR}"/${P}-protobuf-22.patch
+)
+
+src_prepare() {
+ default
+
+ if ! use test; then
+ eapply "${FILESDIR}"/${PN}-1.3.0-no-build-tests.patch
+ fi
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name '*.la' -type f -delete || die
+ einstalldocs
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/
@ 2024-07-09 12:52 Sam James
0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2024-07-09 12:52 UTC (permalink / raw
To: gentoo-commits
commit: 3048b6e8c4bc551480e6fd966fe531c0db1d3afc
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Sun Jul 7 15:57:14 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 9 12:51:24 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3048b6e8
dev-libs/protobuf-c: add 1.5.0-r1
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/protobuf-c-1.5.0-Clean-CMake.patch | 169 +++++++++++++++++++++
dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild | 51 +++++++
2 files changed, 220 insertions(+)
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch b/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch
new file mode 100644
index 000000000000..f3e55a9c89cc
--- /dev/null
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch
@@ -0,0 +1,169 @@
+From a6cf1aa386067e26d582cc1d1e327787595c9f13 Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Wed, 20 Mar 2024 21:48:10 -0400
+Subject: [PATCH 01/11] FileGenerator::GenerateHeader(): Set
+ `min_header_version` unconditionally
+
+Previously, we were conditionally trying to set `min_header_version` to
+the lowest possible value, and relying on a "legacy" Google interface to
+determine the file descriptor's syntax version as part of that
+determination.
+
+Instead, simply bump the minimum version to 1003000 (1.3.0). This
+release was almost 7 years ago. In practice protobuf-c users should not
+be shipping pre-compiled .pb-c.c/.pb-c.h files, anyway.
+---
+ protoc-c/c_file.cc | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/protoc-c/c_file.cc b/protoc-c/c_file.cc
+index ca0ad34e..c6d8a240 100644
+--- a/protoc-c/c_file.cc
++++ b/protoc-c/c_file.cc
+@@ -117,14 +117,7 @@ FileGenerator::~FileGenerator() {}
+ void FileGenerator::GenerateHeader(io::Printer* printer) {
+ std::string filename_identifier = FilenameIdentifier(file_->name());
+
+- int min_header_version = 1000000;
+-#if GOOGLE_PROTOBUF_VERSION >= 4023000
+- if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) {
+-#else
+- if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) {
+-#endif
+- min_header_version = 1003000;
+- }
++ const int min_header_version = 1003000;
+
+ // Generate top of header.
+ printer->Print(
+
+From ee3d9e5423c93ee6b828fdda8e7fef13a77634eb Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Wed, 20 Mar 2024 22:25:54 -0400
+Subject: [PATCH 02/11] Reimplement FieldSyntax() to maximize compatibility
+ across protobuf versions
+
+Recent versions of Google protobuf have broken the interfaces for
+determining the syntax version of a .proto file. The current protobuf-c
+1.5.0 release does not compile with Google protobuf 26.0 due to the most
+recentage breakage. There is a possible workaround involving the Google
+protobuf `FileDescriptorLegacy` class, which is documented as:
+
+// TODO Remove this deprecated API entirely.
+
+So we probably shouldn't rely on it.
+
+Instead, this commit obtains the `FileDescriptorProto` corresponding
+to the passed in `FieldDescriptor` and interrogates the `syntax` field
+directly. This is a single implementation with no version-specific
+workarounds. Hopefully this won't break in the next Google protobuf
+release.
+
+I tested the `FieldSyntax()` implementation in this commit across a
+number of different Google protobuf releases and found that it worked
+(`make && make check`) on all of them:
+
+- Google protobuf 3.6.1.3 (Ubuntu 20.04)
+- Google protobuf 3.12.4 (Ubuntu 22.04)
+- Google protobuf 3.21.12 (Debian 12 + Debian unstable)
+- Google protobuf 3.25.2 (Debian experimental)
+- Google protobuf 26.1-dev
+---
+ protoc-c/c_helpers.h | 24 ++++++++++++++----------
+ 1 file changed, 14 insertions(+), 10 deletions(-)
+
+diff --git a/protoc-c/c_helpers.h b/protoc-c/c_helpers.h
+index 062d330b..be28b601 100644
+--- a/protoc-c/c_helpers.h
++++ b/protoc-c/c_helpers.h
+@@ -70,10 +70,6 @@
+ #include <protobuf-c/protobuf-c.pb.h>
+ #include <google/protobuf/io/printer.h>
+
+-#if GOOGLE_PROTOBUF_VERSION >= 4023000
+-# include <google/protobuf/descriptor_legacy.h>
+-#endif
+-
+ namespace google {
+ namespace protobuf {
+ namespace compiler {
+@@ -173,13 +169,21 @@ struct NameIndex
+ int compare_name_indices_by_name(const void*, const void*);
+
+ // Return the syntax version of the file containing the field.
+-// This wrapper is needed to be able to compile against protobuf2.
+ inline int FieldSyntax(const FieldDescriptor* field) {
+-#if GOOGLE_PROTOBUF_VERSION >= 4023000
+- return FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3 ? 3 : 2;
+-#else
+- return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? 3 : 2;
+-#endif
++ auto proto = FileDescriptorProto();
++ field->file()->CopyTo(&proto);
++
++ if (proto.has_syntax()) {
++ auto syntax = proto.syntax();
++ assert(syntax == "proto2" || syntax == "proto3");
++ if (syntax == "proto2") {
++ return 2;
++ } else if (syntax == "proto3") {
++ return 3;
++ }
++ }
++
++ return 2;
+ }
+
+ // Work around changes in protobuf >= 22.x without breaking compilation against
+
+From 2480f4d9d2fa97e5511ed0914ee529a344e969a7 Mon Sep 17 00:00:00 2001
+From: Robert Edmonds <edmonds@users.noreply.github.com>
+Date: Wed, 20 Mar 2024 22:43:30 -0400
+Subject: [PATCH 03/11] CGenerator: Protect against being invoked against
+ "edition" syntax .proto files
+
+The Google protobuf project is currently experimenting with a new syntax
+for .proto files called "editions". Since protobuf-c is a proto2/proto3
+compiler, after the previous commit reimplementing `FieldSyntax()`, the
+protobuf compiler will abort like this if presented with an "editions"
+syntax .proto file due to the safety check in `FieldSyntax()`:
+
+ $ protoc --experimental_editions --c_out=. test.proto
+ protoc-gen-c: ./protoc-c/c_helpers.h:178: int google::protobuf::compiler::c::FieldSyntax(const google::protobuf::FieldDescriptor*): Assertion `syntax == "proto2" || syntax == "proto3"' failed.
+ --c_out: protoc-gen-c: Plugin killed by signal 6.
+
+On protobuf 26, our `CodeGenerator` can implement certain methods to
+declare that we "support" editions, and then reject any other edition
+except proto2 and proto3, which have apparently been retroactively
+declared to be "editions". Of course this needs to be wrapped in a
+version guard.
+
+With this protection in place, the protobuf compiler cleanly exits with
+a nice error message like this:
+
+ $ protoc --experimental_editions --c_out=. test.proto
+ WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
+ E0000 00:00:1710988958.296200 20022 descriptor.cc:4620] Invalid proto descriptor for file "test.proto":
+ E0000 00:00:1710988958.296239 20022 descriptor.cc:4623] test.proto: Edition 2023 is later than the maximum supported edition PROTO3
+ --c_out: protoc-gen-c: Plugin failed with status code 1.
+---
+ protoc-c/c_generator.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h
+index b8b44aaa..4aeb5790 100644
+--- a/protoc-c/c_generator.h
++++ b/protoc-c/c_generator.h
+@@ -93,6 +93,12 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator {
+ const std::string& parameter,
+ OutputDirectory* output_directory,
+ std::string* error) const;
++
++#if GOOGLE_PROTOBUF_VERSION >= 5026000
++ uint64_t GetSupportedFeatures() const { return CodeGenerator::FEATURE_SUPPORTS_EDITIONS; }
++ Edition GetMinimumEdition() const { return Edition::EDITION_PROTO2; }
++ Edition GetMaximumEdition() const { return Edition::EDITION_PROTO3; }
++#endif
+ };
+
+ } // namespace c
diff --git a/dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild
new file mode 100644
index 000000000000..842e911beb9e
--- /dev/null
+++ b/dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multilib-minimal
+
+MY_PV="${PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Protocol Buffers implementation in C"
+HOMEPAGE="https://github.com/protobuf-c/protobuf-c"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD-2"
+# Subslot == SONAME version
+SLOT="0/1.0.0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="static-libs"
+
+BDEPEND="
+ >=dev-libs/protobuf-3:0
+ virtual/pkgconfig
+"
+DEPEND="
+ >=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.5.0-Clean-CMake.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ --enable-year2038
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name '*.la' -type f -delete || die
+ einstalldocs
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/
@ 2024-07-19 5:35 Sam James
0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2024-07-19 5:35 UTC (permalink / raw
To: gentoo-commits
commit: a7a48ed2a0c9cfb428f50be5bf15b9fd1132c9c6
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Thu Jul 18 19:09:20 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 19 05:34:39 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7a48ed2
dev-libs/protobuf-c: add 1.5.0-r2
Drop patch causing "Built-in generator --c_out specifies a maximum edition
PROTO3 which is not the protoc maximum 2023"
Add dependency on dev-cpp/abseil-cpp:=
Closes: https://bugs.gentoo.org/934464
Closes: https://bugs.gentoo.org/936230
Closes: https://bugs.gentoo.org/936167
Closes: https://bugs.gentoo.org/936122
Closes: https://bugs.gentoo.org/936120
Closes: https://bugs.gentoo.org/936030
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37607
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/protobuf-c-1.5.0-Clean-CMake.patch | 52 ----------------------
...-1.5.0-r1.ebuild => protobuf-c-1.5.0-r2.ebuild} | 9 +++-
2 files changed, 7 insertions(+), 54 deletions(-)
diff --git a/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch b/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch
index f3e55a9c89cc..38a36b50cc86 100644
--- a/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch
+++ b/dev-libs/protobuf-c/files/protobuf-c-1.5.0-Clean-CMake.patch
@@ -115,55 +115,3 @@ index 062d330b..be28b601 100644
}
// Work around changes in protobuf >= 22.x without breaking compilation against
-
-From 2480f4d9d2fa97e5511ed0914ee529a344e969a7 Mon Sep 17 00:00:00 2001
-From: Robert Edmonds <edmonds@users.noreply.github.com>
-Date: Wed, 20 Mar 2024 22:43:30 -0400
-Subject: [PATCH 03/11] CGenerator: Protect against being invoked against
- "edition" syntax .proto files
-
-The Google protobuf project is currently experimenting with a new syntax
-for .proto files called "editions". Since protobuf-c is a proto2/proto3
-compiler, after the previous commit reimplementing `FieldSyntax()`, the
-protobuf compiler will abort like this if presented with an "editions"
-syntax .proto file due to the safety check in `FieldSyntax()`:
-
- $ protoc --experimental_editions --c_out=. test.proto
- protoc-gen-c: ./protoc-c/c_helpers.h:178: int google::protobuf::compiler::c::FieldSyntax(const google::protobuf::FieldDescriptor*): Assertion `syntax == "proto2" || syntax == "proto3"' failed.
- --c_out: protoc-gen-c: Plugin killed by signal 6.
-
-On protobuf 26, our `CodeGenerator` can implement certain methods to
-declare that we "support" editions, and then reject any other edition
-except proto2 and proto3, which have apparently been retroactively
-declared to be "editions". Of course this needs to be wrapped in a
-version guard.
-
-With this protection in place, the protobuf compiler cleanly exits with
-a nice error message like this:
-
- $ protoc --experimental_editions --c_out=. test.proto
- WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
- E0000 00:00:1710988958.296200 20022 descriptor.cc:4620] Invalid proto descriptor for file "test.proto":
- E0000 00:00:1710988958.296239 20022 descriptor.cc:4623] test.proto: Edition 2023 is later than the maximum supported edition PROTO3
- --c_out: protoc-gen-c: Plugin failed with status code 1.
----
- protoc-c/c_generator.h | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h
-index b8b44aaa..4aeb5790 100644
---- a/protoc-c/c_generator.h
-+++ b/protoc-c/c_generator.h
-@@ -93,6 +93,12 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator {
- const std::string& parameter,
- OutputDirectory* output_directory,
- std::string* error) const;
-+
-+#if GOOGLE_PROTOBUF_VERSION >= 5026000
-+ uint64_t GetSupportedFeatures() const { return CodeGenerator::FEATURE_SUPPORTS_EDITIONS; }
-+ Edition GetMinimumEdition() const { return Edition::EDITION_PROTO2; }
-+ Edition GetMaximumEdition() const { return Edition::EDITION_PROTO3; }
-+#endif
- };
-
- } // namespace c
diff --git a/dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild b/dev-libs/protobuf-c/protobuf-c-1.5.0-r2.ebuild
similarity index 76%
rename from dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild
rename to dev-libs/protobuf-c/protobuf-c-1.5.0-r2.ebuild
index 842e911beb9e..3099c2e6a0ad 100644
--- a/dev-libs/protobuf-c/protobuf-c-1.5.0-r1.ebuild
+++ b/dev-libs/protobuf-c/protobuf-c-1.5.0-r2.ebuild
@@ -16,7 +16,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="BSD-2"
# Subslot == SONAME version
SLOT="0/1.0.0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86"
IUSE="static-libs"
BDEPEND="
@@ -25,7 +25,12 @@ BDEPEND="
"
DEPEND="
>=dev-libs/protobuf-3:0=[${MULTILIB_USEDEP}]"
-RDEPEND="${DEPEND}"
+# NOTE
+# protobuf links to abseil-cpp libraries via it's .pc files.
+# To cause rebuild when the abseil-cpp version changes we add it to RDEPEND only.
+RDEPEND="${DEPEND}
+ dev-cpp/abseil-cpp:=[${MULTILIB_USEDEP}]
+"
PATCHES=(
"${FILESDIR}/${PN}-1.5.0-Clean-CMake.patch"
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-07-19 5:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 12:52 [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf-c/, dev-libs/protobuf-c/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-07-19 5:35 Sam James
2023-08-21 19:57 Sam James
2021-11-04 21:04 Sam James
2019-05-05 19:05 Mike Gilbert
2018-07-07 2:03 Mike Gilbert
2018-04-26 15:14 Mike Gilbert
2017-08-10 7:26 Lars Wendler
2016-04-07 11:29 Lars Wendler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox