diff --git a/media-video/shotcut/patches/shotcut-19.12.31.patchset b/media-video/shotcut/patches/shotcut-20.11.28.patchset similarity index 64% rename from media-video/shotcut/patches/shotcut-19.12.31.patchset rename to media-video/shotcut/patches/shotcut-20.11.28.patchset index 955a4eaf2..8f422dce6 100644 --- a/media-video/shotcut/patches/shotcut-19.12.31.patchset +++ b/media-video/shotcut/patches/shotcut-20.11.28.patchset @@ -1,34 +1,15 @@ -From 91e3e861a7cc81c3c039611d664c7479e310a2d4 Mon Sep 17 00:00:00 2001 +From bde99b02738213322491a927f079363f6e5b0d01 Mon Sep 17 00:00:00 2001 From: TURX Date: Mon, 20 Jan 2020 01:32:19 +0800 -Subject: [PATCH] fix Haiku support +Subject: fix Haiku support ---- - src/jobs/meltjob.cpp | 2 ++ - src/main.cpp | 11 +++++++++++ - src/mainwindow.cpp | 14 +++++++++++++- - src/src.pro | 6 ++++-- - 4 files changed, 30 insertions(+), 3 deletions(-) -diff --git a/src/jobs/meltjob.cpp b/src/jobs/meltjob.cpp -index 10156782..5b11a0b6 100644 ---- a/src/jobs/meltjob.cpp -+++ b/src/jobs/meltjob.cpp -@@ -87,6 +87,8 @@ void MeltJob::start() - QString shotcutPath = qApp->applicationDirPath(); - #ifdef Q_OS_WIN - QFileInfo meltPath(shotcutPath, "qmelt.exe"); -+#elif defined(Q_OS_HAIKU) -+ QFileInfo meltPath(shotcutPath, "melt"); - #else - QFileInfo meltPath(shotcutPath, "qmelt"); - #endif diff --git a/src/main.cpp b/src/main.cpp -index 6d0d18fe..b2216f6d 100644 +index 267bae8..8a91bbe 100644 --- a/src/main.cpp +++ b/src/main.cpp -@@ -44,6 +44,10 @@ extern "C" - } +@@ -51,6 +51,10 @@ static const char* kDefaultScaleRoundPolicy = "RoundPreferFloor"; + static const char* kDefaultScaleRoundPolicy = "Round"; #endif +#ifdef Q_OS_HAIKU @@ -38,26 +19,26 @@ index 6d0d18fe..b2216f6d 100644 static void mlt_log_handler(void *service, int mlt_level, const char *format, va_list args) { if (mlt_level > mlt_log_get_level()) -@@ -182,7 +186,14 @@ public: +@@ -196,7 +200,14 @@ public: resourceArg = parser.positionalArguments(); // Startup logging. +#if !defined(Q_OS_HAIKU) - dir = Settings.appDataLocation(); + 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 = path; ++ 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 a170be4e..a3de57da 100644 +index a478128..00e383a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp -@@ -90,6 +90,10 @@ +@@ -96,6 +96,10 @@ #include #include @@ -68,7 +49,7 @@ index a170be4e..a3de57da 100644 static bool eventDebugCallback(void **data) { QEvent *event = reinterpret_cast(data[1]); -@@ -3657,7 +3661,15 @@ void MainWindow::onDrawingMethodTriggered(QAction *action) +@@ -3861,7 +3865,15 @@ void MainWindow::onDrawingMethodTriggered(QAction *action) void MainWindow::on_actionApplicationLog_triggered() { TextViewerDialog dialog(this); @@ -86,12 +67,12 @@ index a170be4e..a3de57da 100644 logFile.open(QIODevice::ReadOnly | QIODevice::Text); dialog.setText(logFile.readAll()); diff --git a/src/src.pro b/src/src.pro -index 8d7294da..9030c5f3 100644 +index 48a6fbf..504bff9 100644 --- a/src/src.pro +++ b/src/src.pro -@@ -365,11 +365,13 @@ win32 { - } - RC_FILE = ../packaging/windows/shotcut.rc +@@ -401,11 +401,13 @@ win32 { + SOURCES += \ + windowstools.cpp } -unix:!mac { +unix:!mac:!haiku { @@ -106,5 +87,5 @@ index 8d7294da..9030c5f3 100644 unix:!mac:isEmpty(PREFIX) { -- -2.20.1 +2.30.0 diff --git a/media-video/shotcut/shotcut-19.12.31.recipe b/media-video/shotcut/shotcut-20.11.28.recipe similarity index 93% rename from media-video/shotcut/shotcut-19.12.31.recipe rename to media-video/shotcut/shotcut-20.11.28.recipe index 913333c8f..ff6177238 100644 --- a/media-video/shotcut/shotcut-19.12.31.recipe +++ b/media-video/shotcut/shotcut-20.11.28.recipe @@ -3,9 +3,9 @@ DESCRIPTION="Major features include support for a wide range of formats." HOMEPAGE="https://shotcut.org/" COPYRIGHT="2011-2019 by Meltytech, LLC." LICENSE="GNU GPL v3" -REVISION="2" +REVISION="1" SOURCE_URI="https://github.com/mltframework/shotcut/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="d7017d605edb581cb47de4844827bd627c159c810614381f4586ef35e8c3d97a" +CHECKSUM_SHA256="e07a9f55d0d0c7f4795c34a56ad9e5f4ecb6317f29f477838eb83f1d790e2637" SOURCE_DIR="shotcut-$portVersion" PATCHES="shotcut-$portVersion.patchset" @@ -72,7 +72,8 @@ BUILD_PREREQUIRES=" BUILD() { - qmake PREFIX=$prefix + qmake PREFIX=$prefix SHOTCUT_VERSION=HAIKU-$portVersion \ + DEFINES+=SHOTCUT_NOUPGRADE make $jobArgs }