diff options
Diffstat (limited to 'media-gfx/flameshot')
4 files changed, 164 insertions, 0 deletions
diff --git a/media-gfx/flameshot/Manifest b/media-gfx/flameshot/Manifest index 7622c0466f0d..65c45fa8472b 100644 --- a/media-gfx/flameshot/Manifest +++ b/media-gfx/flameshot/Manifest @@ -1,5 +1,9 @@ AUX flameshot-0.6.0-missing-include-fix.patch 869 BLAKE2B edccee0ef880470652535d65797800dc675e40556e4cdf560e257e60e649924316e5a0fdc271507763d90734fc60290e1ddecab417148542e8b318041ca9690c SHA512 852a3c12e1fee4a90e6a31c5c17a371a2b44fe1a399a6e11f8a760d5436ea73fa7aed9ebb906f67f7efbd4315e9c092c7cdf76a464f916df6893cc13bd361f7c AUX flameshot-0.6.0-unbundle-qtsingleapplication.patch 1505 BLAKE2B 51b8c59945f580d7777d4f9aeb954196bbd7e473301153053d451e0e07f08abb50a21fb993f940ab6ab40bfbbc6a14e04852d8e6a54e7ce4047ab64feb8cc2b5 SHA512 7543862bdead4f58435be97d09e4045ec1a9e77f90947c55076510da891627e189dc052cbd4ec8947203d5fa2c985220c2cd3fbb6cb9470222b3f5d42c61cf14 +AUX flameshot-0.9.0-dont-force-ccache.patch 385 BLAKE2B 2acfd1410e247c6aec3dc2c9ea886b25de25f5432131baf787d4a9dd5f8db114e08cfa7baaff7f83e3228431fc97ad65664c31d4c72b8eca15bd6f5db18f94c9 SHA512 a0c6cefac528e822b2b65fd693830cb96c2ea1df393ebfc2718324411199ed1b82e9121a6018622d5b4ed8bdbf3b14c06c201925a2fd69fa96ac1f9d297c4f04 +AUX flameshot-0.9.0-unbundle-qtsingleapplication.patch 3613 BLAKE2B cc5681081eeb48d3db2e2ab031fbfe4d96d6a52f5078b73b1e6af45b0aa98d078d75e4b4d5f3f50e0d93e7e3be0f8ae515ab096c7513e0f4974f674fc5f16395 SHA512 ce7014b932193650405852957b27c779c567285d46a85e3d3bb89c05449491d15b154efc213bd8f8370660ecadf048adfbf3ce3ade0fcd209fb9e2be9805e8f5 DIST flameshot-0.6.0.tar.gz 641561 BLAKE2B f9e87373d84c1a841f70cd9c13b504865a0ef23d0fb29848f2270171459afe9c6852e12c712ebdc7cf3cfc62214d7b7507b85cf21838d0ebed33bee1e39f4aad SHA512 194127032ab0f62a6ba2698688e11b2d4e6f0e04a282144f5fbb6c232eeebc71371af2d55abbb6e98b8649dee036e6f0a6ef55710e4321a60fd5ac6e453ab975 +DIST flameshot-0.9.0.tar.gz 7659641 BLAKE2B 38151bf333802ccbaa6c2292799958fe4c75f5a978eea9b2314c5eb264fb569cfcce73afac79b80423686d3a10ec54300ad4cacd3be9a6c6e58c72f59c23fb46 SHA512 888422cd66b7c90cd6da0e824a2c12c0ca7e3cfdfd0a0499868acf9609e6c3a0977f816c656690fa101971b98a3f560cf7849b93079c091b25155360cb20ea11 EBUILD flameshot-0.6.0.ebuild 1167 BLAKE2B 04249a8ba0efb3bfbdd9435dac5a80d9418d01c1c811e9111ce96ddf70c7869f458432e36bc50956cfd9d1a7cd83996b6d1043da442cce0237c370c27748b1e0 SHA512 1be8a46785eff93665ec860d080ecf43afbeee9b4879d583065d87ee3b7ea9ed5662e01e295408acd1a6366f8761ed4973802e282c1bbcb20481bfdf5414da49 +EBUILD flameshot-0.9.0.ebuild 1036 BLAKE2B 9b7ca625827cc886934098444d9361d3433c8809a764987080901c1f4f0785468677cd5309e65e1bf1f3def0b5814770036980d91299db70b6d2163d08d5aae8 SHA512 6a5e5083cc0c78d15935fb4804313b2c24452d21321e12e99fdab62204bcf0328b42534a371b9b195df822a2cce7386e9071d604ed670b65874ad9ec828ef4c4 MISC metadata.xml 396 BLAKE2B aa67921bf3b8f848824726187c8645c3d48e4a4b3e629ac32fea19e9764408871beddb474e10b9f8f106ff9caa9d0b0fbd87441f14275383c95c3062d47e071f SHA512 7b9df389d3add92f56cc7fcd95fd4986883860e088d678c20d9ca3d47c80faa45a2242bc74b8d54b54999279a8be1d7d04fac5f741db5876e45577c6df8413aa diff --git a/media-gfx/flameshot/files/flameshot-0.9.0-dont-force-ccache.patch b/media-gfx/flameshot/files/flameshot-0.9.0-dont-force-ccache.patch new file mode 100644 index 000000000000..85f43fc6c98e --- /dev/null +++ b/media-gfx/flameshot/files/flameshot-0.9.0-dont-force-ccache.patch @@ -0,0 +1,13 @@ +diff -ruN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2021-05-03 12:55:07.561259897 +0300 ++++ b/CMakeLists.txt 2021-05-03 12:55:36.772461830 +0300 +@@ -70,9 +70,6 @@ + + add_library(project_warnings INTERFACE) + +-# enable cache system +-include(cmake/Cache.cmake) +- + # standard compiler warnings + include(cmake/CompilerWarnings.cmake) + # set_project_warnings(project_warnings) 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; diff --git a/media-gfx/flameshot/flameshot-0.9.0.ebuild b/media-gfx/flameshot/flameshot-0.9.0.ebuild new file mode 100644 index 000000000000..0b3b2178cb12 --- /dev/null +++ b/media-gfx/flameshot/flameshot-0.9.0.ebuild @@ -0,0 +1,51 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake desktop xdg + +DESCRIPTION="Powerful yet simple to use screenshot software" +HOMEPAGE="https://flameshot.org https://github.com/flameshot-org/flameshot" +SRC_URI="https://github.com/flameshot-org/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0 FreeArt GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=" + dev-qt/qtcore:5 + dev-qt/qtgui:5 + =dev-qt/qtsingleapplication-2.6*[qt5(+),X] + dev-qt/qtwidgets:5 + dev-qt/qtsvg:5 + dev-qt/qtnetwork:5 + dev-qt/qtdbus:5 + sys-apps/dbus + dev-libs/spdlog +" +BDEPEND=" + dev-qt/linguist-tools:5 +" +RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}/${P}-unbundle-qtsingleapplication.patch" + "${FILESDIR}/${P}-dont-force-ccache.patch" +) + +src_prepare() { + rm -r external/spdlog || die + rm -r external/singleapplication || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DUSE_EXTERNAL_SPDLOG=1 + -DUSE_EXTERNAL_SINGLEAPPLICATION=1 + ) + + cmake_src_configure +} |