From d8a698d229beb408ee00d27ad0219da8a22e1eb7 Mon Sep 17 00:00:00 2001 From: miqlas <5569059+extrowerk@users.noreply.github.com> Date: Sat, 25 Aug 2018 21:15:00 +0200 Subject: [PATCH] Alembic: build fix (#2937) --- media-libs/alembic/alembic-1.7.8.recipe | 2 +- .../alembic/patches/alembic-1.7.8.patchset | 41 +++++++++++-------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/media-libs/alembic/alembic-1.7.8.recipe b/media-libs/alembic/alembic-1.7.8.recipe index 1ed389ec8..a15e8b6d2 100644 --- a/media-libs/alembic/alembic-1.7.8.recipe +++ b/media-libs/alembic/alembic-1.7.8.recipe @@ -22,7 +22,7 @@ COPYRIGHT="2009-2016 Sony Pictures Imageworks 2016-2018 Blizzard Entertainment, Inc. 2018 J Cube, Inc." LICENSE="ALEMBIC" -REVISION="1" +REVISION="2" SOURCE_URI="https://github.com/alembic/alembic/archive/$portVersion.tar.gz" CHECKSUM_SHA256='119e2cbac2b862880018e756da2219171d1e9ae7aa0ef7dc7c216d678384808e' SOURCE_FILENAME="alembic-$portVersion.tar.gz" diff --git a/media-libs/alembic/patches/alembic-1.7.8.patchset b/media-libs/alembic/patches/alembic-1.7.8.patchset index d9e2e1623..080ade5fa 100644 --- a/media-libs/alembic/patches/alembic-1.7.8.patchset +++ b/media-libs/alembic/patches/alembic-1.7.8.patchset @@ -1,4 +1,4 @@ -From e83fa44d31c15cbf9d3ea5081428ef92ee09bd00 Mon Sep 17 00:00:00 2001 +From 7ecb7287671547f607870da8b7585a916308f5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sat, 31 Mar 2018 08:49:25 +0200 Subject: Haiku build fixes @@ -17,24 +17,33 @@ index dac8659..91b1135 100644 include include/OpenEXR diff --git a/lib/Alembic/AbcCoreOgawa/StreamManager.cpp b/lib/Alembic/AbcCoreOgawa/StreamManager.cpp -index f163173..a5daa62 100644 +index f163173..c5a2a27 100644 --- a/lib/Alembic/AbcCoreOgawa/StreamManager.cpp +++ b/lib/Alembic/AbcCoreOgawa/StreamManager.cpp -@@ -46,9 +46,12 @@ namespace ALEMBIC_VERSION_NS { - #if !defined( ALEMBIC_LIB_USES_TR1 ) && __cplusplus >= 201103L - #define COMPARE_EXCHANGE( V, COMP, EXCH ) V.compare_exchange_weak( COMP, EXCH, std::memory_order_seq_cst, std::memory_order_seq_cst ) - // Windows --#elif defined( _MSC_VER ) -+#elif defined( _MSC_VER ) || defined(__HAIKU__) -+#ifndef __HAIKU__ - #define COMPARE_EXCHANGE( V, COMP, EXCH ) (InterlockedCompareExchange64( &V, EXCH, COMP ) == COMP) -- -+#else +@@ -67,6 +67,9 @@ Alembic::Util::int64_t ffsll( Alembic::Util::int64_t iValue ) + return 0; + } + ++#elif defined( __HAIKU__ ) +#define COMPARE_EXCHANGE( V, COMP, EXCH ) __atomic_compare_exchange_n( &V, &COMP, EXCH, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST ) -+#endif - Alembic::Util::int64_t ffsll( Alembic::Util::int64_t iValue ) ++#include + + // gcc 4.8 and above not using C++11 + #elif defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8 +@@ -107,6 +110,13 @@ StreamManager::~StreamManager() { - if ( !iValue ) + } + ++#ifdef __HAIKU__ ++int ffsll(long long i) ++{ ++ return (__builtin_ffsll(i)); ++} ++#endif ++ + StreamIDPtr StreamManager::get() + { + -- -2.16.2 +2.16.4