aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-12-15 12:44:23 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-12-15 12:44:43 +0000
commit4796dad4c69d91c1cfa42b6bfefd988a4a255210 (patch)
treecf8e6034a6011e3d778bfd236a2653a3186aa09b /main
parent07ac854bf3906386ec89a06b8ac777f19580e9a8 (diff)
downloadaports-4796dad4c69d91c1cfa42b6bfefd988a4a255210.tar.bz2
aports-4796dad4c69d91c1cfa42b6bfefd988a4a255210.tar.xz
main/protobuf: fix build on s390x
Diffstat (limited to 'main')
-rw-r--r--main/protobuf/APKBUILD6
-rw-r--r--main/protobuf/adding_release_compareandswap_64-bit_variant.patch28
2 files changed, 32 insertions, 2 deletions
diff --git a/main/protobuf/APKBUILD b/main/protobuf/APKBUILD
index 20f2acf35f..eaac1377b5 100644
--- a/main/protobuf/APKBUILD
+++ b/main/protobuf/APKBUILD
@@ -3,7 +3,7 @@
pkgname=protobuf
_gemname=google-protobuf
pkgver=3.5.0
-pkgrel=0
+pkgrel=1
pkgdesc="Library for extensible, efficient structure packing"
url="https://github.com/google/protobuf"
arch="all"
@@ -14,6 +14,7 @@ subpackages="ruby-$_gemname:_ruby $pkgname-dev $pkgname-vim::noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/v$pkgver.tar.gz
musl-fix.patch
trim-rakefile.patch
+ adding_release_compareandswap_64-bit_variant.patch
"
builddir="$srcdir/$pkgname-$pkgver"
@@ -88,4 +89,5 @@ vim() {
sha512sums="7b9477d298f604067b9ebab72a99adae8a31249b3ea3fd0e70fd4ac77180bec83131193b2642a624fbb7cc5eae9f1b369bffec9297b49b04207ae50a4071aaa4 protobuf-3.5.0.tar.gz
b321cf82a959263d3173cc1c5cce4c77d4720f5dd824f20c98abb94f11eccf2907afce8b8a86340b4fc1bd1c7d5df1afca4672c17a97feb089521e167b20c70f musl-fix.patch
-e1f6483b7e8d38b07cd01883bda439b2017fa0a87626fa49628f1d2042b5097ba8a68bdf1a03cd385e3e9a7c0bd2af6fbccec25e1c061617c3cceccabd17dce4 trim-rakefile.patch"
+e1f6483b7e8d38b07cd01883bda439b2017fa0a87626fa49628f1d2042b5097ba8a68bdf1a03cd385e3e9a7c0bd2af6fbccec25e1c061617c3cceccabd17dce4 trim-rakefile.patch
+269184e48fc0b645134a08a0e1e2709970109f283a75cef5e8de9b8b61344d6ca9dea2e7ff15aee26dd8049c5b424fd94262729e7fcc1e688a1d7fc486d9d2e4 adding_release_compareandswap_64-bit_variant.patch"
diff --git a/main/protobuf/adding_release_compareandswap_64-bit_variant.patch b/main/protobuf/adding_release_compareandswap_64-bit_variant.patch
new file mode 100644
index 0000000000..d7fd2c60a5
--- /dev/null
+++ b/main/protobuf/adding_release_compareandswap_64-bit_variant.patch
@@ -0,0 +1,28 @@
+From 642e1ac635f2563b4a14c255374f02645ae85dac Mon Sep 17 00:00:00 2001
+From: Nayana-ibm <nayana.thorat@gmail.com>
+Date: Mon, 27 Nov 2017 05:43:30 -0500
+Subject: [PATCH] Adding Release_CompareAndSwap 64-bit variant
+
+---
+ src/google/protobuf/stubs/atomicops_internals_generic_gcc.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h b/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
+index 0b0b06ce6c..075c406aba 100644
+--- a/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
++++ b/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
+@@ -146,6 +146,14 @@ inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
+ return __atomic_load_n(ptr, __ATOMIC_RELAXED);
+ }
+
++inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
++ Atomic64 old_value,
++ Atomic64 new_value) {
++ __atomic_compare_exchange_n(ptr, &old_value, new_value, false,
++ __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
++ return old_value;
++}
++
+ #endif // defined(__LP64__)
+
+ } // namespace internal