diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-05-04 22:28:33 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-05-04 22:28:33 +0100 |
commit | a978c074e4272bb901fbe4a10de0a7b2af574f17 (patch) | |
tree | 8c764c1cc0576389ce22abd317bceba71ea5732d /media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch | |
parent | 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (diff) |
gentoo resync : 04.05.2021
Diffstat (limited to 'media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch')
-rw-r--r-- | media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch b/media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch new file mode 100644 index 000000000000..20e8f6bb5f31 --- /dev/null +++ b/media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch @@ -0,0 +1,96 @@ +diff -ruN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2021-04-28 20:19:06.995353847 +0300 ++++ b/CMakeLists.txt 2021-04-28 21:06:25.811315173 +0300 +@@ -86,7 +86,17 @@ + set(QAPPLICATION_CLASS + QApplication + CACHE STRING "Inheritance class for SingleApplication") +-add_subdirectory(external/singleapplication) ++ ++if(USE_EXTERNAL_SINGLEAPPLICATION) ++ # look for external QtSingleApplication ++ # package dev-qt/qtsingleapplication provides no symlink to current version ++ set(qtsingleapplication_libs libQt5Solutions_SingleApplication-2.6 Qt5Solutions_SingleApplication-2.6) ++ find_library(QTSINGLEAPPLICATION_LIBRARY NAMES ${qtsingleapplication_libs}) ++ message(STATUS "Using external SingleApplication library") ++else() ++ add_subdirectory(external/singleapplication) ++ set(QTSINGLEAPPLICATION_LIBRARY SingleApplication::SingleApplication) ++endif() + + if(USE_EXTERNAL_SPDLOG) + find_package(spdlog REQUIRED) +diff -ruN a/src/CMakeLists.txt b/src/CMakeLists.txt +--- a/src/CMakeLists.txt 2021-04-28 20:19:07.048354525 +0300 ++++ b/src/CMakeLists.txt 2021-04-28 21:07:44.651559479 +0300 +@@ -107,7 +107,7 @@ + + target_sources( + flameshot +- PRIVATE # ${CMAKE_CURRENT_SOURCE_DIR}/../external/singleapplication/singleapplication.cpp ++ PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/src/color_utils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/src/color_wheel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/include/color_wheel.hpp +@@ -120,7 +120,6 @@ + flameshot + PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/> +- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/singleapplication/> + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/include> + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../dbus/> + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cli> +@@ -153,6 +152,15 @@ + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/widgets/capture> + $<INSTALL_INTERFACE:include/mylib>) + ++if (USE_EXTERNAL_SINGLEAPPLICATION) ++ add_compile_definitions(USE_EXTERNAL_SINGLEAPPLICATION=1) ++else () ++ target_include_directories( ++ flameshot ++ PUBLIC ++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/singleapplication>) ++endif() ++ + target_link_libraries( + flameshot + project_warnings +@@ -161,7 +169,7 @@ + Qt5::DBus + Qt5::Network + Qt5::Widgets +- SingleApplication::SingleApplication ++ ${QTSINGLEAPPLICATION_LIBRARY} + spdlog::spdlog + ) + +diff -ruN a/src/main.cpp b/src/main.cpp +--- a/src/main.cpp 2021-04-28 20:19:07.051354563 +0300 ++++ b/src/main.cpp 2021-04-28 20:59:32.921808263 +0300 +@@ -1,7 +1,12 @@ + // SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors + +-#include "singleapplication.h" ++#ifndef USE_EXTERNAL_SINGLEAPPLICATION ++ #include "singleapplication.h" ++#else ++ #include "QtSolutions/qtsingleapplication.h" ++#endif ++ + #include "src/cli/commandlineparser.h" + #include "src/config/styleoverride.h" + #include "src/core/capturerequest.h" +@@ -65,7 +70,11 @@ + + // no arguments, just launch Flameshot + if (argc == 1) { ++#ifndef USE_EXTERNAL_SINGLEAPPLICATION + SingleApplication app(argc, argv); ++#else ++ QtSingleApplication app(argc, argv); ++#endif + QApplication::setStyle(new StyleOverride); + + QTranslator translator, qtTranslator; |