mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 00:30:06 +02:00
108 lines
3.4 KiB
Plaintext
108 lines
3.4 KiB
Plaintext
From 42aae85e3c8f8357ce0f6385981cd0f55eb7354c Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Sun, 16 Apr 2023 11:15:33 +1000
|
|
Subject: Fix build for Haiku
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index a8f8aa9..1800598 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -22,6 +22,7 @@ For more information, please visit <http://www.openshot.org/>.
|
|
|
|
################ ADD CMAKE MODULES ##################
|
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
|
|
+include(GNUInstallDirs)
|
|
|
|
################ PROJECT VERSION ####################
|
|
set(PROJECT_VERSION_FULL "0.3.2")
|
|
diff --git a/src/AudioBufferSource.h b/src/AudioBufferSource.h
|
|
index 173ccf4..919c2b0 100644
|
|
--- a/src/AudioBufferSource.h
|
|
+++ b/src/AudioBufferSource.h
|
|
@@ -13,6 +13,7 @@
|
|
#ifndef OPENSHOT_AUDIOBUFFERSOURCE_H
|
|
#define OPENSHOT_AUDIOBUFFERSOURCE_H
|
|
|
|
+#include <string.h>
|
|
#include <AppConfig.h>
|
|
#include <juce_audio_basics/juce_audio_basics.h>
|
|
|
|
diff --git a/src/AudioDevices.cpp b/src/AudioDevices.cpp
|
|
index 0d1f1eb..2caf1f5 100644
|
|
--- a/src/AudioDevices.cpp
|
|
+++ b/src/AudioDevices.cpp
|
|
@@ -11,6 +11,8 @@
|
|
//
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
+#include <string.h>
|
|
+
|
|
#include "AudioDevices.h"
|
|
|
|
using namespace openshot;
|
|
diff --git a/src/CrashHandler.cpp b/src/CrashHandler.cpp
|
|
index 26018cc..6e24f96 100644
|
|
--- a/src/CrashHandler.cpp
|
|
+++ b/src/CrashHandler.cpp
|
|
@@ -186,7 +186,7 @@ void CrashHandler::printStackTrace(FILE *out, unsigned int max_frames)
|
|
}
|
|
SymCleanup(process);
|
|
|
|
-#else
|
|
+#elif !defined(__HAIKU__)
|
|
// Linux and Mac stack unwinding
|
|
// Storage array for stack trace address data
|
|
void* addrlist[max_frames+1];
|
|
diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp
|
|
index 291f585..8a45ef8 100644
|
|
--- a/src/FFmpegReader.cpp
|
|
+++ b/src/FFmpegReader.cpp
|
|
@@ -367,7 +367,7 @@ void FFmpegReader::Open() {
|
|
if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == 0 ) {
|
|
#elif defined(_WIN32)
|
|
if( adapter_ptr != NULL ) {
|
|
-#elif defined(__APPLE__)
|
|
+#elif defined(__APPLE__) || defined(__HAIKU__)
|
|
if( adapter_ptr != NULL ) {
|
|
#endif
|
|
ZmqLogger::Instance()->AppendDebugMethod("Decode Device present using device");
|
|
diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp
|
|
index 273afdb..3513056 100644
|
|
--- a/src/FFmpegWriter.cpp
|
|
+++ b/src/FFmpegWriter.cpp
|
|
@@ -1474,7 +1474,7 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVStream *st) {
|
|
snprintf(adapter,sizeof(adapter),"/dev/dri/renderD%d", adapter_num+128);
|
|
// Maybe 127 is better because the first card would be 1?!
|
|
adapter_ptr = adapter;
|
|
-#elif defined(_WIN32) || defined(__APPLE__)
|
|
+#elif defined(_WIN32) || defined(__APPLE__) || defined(__HAIKU__)
|
|
adapter_ptr = NULL;
|
|
#endif
|
|
}
|
|
@@ -1484,7 +1484,7 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVStream *st) {
|
|
// Check if it is there and writable
|
|
#if defined(__linux__)
|
|
if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == 0 ) {
|
|
-#elif defined(_WIN32) || defined(__APPLE__)
|
|
+#elif defined(_WIN32) || defined(__APPLE__) || defined(__HAIKU__)
|
|
if( adapter_ptr != NULL ) {
|
|
#endif
|
|
ZmqLogger::Instance()->AppendDebugMethod(
|
|
diff --git a/src/Qt/VideoPlaybackThread.cpp b/src/Qt/VideoPlaybackThread.cpp
|
|
index b8c53e5..8622613 100644
|
|
--- a/src/Qt/VideoPlaybackThread.cpp
|
|
+++ b/src/Qt/VideoPlaybackThread.cpp
|
|
@@ -11,6 +11,8 @@
|
|
//
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
+#include <string.h>
|
|
+
|
|
#include "VideoPlaybackThread.h"
|
|
#include "ZmqLogger.h"
|
|
|
|
--
|
|
2.37.3
|
|
|