Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/scantailor-advanced/, media-gfx/scantailor-advanced/files/
Date: Sat, 30 May 2020 23:46:20
Message-Id: 1590882357.2dc5ae6f903df23fbf51fb8611fde9df09400aac.asturm@gentoo
1 commit: 2dc5ae6f903df23fbf51fb8611fde9df09400aac
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 30 23:05:05 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat May 30 23:45:57 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dc5ae6f
7
8 media-gfx/scantailor-advanced: Fix build with Qt 5.15
9
10 - Move dev-qt/linguist-tools:5 to BDEPEND where it belongs
11 - Add missing RDEPEND, drop bogus DEPEND (already fixed upstream)
12 - Add missing xdg.eclass and drop unused desktop.eclass
13 - Fix QA warning wrt upstream .desktop file
14 - Drop obsolete src_install
15 - Switch HOMEPAGE to https
16
17 Bug: https://bugs.gentoo.org/662004
18 Closes: https://bugs.gentoo.org/726066
19 Package-Manager: Portage-2.3.100, Repoman-2.3.22
20 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
21
22 .../scantailor-advanced-1.0.16-bogus-dep.patch | 37 +++++++++
23 .../scantailor-advanced-1.0.16-desktopfile.patch | 23 ++++++
24 .../files/scantailor-advanced-1.0.16-qt-5.15.patch | 87 ++++++++++++++++++++++
25 .../scantailor-advanced-1.0.16-r1.ebuild | 52 +++++++++++++
26 4 files changed, 199 insertions(+)
27
28 diff --git a/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-bogus-dep.patch b/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-bogus-dep.patch
29 new file mode 100644
30 index 00000000000..553c108c19c
31 --- /dev/null
32 +++ b/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-bogus-dep.patch
33 @@ -0,0 +1,37 @@
34 +--- a/CMakeLists.txt 2020-05-31 01:09:58.634978658 +0200
35 ++++ b/CMakeLists.txt 2020-05-31 01:12:51.011307579 +0200
36 +@@ -298,7 +298,6 @@
37 + find_package(Qt5Gui ${qt_min_version} REQUIRED)
38 + find_package(Qt5Widgets ${qt_min_version} REQUIRED)
39 + find_package(Qt5Xml ${qt_min_version} REQUIRED)
40 +-find_package(Qt5Network ${qt_min_version} REQUIRED)
41 + find_package(Qt5LinguistTools ${qt_min_version} REQUIRED)
42 + find_package(Qt5OpenGL ${qt_min_version} REQUIRED)
43 +
44 +@@ -311,8 +310,6 @@
45 + link_directories(${Qt5Widgets_LIBRARIES})
46 + include_directories(${Qt5Xml_INCLUDE_DIRS})
47 + link_directories(${Qt5Xml_LIBRARIES})
48 +-include_directories(${Qt5Network_INCLUDE_DIRS})
49 +-link_directories(${Qt5Network_LIBRARIES})
50 + include_directories(${Qt5OpenGL_INCLUDE_DIRS})
51 + link_directories(${Qt5OpenGL_LIBRARIES})
52 + include_directories(${Qt5LinguistTools_INCLUDE_DIRS})
53 +@@ -578,7 +575,7 @@
54 + scantailor
55 + fix_orientation page_split deskew select_content page_layout output stcore
56 + dewarping zones interaction imageproc math foundation
57 +- ${Qt5Core_LIBRARIES} ${Qt5GUI_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5Network_LIBRARIES}
58 ++ ${Qt5Core_LIBRARIES} ${Qt5GUI_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Xml_LIBRARIES}
59 + ${Qt5OpenGL_LIBRARIES} ${Qt5LinguistTools_LIBRARIES} ${EXTRA_LIBS}
60 + )
61 +
62 +@@ -639,7 +636,7 @@
63 + qt5_libs
64 + ${Qt5Widgets_LIBRARIES} ${Qt5Gui_LIBRARIES}
65 + ${Qt5Core_LIBRARIES} ${Qt5Xml_LIBRARIES}
66 +- ${Qt5Network_LIBRARIES} ${Qt5OpenGL_LIBRARIES}
67 ++ ${Qt5OpenGL_LIBRARIES}
68 + )
69 +
70 + foreach (target ${qt5_libs})
71
72 diff --git a/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-desktopfile.patch b/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-desktopfile.patch
73 new file mode 100644
74 index 00000000000..cececbb84f4
75 --- /dev/null
76 +++ b/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-desktopfile.patch
77 @@ -0,0 +1,23 @@
78 +From e4125b66138c4258f13e69dc4bd8e6df41323599 Mon Sep 17 00:00:00 2001
79 +From: 4lex4 <4lex49@××××.com>
80 +Date: Tue, 27 Aug 2019 17:30:50 +0300
81 +Subject: [PATCH] ~ Remove a deprecated value from the .desktop file
82 +
83 +---
84 + resources/unix/scantailor.desktop | 2 +-
85 + 1 file changed, 1 insertion(+), 1 deletion(-)
86 +
87 +diff --git a/resources/unix/scantailor.desktop b/resources/unix/scantailor.desktop
88 +index 9e49d5e..4df7d97 100644
89 +--- a/resources/unix/scantailor.desktop
90 ++++ b/resources/unix/scantailor.desktop
91 +@@ -7,5 +7,5 @@ Icon=ScanTailor
92 + Terminal=false
93 + X-MultipleArgs=false
94 + Type=Application
95 +-Categories=Graphics;Applications;
96 ++Categories=Graphics;
97 + MimeType=application/x-scantailor-project;
98 +--
99 +2.26.2
100 +
101
102 diff --git a/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-qt-5.15.patch b/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-qt-5.15.patch
103 new file mode 100644
104 index 00000000000..4ed35702562
105 --- /dev/null
106 +++ b/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-qt-5.15.patch
107 @@ -0,0 +1,87 @@
108 +diff -ur a/filters/output/OutputGenerator.cpp b/filters/output/OutputGenerator.cpp
109 +--- a/filters/output/OutputGenerator.cpp 2018-07-17 04:04:23.000000000 +0200
110 ++++ b/filters/output/OutputGenerator.cpp 2020-05-29 12:15:28.759822806 +0200
111 +@@ -25,6 +25,7 @@
112 + #include <imageproc/ImageCombination.h>
113 + #include <QDebug>
114 + #include <QPainter>
115 ++#include <QPainterPath>
116 + #include <QtCore/QSettings>
117 + #include <boost/bind.hpp>
118 + #include "DebugImages.h"
119 +@@ -2666,4 +2667,4 @@
120 + posterizationOptions.isForceBlackAndWhite(), 0, qRound(background_color.lightnessF() * 255))
121 + .getImage();
122 + }
123 +-} // namespace output
124 +\ Chybí znak konce řádku na konci souboru
125 ++} // namespace output
126 +diff -ur a/filters/page_layout/ImageView.cpp b/filters/page_layout/ImageView.cpp
127 +--- a/filters/page_layout/ImageView.cpp 2018-07-17 04:04:23.000000000 +0200
128 ++++ b/filters/page_layout/ImageView.cpp 2020-05-29 12:14:09.691546103 +0200
129 +@@ -27,6 +27,7 @@
130 + #include <imageproc/Transform.h>
131 + #include <QMouseEvent>
132 + #include <QPainter>
133 ++#include <QPainterPath>
134 + #include <boost/bind.hpp>
135 + #include <boost/lambda/lambda.hpp>
136 + #include "ImagePresentation.h"
137 +@@ -1160,4 +1161,4 @@
138 + bool ImageView::isShowingMiddleRectEnabled() const {
139 + return (!m_nullContentRect && m_settings->isShowingMiddleRectEnabled()) || m_alignment.isNull();
140 + }
141 +-} // namespace page_layout
142 +\ Chybí znak konce řádku na konci souboru
143 ++} // namespace page_layout
144 +diff -ur a/filters/select_content/ContentBoxFinder.cpp b/filters/select_content/ContentBoxFinder.cpp
145 +--- a/filters/select_content/ContentBoxFinder.cpp 2018-07-17 04:04:23.000000000 +0200
146 ++++ b/filters/select_content/ContentBoxFinder.cpp 2020-05-29 12:12:39.023619751 +0200
147 +@@ -19,6 +19,7 @@
148 + #include "ContentBoxFinder.h"
149 + #include <QDebug>
150 + #include <QPainter>
151 ++#include <QPainterPath>
152 + #include <cmath>
153 + #include <queue>
154 + #include "DebugImages.h"
155 +@@ -1353,4 +1354,4 @@
156 +
157 + return m_sedm;
158 + }
159 +-} // namespace select_content
160 +\ Chybí znak konce řádku na konci souboru
161 ++} // namespace select_content
162 +diff -ur a/ImageViewBase.cpp b/ImageViewBase.cpp
163 +--- a/ImageViewBase.cpp 2018-07-17 04:04:23.000000000 +0200
164 ++++ b/ImageViewBase.cpp 2020-05-29 11:58:54.720220475 +0200
165 +@@ -24,6 +24,7 @@
166 + #include <QPointer>
167 + #include <QScrollBar>
168 + #include <QSettings>
169 ++#include <QPainterPath>
170 + #include <QtWidgets/QMainWindow>
171 + #include <QtWidgets/QStatusBar>
172 + #include "BackgroundExecutor.h"
173 +diff -ur a/zones/ZoneContextMenuInteraction.cpp b/zones/ZoneContextMenuInteraction.cpp
174 +--- a/zones/ZoneContextMenuInteraction.cpp 2018-07-17 04:04:23.000000000 +0200
175 ++++ b/zones/ZoneContextMenuInteraction.cpp 2020-05-29 12:10:53.079190198 +0200
176 +@@ -21,6 +21,7 @@
177 + #include <QMenu>
178 + #include <QMessageBox>
179 + #include <QPainter>
180 ++#include <QPainterPath>
181 + #include <QSignalMapper>
182 + #include <boost/bind.hpp>
183 + #include "ImageViewBase.h"
184 +diff -ur a/zones/ZoneDefaultInteraction.cpp b/zones/ZoneDefaultInteraction.cpp
185 +--- a/zones/ZoneDefaultInteraction.cpp 2018-07-17 04:04:23.000000000 +0200
186 ++++ b/zones/ZoneDefaultInteraction.cpp 2020-05-29 12:09:24.276172092 +0200
187 +@@ -19,6 +19,7 @@
188 + #include "ZoneDefaultInteraction.h"
189 + #include <QMouseEvent>
190 + #include <QPainter>
191 ++#include <QPainterPath>
192 + #include "ImageViewBase.h"
193 + #include "SerializableSpline.h"
194 + #include "ZoneInteractionContext.h"
195
196 diff --git a/media-gfx/scantailor-advanced/scantailor-advanced-1.0.16-r1.ebuild b/media-gfx/scantailor-advanced/scantailor-advanced-1.0.16-r1.ebuild
197 new file mode 100644
198 index 00000000000..f5fe9384baf
199 --- /dev/null
200 +++ b/media-gfx/scantailor-advanced/scantailor-advanced-1.0.16-r1.ebuild
201 @@ -0,0 +1,52 @@
202 +# Copyright 1999-2020 Gentoo Authors
203 +# Distributed under the terms of the GNU General Public License v2
204 +
205 +EAPI=7
206 +
207 +inherit cmake virtualx xdg
208 +
209 +DESCRIPTION="Interactive post-processing tool for scanned pages"
210 +HOMEPAGE="https://scantailor.org/ https://github.com/4lex4/scantailor-advanced"
211 +SRC_URI="https://github.com/4lex4/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
212 +
213 +LICENSE="GPL-2 GPL-3 public-domain"
214 +SLOT="0"
215 +KEYWORDS="~amd64 ~x86"
216 +IUSE=""
217 +
218 +BDEPEND="
219 + dev-qt/linguist-tools:5
220 +"
221 +COMMON_DEPEND="
222 + dev-qt/qtcore:5
223 + dev-qt/qtgui:5
224 + dev-qt/qtopengl:5
225 + dev-qt/qtwidgets:5
226 + dev-qt/qtxml:5
227 + media-libs/libpng:0=
228 + media-libs/tiff:0
229 + sys-libs/zlib
230 + virtual/jpeg:0
231 +"
232 +DEPEND="${COMMON_DEPEND}
233 + dev-libs/boost
234 +"
235 +RDEPEND="${COMMON_DEPEND}
236 + dev-qt/qtsvg:5
237 +"
238 +
239 +PATCHES=(
240 + "${FILESDIR}"/${P}-tests.patch # bug 662004
241 + "${FILESDIR}"/${P}-qt-5.15.patch # bug 726066
242 + "${FILESDIR}"/${P}-desktopfile.patch
243 + "${FILESDIR}"/${P}-bogus-dep.patch
244 +)
245 +
246 +src_prepare() {
247 + cmake_src_prepare
248 +}
249 +
250 +src_test() {
251 + cd "${CMAKE_BUILD_DIR}" || die
252 + virtx cmake_src_test
253 +}