mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
shotcut, bump version, leave disabled (crash on launch) (#8431)
This commit is contained in:
@@ -1,91 +0,0 @@
|
||||
From bde99b02738213322491a927f079363f6e5b0d01 Mon Sep 17 00:00:00 2001
|
||||
From: TURX <turx2003@gmail.com>
|
||||
Date: Mon, 20 Jan 2020 01:32:19 +0800
|
||||
Subject: fix Haiku support
|
||||
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 267bae8..8a91bbe 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -51,6 +51,10 @@ static const char* kDefaultScaleRoundPolicy = "RoundPreferFloor";
|
||||
static const char* kDefaultScaleRoundPolicy = "Round";
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
static void mlt_log_handler(void *service, int mlt_level, const char *format, va_list args)
|
||||
{
|
||||
if (mlt_level > mlt_log_get_level())
|
||||
@@ -196,7 +200,14 @@ public:
|
||||
resourceArg = parser.positionalArguments();
|
||||
|
||||
// Startup logging.
|
||||
+#if !defined(Q_OS_HAIKU)
|
||||
dir.setPath(Settings.appDataLocation());
|
||||
+#else
|
||||
+ char buffer[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
||||
+ find_directory(B_USER_LOG_DIRECTORY, -1, false, buffer, sizeof(buffer));
|
||||
+ QString path = QString::fromUtf8(buffer);
|
||||
+ dir.setPath(path);
|
||||
+#endif
|
||||
if (!dir.exists()) dir.mkpath(dir.path());
|
||||
const QString logFileName = dir.filePath("shotcut-log.txt");
|
||||
QFile::remove(logFileName);
|
||||
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
|
||||
index a478128..00e383a 100644
|
||||
--- a/src/mainwindow.cpp
|
||||
+++ b/src/mainwindow.cpp
|
||||
@@ -96,6 +96,10 @@
|
||||
#include <QVersionNumber>
|
||||
#include <clocale>
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
static bool eventDebugCallback(void **data)
|
||||
{
|
||||
QEvent *event = reinterpret_cast<QEvent*>(data[1]);
|
||||
@@ -3861,7 +3865,15 @@ void MainWindow::onDrawingMethodTriggered(QAction *action)
|
||||
void MainWindow::on_actionApplicationLog_triggered()
|
||||
{
|
||||
TextViewerDialog dialog(this);
|
||||
- QDir dir = Settings.appDataLocation();
|
||||
+ QDir dir;
|
||||
+#if !defined(Q_OS_HAIKU)
|
||||
+ dir = Settings.appDataLocation();
|
||||
+#else
|
||||
+ char buffer[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
||||
+ find_directory(B_USER_LOG_DIRECTORY, -1, false, buffer, sizeof(buffer));
|
||||
+ QString path = QString::fromUtf8(buffer);
|
||||
+ dir = path;
|
||||
+#endif
|
||||
QFile logFile(dir.filePath("shotcut-log.txt"));
|
||||
logFile.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
dialog.setText(logFile.readAll());
|
||||
diff --git a/src/src.pro b/src/src.pro
|
||||
index 48a6fbf..504bff9 100644
|
||||
--- a/src/src.pro
|
||||
+++ b/src/src.pro
|
||||
@@ -401,11 +401,13 @@ win32 {
|
||||
SOURCES += \
|
||||
windowstools.cpp
|
||||
}
|
||||
-unix:!mac {
|
||||
+unix:!mac:!haiku {
|
||||
QT += x11extras
|
||||
+ LIBS += -lX11
|
||||
+}
|
||||
+unix:!mac {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += mlt++
|
||||
- LIBS += -lX11
|
||||
}
|
||||
|
||||
unix:!mac:isEmpty(PREFIX) {
|
||||
--
|
||||
2.30.0
|
||||
|
||||
151
media-video/shotcut/patches/shotcut-22.12.21.patchset
Normal file
151
media-video/shotcut/patches/shotcut-22.12.21.patchset
Normal file
@@ -0,0 +1,151 @@
|
||||
From a1705efaa30d6f1c677a5b29ae2e6a45a5a92d64 Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Tue, 18 Apr 2023 13:13:07 +0200
|
||||
Subject: Haiku build fixes
|
||||
|
||||
|
||||
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
|
||||
index 2f58f75..0ea9b9b 100644
|
||||
--- a/src/mainwindow.cpp
|
||||
+++ b/src/mainwindow.cpp
|
||||
@@ -133,7 +133,7 @@ MainWindow::MainWindow()
|
||||
, m_upgradeUrl("https://www.shotcut.org/download/")
|
||||
, m_keyframesDock(0)
|
||||
{
|
||||
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_HAIKU)
|
||||
QLibrary libJack("libjack.so.0");
|
||||
if (!libJack.load()) {
|
||||
QMessageBox::critical(this, qApp->applicationName(),
|
||||
diff --git a/src/spatialmedia/constants.h b/src/spatialmedia/constants.h
|
||||
index 3bceef7..bdce17e 100644
|
||||
--- a/src/spatialmedia/constants.h
|
||||
+++ b/src/spatialmedia/constants.h
|
||||
@@ -35,6 +35,52 @@
|
||||
# define htole64(x) qtoLittleEndian(x)
|
||||
# define be64toh(x) qFromBigEndian(x)
|
||||
# define le64toh(x) qFromLittleEndian(x)
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+#include <config/HaikuConfig.h>
|
||||
+#include <support/ByteOrder.h>
|
||||
+#include <support/SupportDefs.h>
|
||||
+
|
||||
+/*
|
||||
+ * General byte order swapping functions.
|
||||
+ */
|
||||
+#define bswap16(x) __swap_int16(x)
|
||||
+#define bswap32(x) __swap_int32(x)
|
||||
+#define bswap64(x) __swap_int64(x)
|
||||
+
|
||||
+/*
|
||||
+ * Host to big endian, host to little endian, big endian to host, and little
|
||||
+ * endian to host byte order functions as detailed in byteorder(9).
|
||||
+ */
|
||||
+#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
+#define htobe16(x) bswap16((x))
|
||||
+#define htobe32(x) bswap32((x))
|
||||
+#define htobe64(x) bswap64((x))
|
||||
+#define htole16(x) ((uint16_t)(x))
|
||||
+#define htole32(x) ((uint32_t)(x))
|
||||
+#define htole64(x) ((uint64_t)(x))
|
||||
+
|
||||
+#define be16toh(x) bswap16((x))
|
||||
+#define be32toh(x) bswap32((x))
|
||||
+#define be64toh(x) bswap64((x))
|
||||
+#define le16toh(x) ((uint16_t)(x))
|
||||
+#define le32toh(x) ((uint32_t)(x))
|
||||
+#define le64toh(x) ((uint64_t)(x))
|
||||
+#else /* BYTE_ORDER != LITTLE_ENDIAN */
|
||||
+#define htobe16(x) ((uint16_t)(x))
|
||||
+#define htobe32(x) ((uint32_t)(x))
|
||||
+#define htobe64(x) ((uint64_t)(x))
|
||||
+#define htole16(x) bswap16((x))
|
||||
+#define htole32(x) bswap32((x))
|
||||
+#define htole64(x) bswap64((x))
|
||||
+
|
||||
+#define be16toh(x) ((uint16_t)(x))
|
||||
+#define be32toh(x) ((uint32_t)(x))
|
||||
+#define be64toh(x) ((uint64_t)(x))
|
||||
+#define le16toh(x) bswap16((x))
|
||||
+#define le32toh(x) bswap32((x))
|
||||
+#define le64toh(x) bswap64((x))
|
||||
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
|
||||
#elif !defined(__FreeBSD__)
|
||||
# include <endian.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From 409c50bf19e09c39876daaa52559927ed2b2a7d3 Mon Sep 17 00:00:00 2001
|
||||
From: TURX <turx2003@gmail.com>
|
||||
Date: Mon, 20 Jan 2020 01:32:19 +0800
|
||||
Subject: fix Haiku support
|
||||
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 0c4b8cf..7c43871 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -52,6 +52,10 @@ static const char *kDefaultScaleRoundPolicy = "PassThrough";
|
||||
static const char *kDefaultScaleRoundPolicy = "Round";
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
static void mlt_log_handler(void *service, int mlt_level, const char *format, va_list args)
|
||||
{
|
||||
if (mlt_level > mlt_log_get_level())
|
||||
@@ -203,7 +207,14 @@ public:
|
||||
resourceArg = parser.positionalArguments();
|
||||
|
||||
// Startup logging.
|
||||
+#if !defined(Q_OS_HAIKU)
|
||||
dir.setPath(Settings.appDataLocation());
|
||||
+#else
|
||||
+ char buffer[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
||||
+ find_directory(B_USER_LOG_DIRECTORY, -1, false, buffer, sizeof(buffer));
|
||||
+ QString path = QString::fromUtf8(buffer);
|
||||
+ dir.setPath(path);
|
||||
+#endif
|
||||
if (!dir.exists()) dir.mkpath(dir.path());
|
||||
const QString logFileName = dir.filePath("shotcut-log.txt");
|
||||
QFile::remove(logFileName);
|
||||
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
|
||||
index 0ea9b9b..ddc354e 100644
|
||||
--- a/src/mainwindow.cpp
|
||||
+++ b/src/mainwindow.cpp
|
||||
@@ -103,6 +103,10 @@
|
||||
#include <clocale>
|
||||
#include <algorithm>
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <FindDirectory.h>
|
||||
+#endif
|
||||
+
|
||||
static bool eventDebugCallback(void **data)
|
||||
{
|
||||
QEvent *event = reinterpret_cast<QEvent *>(data[1]);
|
||||
@@ -3761,7 +3765,15 @@ void MainWindow::onDrawingMethodTriggered(QAction *action)
|
||||
void MainWindow::on_actionApplicationLog_triggered()
|
||||
{
|
||||
TextViewerDialog dialog(this);
|
||||
- QDir dir = Settings.appDataLocation();
|
||||
+ QDir dir;
|
||||
+#if !defined(Q_OS_HAIKU)
|
||||
+ dir = Settings.appDataLocation();
|
||||
+#else
|
||||
+ char buffer[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
||||
+ find_directory(B_USER_LOG_DIRECTORY, -1, false, buffer, sizeof(buffer));
|
||||
+ QString path = QString::fromUtf8(buffer);
|
||||
+ dir = path;
|
||||
+#endif
|
||||
QFile logFile(dir.filePath("shotcut-log.txt"));
|
||||
logFile.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
dialog.setText(logFile.readAll());
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -5,16 +5,16 @@ COPYRIGHT="2011-2019 by Meltytech, LLC."
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/mltframework/shotcut/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="e07a9f55d0d0c7f4795c34a56ad9e5f4ecb6317f29f477838eb83f1d790e2637"
|
||||
SOURCE_DIR="shotcut-$portVersion"
|
||||
CHECKSUM_SHA256="1b9a4f87b16a9751f9cb41588f22af4c00f085105d82cf21d095d9f3c280bc86"
|
||||
PATCHES="shotcut-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?all"
|
||||
ARCHITECTURES="?all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
PROVIDES="
|
||||
shotcut$secondaryArchSuffix = $portVersion
|
||||
app:shotcut
|
||||
lib:libcutelogger$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
@@ -22,9 +22,10 @@ REQUIRES="
|
||||
cmd:melt
|
||||
frei0r$secondaryArchSuffix
|
||||
ladspa_sdk$secondaryArchSuffix
|
||||
lib:libfftw3$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libmlt++$secondaryArchSuffix
|
||||
lib:libmlt$secondaryArchSuffix
|
||||
lib:libmlt++_7$secondaryArchSuffix
|
||||
lib:libmlt_7$secondaryArchSuffix
|
||||
lib:libQt5$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Designer$secondaryArchSuffix
|
||||
@@ -35,7 +36,7 @@ REQUIRES="
|
||||
lib:libQt5Test$secondaryArchSuffix
|
||||
lib:libQt5WebKitWidgets$secondaryArchSuffix
|
||||
lib:libQt5Xml$secondaryArchSuffix
|
||||
lib:libsdl2_2.0$secondaryArchSuffix
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
lib:libsqlite3$secondaryArchSuffix
|
||||
lib:libwebm$secondaryArchSuffix
|
||||
lib:libx264$secondaryArchSuffix
|
||||
@@ -45,9 +46,10 @@ BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
frei0r${secondaryArchSuffix}_devel
|
||||
ladspa_sdk${secondaryArchSuffix}_devel
|
||||
devel:libfftw3$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libmlt++$secondaryArchSuffix
|
||||
devel:libmlt$secondaryArchSuffix
|
||||
devel:libmlt++_7$secondaryArchSuffix
|
||||
devel:libmlt_7$secondaryArchSuffix
|
||||
devel:libQt5$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Designer$secondaryArchSuffix
|
||||
@@ -58,10 +60,12 @@ BUILD_REQUIRES="
|
||||
devel:libQt5Test$secondaryArchSuffix
|
||||
devel:libQt5WebKitWidgets$secondaryArchSuffix
|
||||
devel:libQt5Xml$secondaryArchSuffix
|
||||
devel:libSDL2_2.0$secondaryArchSuffix
|
||||
devel:libwebm$secondaryArchSuffix
|
||||
devel:libx264$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:getconf
|
||||
cmd:lrelease$secondaryArchSuffix >= 5
|
||||
@@ -72,22 +76,17 @@ BUILD_PREREQUIRES="
|
||||
|
||||
BUILD()
|
||||
{
|
||||
qmake PREFIX=$prefix SHOTCUT_VERSION=HAIKU-$portVersion \
|
||||
DEFINES+=SHOTCUT_NOUPGRADE
|
||||
make $jobArgs
|
||||
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
make -C build install
|
||||
|
||||
mkdir -p $appsDir $dataDir $manDir
|
||||
mv $prefix/share/man/man1 $manDir
|
||||
mv $prefix/share/metainfo $dataDir
|
||||
mv $prefix/share/mime/packages $dataDir
|
||||
mv $prefix/share/shotcut $dataDir
|
||||
rm -rf $prefix/share
|
||||
mkdir -p $appsDir
|
||||
|
||||
mv $prefix/bin/shotcut $appsDir/Shotcut
|
||||
mv $binDir/shotcut $appsDir/Shotcut
|
||||
addAppDeskbarSymlink $appsDir/Shotcut
|
||||
}
|
||||
Reference in New Issue
Block a user