From 2dc5ae6f903df23fbf51fb8611fde9df09400aac Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sun, 31 May 2020 01:05:05 +0200 Subject: 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 --- .../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(+) create mode 100644 media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-bogus-dep.patch create mode 100644 media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-desktopfile.patch create mode 100644 media-gfx/scantailor-advanced/files/scantailor-advanced-1.0.16-qt-5.15.patch create mode 100644 media-gfx/scantailor-advanced/scantailor-advanced-1.0.16-r1.ebuild 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 000000000000..553c108c19cf --- /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 000000000000..cececbb84f43 --- /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 <4lex49@zoho.com> +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 000000000000..4ed357025622 --- /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 + #include + #include ++#include + #include + #include + #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 + #include + #include ++#include + #include + #include + #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 + #include ++#include + #include + #include + #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 + #include + #include ++#include + #include + #include + #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 + #include + #include ++#include + #include + #include + #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 + #include ++#include + #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 000000000000..f5fe9384bafb --- /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 +} -- cgit v1.2.3-65-gdbad