untrusted comment: verify with /etc/ports/core-arm64.pub
-RWSKslkvIwb+2XoXBRVpSAkd4mi2oRhxeS2Er8YmLxerzF1WYoEBoiyjxgy4hQ2Lk9SHiE4hRIq1Fc3FUszaGmTR84hHN8prKgE=
-SHA256 (Pkgfile) = f4c1bd5df630b5662ce73657272995af0ed89d2f34bbb1826af935a387f1a35a
+RWSKslkvIwb+2bghfP8JGuBs73a1x+u8aPm4lTdUYgkjUeZd7MwjDIkCgbrdmx9R4h9DCFY409xnEhUcMcBkR1GgiQPcfCyLvAw=
+SHA256 (Pkgfile) = fcc67c6052bc27ea5399ee04bbb19e67d89a974f5331bd876766d780101ba194
SHA256 (.footprint) = 3a4d0e8a4f718b7d171558a53799371c27bdcacf7991ef39b5c82e16d51b0f02
SHA256 (db-5.3.28.tar.gz) = e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628
+SHA256 (0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch) = 696ac5af5473f0d85ecc6af44a85333c91500721fb5c33028c05e843429058d1
--- /dev/null
+From 29621d637e30982489693f2e207ce6a1790e3337 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 22 Mar 2017 15:32:26 +0000
+Subject: [PATCH] atomic: Rename local __atomic_compare_exchange to avoid clash
+ with builtins
+
+Helps building with clang
+
+Fixes
+
+../db-5.3.28/src/dbinc/atomic.h:179:19: error: definition of builtin function '__atomic_compare_exchange'
+static inline int __atomic_compare_exchange(
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/dbinc/atomic.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
+index 6a858f7..1b49de5 100644
+--- a/src/dbinc/atomic.h
++++ b/src/dbinc/atomic.h
+@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
++ __db_atomic_compare_exchange((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int __db_atomic_compare_exchange(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;
+--
+1.8.3.1
+
# Description: Berkeley DB
-# URL: http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/
-# Maintainer: CRUX System Team, core-ports at crux dot nu
+# URL: http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/
+# Maintainer: CRUX System Team, core-ports at crux dot nu
+# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
name=db
version=5.3.28
-release=1
-source=(http://download.oracle.com/berkeley-db/$name-$version.tar.gz)
+release=2
+source=(http://download.oracle.com/berkeley-db/$name-$version.tar.gz \
+ 0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch)
build() {
- cd $name-$version/build_unix
+ cd $name-$version/
+ patch -p1 -i $SRC/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch
+
+ cd build_unix
../dist/configure --prefix=/usr \
--build=arm-unknown-linux-gnu \
--enable-compat185 \