Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/brewtarget/, app-misc/brewtarget/files/
Date: Sun, 23 Feb 2020 00:32:35
Message-Id: 1582417052.c2066655d57ee59c27329610c08854a083dd8df3.asturm@gentoo
1 commit: c2066655d57ee59c27329610c08854a083dd8df3
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 17 00:54:22 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 23 00:17:32 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2066655
7
8 app-misc/brewtarget: EAPI-7, use cmake.eclass, drop dev-qt/qtwebkit
9
10 Fixing QA warning about wrong doc install dir and compressed file along the way.
11
12 Closes: https://bugs.gentoo.org/684772
13 Package-Manager: Portage-2.3.89, Repoman-2.3.20
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 app-misc/brewtarget/brewtarget-2.3.1-r1.ebuild | 62 ++++++++
17 .../files/brewtarget-2.3.1-no-compress-docs.patch | 22 +++
18 .../files/brewtarget-2.3.1-no-qtwebkit.patch | 164 +++++++++++++++++++++
19 3 files changed, 248 insertions(+)
20
21 diff --git a/app-misc/brewtarget/brewtarget-2.3.1-r1.ebuild b/app-misc/brewtarget/brewtarget-2.3.1-r1.ebuild
22 new file mode 100644
23 index 00000000000..03780974f84
24 --- /dev/null
25 +++ b/app-misc/brewtarget/brewtarget-2.3.1-r1.ebuild
26 @@ -0,0 +1,62 @@
27 +# Copyright 1999-2020 Gentoo Authors
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=7
31 +
32 +PLOCALES="ca cs da de el en es et eu fr gl hu it lv nb nl pl pt ru sr sv tr zh"
33 +inherit cmake l10n
34 +
35 +DESCRIPTION="Application to create and manage beer recipes"
36 +HOMEPAGE="http://www.brewtarget.org/"
37 +SRC_URI="https://github.com/Brewtarget/${PN}/releases/download/v${PV}/${PN}_${PV}.orig.tar.xz"
38 +
39 +LICENSE="GPL-3 WTFPL-2"
40 +SLOT="0"
41 +KEYWORDS="~amd64"
42 +IUSE=""
43 +
44 +BDEPEND="
45 + dev-qt/linguist-tools:5
46 +"
47 +DEPEND="
48 + dev-qt/qtcore:5
49 + dev-qt/qtdeclarative:5
50 + dev-qt/qtgui:5
51 + dev-qt/qtmultimedia:5
52 + dev-qt/qtnetwork:5
53 + dev-qt/qtprintsupport:5
54 + dev-qt/qtsql:5[sqlite]
55 + dev-qt/qtsvg:5
56 + dev-qt/qtwidgets:5
57 + dev-qt/qtxml:5
58 +"
59 +RDEPEND="${DEPEND}"
60 +
61 +PATCHES=(
62 + "${FILESDIR}/${P}-no-qtwebkit.patch"
63 + "${FILESDIR}/${P}-no-compress-docs.patch"
64 +)
65 +
66 +remove_locale() {
67 + sed -i -e "/bt_${1}\.ts/d" CMakeLists.txt || die
68 +}
69 +
70 +src_prepare() {
71 + cmake_src_prepare
72 +
73 + l10n_find_plocales_changes translations bt_ .ts
74 + l10n_for_each_disabled_locale_do remove_locale
75 +
76 + # Tests are bogus, don't build them
77 + sed -i -e '/Qt5Test/d' CMakeLists.txt || die
78 + sed -i -e '/=Tests=/,/=Installs=/d' src/CMakeLists.txt || die
79 +}
80 +
81 +src_configure() {
82 + local mycmakeargs=(
83 + -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF}
84 + -DDO_RELEASE_BUILD=ON
85 + -DNO_MESSING_WITH_FLAGS=ON
86 + )
87 + cmake_src_configure
88 +}
89
90 diff --git a/app-misc/brewtarget/files/brewtarget-2.3.1-no-compress-docs.patch b/app-misc/brewtarget/files/brewtarget-2.3.1-no-compress-docs.patch
91 new file mode 100644
92 index 00000000000..f437a72e591
93 --- /dev/null
94 +++ b/app-misc/brewtarget/files/brewtarget-2.3.1-no-compress-docs.patch
95 @@ -0,0 +1,22 @@
96 +--- a/CMakeLists.txt 2020-02-17 02:07:48.201051509 +0100
97 ++++ b/CMakeLists.txt 2020-02-17 02:10:26.790061722 +0100
98 +@@ -176,18 +176,7 @@
99 + ENDIF()
100 +
101 + #=========================Changelog custom target==============================
102 +-FIND_PROGRAM( GZIP_CMD gzip )
103 +-IF( GZIP_CMD )
104 +- SET( CHANGELOG_UNCOMPRESSED "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES.markdown" )
105 +- SET( CHANGELOG "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz" )
106 +- ADD_CUSTOM_COMMAND(
107 +- OUTPUT ${CHANGELOG}
108 +- COMMAND ${GZIP_CMD} -9 -n -c ${CHANGELOG_UNCOMPRESSED} > ${CHANGELOG}
109 +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
110 +- MAIN_DEPENDENCY ${CHANGELOG_UNCOMPRESSED}
111 +- )
112 +- ADD_CUSTOM_TARGET(changelog ALL DEPENDS ${CHANGELOG})
113 +-ENDIF()
114 ++SET( CHANGELOG "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES.markdown" )
115 +
116 + #=========================Detect Debian========================================
117 + IF( EXISTS "/etc/debian_version" )
118
119 diff --git a/app-misc/brewtarget/files/brewtarget-2.3.1-no-qtwebkit.patch b/app-misc/brewtarget/files/brewtarget-2.3.1-no-qtwebkit.patch
120 new file mode 100644
121 index 00000000000..ec149c8f410
122 --- /dev/null
123 +++ b/app-misc/brewtarget/files/brewtarget-2.3.1-no-qtwebkit.patch
124 @@ -0,0 +1,164 @@
125 +From 761bb3882c4c243a49279b67e53c87e5e5d2928f Mon Sep 17 00:00:00 2001
126 +From: Mik Firestone <mikfire@×××××.com>
127 +Date: Sat, 19 Mar 2016 23:01:54 -0400
128 +Subject: [PATCH 1/2] Closes #127 - TravisCI can't find webkit
129 +
130 +Qt 5.6 did away with the web kit, but none of our build environment have the
131 +replacement yet. This patch replaces all the WebDocs with TextBrowser, which
132 +seems to work and should compile.
133 +
134 +I removed the webkit requirement from the CMakeLists file, but I wasn't sure
135 +if the webkitwidgets needed axed as well. Although writing it out makes the
136 +answer somewhat obvious.
137 +---
138 + src/BrewDayScrollWidget.cpp | 2 +-
139 + src/BrewDayScrollWidget.h | 4 ++--
140 + src/BrewDayWidget.cpp | 4 ++--
141 + src/BrewDayWidget.h | 4 ++--
142 + src/CMakeLists.txt | 2 --
143 + src/RecipeFormatter.cpp | 2 +-
144 + src/RecipeFormatter.h | 4 ++--
145 + 7 files changed, 10 insertions(+), 12 deletions(-)
146 +
147 +diff --git a/src/BrewDayScrollWidget.cpp b/src/BrewDayScrollWidget.cpp
148 +index 760d2dc5..0846d791 100644
149 +--- a/src/BrewDayScrollWidget.cpp
150 ++++ b/src/BrewDayScrollWidget.cpp
151 +@@ -35,7 +35,7 @@
152 + #include "mash.h"
153 +
154 + BrewDayScrollWidget::BrewDayScrollWidget(QWidget* parent)
155 +- : QWidget(parent), doc(new QWebView())
156 ++ : QWidget(parent), doc(new QTextBrowser())
157 + {
158 + setupUi(this);
159 + setObjectName("BrewDayScrollWidget");
160 +--- a/src/BrewDayScrollWidget.h
161 ++++ b/src/BrewDayScrollWidget.h
162 +@@ -27,7 +27,7 @@ class BrewDayScrollWidget;
163 + #include "ui_brewDayScrollWidget.h"
164 + #include <QWidget>
165 + #include <QSize>
166 +-#include <QWebView>
167 ++#include <QTextBrowser>
168 + #include <QPrinter>
169 + #include <QPrintDialog>
170 + #include <QFile>
171 +@@ -90,7 +90,7 @@ private slots:
172 +
173 + Recipe* recObs;
174 + QPrinter* printer;
175 +- QWebView* doc;
176 ++ QTextBrowser* doc;
177 + //! Internal list of recipe instructions, always sorted by instruction number.
178 + QList<Instruction*> recIns;
179 +
180 +--- a/src/BrewDayWidget.cpp
181 ++++ b/src/BrewDayWidget.cpp
182 +@@ -37,7 +37,7 @@
183 +
184 + // NOTE: QPrinter has no parent? Will it get destroyed properly?
185 + BrewDayWidget::BrewDayWidget(QWidget* parent) :
186 +- QWidget(parent), recObs(0), printer(new QPrinter()), doc(new QWebView(this))
187 ++ QWidget(parent), recObs(0), printer(new QPrinter()), doc(new QTextBrowser(this))
188 + {
189 + setupUi(this);
190 +
191 +@@ -291,7 +291,7 @@ void BrewDayWidget::pushInstructionPrint()
192 + QString pDoc;
193 + QPrintDialog *dialog = new QPrintDialog(printer, this);
194 +
195 +- /* Instantiate the Webview and then connect its signal */
196 ++ /* Instantiate the TextBrowser and then connect its signal */
197 + connect( doc, SIGNAL(loadFinished(bool)), this, SLOT(loadComplete(bool)) );
198 +
199 + dialog->setWindowTitle(tr("Print Document"));
200 +--- a/src/BrewDayWidget.h
201 ++++ b/src/BrewDayWidget.h
202 +@@ -27,7 +27,7 @@ class BrewDayWidget;
203 + #include "ui_brewDayWidget.h"
204 + #include <QWidget>
205 + #include <QSize>
206 +-#include <QWebView>
207 ++#include <QTextBrowser>
208 + #include <QMetaProperty>
209 + #include <QVariant>
210 +
211 +@@ -70,7 +70,7 @@ public slots:
212 +
213 + Recipe* recObs;
214 + QPrinter* printer;
215 +- QWebView* doc;
216 ++ QTextBrowser* doc;
217 +
218 + QString cssName;
219 +
220 +--- a/src/CMakeLists.txt
221 ++++ b/src/CMakeLists.txt
222 +@@ -424,7 +424,5 @@ SET( QT5_USE_MODULES_LIST
223 + Sql
224 + Svg
225 + Xml
226 +- WebKit
227 +- WebKitWidgets
228 + )
229 +
230 +diff --git a/src/RecipeFormatter.cpp b/src/RecipeFormatter.cpp
231 +index bb6a9295..f8a1ab4c 100644
232 +--- a/src/RecipeFormatter.cpp
233 ++++ b/src/RecipeFormatter.cpp
234 +@@ -52,7 +52,7 @@ RecipeFormatter::RecipeFormatter(QObject* parent)
235 + docDialog->setWindowTitle("Print Preview");
236 + if( docDialog->layout() == 0 )
237 + docDialog->setLayout(new QVBoxLayout(docDialog));
238 +- doc = new QWebView(docDialog);
239 ++ doc = new QTextBrowser(docDialog);
240 + docDialog->layout()->addWidget(doc);
241 + /*
242 + // Add a print button at the bottom.
243 +--- a/src/RecipeFormatter.h
244 ++++ b/src/RecipeFormatter.h
245 +@@ -28,7 +28,7 @@ class RecipeFormatter;
246 + #include <QObject>
247 + #include <QPrinter>
248 + #include <QPrintDialog>
249 +-#include <QWebView>
250 ++#include <QTextBrowser>
251 + #include <QDialog>
252 + #include <QFile>
253 + #include "recipe.h"
254 +@@ -114,7 +114,7 @@ public slots:
255 + Recipe* rec;
256 +
257 + QPrinter* printer;
258 +- QWebView* doc;
259 ++ QTextBrowser* doc;
260 + QDialog* docDialog;
261 + QString cssName;
262 +
263 +
264 +From 3e0223a3b95c0e1169115cd14d0ede7f17c4f30f Mon Sep 17 00:00:00 2001
265 +From: Mik Firestone <mikfire@×××××.com>
266 +Date: Sat, 19 Mar 2016 23:09:41 -0400
267 +Subject: [PATCH 2/2] Missed a few edits.
268 +
269 +Missed some entries in the CMakeList files.
270 +---
271 + CMakeLists.txt | 6 ------
272 + 1 file changed, 6 deletions(-)
273 +
274 +--- a/CMakeLists.txt
275 ++++ b/CMakeLists.txt
276 +@@ -153,12 +153,6 @@ INCLUDE_DIRECTORIES(${Qt5Sql_INCLUDE_DIRS})
277 + FIND_PACKAGE(Qt5Svg REQUIRED)
278 + INCLUDE_DIRECTORIES(${Qt5Svg_INCLUDE_DIRS})
279 +
280 +-FIND_PACKAGE(Qt5WebKit REQUIRED)
281 +-INCLUDE_DIRECTORIES(${Qt5WebKit_INCLUDE_DIRS})
282 +-
283 +-FIND_PACKAGE(Qt5WebKitWidgets REQUIRED)
284 +-INCLUDE_DIRECTORIES(${Qt5WebKitWidgets_INCLUDE_DIRS})
285 +-
286 + FIND_PACKAGE(Qt5Xml REQUIRED)
287 + INCLUDE_DIRECTORIES(${Qt5Xml_INCLUDE_DIRS})
288 +