OpenToonz - An open-source full-featured 2D animation creation software
C
Haiku patch
Jerome Duvalb2d63bfc0dd2
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txtindex e01cde8f8..9eb1149ca 100644--- a/toonz/sources/CMakeLists.txt+++ b/toonz/sources/CMakeLists.txt@@ -188,8 +188,12 @@ elseif(BUILD_ENV_APPLE)elseif(BUILD_ENV_UNIXLIKE)# Needed for correct Qt detectioncmake_minimum_required(VERSION 2.8.12)+ set(PRELOAD_VARIABLE "LD_LIBRARY_PATH")if(CMAKE_SYSTEM_NAME MATCHES "Linux")add_definitions(-DLINUX)+ elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku")+ add_definitions(-DHAIKU)+ set(PRELOAD_VARIABLE "LIBRARY_PATH")elseif(CMAKE_SYSTEM_NAME MATCHES "^.*BSD$|DragonFly")set(BUILD_TARGET_BSD ON)add_definitions(-D_BSD_SOURCE -DFREEBSD)@@ -472,6 +476,9 @@ elseif(BUILD_ENV_UNIXLIKE)find_package(LZO REQUIRED)message("LZO:" ${LZO_INCLUDE_DIR})+ if(HAIKU)+ find_library(EXECINFO_LIBRARY execinfo)+ endif()find_library(PTHREAD_LIBRARY pthread)if(NOT BUILD_TARGET_WIN)diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cppindex 173c349c2..8f83764c6 100644--- a/toonz/sources/common/tapptools/tenv.cpp+++ b/toonz/sources/common/tapptools/tenv.cpp@@ -6,6 +6,7 @@#include <QDir>#include <QSettings>+#include <QStandardPaths>#ifdef LEVO_MACOSX@@ -79,12 +80,16 @@ public:settingsPath = QString::fromStdString(getApplicationFileName()) +QString(".app") +QString("/Contents/Resources/SystemVar.ini");+#else+#ifdef HAIKU+ settingsPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/SystemVar.ini";#else /* Generic Unix */// TODO: use QStandardPaths::ConfigLocation when we drop Qt4settingsPath = QDir::homePath();settingsPath.append("/.config/");settingsPath.append(getApplicationName().c_str());settingsPath.append("/SystemVar.ini");+#endif#endifQSettings settings(settingsPath, QSettings::IniFormat);diff --git a/toonz/sources/common/tgl/tgl.cpp b/toonz/sources/common/tgl/tgl.cppindex 453c07a0f..88c69891d 100644--- a/toonz/sources/common/tgl/tgl.cpp+++ b/toonz/sources/common/tgl/tgl.cpp@@ -12,14 +12,14 @@#ifdef _WIN32#include <cstdlib>#include <GL/glut.h>-#elif defined(LINUX) || defined(FREEBSD)+#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU)#include <GL/glut.h>#else#include <GLUT/glut.h>#endif#endif-#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD)+#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU)#include <QGLContext>#endif@@ -617,7 +617,7 @@ void tglMakeCurrent(TGlContext context) {void tglDoneCurrent(TGlContext) { wglMakeCurrent(NULL, NULL); }-#elif defined(LINUX) || defined(FREEBSD) || defined(__sgi) || defined(MACOSX)+#elif defined(LINUX) || defined(FREEBSD) || defined(__sgi) || defined(MACOSX) || defined(HAIKU)TGlContext tglGetCurrentContext() {return reinterpret_cast<TGlContext>(diff --git a/toonz/sources/common/tiio/movsettings.cpp b/toonz/sources/common/tiio/movsettings.cppindex dcb302c69..490405074 100644--- a/toonz/sources/common/tiio/movsettings.cpp+++ b/toonz/sources/common/tiio/movsettings.cpp@@ -8,7 +8,7 @@#include "tiio.h"#if !defined(x64) && !defined(__LP64__) && \- !(defined(LINUX) || defined(FREEBSD)) && \+ !(defined(LINUX) || defined(FREEBSD) || defined(HAIKU)) && \!(defined(__GNUC__) && defined(_WIN32))//*******************************************************************************diff --git a/toonz/sources/common/tipc/tipc.cpp b/toonz/sources/common/tipc/tipc.cppindex d61b9734d..df5877b52 100644--- a/toonz/sources/common/tipc/tipc.cpp+++ b/toonz/sources/common/tipc/tipc.cpp@@ -18,7 +18,7 @@#elif defined(MACOSX)#include <sys/sysctl.h>#include <unistd.h>-#elif defined(LINUX) || defined(FREEBSD)+#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU)#include <sys/time.h>#include <unistd.h>#endifdiff --git a/toonz/sources/common/tsystem/tpluginmanager.cpp b/toonz/sources/common/tsystem/tpluginmanager.cppindex a82fce845..4c0d20cc2 100644--- a/toonz/sources/common/tsystem/tpluginmanager.cpp+++ b/toonz/sources/common/tsystem/tpluginmanager.cpp@@ -20,12 +20,16 @@#endif#include <stdio.h>#include <unistd.h>+#ifndef HAIKU#include <sys/dir.h>+#endif#include <sys/param.h> // for getfsstat#ifdef MACOSX#include <sys/ucred.h>#endif+#ifndef HAIKU#include <sys/mount.h>+#endif#include <pwd.h>#include <dlfcn.h>#endif@@ -172,7 +176,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp) {void TPluginManager::loadPlugins(const TFilePath &dir) {#if defined(_WIN32)const std::string extension = "dll";-#elif defined(LINUX) || defined(FREEBSD) || defined(__sgi)+#elif defined(LINUX) || defined(FREEBSD) || defined(__sgi) || defined(HAIKU)const std::string extension = "so";#elif defined(MACOSX)const std::string extension = "dylib";diff --git a/toonz/sources/common/tsystem/tsystempd.cpp b/toonz/sources/common/tsystem/tsystempd.cppindex 130d28b30..524cc5f6d 100644--- a/toonz/sources/common/tsystem/tsystempd.cpp+++ b/toonz/sources/common/tsystem/tsystempd.cpp@@ -123,6 +123,23 @@#endif+#ifdef HAIKU+#define PLATFORM HAIKU+#include <grp.h>+#include <utime.h>+#include <sys/param.h>+#include <unistd.h>+#include <sys/types.h>+#include <stdio.h>+#include <unistd.h>+#include <dirent.h>+#include <pwd.h>+#include <dlfcn.h>+#include <utime.h>+#include <sys/time.h>++#endif+#ifndef PLATFORMPLATFORM_NOT_SUPPORTED#endif@@ -216,6 +233,11 @@ bool TSystem::memoryShortage() {// to be done...return false;+#elif defined(HAIKU)++ // to be done...+ return false;+#else@ @ @ERROR : PLATFORM NOT SUPPORTED@@ -308,6 +330,11 @@ TINT64 TSystem::getFreeMemorySize(bool onlyPhysicalMemory) {// to be done...totalFree = 512 * 1024;+#elif defined(HAIKU)++ // to be done...+ totalFree = 512 * 1024;+#else@ @ @ERROR : PLATFORM NOT SUPPORTED#endif@@ -336,6 +363,9 @@ TINT64 TSystem::getDiskSize(const TFilePath &diskName) {return 0;}#ifndef _WIN32+#ifdef HAIKU+ size = 0;+#elsestruct statfs buf;#ifdef __sgistatfs(::to_string(diskName).c_str(), &buf, sizeof(struct statfs), 0);@@ -343,6 +373,7 @@ TINT64 TSystem::getDiskSize(const TFilePath &diskName) {statfs(::to_string(diskName).c_str(), &buf);#endifsize = (TINT64)((buf.f_blocks * buf.f_bsize) >> 10);+#endif#elseDWORD sectorsPerCluster; // sectors per clusterDWORD bytesPerSector; // bytes per sector@@ -373,6 +404,9 @@ TINT64 TSystem::getFreeDiskSize(const TFilePath &diskName) {return 0;}#ifndef _WIN32+#ifdef HAIKU+ size = 0;+#elsestruct statfs buf;#ifdef __sgistatfs(diskName.getWideString().c_str(), &buf, sizeof(struct statfs), 0);@@ -380,6 +414,7 @@ TINT64 TSystem::getFreeDiskSize(const TFilePath &diskName) {statfs(::to_string(diskName).c_str(), &buf);#endifsize = (TINT64)(buf.f_bfree * buf.f_bsize) >> 10;+#endif#elseDWORD sectorsPerCluster; // sectors per clusterDWORD bytesPerSector; // bytes per sector@@ -465,6 +500,11 @@ TINT64 TSystem::getMemorySize(bool onlyPhysicalMemory) {// to be done...return 512 * 1024;+#elif defined(HAIKU)++ // to be done...+ return 512 * 1024;+#else@ @ @ERROR : PLATFORM NOT SUPPORTED#endifdiff --git a/toonz/sources/common/tvrender/tofflinegl.cpp b/toonz/sources/common/tvrender/tofflinegl.cppindex 3b50a5ae4..0908fe82a 100644--- a/toonz/sources/common/tvrender/tofflinegl.cpp+++ b/toonz/sources/common/tvrender/tofflinegl.cpp@@ -19,7 +19,7 @@#include "tthread.h"-#elif defined(MACOSX)+#elif defined(MACOSX) || defined(HAIKU)#include "qtofflinegl.h"@@ -500,7 +500,7 @@ static std::shared_ptr<TOfflineGL::Imp> defaultOfflineGLGenerator(return std::make_shared<QtOfflineGL>(dim, shared);}-#elif defined(MACOSX)+#elif defined(MACOSX) || defined(HAIKU)std::shared_ptr<TOfflineGL::Imp> defaultOfflineGLGenerator(const TDimension &dim, std::shared_ptr<TOfflineGL::Imp> shared) {diff --git a/toonz/sources/common/tvrender/ttessellator.cpp b/toonz/sources/common/tvrender/ttessellator.cppindex a6ecdf866..4362b97d5 100644--- a/toonz/sources/common/tvrender/ttessellator.cpp+++ b/toonz/sources/common/tvrender/ttessellator.cpp@@ -94,7 +94,7 @@ static void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4], GLfloat w[4],typedef GLvoid(CALLBACK *GluCallback)(void);#endif-#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD)+#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU)typedef GLvoid (*GluCallback)();diff --git a/toonz/sources/image/3gp/tiio_3gp_proxy.cpp b/toonz/sources/image/3gp/tiio_3gp_proxy.cppindex fca4c3e4b..fa0a2ebb9 100644--- a/toonz/sources/image/3gp/tiio_3gp_proxy.cpp+++ b/toonz/sources/image/3gp/tiio_3gp_proxy.cpp@@ -1,7 +1,7 @@#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || \- (defined(_WIN32) && defined(__GNUC__))+ defined(HAIKU) || (defined(_WIN32) && defined(__GNUC__))// Toonz includes#include "tfilepath.h"diff --git a/toonz/sources/image/3gp/tiio_3gp_proxy.h b/toonz/sources/image/3gp/tiio_3gp_proxy.hindex d7778393d..810f3bd05 100644--- a/toonz/sources/image/3gp/tiio_3gp_proxy.h+++ b/toonz/sources/image/3gp/tiio_3gp_proxy.h@@ -3,7 +3,7 @@#ifndef TIIO_3GP_PROXY_H#define TIIO_3GP_PROXY_H-#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || (defined(_WIN32) && defined(__GNUC__))+#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU) || (defined(_WIN32) && defined(__GNUC__))// Qt includes#include <QString>diff --git a/toonz/sources/image/compatibility/tfile_io.c b/toonz/sources/image/compatibility/tfile_io.cindex 83c3ac1f1..bef889224 100644--- a/toonz/sources/image/compatibility/tfile_io.c+++ b/toonz/sources/image/compatibility/tfile_io.c@@ -58,7 +58,7 @@ char *convertWCHAR2CHAR(const wchar_t *wc) {}#endif/*-----------------------------------*/-#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD)+#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU)FILE *_wfopen(const wchar_t *fname, const wchar_t *mode) {char *cfname = convertWCHAR2CHAR(fname);diff --git a/toonz/sources/image/compatibility/tfile_io.h b/toonz/sources/image/compatibility/tfile_io.hindex fa8a9f7fc..1bf977473 100644--- a/toonz/sources/image/compatibility/tfile_io.h+++ b/toonz/sources/image/compatibility/tfile_io.h@@ -19,7 +19,7 @@ extern "C" {char *convertWCHAR2CHAR(const wchar_t *fname);-#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD)+#if defined(MACOSX) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU)#include <sys/types.h>#include <sys/stat.h>diff --git a/toonz/sources/image/compatibility/tnz4.h b/toonz/sources/image/compatibility/tnz4.hindex e903fadcb..50eddbeed 100644--- a/toonz/sources/image/compatibility/tnz4.h+++ b/toonz/sources/image/compatibility/tnz4.h@@ -34,7 +34,7 @@ TNZ_LITTLE_ENDIAN undefined !!unsigned char b, g, r, m;#elif defined(__sgi)unsigned char m, b, g, r;-#elif defined(LINUX) || defined(FREEBSD)+#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU)unsigned char r, g, b, m;#elif defined(MACOSX)unsigned char m, r, g, b;@@ -48,7 +48,7 @@ typedef struct SPIXEL {unsigned short b, g, r, m;#elif defined(__sgi)unsigned short m, b, g, r;-#elif defined(LINUX) || defined(FREEBSD)+#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU)unsigned short r, g, b, m;#elif defined(MACOSX)unsigned char m, r, g, b;diff --git a/toonz/sources/image/mov/tiio_mov_proxy.cpp b/toonz/sources/image/mov/tiio_mov_proxy.cppindex 8718ed210..93b0dc246 100644--- a/toonz/sources/image/mov/tiio_mov_proxy.cpp+++ b/toonz/sources/image/mov/tiio_mov_proxy.cpp@@ -1,7 +1,7 @@#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || \- (defined(_WIN32) && defined(__GNUC__))+ defined(HAIKU) || (defined(_WIN32) && defined(__GNUC__))// Toonz includes#include "tfilepath.h"diff --git a/toonz/sources/image/mov/tiio_mov_proxy.h b/toonz/sources/image/mov/tiio_mov_proxy.hindex fbd82130b..3fdbe708c 100644--- a/toonz/sources/image/mov/tiio_mov_proxy.h+++ b/toonz/sources/image/mov/tiio_mov_proxy.h@@ -3,7 +3,7 @@#ifndef TIIO_MOV_PROXY_H#define TIIO_MOV_PROXY_H-#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || (defined(_WIN32) && defined(__GNUC__))+#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU) || (defined(_WIN32) && defined(__GNUC__))// Qt includes#include <QString>diff --git a/toonz/sources/image/pli/pli_io.cpp b/toonz/sources/image/pli/pli_io.cppindex df4d5863b..d003e5e27 100644--- a/toonz/sources/image/pli/pli_io.cpp+++ b/toonz/sources/image/pli/pli_io.cpp@@ -435,7 +435,7 @@ void ParsedPli::setMaxThickness(double maxThickness) {};/* indirect inclusion of <math.h> causes 'abs' to return double on Linux */-#if defined(LINUX) || defined(FREEBSD) || (defined(_WIN32) && defined(__GNUC__))+#if defined(LINUX) || defined(FREEBSD) || (defined(_WIN32) && defined(__GNUC__)) || defined(HAIKU)template <typename T>T abs_workaround(T a) {return (a > 0) ? a : -a;diff --git a/toonz/sources/image/tiio.cpp b/toonz/sources/image/tiio.cppindex 0bfd43ffa..97d766ebc 100644--- a/toonz/sources/image/tiio.cpp+++ b/toonz/sources/image/tiio.cpp@@ -54,7 +54,7 @@#include "./mov/tiio_movM.h"#include "./3gp/tiio_3gpM.h"-#elif defined(LINUX) || defined(FREEBSD) // No more supported by the way...+#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU) // No more supported by the way...// #include "./mov/tiio_movL.h"#include "./mov/tiio_mov_proxy.h"#include "./3gp/tiio_3gp_proxy.h"diff --git a/toonz/sources/include/movsettings.h b/toonz/sources/include/movsettings.hindex 9008f7df6..ad64de92d 100644--- a/toonz/sources/include/movsettings.h+++ b/toonz/sources/include/movsettings.h@@ -13,7 +13,7 @@#define DVVAR DV_IMPORT_VAR#endif-#if !defined(x64) && !defined(__LP64__) && !(defined(LINUX) || defined(FREEBSD)) && !(defined(__GNUC__) && defined(_WIN32))+#if !defined(x64) && !defined(__LP64__) && !(defined(LINUX) || defined(FREEBSD) || defined(HAIKU)) && !(defined(__GNUC__) && defined(_WIN32))#ifdef _WIN32diff --git a/toonz/sources/include/tcg/hpp/triangulate.hpp b/toonz/sources/include/tcg/hpp/triangulate.hppindex 3b5e5b3f8..499d13beb 100644--- a/toonz/sources/include/tcg/hpp/triangulate.hpp+++ b/toonz/sources/include/tcg/hpp/triangulate.hpp@@ -14,7 +14,7 @@#include <GL/glu.h>#elif defined(MACOSX)#include <GLUT/glut.h>-#elif defined(LINUX) || defined(FREEBSD)+#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU)#include <GL/glut.h>#include <cstring>#endifdiff --git a/toonz/sources/include/tgl.h b/toonz/sources/include/tgl.hindex 09e64fb0f..5c993b173 100644--- a/toonz/sources/include/tgl.h+++ b/toonz/sources/include/tgl.h@@ -21,7 +21,7 @@#define GLUT_NO_WARNING_DISABLE#endif-#if defined(LINUX) || defined(FREEBSD)+#if defined(LINUX) || defined(FREEBSD) || defined(HAIKU)#include <GL/gl.h>#include <GL/glu.h>#include <GL/glut.h>diff --git a/toonz/sources/include/tmachine.h b/toonz/sources/include/tmachine.hindex ec67785c8..308a251af 100644--- a/toonz/sources/include/tmachine.h+++ b/toonz/sources/include/tmachine.h@@ -7,7 +7,7 @@#define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1#elif defined(__sgi)#define TNZ_MACHINE_CHANNEL_ORDER_MBGR 1-#elif defined(LINUX) || defined(FREEBSD)+#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU)#define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1#elif defined(MACOSX)#define TNZ_MACHINE_CHANNEL_ORDER_MRGB 1diff --git a/toonz/sources/include/tnztypes.h b/toonz/sources/include/tnztypes.hindex 6aaaf84d4..5b1e56c2b 100644--- a/toonz/sources/include/tnztypes.h+++ b/toonz/sources/include/tnztypes.h@@ -18,7 +18,7 @@ typedef uint32_t TUINT32;typedef int64_t TINT64;typedef uint64_t TUINT64;-#elif defined(__LP64__) && !(defined(LINUX) || defined(FREEBSD))+#elif defined(__LP64__) && !(defined(LINUX) || defined(FREEBSD) || defined(HAIKU))#define TINT32 \; \@@ -40,6 +40,13 @@ typedef int32_t TINT32;typedef uint32_t TUINT32;typedef int64_t TINT64;typedef uint64_t TUINT64;++#elif defined(HAIKU)+#include <stdint.h>+#define TINT32 int32_t+typedef uint32_t TUINT32;+typedef int64_t TINT64;+typedef uint64_t TUINT64;#endif#endifdiff --git a/toonz/sources/include/toonz4.6/machine.h b/toonz/sources/include/toonz4.6/machine.hindex 75ebe747c..e2efddba9 100644--- a/toonz/sources/include/toonz4.6/machine.h+++ b/toonz/sources/include/toonz4.6/machine.h@@ -17,7 +17,7 @@#define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1#elif defined(__sgi)#define TNZ_MACHINE_CHANNEL_ORDER_MBGR 1-#elif defined(LINUX) || defined(FREEBSD)+#elif defined(LINUX) || defined(FREEBSD) || defined(HAIKU)#define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1#elif defined(MACOSX)#define TNZ_MACHINE_CHANNEL_ORDER_MRGB 1diff --git a/toonz/sources/include/tpixel.h b/toonz/sources/include/tpixel.hindex 45a67a11e..2b0136690 100644--- a/toonz/sources/include/tpixel.h+++ b/toonz/sources/include/tpixel.h@@ -177,7 +177,7 @@ undefined machine order !!!!TPixelRGBM64(int rr, int gg, int bb, int mm = maxChannelValue): r(rr), g(gg), b(bb), m(mm){};#else-#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX)+#if defined(LINUX) || defined(FREEBSD) || defined(MACOSX) || defined(HAIKU)#ifdef powerpcdiff --git a/toonz/sources/t32bitsrv/main.cpp b/toonz/sources/t32bitsrv/main.cppindex 806904f4e..44830cf8f 100644--- a/toonz/sources/t32bitsrv/main.cpp+++ b/toonz/sources/t32bitsrv/main.cpp@@ -1,6 +1,6 @@-#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD)))+#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU)))// Toonz includes#include "tiio_std.h"diff --git a/toonz/sources/t32bitsrv/t323gpmsg.cpp b/toonz/sources/t32bitsrv/t323gpmsg.cppindex 84ead4474..14dc606ac 100644--- a/toonz/sources/t32bitsrv/t323gpmsg.cpp+++ b/toonz/sources/t32bitsrv/t323gpmsg.cpp@@ -1,6 +1,6 @@-#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD)))+#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU)))// Toonz stuff#include "tiio.h"diff --git a/toonz/sources/t32bitsrv/t32movmsg.cpp b/toonz/sources/t32bitsrv/t32movmsg.cppindex 9c8d49d20..a3b2bbf1f 100644--- a/toonz/sources/t32bitsrv/t32movmsg.cpp+++ b/toonz/sources/t32bitsrv/t32movmsg.cpp@@ -1,6 +1,6 @@-#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD)))+#if (!(defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU)))// Toonz stuff#include "tiio.h"diff --git a/toonz/sources/toonz/CMakeLists.txt b/toonz/sources/toonz/CMakeLists.txtindex 770d6b7ad..d3aee4917 100644--- a/toonz/sources/toonz/CMakeLists.txt+++ b/toonz/sources/toonz/CMakeLists.txt@@ -540,7 +540,7 @@ elseif(BUILD_ENV_UNIXLIKE)# 変なところにライブラリ生成するカスどもset(EXTRA_LIBS ${EXTRA_LIBS} "$<TARGET_FILE:tnzstdfx>" "$<TARGET_FILE:tfarm>")- set(EXTRA_LIBS ${EXTRA_LIBS} ${Boost_LIBRARIES} ${OPENBLAS_LIB})+ set(EXTRA_LIBS ${EXTRA_LIBS} ${Boost_LIBRARIES} ${OPENBLAS_LIB} ${EXECINFO_LIBRARY})if(PLATFORM EQUAL 64)set(EXTRA_LIBS ${EXTRA_LIBS} Qt5::SerialPort ${TURBOJPEG_LIB} ${OpenCV_LIBS})endif()@@ -701,7 +701,7 @@ TOONZSTUDIOPALETTE=\"\$HOME/.config/OpenToonz/stuff/studiopalette\"EOFfi-export LD_LIBRARY_PATH=\${OPENTOONZ_BASE}/lib/opentoonz:\${LD_LIBRARY_PATH}+export ${PRELOAD_VARIABLE}=\${OPENTOONZ_BASE}/lib/opentoonz:\${${PRELOAD_VARIABLE}}exec \$OPENTOONZ_BASE/bin/OpenToonz \"\$@\"")diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cppindex 826615c52..b7dc6fec8 100644--- a/toonz/sources/toonz/main.cpp+++ b/toonz/sources/toonz/main.cpp@@ -479,7 +479,9 @@ int main(int argc, char *argv[]) {fmt.setStencil(true);QGLFormat::setDefaultFormat(fmt);+#ifndef __HAIKU__glutInit(&argc, argv);+#endifsplash.showMessage(offsetStr + "Initializing Toonz environment ...",Qt::AlignCenter, Qt::white);diff --git a/toonz/sources/toonz/sceneviewer.cpp b/toonz/sources/toonz/sceneviewer.cppindex 9b718732f..ca4e52c54 100644--- a/toonz/sources/toonz/sceneviewer.cpp+++ b/toonz/sources/toonz/sceneviewer.cpp@@ -1,5 +1,5 @@-#if defined(LINUX) || defined(FREEBSD)+#if defined(LINUX) || defined(FREEBSD) || defined(HAIKU)#define GL_GLEXT_PROTOTYPES#endif