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/, dev-libs/protobuf/files/
Date: Wed, 21 Feb 2018 20:34:13
Message-Id: 1519245137.34f2b3a8006ca31bcc03364066ec7dcd68d2950e.floppym@gentoo
1 commit: 34f2b3a8006ca31bcc03364066ec7dcd68d2950e
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Wed Feb 21 17:57:00 2018 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 21 20:32:17 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34f2b3a8
7
8 dev-libs/protobuf: Fix building on IA64.
9
10 Closes: https://bugs.gentoo.org/648248
11
12 .../files/protobuf-3.5.0-atomic_operations.patch | 21 +++++++++++++++++++++
13 dev-libs/protobuf/protobuf-3.5.1.1.ebuild | 7 ++++++-
14 2 files changed, 27 insertions(+), 1 deletion(-)
15
16 diff --git a/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch b/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch
17 new file mode 100644
18 index 00000000000..7a88e837950
19 --- /dev/null
20 +++ b/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch
21 @@ -0,0 +1,21 @@
22 +https://github.com/google/protobuf/issues/3937
23 +https://github.com/google/protobuf/pull/3955
24 +https://github.com/google/protobuf/commit/642e1ac635f2563b4a14c255374f02645ae85dac
25 +
26 +--- /src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
27 ++++ /src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
28 +@@ -146,6 +146,14 @@
29 + return __atomic_load_n(ptr, __ATOMIC_RELAXED);
30 + }
31 +
32 ++inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
33 ++ Atomic64 old_value,
34 ++ Atomic64 new_value) {
35 ++ __atomic_compare_exchange_n(ptr, &old_value, new_value, false,
36 ++ __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
37 ++ return old_value;
38 ++}
39 ++
40 + #endif // defined(__LP64__)
41 +
42 + } // namespace internal
43
44 diff --git a/dev-libs/protobuf/protobuf-3.5.1.1.ebuild b/dev-libs/protobuf/protobuf-3.5.1.1.ebuild
45 index 4f44ebc4d8c..97cbe92c922 100644
46 --- a/dev-libs/protobuf/protobuf-3.5.1.1.ebuild
47 +++ b/dev-libs/protobuf/protobuf-3.5.1.1.ebuild
48 @@ -23,16 +23,21 @@ PATCHES=(
49 "${FILESDIR}/${PN}-3.4.0-disable_no-warning-test.patch"
50 "${FILESDIR}/${PN}-3.4.0-system_libraries.patch"
51 "${FILESDIR}/${PN}-3.4.0-protoc_input_output_files.patch"
52 + "${FILESDIR}/${PN}-3.5.0-atomic_operations.patch"
53 )
54
55 DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
56
57 src_prepare() {
58 - append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
59 default
60 eautoreconf
61 }
62
63 +src_configure() {
64 + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
65 + multilib-minimal_src_configure
66 +}
67 +
68 multilib_src_configure() {
69 local myeconfargs=(
70 $(use_enable static-libs static)