diff options
author | Pavel Kalugin <pavel@pavelthebest.me> | 2021-04-28 22:04:47 +0300 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-04-30 10:19:18 +0300 |
commit | 23db2bfabfb85b73d30cbced60000ef62cd61f3c (patch) | |
tree | 0afc67c5852ef1faa5342bd1a018c7d9a41b3df6 /media-gfx/flameshot | |
parent | sys-devel/gcc: fail if riscv32 patch does not exist (diff) | |
download | gentoo-23db2bfabfb85b73d30cbced60000ef62cd61f3c.tar.gz gentoo-23db2bfabfb85b73d30cbced60000ef62cd61f3c.tar.bz2 gentoo-23db2bfabfb85b73d30cbced60000ef62cd61f3c.zip |
media-gfx/flameshot: version bump to 0.9.0
- unbundle qtsingleapplication
- add spdlog to dependencies
- use xdg instead of xdg-utils to avoid boilerplate
- sort license names alphabetically
Closes: https://bugs.gentoo.org/777414
Suggested-by: shiz01 <shiz01@tutanota.com>
Signed-off-by: Pavel Kalugin <pavel@pavelthebest.me>
Closes: https://github.com/gentoo/gentoo/pull/20584
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-gfx/flameshot')
-rw-r--r-- | media-gfx/flameshot/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch | 96 | ||||
-rw-r--r-- | media-gfx/flameshot/flameshot-0.9.0.ebuild | 50 |
3 files changed, 147 insertions, 0 deletions
diff --git a/media-gfx/flameshot/Manifest b/media-gfx/flameshot/Manifest index bf5fbbbba36b..33e42fb44c6f 100644 --- a/media-gfx/flameshot/Manifest +++ b/media-gfx/flameshot/Manifest @@ -1 +1,2 @@ DIST flameshot-0.6.0.tar.gz 641561 BLAKE2B f9e87373d84c1a841f70cd9c13b504865a0ef23d0fb29848f2270171459afe9c6852e12c712ebdc7cf3cfc62214d7b7507b85cf21838d0ebed33bee1e39f4aad SHA512 194127032ab0f62a6ba2698688e11b2d4e6f0e04a282144f5fbb6c232eeebc71371af2d55abbb6e98b8649dee036e6f0a6ef55710e4321a60fd5ac6e453ab975 +DIST flameshot-0.9.0.tar.gz 7659641 BLAKE2B 38151bf333802ccbaa6c2292799958fe4c75f5a978eea9b2314c5eb264fb569cfcce73afac79b80423686d3a10ec54300ad4cacd3be9a6c6e58c72f59c23fb46 SHA512 888422cd66b7c90cd6da0e824a2c12c0ca7e3cfdfd0a0499868acf9609e6c3a0977f816c656690fa101971b98a3f560cf7849b93079c091b25155360cb20ea11 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..2f6c1bbbe3f3 --- /dev/null +++ b/media-gfx/flameshot/flameshot-0.9.0.ebuild @@ -0,0 +1,50 @@ +# 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" +) + +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 +} |