Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
Date: Fri, 19 Oct 2018 17:39:51
Message-Id: 1539970758.a246eb7e586b2d0102833be248aa94e557c98c2f.floppym@gentoo
1 commit: a246eb7e586b2d0102833be248aa94e557c98c2f
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Fri Oct 19 15:37:26 2018 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 19 17:39:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a246eb7e
7
8 dev-libs/protobuf: Fix building on ARMv6.
9
10 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
11 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
12
13 .../files/protobuf-3.6.1-libatomic_linking.patch | 49 ++++++++++++++++++++++
14 dev-libs/protobuf/protobuf-3.6.1.ebuild | 1 +
15 2 files changed, 50 insertions(+)
16
17 diff --git a/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch b/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch
18 new file mode 100644
19 index 00000000000..2b357b21317
20 --- /dev/null
21 +++ b/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch
22 @@ -0,0 +1,49 @@
23 +https://github.com/protocolbuffers/protobuf/issues/5219
24 +https://github.com/protocolbuffers/protobuf/pull/5227
25 +https://github.com/protocolbuffers/protobuf/commit/56b40a8f055cfd05633054aed5d3466a6e058b72
26 +
27 +--- /configure.ac
28 ++++ /configure.ac
29 +@@ -165,6 +165,22 @@
30 + ])
31 + AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1])
32 +
33 ++dnl On some platforms, std::atomic needs a helper library
34 ++AC_MSG_CHECKING(whether -latomic is needed)
35 ++AC_LINK_IFELSE([AC_LANG_SOURCE([[
36 ++ #include <atomic>
37 ++ #include <cstdint>
38 ++ std::atomic<std::int64_t> v;
39 ++ int main() {
40 ++ return v;
41 ++ }
42 ++]])], STD_ATOMIC_NEED_LIBATOMIC=no, STD_ATOMIC_NEED_LIBATOMIC=yes)
43 ++AC_MSG_RESULT($STD_ATOMIC_NEED_LIBATOMIC)
44 ++if test "x$STD_ATOMIC_NEED_LIBATOMIC" = xyes; then
45 ++ LIBATOMIC_LIBS="-latomic"
46 ++fi
47 ++AC_SUBST([LIBATOMIC_LIBS])
48 ++
49 + AS_IF([test "$with_protoc" != "no"], [
50 + PROTOC=$with_protoc
51 + AS_IF([test "$with_protoc" = "yes"], [
52 +--- /src/Makefile.am
53 ++++ /src/Makefile.am
54 +@@ -163,7 +163,7 @@
55 +
56 + lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
57 +
58 +-libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
59 ++libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
60 + libprotobuf_lite_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
61 + if HAVE_LD_VERSION_SCRIPT
62 + libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
63 +@@ -209,7 +209,7 @@
64 + google/protobuf/io/zero_copy_stream.cc \
65 + google/protobuf/io/zero_copy_stream_impl_lite.cc
66 +
67 +-libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
68 ++libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
69 + libprotobuf_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
70 + if HAVE_LD_VERSION_SCRIPT
71 + libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
72
73 diff --git a/dev-libs/protobuf/protobuf-3.6.1.ebuild b/dev-libs/protobuf/protobuf-3.6.1.ebuild
74 index 3b3bdeaf351..065eed56272 100644
75 --- a/dev-libs/protobuf/protobuf-3.6.1.ebuild
76 +++ b/dev-libs/protobuf/protobuf-3.6.1.ebuild
77 @@ -23,6 +23,7 @@ PATCHES=(
78 "${FILESDIR}/${PN}-3.6.0-disable_no-warning-test.patch"
79 "${FILESDIR}/${PN}-3.6.0-system_libraries.patch"
80 "${FILESDIR}/${PN}-3.6.0-protoc_input_output_files.patch"
81 + "${FILESDIR}/${PN}-3.6.1-libatomic_linking.patch"
82 )
83
84 DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)