From 1d6407528b3e8575d2f6ae9fae3fd4de67b77f0c Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sun, 6 Dec 2020 00:27:37 +1000 Subject: [PATCH] Flameshot: bump version --- ...ot-0.6.0.recipe => flameshot-0.8.5.recipe} | 18 ++- ....6.0.patchset => flameshot-0.8.5.patchset} | 128 +++++------------- 2 files changed, 48 insertions(+), 98 deletions(-) rename media-gfx/flameshot/{flameshot-0.6.0.recipe => flameshot-0.8.5.recipe} (86%) rename media-gfx/flameshot/patches/{flameshot-0.6.0.patchset => flameshot-0.8.5.patchset} (54%) diff --git a/media-gfx/flameshot/flameshot-0.6.0.recipe b/media-gfx/flameshot/flameshot-0.8.5.recipe similarity index 86% rename from media-gfx/flameshot/flameshot-0.6.0.recipe rename to media-gfx/flameshot/flameshot-0.8.5.recipe index 6df42e315..700bc13b6 100644 --- a/media-gfx/flameshot/flameshot-0.6.0.recipe +++ b/media-gfx/flameshot/flameshot-0.8.5.recipe @@ -7,11 +7,11 @@ DESCRIPTION="Features * DBus interface. * Upload to Imgur." HOMEPAGE="https://github.com/lupoDharkael/flameshot/" -COPYRIGHT="2019 lupoDharkael" +COPYRIGHT="2020 lupoDharkael" LICENSE="GNU GPL v3" -REVISION="3" +REVISION="1" SOURCE_URI="https://github.com/lupoDharkael/flameshot/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="61b3a1969d6e17d80d5d90a3fce53ca5ae78fa21f9a45e5a19b0b32ea815a589" +CHECKSUM_SHA256="f820c1f8cd464988cfcfc1af1fbcea2a3d0e5c4fb32accc3f54d93a8b5e1e890" PATCHES="flameshot-$portVersion.patchset" ADDITIONAL_FILES=" flameshot.rdef.in @@ -27,6 +27,7 @@ PROVIDES=" " REQUIRES=" haiku$secondaryArchSuffix + cmd:dbus_launch lib:libGL$secondaryArchSuffix lib:libQt5Core$secondaryArchSuffix lib:libQt5DBus$secondaryArchSuffix @@ -41,25 +42,28 @@ BUILD_REQUIRES=" devel:libQt5Core$secondaryArchSuffix " BUILD_PREREQUIRES=" + cmd:cmake cmd:gcc$secondaryArchSuffix - cmd:lrelease$secondaryArchSuffix >= 5 + cmd:lrelease$secondaryArchSuffix cmd:make - cmd:qmake$secondaryArchSuffix >= 5 " PATCH() { - cp -f $sourceDir/../../additional-files/flameshot.png $sourceDir/img/app/flameshot.png + cp -f $sourceDir/../../additional-files/flameshot.png $sourceDir/data/img/app/flameshot.png } BUILD() { - qmake PREFIX=$appsDir/Flameshot + mkdir -p build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=$appsDir/Flameshot make $jobArgs } INSTALL() { + cd build make install mv $appsDir/Flameshot/bin/flameshot \ diff --git a/media-gfx/flameshot/patches/flameshot-0.6.0.patchset b/media-gfx/flameshot/patches/flameshot-0.8.5.patchset similarity index 54% rename from media-gfx/flameshot/patches/flameshot-0.6.0.patchset rename to media-gfx/flameshot/patches/flameshot-0.8.5.patchset index dbde9e4ef..8409640d1 100644 --- a/media-gfx/flameshot/patches/flameshot-0.6.0.patchset +++ b/media-gfx/flameshot/patches/flameshot-0.8.5.patchset @@ -1,85 +1,17 @@ -From 37c38cf8bb9b7ec66a4e7adf640b157992469b9b Mon Sep 17 00:00:00 2001 +From 24a735fc878e61a74fe83ddc0473983a55430058 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 21 Aug 2019 21:38:36 +1000 -Subject: Fix crush - - -diff --git a/src/utils/filenamehandler.cpp b/src/utils/filenamehandler.cpp -index d31bcfd..ae1f03e 100644 ---- a/src/utils/filenamehandler.cpp -+++ b/src/utils/filenamehandler.cpp -@@ -23,7 +23,9 @@ - #include - - FileNameHandler::FileNameHandler(QObject *parent) : QObject(parent) { -+#ifndef __HAIKU__ - std::locale::global(std::locale("")); -+#endif - } - - QString FileNameHandler::parsedPattern() { --- -2.28.0 - - -From af6feac4c9b47b4cd73a6307271ecf581c13b3ad Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 21 Aug 2020 21:37:07 +1000 -Subject: Fix build for Qt 5.15 - - -diff --git a/src/third-party/Qt-Color-Widgets/src/color_wheel.cpp b/src/third-party/Qt-Color-Widgets/src/color_wheel.cpp -index 335b29c..a9a6fba 100644 ---- a/src/third-party/Qt-Color-Widgets/src/color_wheel.cpp -+++ b/src/third-party/Qt-Color-Widgets/src/color_wheel.cpp -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - #include - #include - #include --- -2.28.0 - - -From 41fc7ded2fbacbefdcb097ed0604f27ad113d944 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 21 Aug 2020 21:37:53 +1000 -Subject: Fix build for Qt 5.15 - - -diff --git a/src/tools/arrow/arrowtool.h b/src/tools/arrow/arrowtool.h -index abdbe33..1dd0471 100644 ---- a/src/tools/arrow/arrowtool.h -+++ b/src/tools/arrow/arrowtool.h -@@ -19,6 +19,7 @@ - - #include "src/tools/abstracttwopointtool.h" - #include -+#include - - class ArrowTool : public AbstractTwoPointTool { - Q_OBJECT --- -2.28.0 - - -From f92403f65f9a4d6a39dc0075a7f9023b11c083e1 Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 21 Aug 2020 21:38:13 +1000 +Date: Sun, 6 Dec 2020 00:08:29 +1000 Subject: Add support for autolaunch diff --git a/src/utils/confighandler.cpp b/src/utils/confighandler.cpp -index 6eef22a..9b91878 100644 +index ee50acb..0a0a144 100644 --- a/src/utils/confighandler.cpp +++ b/src/utils/confighandler.cpp -@@ -240,7 +240,10 @@ void ConfigHandler::setKeepOpenAppLauncher(const bool keepOpen) { - - bool ConfigHandler::startupLaunchValue() { +@@ -296,7 +296,10 @@ bool ConfigHandler::verifyLaunchFile() + { bool res = false; + -#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) +#if defined(Q_OS_HAIKU) + QString path = QDir::homePath() + "/config/settings/boot/launch/Flameshot"; @@ -88,10 +20,10 @@ index 6eef22a..9b91878 100644 QString path = QDir::homePath() + "/.config/autostart/Flameshot.desktop"; res = QFile(path).exists(); #elif defined(Q_OS_WIN) -@@ -254,7 +257,16 @@ bool ConfigHandler::startupLaunchValue() { - } +@@ -311,7 +314,16 @@ bool ConfigHandler::verifyLaunchFile() - void ConfigHandler::setStartupLaunch(const bool start) { + void ConfigHandler::setStartupLaunch(const bool start) + { -#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) +#if defined(Q_OS_HAIKU) + QString linkname = QDir::homePath() + "/config/settings/boot/launch/Flameshot"; @@ -103,36 +35,36 @@ index 6eef22a..9b91878 100644 + linkFile.remove(); + } +#elif defined(Q_OS_LINUX) || defined(Q_OS_UNIX) - QString path = QDir::homePath() + "/.config/autostart/Flameshot.desktop"; - QFile file(path); - if (start) { + QString path = QDir::homePath() + "/.config/autostart/"; + QDir autostartDir(path); + if (!autostartDir.exists()) { -- 2.28.0 -From fe04c9b90cc719990d8974b38c6bf6533d3d91d3 Mon Sep 17 00:00:00 2001 +From 4b818982fc484de02d324b579ee15981e5355416 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 21 Aug 2020 21:41:02 +1000 +Date: Sun, 6 Dec 2020 00:09:32 +1000 Subject: DBus autostart diff --git a/src/main.cpp b/src/main.cpp -index 83fa1c1..4bf0db9 100644 +index 2d44f54..314642f 100644 --- a/src/main.cpp +++ b/src/main.cpp -@@ -28,6 +28,7 @@ +@@ -30,6 +30,7 @@ #include #include - #include + #include +#include #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) #include "src/core/flameshotdbusadapter.h" -@@ -44,7 +45,28 @@ int main(int argc, char *argv[]) { - +@@ -48,6 +49,28 @@ int main(int argc, char* argv[]) // no arguments, just launch Flameshot if (argc == 1) { - SingleApplication app(argc, argv); + SingleApplication app(argc, argv); ++ +#ifdef Q_OS_HAIKU + int status=0; + QProcess dbusProcess; @@ -154,10 +86,10 @@ index 83fa1c1..4bf0db9 100644 + putenv(str.toLatin1().data()); +#endif + + QApplication::setStyle(new StyleOverride); - QTranslator translator; - QStringList trPaths = PathInfo::translationsPaths(); -@@ -77,10 +99,30 @@ int main(int argc, char *argv[]) { + QTranslator translator, qtTranslator; +@@ -89,10 +112,30 @@ int main(int argc, char* argv[]) // Exporting captures must be connected after the dbus interface // or the dbus signal gets blocked until we end the exports. c->enableExports(); @@ -188,6 +120,20 @@ index 83fa1c1..4bf0db9 100644 /*--------------| * CLI parsing | * ------------*/ +diff --git a/src/utils/filenamehandler.cpp b/src/utils/filenamehandler.cpp +index e3eb0e7..fb64d60 100644 +--- a/src/utils/filenamehandler.cpp ++++ b/src/utils/filenamehandler.cpp +@@ -25,7 +25,9 @@ + FileNameHandler::FileNameHandler(QObject* parent) + : QObject(parent) + { ++#ifndef __HAIKU__ + std::locale::global(std::locale("")); ++#endif + } + + QString FileNameHandler::parsedPattern() -- 2.28.0