databases/leofs: fix build on powerpc*

Same fix as the one for databases/p5-Tie-LevelDB.
This commit is contained in:
Piotr Kubaj 2021-05-20 13:41:42 +00:00
parent 8ad46e2fad
commit db917ae45e
2 changed files with 17 additions and 1 deletions

View File

@ -12,7 +12,7 @@ COMMENT= Highly scalable, fault-tolerant distributed file system
LICENSE= APACHE20
BROKEN_aarch64= Does not compile: fatal error: lzo/lzo1x.h file not found
NOT_FOR_ARCHS= powerpc64 powerpc64le riscv64 sparc64
NOT_FOR_ARCHS= riscv64 sparc64
NOT_FOR_ARCHS_REASON= does not build: error Please implement AtomicPointer for this platform
BUILD_DEPENDS= ${LOCALBASE}/lib/erlang21/bin/erlc:lang/erlang-runtime21 \
@ -107,6 +107,11 @@ LEOFS_DEPS= \
GH_TUPLE= ${LEOFS_DEPS:C,(.*)/(.*)=(.*):(.*),\1:\2:\3:\4/deps/\4,}
CFLAGS_powerpc= -DLEVELDB_CSTDATOMIC_PRESENT
CFLAGS_powerpc64= -DLEVELDB_CSTDATOMIC_PRESENT
CFLAGS_powerpc64le= -DLEVELDB_CSTDATOMIC_PRESENT
CFLAGS_powerpcspe= -DLEVELDB_CSTDATOMIC_PRESENT
post-extract:
.for dep in ${LEOFS_DEPS}
.for tagname in ${dep:C,^[^=]+=([^\?]+)\?.*$,\1,}

View File

@ -0,0 +1,11 @@
--- deps/leveldb/port/atomic_pointer.h.orig 2021-05-20 13:33:22 UTC
+++ deps/leveldb/port/atomic_pointer.h
@@ -116,7 +116,7 @@ class AtomicPointer {
// AtomicPointer based on <cstdatomic>
#elif defined(LEVELDB_CSTDATOMIC_PRESENT)
-#include <cstdatomic>
+#include <atomic>
class AtomicPointer {
private: