alembic-1.7.12.patchset revision 4ab5e634
1From 2a37f467024bf26482833493b4af5ccd5dee8d4a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
3Date: Sat, 31 Mar 2018 08:49:25 +0200
4Subject: Haiku build fixes
5
6
7diff --git a/cmake/Modules/FindIlmBase.cmake b/cmake/Modules/FindIlmBase.cmake
8index 679a02f..8c5a505 100644
9--- a/cmake/Modules/FindIlmBase.cmake
10+++ b/cmake/Modules/FindIlmBase.cmake
11@@ -92,6 +92,7 @@ FIND_PATH(ILMBASE_INCLUDE_DIR
12     IlmBaseConfig.h
13   HINTS
14     ${_ilmbase_SEARCH_DIRS}
15+    "$ENV{ILMBASE_INC_DIR}"
16   PATH_SUFFIXES
17     include
18     include/OpenEXR
19diff --git a/lib/Alembic/AbcCoreOgawa/StreamManager.cpp b/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
20index f163173..c5a2a27 100644
21--- a/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
22+++ b/lib/Alembic/AbcCoreOgawa/StreamManager.cpp
23@@ -67,6 +67,9 @@ Alembic::Util::int64_t ffsll( Alembic::Util::int64_t iValue )
24     return 0;
25 }
26 
27+#elif defined( __HAIKU__ )
28+#define COMPARE_EXCHANGE( V, COMP, EXCH ) __atomic_compare_exchange_n( &V, &COMP, EXCH, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST )
29+#include <strings.h>
30 
31 // gcc 4.8 and above not using C++11
32 #elif defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8
33@@ -107,6 +110,13 @@ StreamManager::~StreamManager()
34 {
35 }
36 
37+#ifdef __HAIKU__
38+int ffsll(long long i)
39+{
40+	return (__builtin_ffsll(i));
41+}
42+#endif
43+
44 StreamIDPtr StreamManager::get()
45 {
46 
47-- 
482.24.0
49
50
51From bcc682c510731b89768366c48ed2700666e45dc9 Mon Sep 17 00:00:00 2001
52From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
53Date: Tue, 18 Sep 2018 21:46:33 +0200
54Subject: Build fix
55
56
57diff --git a/lib/Alembic/Ogawa/IStreams.cpp b/lib/Alembic/Ogawa/IStreams.cpp
58index c2eb987..a4cd761 100644
59--- a/lib/Alembic/Ogawa/IStreams.cpp
60+++ b/lib/Alembic/Ogawa/IStreams.cpp
61@@ -38,7 +38,8 @@
62 #include <stdexcept>
63 
64 
65-#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
66+#if defined (__unix__) || defined (__HAIKU__) || \
67+	(defined (__APPLE__) && defined (__MACH__))
68 
69     #include <sys/mman.h>
70     #include <sys/stat.h>
71-- 
722.24.0
73
74