opentoonz: bump version

* remove upstreamed patch
* disabled translation because of a regression in Qt 5.15.9
This commit is contained in:
Jerome Duval
2023-05-13 19:35:21 +02:00
parent dc2b4bab47
commit d2f8a39a66
3 changed files with 39 additions and 637 deletions

View File

@@ -7,10 +7,10 @@ Studio Ghibli (http://www.ghibli.jp/) over many years of production."
HOMEPAGE="https://github.com/opentoonz/opentoonz/"
COPYRIGHT="2016-2018, DWANGO Co., Ltd."
LICENSE="BSD (3-clause)"
REVISION="4"
srcGitRev="79abc3c572f9ec45b8a1c08d822bc36aecbe06bd"
REVISION="1"
srcGitRev="dd4cb36142ebf65a2aa74ff8575002863d3e17fc"
SOURCE_URI="${HOMEPAGE}archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="705b3d4488cafc55536281d982257be76ceb035b985242b7b38dee076b06370b"
CHECKSUM_SHA256="78bc3bfde9bacb79a8357c07f3053c9bdeb5449671a02dbe01c78c444860d2f5"
SOURCE_DIR="opentoonz-$srcGitRev"
PATCHES="opentoonz-$portVersion.patchset"
ADDITIONAL_FILES="opentoonz.rdef"
@@ -110,7 +110,8 @@ BUILD()
-DCMAKE_INSTALL_PREFIX=$prefix \
-DGLUT_LIB=/system/develop/lib/libglut.so \
-DCMAKE_CXX_FLAGS=-DBOOST_NO_CXX11_CONSTEXPR \
-DCMAKE_SKIP_RPATH=YES
-DCMAKE_SKIP_RPATH=YES \
-DWITH_TRANSLATION=OFF
ninja -C build $jobArgs
}

View File

@@ -1,633 +0,0 @@
From 3823ca2c0bbb1fc3e91e52896cd2a057120728cb Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 22 Mar 2017 22:05:39 +0100
Subject: Haiku patch
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt
index e01cde8..304b8e8 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 detection
cmake_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,7 @@ elseif(BUILD_ENV_UNIXLIKE)
find_package(LZO REQUIRED)
message("LZO:" ${LZO_INCLUDE_DIR})
+ find_library(EXECINFO_LIBRARY execinfo)
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.cpp
index 173c349..8f83764 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 Qt4
settingsPath = QDir::homePath();
settingsPath.append("/.config/");
settingsPath.append(getApplicationName().c_str());
settingsPath.append("/SystemVar.ini");
+#endif
#endif
QSettings settings(settingsPath, QSettings::IniFormat);
diff --git a/toonz/sources/common/tgl/tgl.cpp b/toonz/sources/common/tgl/tgl.cpp
index 453c07a..88c6989 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.cpp
index dcb302c..4904050 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.cpp
index d61b973..df5877b 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>
#endif
diff --git a/toonz/sources/common/tsystem/tpluginmanager.cpp b/toonz/sources/common/tsystem/tpluginmanager.cpp
index a82fce8..4c0d20c 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.cpp
index 130d28b..524cc5f 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 PLATFORM
PLATFORM_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;
+#else
struct statfs buf;
#ifdef __sgi
statfs(::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);
#endif
size = (TINT64)((buf.f_blocks * buf.f_bsize) >> 10);
+#endif
#else
DWORD sectorsPerCluster; // sectors per cluster
DWORD bytesPerSector; // bytes per sector
@@ -373,6 +404,9 @@ TINT64 TSystem::getFreeDiskSize(const TFilePath &diskName) {
return 0;
}
#ifndef _WIN32
+#ifdef HAIKU
+ size = 0;
+#else
struct statfs buf;
#ifdef __sgi
statfs(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);
#endif
size = (TINT64)(buf.f_bfree * buf.f_bsize) >> 10;
+#endif
#else
DWORD sectorsPerCluster; // sectors per cluster
DWORD 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
#endif
diff --git a/toonz/sources/common/tvrender/tofflinegl.cpp b/toonz/sources/common/tvrender/tofflinegl.cpp
index 3b50a5a..0908fe8 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.cpp
index a6ecdf8..4362b97 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.cpp
index fca4c3e..fa0a2eb 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.h
index d777839..810f3bd 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.c
index 83c3ac1..bef8892 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.h
index fa8a9f7..1bf9774 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.h
index e903fad..50eddbe 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.cpp
index 8718ed2..93b0dc2 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.h
index fbd8213..3fdbe70 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.cpp
index df4d586..d003e5e 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.cpp
index 0bfd43f..97d766e 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.h
index 9008f7d..ad64de9 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 _WIN32
diff --git a/toonz/sources/include/tcg/hpp/triangulate.hpp b/toonz/sources/include/tcg/hpp/triangulate.hpp
index 3b5e5b3..499d13b 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>
#endif
diff --git a/toonz/sources/include/tgl.h b/toonz/sources/include/tgl.h
index 09e64fb..5c993b1 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.h
index ec67785..308a251 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 1
diff --git a/toonz/sources/include/tnztypes.h b/toonz/sources/include/tnztypes.h
index 6aaaf84..5b1e56c 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
#endif
diff --git a/toonz/sources/include/toonz4.6/machine.h b/toonz/sources/include/toonz4.6/machine.h
index 75ebe74..e2efddb 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 1
diff --git a/toonz/sources/include/tpixel.h b/toonz/sources/include/tpixel.h
index 45a67a1..2b01366 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 powerpc
diff --git a/toonz/sources/t32bitsrv/main.cpp b/toonz/sources/t32bitsrv/main.cpp
index 806904f..44830cf 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.cpp
index 84ead44..14dc606 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.cpp
index 9c8d49d..a3b2bbf 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.txt
index 770d6b7..d3aee49 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\"
EOF
fi
-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.cpp
index 826615c..b7dc6fe 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);
+#endif
splash.showMessage(offsetStr + "Initializing Toonz environment ...",
Qt::AlignCenter, Qt::white);
diff --git a/toonz/sources/toonz/sceneviewer.cpp b/toonz/sources/toonz/sceneviewer.cpp
index 9b71873..ca4e52c 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
--
2.37.3
From 0738c0b8ad1a7e3fa8b08f887031ae072247f9eb Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 10 Mar 2023 16:39:26 +0100
Subject: Haiku: startup script behavior for the Deskbar menu
diff --git a/toonz/sources/toonz/CMakeLists.txt b/toonz/sources/toonz/CMakeLists.txt
index d3aee49..b709014 100644
--- a/toonz/sources/toonz/CMakeLists.txt
+++ b/toonz/sources/toonz/CMakeLists.txt
@@ -667,7 +667,8 @@ elseif(BUILD_ENV_UNIXLIKE AND NOT BUILD_TARGET_WIN)
# and sets the library preload path.
file(WRITE ${CMAKE_BINARY_DIR}/bin/opentoonz
"#!/bin/sh
-OPENTOONZ_BASE=\$(dirname \"\$0\")/..
+OPENTOONZ_SCRIPT=\$(readlink -f \"\$0\")
+OPENTOONZ_BASE=\$(dirname \"\$OPENTOONZ_SCRIPT\")/..
if [ ! -d \$HOME/.config/OpenToonz ]; then
mkdir -p \$HOME/.config/OpenToonz
@@ -703,7 +704,7 @@ fi
export ${PRELOAD_VARIABLE}=\${OPENTOONZ_BASE}/lib/opentoonz:\${${PRELOAD_VARIABLE}}
-exec \$OPENTOONZ_BASE/bin/OpenToonz \"\$@\"
+\$OPENTOONZ_BASE/bin/OpenToonz \"\$@\" &
")
# only needed for executing without installing
execute_process(COMMAND chmod +x ${CMAKE_BINARY_DIR}/bin/opentoonz)
--
2.37.3

View File

@@ -0,0 +1,34 @@
From 0738c0b8ad1a7e3fa8b08f887031ae072247f9eb Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 10 Mar 2023 16:39:26 +0100
Subject: Haiku: startup script behavior for the Deskbar menu
diff --git a/toonz/sources/toonz/CMakeLists.txt b/toonz/sources/toonz/CMakeLists.txt
index d3aee49..b709014 100644
--- a/toonz/sources/toonz/CMakeLists.txt
+++ b/toonz/sources/toonz/CMakeLists.txt
@@ -667,7 +667,8 @@ elseif(BUILD_ENV_UNIXLIKE AND NOT BUILD_TARGET_WIN)
# and sets the library preload path.
file(WRITE ${CMAKE_BINARY_DIR}/bin/opentoonz
"#!/bin/sh
-OPENTOONZ_BASE=\$(dirname \"\$0\")/..
+OPENTOONZ_SCRIPT=\$(readlink -f \"\$0\")
+OPENTOONZ_BASE=\$(dirname \"\$OPENTOONZ_SCRIPT\")/..
if [ ! -d \$HOME/.config/OpenToonz ]; then
mkdir -p \$HOME/.config/OpenToonz
@@ -703,7 +704,7 @@ fi
export ${PRELOAD_VARIABLE}=\${OPENTOONZ_BASE}/lib/opentoonz:\${${PRELOAD_VARIABLE}}
-exec \$OPENTOONZ_BASE/bin/OpenToonz \"\$@\"
+\$OPENTOONZ_BASE/bin/OpenToonz \"\$@\" &
")
# only needed for executing without installing
execute_process(COMMAND chmod +x ${CMAKE_BINARY_DIR}/bin/opentoonz)
--
2.37.3