1 |
commit: 23db2bfabfb85b73d30cbced60000ef62cd61f3c |
2 |
Author: Pavel Kalugin <pavel <AT> pavelthebest <DOT> me> |
3 |
AuthorDate: Wed Apr 28 19:04:47 2021 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 30 07:19:18 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23db2bfa |
7 |
|
8 |
media-gfx/flameshot: version bump to 0.9.0 |
9 |
|
10 |
- unbundle qtsingleapplication |
11 |
- add spdlog to dependencies |
12 |
- use xdg instead of xdg-utils to avoid boilerplate |
13 |
- sort license names alphabetically |
14 |
|
15 |
Closes: https://bugs.gentoo.org/777414 |
16 |
Suggested-by: shiz01 <shiz01 <AT> tutanota.com> |
17 |
Signed-off-by: Pavel Kalugin <pavel <AT> pavelthebest.me> |
18 |
Closes: https://github.com/gentoo/gentoo/pull/20584 |
19 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
20 |
|
21 |
media-gfx/flameshot/Manifest | 1 + |
22 |
...meshot-0.9.0-unbundle-qtsingleapplication.patch | 96 ++++++++++++++++++++++ |
23 |
media-gfx/flameshot/flameshot-0.9.0.ebuild | 50 +++++++++++ |
24 |
3 files changed, 147 insertions(+) |
25 |
|
26 |
diff --git a/media-gfx/flameshot/Manifest b/media-gfx/flameshot/Manifest |
27 |
index bf5fbbbba36..33e42fb44c6 100644 |
28 |
--- a/media-gfx/flameshot/Manifest |
29 |
+++ b/media-gfx/flameshot/Manifest |
30 |
@@ -1 +1,2 @@ |
31 |
DIST flameshot-0.6.0.tar.gz 641561 BLAKE2B f9e87373d84c1a841f70cd9c13b504865a0ef23d0fb29848f2270171459afe9c6852e12c712ebdc7cf3cfc62214d7b7507b85cf21838d0ebed33bee1e39f4aad SHA512 194127032ab0f62a6ba2698688e11b2d4e6f0e04a282144f5fbb6c232eeebc71371af2d55abbb6e98b8649dee036e6f0a6ef55710e4321a60fd5ac6e453ab975 |
32 |
+DIST flameshot-0.9.0.tar.gz 7659641 BLAKE2B 38151bf333802ccbaa6c2292799958fe4c75f5a978eea9b2314c5eb264fb569cfcce73afac79b80423686d3a10ec54300ad4cacd3be9a6c6e58c72f59c23fb46 SHA512 888422cd66b7c90cd6da0e824a2c12c0ca7e3cfdfd0a0499868acf9609e6c3a0977f816c656690fa101971b98a3f560cf7849b93079c091b25155360cb20ea11 |
33 |
|
34 |
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 |
35 |
new file mode 100644 |
36 |
index 00000000000..20e8f6bb5f3 |
37 |
--- /dev/null |
38 |
+++ b/media-gfx/flameshot/files/flameshot-0.9.0-unbundle-qtsingleapplication.patch |
39 |
@@ -0,0 +1,96 @@ |
40 |
+diff -ruN a/CMakeLists.txt b/CMakeLists.txt |
41 |
+--- a/CMakeLists.txt 2021-04-28 20:19:06.995353847 +0300 |
42 |
++++ b/CMakeLists.txt 2021-04-28 21:06:25.811315173 +0300 |
43 |
+@@ -86,7 +86,17 @@ |
44 |
+ set(QAPPLICATION_CLASS |
45 |
+ QApplication |
46 |
+ CACHE STRING "Inheritance class for SingleApplication") |
47 |
+-add_subdirectory(external/singleapplication) |
48 |
++ |
49 |
++if(USE_EXTERNAL_SINGLEAPPLICATION) |
50 |
++ # look for external QtSingleApplication |
51 |
++ # package dev-qt/qtsingleapplication provides no symlink to current version |
52 |
++ set(qtsingleapplication_libs libQt5Solutions_SingleApplication-2.6 Qt5Solutions_SingleApplication-2.6) |
53 |
++ find_library(QTSINGLEAPPLICATION_LIBRARY NAMES ${qtsingleapplication_libs}) |
54 |
++ message(STATUS "Using external SingleApplication library") |
55 |
++else() |
56 |
++ add_subdirectory(external/singleapplication) |
57 |
++ set(QTSINGLEAPPLICATION_LIBRARY SingleApplication::SingleApplication) |
58 |
++endif() |
59 |
+ |
60 |
+ if(USE_EXTERNAL_SPDLOG) |
61 |
+ find_package(spdlog REQUIRED) |
62 |
+diff -ruN a/src/CMakeLists.txt b/src/CMakeLists.txt |
63 |
+--- a/src/CMakeLists.txt 2021-04-28 20:19:07.048354525 +0300 |
64 |
++++ b/src/CMakeLists.txt 2021-04-28 21:07:44.651559479 +0300 |
65 |
+@@ -107,7 +107,7 @@ |
66 |
+ |
67 |
+ target_sources( |
68 |
+ flameshot |
69 |
+- PRIVATE # ${CMAKE_CURRENT_SOURCE_DIR}/../external/singleapplication/singleapplication.cpp |
70 |
++ PRIVATE |
71 |
+ ${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/src/color_utils.cpp |
72 |
+ ${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/src/color_wheel.cpp |
73 |
+ ${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/include/color_wheel.hpp |
74 |
+@@ -120,7 +120,6 @@ |
75 |
+ flameshot |
76 |
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> |
77 |
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/> |
78 |
+- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/singleapplication/> |
79 |
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/Qt-Color-Widgets/include> |
80 |
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../dbus/> |
81 |
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cli> |
82 |
+@@ -153,6 +152,15 @@ |
83 |
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/widgets/capture> |
84 |
+ $<INSTALL_INTERFACE:include/mylib>) |
85 |
+ |
86 |
++if (USE_EXTERNAL_SINGLEAPPLICATION) |
87 |
++ add_compile_definitions(USE_EXTERNAL_SINGLEAPPLICATION=1) |
88 |
++else () |
89 |
++ target_include_directories( |
90 |
++ flameshot |
91 |
++ PUBLIC |
92 |
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/singleapplication>) |
93 |
++endif() |
94 |
++ |
95 |
+ target_link_libraries( |
96 |
+ flameshot |
97 |
+ project_warnings |
98 |
+@@ -161,7 +169,7 @@ |
99 |
+ Qt5::DBus |
100 |
+ Qt5::Network |
101 |
+ Qt5::Widgets |
102 |
+- SingleApplication::SingleApplication |
103 |
++ ${QTSINGLEAPPLICATION_LIBRARY} |
104 |
+ spdlog::spdlog |
105 |
+ ) |
106 |
+ |
107 |
+diff -ruN a/src/main.cpp b/src/main.cpp |
108 |
+--- a/src/main.cpp 2021-04-28 20:19:07.051354563 +0300 |
109 |
++++ b/src/main.cpp 2021-04-28 20:59:32.921808263 +0300 |
110 |
+@@ -1,7 +1,12 @@ |
111 |
+ // SPDX-License-Identifier: GPL-3.0-or-later |
112 |
+ // SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors |
113 |
+ |
114 |
+-#include "singleapplication.h" |
115 |
++#ifndef USE_EXTERNAL_SINGLEAPPLICATION |
116 |
++ #include "singleapplication.h" |
117 |
++#else |
118 |
++ #include "QtSolutions/qtsingleapplication.h" |
119 |
++#endif |
120 |
++ |
121 |
+ #include "src/cli/commandlineparser.h" |
122 |
+ #include "src/config/styleoverride.h" |
123 |
+ #include "src/core/capturerequest.h" |
124 |
+@@ -65,7 +70,11 @@ |
125 |
+ |
126 |
+ // no arguments, just launch Flameshot |
127 |
+ if (argc == 1) { |
128 |
++#ifndef USE_EXTERNAL_SINGLEAPPLICATION |
129 |
+ SingleApplication app(argc, argv); |
130 |
++#else |
131 |
++ QtSingleApplication app(argc, argv); |
132 |
++#endif |
133 |
+ QApplication::setStyle(new StyleOverride); |
134 |
+ |
135 |
+ QTranslator translator, qtTranslator; |
136 |
|
137 |
diff --git a/media-gfx/flameshot/flameshot-0.9.0.ebuild b/media-gfx/flameshot/flameshot-0.9.0.ebuild |
138 |
new file mode 100644 |
139 |
index 00000000000..2f6c1bbbe3f |
140 |
--- /dev/null |
141 |
+++ b/media-gfx/flameshot/flameshot-0.9.0.ebuild |
142 |
@@ -0,0 +1,50 @@ |
143 |
+# Copyright 2021 Gentoo Authors |
144 |
+# Distributed under the terms of the GNU General Public License v2 |
145 |
+ |
146 |
+EAPI=7 |
147 |
+ |
148 |
+inherit cmake desktop xdg |
149 |
+ |
150 |
+DESCRIPTION="Powerful yet simple to use screenshot software" |
151 |
+HOMEPAGE="https://flameshot.org https://github.com/flameshot-org/flameshot" |
152 |
+SRC_URI="https://github.com/flameshot-org/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
153 |
+ |
154 |
+LICENSE="Apache-2.0 FreeArt GPL-3" |
155 |
+SLOT="0" |
156 |
+KEYWORDS="~amd64 ~x86" |
157 |
+IUSE="" |
158 |
+ |
159 |
+DEPEND=" |
160 |
+ dev-qt/qtcore:5 |
161 |
+ dev-qt/qtgui:5 |
162 |
+ =dev-qt/qtsingleapplication-2.6*[qt5(+),X] |
163 |
+ dev-qt/qtwidgets:5 |
164 |
+ dev-qt/qtsvg:5 |
165 |
+ dev-qt/qtnetwork:5 |
166 |
+ dev-qt/qtdbus:5 |
167 |
+ sys-apps/dbus |
168 |
+ dev-libs/spdlog |
169 |
+" |
170 |
+BDEPEND=" |
171 |
+ dev-qt/linguist-tools:5 |
172 |
+" |
173 |
+RDEPEND="${DEPEND}" |
174 |
+PATCHES=( |
175 |
+ "${FILESDIR}/${P}-unbundle-qtsingleapplication.patch" |
176 |
+) |
177 |
+ |
178 |
+src_prepare() { |
179 |
+ rm -r external/spdlog || die |
180 |
+ rm -r external/singleapplication || die |
181 |
+ |
182 |
+ cmake_src_prepare |
183 |
+} |
184 |
+ |
185 |
+src_configure() { |
186 |
+ local mycmakeargs=( |
187 |
+ -DUSE_EXTERNAL_SPDLOG=1 |
188 |
+ -DUSE_EXTERNAL_SINGLEAPPLICATION=1 |
189 |
+ ) |
190 |
+ |
191 |
+ cmake_src_configure |
192 |
+} |