commit:     2dc5ae6f903df23fbf51fb8611fde9df09400aac
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May 30 23:05:05 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May 30 23:45:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dc5ae6f

media-gfx/scantailor-advanced: Fix build with Qt 5.15

- Move dev-qt/linguist-tools:5 to BDEPEND where it belongs
- Add missing RDEPEND, drop bogus DEPEND (already fixed upstream)
- Add missing xdg.eclass and drop unused desktop.eclass
- Fix QA warning wrt upstream .desktop file
- Drop obsolete src_install
- Switch HOMEPAGE to https

Bug: https://bugs.gentoo.org/662004
Closes: https://bugs.gentoo.org/726066
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../scantailor-advanced-1.0.16-bogus-dep.patch     | 37 +++++++++
 .../scantailor-advanced-1.0.16-desktopfile.patch   | 23 ++++++
 .../files/scantailor-advanced-1.0.16-qt-5.15.patch | 87 ++++++++++++++++++++++
 .../scantailor-advanced-1.0.16-r1.ebuild           | 52 +++++++++++++
 4 files changed, 199 insertions(+)

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
new file mode 100644
index 00000000000..553c108c19c
--- /dev/null
+++ 
b/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-bogus-dep.patch
@@ -0,0 +1,37 @@
+--- a/CMakeLists.txt   2020-05-31 01:09:58.634978658 +0200
++++ b/CMakeLists.txt   2020-05-31 01:12:51.011307579 +0200
+@@ -298,7 +298,6 @@
+ find_package(Qt5Gui ${qt_min_version} REQUIRED)
+ find_package(Qt5Widgets ${qt_min_version} REQUIRED)
+ find_package(Qt5Xml ${qt_min_version} REQUIRED)
+-find_package(Qt5Network ${qt_min_version} REQUIRED)
+ find_package(Qt5LinguistTools ${qt_min_version} REQUIRED)
+ find_package(Qt5OpenGL ${qt_min_version} REQUIRED)
+ 
+@@ -311,8 +310,6 @@
+ link_directories(${Qt5Widgets_LIBRARIES})
+ include_directories(${Qt5Xml_INCLUDE_DIRS})
+ link_directories(${Qt5Xml_LIBRARIES})
+-include_directories(${Qt5Network_INCLUDE_DIRS})
+-link_directories(${Qt5Network_LIBRARIES})
+ include_directories(${Qt5OpenGL_INCLUDE_DIRS})
+ link_directories(${Qt5OpenGL_LIBRARIES})
+ include_directories(${Qt5LinguistTools_INCLUDE_DIRS})
+@@ -578,7 +575,7 @@
+     scantailor
+     fix_orientation page_split deskew select_content page_layout output stcore
+     dewarping zones interaction imageproc math foundation
+-    ${Qt5Core_LIBRARIES} ${Qt5GUI_LIBRARIES} ${Qt5Widgets_LIBRARIES} 
${Qt5Xml_LIBRARIES} ${Qt5Network_LIBRARIES}
++    ${Qt5Core_LIBRARIES} ${Qt5GUI_LIBRARIES} ${Qt5Widgets_LIBRARIES} 
${Qt5Xml_LIBRARIES}
+     ${Qt5OpenGL_LIBRARIES} ${Qt5LinguistTools_LIBRARIES} ${EXTRA_LIBS}
+ )
+ 
+@@ -639,7 +636,7 @@
+       qt5_libs
+       ${Qt5Widgets_LIBRARIES} ${Qt5Gui_LIBRARIES}
+       ${Qt5Core_LIBRARIES} ${Qt5Xml_LIBRARIES}
+-      ${Qt5Network_LIBRARIES} ${Qt5OpenGL_LIBRARIES}
++      ${Qt5OpenGL_LIBRARIES}
+   )
+ 
+   foreach (target ${qt5_libs})

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
new file mode 100644
index 00000000000..cececbb84f4
--- /dev/null
+++ 
b/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-desktopfile.patch
@@ -0,0 +1,23 @@
+From e4125b66138c4258f13e69dc4bd8e6df41323599 Mon Sep 17 00:00:00 2001
+From: 4lex4 <[email protected]>
+Date: Tue, 27 Aug 2019 17:30:50 +0300
+Subject: [PATCH] ~ Remove a deprecated value from the .desktop file
+
+---
+ resources/unix/scantailor.desktop | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/resources/unix/scantailor.desktop 
b/resources/unix/scantailor.desktop
+index 9e49d5e..4df7d97 100644
+--- a/resources/unix/scantailor.desktop
++++ b/resources/unix/scantailor.desktop
+@@ -7,5 +7,5 @@ Icon=ScanTailor
+ Terminal=false
+ X-MultipleArgs=false
+ Type=Application
+-Categories=Graphics;Applications;
++Categories=Graphics;
+ MimeType=application/x-scantailor-project;
+-- 
+2.26.2
+

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
new file mode 100644
index 00000000000..4ed35702562
--- /dev/null
+++ 
b/media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-qt-5.15.patch
@@ -0,0 +1,87 @@
+diff -ur a/filters/output/OutputGenerator.cpp 
b/filters/output/OutputGenerator.cpp
+--- a/filters/output/OutputGenerator.cpp       2018-07-17 04:04:23.000000000 
+0200
++++ b/filters/output/OutputGenerator.cpp       2020-05-29 12:15:28.759822806 
+0200
+@@ -25,6 +25,7 @@
+ #include <imageproc/ImageCombination.h>
+ #include <QDebug>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <QtCore/QSettings>
+ #include <boost/bind.hpp>
+ #include "DebugImages.h"
+@@ -2666,4 +2667,4 @@
+                  posterizationOptions.isForceBlackAndWhite(), 0, 
qRound(background_color.lightnessF() * 255))
+       .getImage();
+ }
+-}  // namespace output
+\ Chybí znak konce řádku na konci souboru
++}  // namespace output
+diff -ur a/filters/page_layout/ImageView.cpp 
b/filters/page_layout/ImageView.cpp
+--- a/filters/page_layout/ImageView.cpp        2018-07-17 04:04:23.000000000 
+0200
++++ b/filters/page_layout/ImageView.cpp        2020-05-29 12:14:09.691546103 
+0200
+@@ -27,6 +27,7 @@
+ #include <imageproc/Transform.h>
+ #include <QMouseEvent>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <boost/bind.hpp>
+ #include <boost/lambda/lambda.hpp>
+ #include "ImagePresentation.h"
+@@ -1160,4 +1161,4 @@
+ bool ImageView::isShowingMiddleRectEnabled() const {
+   return (!m_nullContentRect && m_settings->isShowingMiddleRectEnabled()) || 
m_alignment.isNull();
+ }
+-}  // namespace page_layout
+\ Chybí znak konce řádku na konci souboru
++}  // namespace page_layout
+diff -ur a/filters/select_content/ContentBoxFinder.cpp 
b/filters/select_content/ContentBoxFinder.cpp
+--- a/filters/select_content/ContentBoxFinder.cpp      2018-07-17 
04:04:23.000000000 +0200
++++ b/filters/select_content/ContentBoxFinder.cpp      2020-05-29 
12:12:39.023619751 +0200
+@@ -19,6 +19,7 @@
+ #include "ContentBoxFinder.h"
+ #include <QDebug>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <cmath>
+ #include <queue>
+ #include "DebugImages.h"
+@@ -1353,4 +1354,4 @@
+ 
+   return m_sedm;
+ }
+-}  // namespace select_content
+\ Chybí znak konce řádku na konci souboru
++}  // namespace select_content
+diff -ur a/ImageViewBase.cpp b/ImageViewBase.cpp
+--- a/ImageViewBase.cpp        2018-07-17 04:04:23.000000000 +0200
++++ b/ImageViewBase.cpp        2020-05-29 11:58:54.720220475 +0200
+@@ -24,6 +24,7 @@
+ #include <QPointer>
+ #include <QScrollBar>
+ #include <QSettings>
++#include <QPainterPath>
+ #include <QtWidgets/QMainWindow>
+ #include <QtWidgets/QStatusBar>
+ #include "BackgroundExecutor.h"
+diff -ur a/zones/ZoneContextMenuInteraction.cpp 
b/zones/ZoneContextMenuInteraction.cpp
+--- a/zones/ZoneContextMenuInteraction.cpp     2018-07-17 04:04:23.000000000 
+0200
++++ b/zones/ZoneContextMenuInteraction.cpp     2020-05-29 12:10:53.079190198 
+0200
+@@ -21,6 +21,7 @@
+ #include <QMenu>
+ #include <QMessageBox>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <QSignalMapper>
+ #include <boost/bind.hpp>
+ #include "ImageViewBase.h"
+diff -ur a/zones/ZoneDefaultInteraction.cpp b/zones/ZoneDefaultInteraction.cpp
+--- a/zones/ZoneDefaultInteraction.cpp 2018-07-17 04:04:23.000000000 +0200
++++ b/zones/ZoneDefaultInteraction.cpp 2020-05-29 12:09:24.276172092 +0200
+@@ -19,6 +19,7 @@
+ #include "ZoneDefaultInteraction.h"
+ #include <QMouseEvent>
+ #include <QPainter>
++#include <QPainterPath>
+ #include "ImageViewBase.h"
+ #include "SerializableSpline.h"
+ #include "ZoneInteractionContext.h"

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
new file mode 100644
index 00000000000..f5fe9384baf
--- /dev/null
+++ b/media-gfx/scantailor-advanced/scantailor-advanced-1.0.16-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake virtualx xdg
+
+DESCRIPTION="Interactive post-processing tool for scanned pages"
+HOMEPAGE="https://scantailor.org/ https://github.com/4lex4/scantailor-advanced";
+SRC_URI="https://github.com/4lex4/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-3 public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+BDEPEND="
+       dev-qt/linguist-tools:5
+"
+COMMON_DEPEND="
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+       dev-qt/qtopengl:5
+       dev-qt/qtwidgets:5
+       dev-qt/qtxml:5
+       media-libs/libpng:0=
+       media-libs/tiff:0
+       sys-libs/zlib
+       virtual/jpeg:0
+"
+DEPEND="${COMMON_DEPEND}
+       dev-libs/boost
+"
+RDEPEND="${COMMON_DEPEND}
+       dev-qt/qtsvg:5
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-tests.patch # bug 662004
+       "${FILESDIR}"/${P}-qt-5.15.patch # bug 726066
+       "${FILESDIR}"/${P}-desktopfile.patch
+       "${FILESDIR}"/${P}-bogus-dep.patch
+)
+
+src_prepare() {
+       cmake_src_prepare
+}
+
+src_test() {
+       cd "${CMAKE_BUILD_DIR}" || die
+       virtx cmake_src_test
+}

Reply via email to