Files
haikuports/media-libs/opencollada/patches/opencollada-1.6.63.patchset
2018-08-13 12:29:22 -04:00

113 lines
4.0 KiB
Plaintext

From 69a140c63022d89c0a0e04e35626635a3a802be4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Fri, 8 Dec 2017 18:14:31 +0100
Subject: Build fix
diff --git a/COLLADABaseUtils/include/COLLADABUPlatform.h b/COLLADABaseUtils/include/COLLADABUPlatform.h
index 097845b..0b7b46f 100644
--- a/COLLADABaseUtils/include/COLLADABUPlatform.h
+++ b/COLLADABaseUtils/include/COLLADABUPlatform.h
@@ -23,7 +23,7 @@
# define COLLADABU_OS_WIN64
#elif (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
# define COLLADABU_OS_WIN32
-#elif defined(__linux__) || defined(__linux) || defined(__FreeBSD__)
+#elif defined(__linux__) || defined(__linux) || defined(__FreeBSD__) || defined(__HAIKU__)
# define COLLADABU_OS_LINUX
#endif
diff --git a/DAEValidator/library/src/PathUtil.cpp b/DAEValidator/library/src/PathUtil.cpp
index fd2afae..529355c 100644
--- a/DAEValidator/library/src/PathUtil.cpp
+++ b/DAEValidator/library/src/PathUtil.cpp
@@ -125,8 +125,16 @@ namespace opencollada
if ((dir = opendir(dirs.front().c_str())) != nullptr) {
while ((ent = readdir(dir)) != nullptr) {
string d_name = ent->d_name;
+ #ifdef __HAIKU__
+ struct stat sp;
+ stat(ent->d_name, &sp);
+ #endif
if (recursive &&
- (ent->d_type & DT_DIR) &&
+ #ifndef __HAIKU__
+ (ent->d_type & DT_DIR) &&
+ #else
+ (S_ISDIR(sp.st_mode)) &&
+ #endif
d_name != "." &&
d_name != "..")
{
diff --git a/common/libBuffer/include/CommonFWriteBufferFlusher.h b/common/libBuffer/include/CommonFWriteBufferFlusher.h
index c7af45b..42ff162 100644
--- a/common/libBuffer/include/CommonFWriteBufferFlusher.h
+++ b/common/libBuffer/include/CommonFWriteBufferFlusher.h
@@ -35,7 +35,7 @@ namespace std {
#ifdef __GNUC__
# include <cstdlib> /* size_t */
# include <cstdio> /* FILE */
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__HAIKU__)
#include <stdint.h> /* int64_t */
#endif
#endif
diff --git a/common/libBuffer/src/CommonFWriteBufferFlusher.cpp b/common/libBuffer/src/CommonFWriteBufferFlusher.cpp
index 97480a1..2c1d2cb 100644
--- a/common/libBuffer/src/CommonFWriteBufferFlusher.cpp
+++ b/common/libBuffer/src/CommonFWriteBufferFlusher.cpp
@@ -90,7 +90,7 @@ namespace Common
FilePosType currentPos = ftello64(mStream);
#elif defined( _WIN32)
FilePosType currentPos = _ftelli64(mStream);
-#elif defined (__APPLE__) || defined(__FreeBSD__)
+#elif defined (__APPLE__) || defined(__FreeBSD__) || defined(__HAIKU__)
FilePosType currentPos = ftello(mStream);
#else
FilePosType currentPos = ftello64(mStream);
@@ -115,7 +115,7 @@ namespace Common
return (fseeko64(mStream,0,SEEK_END) == 0);
#elif defined( _WIN32)
return (_fseeki64(mStream, 0, SEEK_END) == 0);
-#elif defined (__APPLE__) || defined(__FreeBSD__)
+#elif defined (__APPLE__) || defined(__FreeBSD__) || defined(__HAIKU__)
return (fseeko(mStream, 0, SEEK_END) == 0);
#else
return (fseeko64(mStream, 0, SEEK_END) == 0);
@@ -135,7 +135,7 @@ namespace Common
bool success = (fseeko64(mStream,pos,SEEK_SET) == 0);
#elif defined( _WIN32)
bool success = (_fseeki64(mStream, pos, SEEK_SET) == 0);
-#elif defined (__APPLE__) || defined(__FreeBSD__)
+#elif defined (__APPLE__) || defined(__FreeBSD__) || defined(__HAIKU__)
bool success = (fseeko(mStream, pos, SEEK_SET) == 0);
#else
bool success = (fseeko64(mStream, pos, SEEK_SET) == 0);
--
2.16.4
From e3ac6f3a6f7f85ba014a3a74bab074a316e65f52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sat, 4 Aug 2018 23:24:44 +0200
Subject: PCRE build fix
diff --git a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
index 22f2598..f20e6cf 100644
--- a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
+++ b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
@@ -13,8 +13,7 @@
#include "COLLADABUPrerequisites.h"
-struct real_pcre;
-typedef struct real_pcre pcre;
+#include "pcre.h"
namespace COLLADABU
--
2.16.4