Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/qgis/, sci-geosciences/qgis/files/
Date: Wed, 28 Mar 2018 21:46:09
Message-Id: 1522273521.489310a6d906eb10bb0a7c0f5fa2c69eecd55551.asturm@gentoo
1 commit: 489310a6d906eb10bb0a7c0f5fa2c69eecd55551
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 28 20:40:39 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 28 21:45:21 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=489310a6
7
8 sci-geosciences/qgis: 3.0.1 version bump
9
10 Bug: https://bugs.gentoo.org/635798
11 Package-Manager: Portage-2.3.25, Repoman-2.3.7
12
13 sci-geosciences/qgis/Manifest | 1 +
14 .../qgis/files/qgis-3.0.1-check-constraints.patch | 237 +++++++++++++++++++++
15 .../qgis/files/qgis-3.0.1-qt-5.11.patch | 199 +++++++++++++++++
16 sci-geosciences/qgis/qgis-3.0.1.ebuild | 222 +++++++++++++++++++
17 4 files changed, 659 insertions(+)
18
19 diff --git a/sci-geosciences/qgis/Manifest b/sci-geosciences/qgis/Manifest
20 index 3c03fb62317..9b2a249d1e5 100644
21 --- a/sci-geosciences/qgis/Manifest
22 +++ b/sci-geosciences/qgis/Manifest
23 @@ -2,5 +2,6 @@ DIST qgis-2.18.12.tar.bz2 84936155 BLAKE2B 0d47094ae8dac3101888140b5773a8e7b52d2
24 DIST qgis-2.18.14.tar.bz2 84935301 BLAKE2B 37468062894235608f6efd0b58311e019f57ec0b3e6db63d8fef92ae93ac95ed13fe51290ebd063d31f1ea2318a23d7bdabb0774b451a2305064162addb4da29 SHA512 da738ae25f1207441a52091af9a3e70fd17f95704a23e27f72ee4c7ba213fd9ccf2d6685d91c34f94c555ca2dce420d6a07840b1fa682d6b960abdf3ba177036
25 DIST qgis-2.18.16.tar.bz2 84976777 BLAKE2B ad68ce63698266bc081db7be0529ef50f66ee9c048b2e2a743cfc24d1ddb161c86c71283c09740a22c45476f863516f8855c69a5ccf074e9676d1ed5a09563a1 SHA512 1fe060c1d392f304eea10a211815e14081299a865e34114625f3a5f2a1b365f571bb30878a21cbf25bc32285ffc689d37cb7dbcab129ce5f03ccd6fa0781876d
26 DIST qgis-3.0.0.tar.bz2 94186303 BLAKE2B 2b2623c218a86af22ee13e1271e66244fc6191732db6bc694860015824525188308609c8758062910ba7065ca6790d4091beb15ff324d1a8410e65525cf785b0 SHA512 91201c5d48f9450734a6268f70cba830e363db15a979266af1a7f2ef73857ca11e89145d027f394d052d0536e54b4f62523b1ad49bbe698743fec882ceecfabe
27 +DIST qgis-3.0.1.tar.bz2 94217493 BLAKE2B 9f3b9e9d76dfac574cbe7c9b95f0dc59fb9ad74ddd5c5a420931107200b1ba6641e2b74cff681ecec8cdab777cda69c0e698fa952bc28cd79c761f4636f62f00 SHA512 c07fc9b033fa043e38098d226dac69ea35890109c45ccc4c47017e0af2d3fbed4b1a71b3fd7dc76fea3eb43fbcdbfb660df50d779da8c43f68a4402b239f8f75
28 DIST qgis_sample_data-2.8.14.tar.gz 22119181 BLAKE2B 2d0565e91ec8119382bc9ab8e262dc04227fe8289146794891759ff5a32012245270614ba1119a6329fc45cf56852830c2079589309aa3467873f71f5c608eac SHA512 6b2653d5b57ffc2c2317639dac212429840984ac917ca3e452b39aabb99ea106d1a77c1c1dd967244ef16ede9deae751b170affdf08b72239eafed5b8977da3d
29 DIST qgis_sample_data.tar.gz 13601736 BLAKE2B 92acadbd009b181e74516120b3a700c96c7c1a732240434439bbe51afa441dee6521dac7bf6629fb5d7489b63fd0e0a45b1871df099820e8cd594920fa1499b7 SHA512 5847d7b32e5f75e771adf6b959847024f55b2360c307bd80e5628595fc53f5aaca18adf6cb00fa027a7e7b326c7f72bab58df16674daf20b77c676e163d93f78
30
31 diff --git a/sci-geosciences/qgis/files/qgis-3.0.1-check-constraints.patch b/sci-geosciences/qgis/files/qgis-3.0.1-check-constraints.patch
32 new file mode 100644
33 index 00000000000..c07cd554dbf
34 --- /dev/null
35 +++ b/sci-geosciences/qgis/files/qgis-3.0.1-check-constraints.patch
36 @@ -0,0 +1,237 @@
37 +From f07389b421065d40abe9b5355c8e329229f792d9 Mon Sep 17 00:00:00 2001
38 +From: Denis Rouzaud <denis.rouzaud@×××××.com>
39 +Date: Sat, 24 Mar 2018 18:30:45 +0100
40 +Subject: [PATCH] fix constraints not checked when they should be (#6550)
41 + (#6599)
42 +
43 +---
44 + python/gui/qgsattributeform.sip.in | 15 ++++++++++++++-
45 + src/gui/attributetable/qgsdualview.cpp | 9 ++++++---
46 + src/gui/attributetable/qgsdualview.h | 2 +-
47 + src/gui/qgsattributeform.cpp | 21 +++++++++++++++------
48 + src/gui/qgsattributeform.h | 14 +++++++++++++-
49 + tests/src/gui/testqgsattributeform.cpp | 14 +++++++-------
50 + 6 files changed, 56 insertions(+), 19 deletions(-)
51 +
52 +diff --git a/python/gui/qgsattributeform.sip.in b/python/gui/qgsattributeform.sip.in
53 +index 8b489dd3089..45deba11a31 100644
54 +--- a/python/gui/qgsattributeform.sip.in
55 ++++ b/python/gui/qgsattributeform.sip.in
56 +@@ -139,12 +139,25 @@ on all attribute widgets.
57 +
58 + signals:
59 +
60 +- void attributeChanged( const QString &attribute, const QVariant &value );
61 ++ void attributeChanged( const QString &attribute, const QVariant &value );
62 + %Docstring
63 + Notifies about changes of attributes
64 +
65 + :param attribute: The name of the attribute that changed.
66 + :param value: The new value of the attribute.
67 ++
68 ++.. deprecated:: since 3.0
69 ++%End
70 ++
71 ++ void widgetValueChanged( const QString &attribute, const QVariant &value, bool attributeChanged );
72 ++%Docstring
73 ++Notifies about changes of attributes
74 ++
75 ++:param attribute: The name of the attribute that changed.
76 ++:param value: The new value of the attribute.
77 ++:param attributeChanged: If true, it corresponds to an actual change of the feature attribute
78 ++
79 ++.. versionadded:: 3.0.1
80 + %End
81 +
82 +
83 +diff --git a/src/gui/attributetable/qgsdualview.cpp b/src/gui/attributetable/qgsdualview.cpp
84 +index d7ccfa1a8a1..2c640036a02 100644
85 +--- a/src/gui/attributetable/qgsdualview.cpp
86 ++++ b/src/gui/attributetable/qgsdualview.cpp
87 +@@ -98,7 +98,7 @@ void QgsDualView::init( QgsVectorLayer *layer, QgsMapCanvas *mapCanvas, const Qg
88 + mAttributeEditor->layout()->addWidget( mAttributeForm );
89 + }
90 +
91 +- connect( mAttributeForm, &QgsAttributeForm::attributeChanged, this, &QgsDualView::featureFormAttributeChanged );
92 ++ connect( mAttributeForm, &QgsAttributeForm::widgetValueChanged, this, &QgsDualView::featureFormAttributeChanged );
93 + connect( mAttributeForm, &QgsAttributeForm::modeChanged, this, &QgsDualView::formModeChanged );
94 + connect( mMasterModel, &QgsAttributeTableModel::modelChanged, mAttributeForm, &QgsAttributeForm::refreshFeature );
95 + connect( mAttributeForm, &QgsAttributeForm::filterExpressionSet, this, &QgsDualView::filterExpressionSet );
96 +@@ -880,9 +880,12 @@ void QgsDualView::extentChanged()
97 + emit filterChanged();
98 + }
99 +
100 +-void QgsDualView::featureFormAttributeChanged()
101 ++void QgsDualView::featureFormAttributeChanged( const QString &attribute, const QVariant &value, bool attributeChanged )
102 + {
103 +- mFeatureList->setCurrentFeatureEdited( true );
104 ++ Q_UNUSED( attribute );
105 ++ Q_UNUSED( value );
106 ++ if ( attributeChanged )
107 ++ mFeatureList->setCurrentFeatureEdited( true );
108 + }
109 +
110 + void QgsDualView::setFilteredFeatures( const QgsFeatureIds &filteredFeatures )
111 +diff --git a/src/gui/attributetable/qgsdualview.h b/src/gui/attributetable/qgsdualview.h
112 +index 73cb420f44b..264adbacb29 100644
113 +--- a/src/gui/attributetable/qgsdualview.h
114 ++++ b/src/gui/attributetable/qgsdualview.h
115 +@@ -327,7 +327,7 @@ class GUI_EXPORT QgsDualView : public QStackedWidget, private Ui::QgsDualViewBas
116 + * Will forward this signal to the feature list to visually represent
117 + * that there has been an edit event.
118 + */
119 +- void featureFormAttributeChanged();
120 ++ void featureFormAttributeChanged( const QString &attribute, const QVariant &value, bool attributeChanged );
121 +
122 + /**
123 + * Will be called periodically, when loading layers from slow data providers.
124 +diff --git a/src/gui/qgsattributeform.cpp b/src/gui/qgsattributeform.cpp
125 +index df1e98282f6..7a707c6fd7d 100644
126 +--- a/src/gui/qgsattributeform.cpp
127 ++++ b/src/gui/qgsattributeform.cpp
128 +@@ -240,6 +240,7 @@ void QgsAttributeForm::changeAttribute( const QString &field, const QVariant &va
129 +
130 + void QgsAttributeForm::setFeature( const QgsFeature &feature )
131 + {
132 ++ mIsSettingFeature = true;
133 + mFeature = feature;
134 +
135 + switch ( mMode )
136 +@@ -266,6 +267,7 @@ void QgsAttributeForm::setFeature( const QgsFeature &feature )
137 + break;
138 + }
139 + }
140 ++ mIsSettingFeature = false;
141 + }
142 +
143 + bool QgsAttributeForm::saveEdits()
144 +@@ -692,11 +694,7 @@ void QgsAttributeForm::onAttributeChanged( const QVariant &value )
145 + QgsEditorWidgetWrapper *eww = qobject_cast<QgsEditorWidgetWrapper *>( sender() );
146 + Q_ASSERT( eww );
147 +
148 +- const QVariant oldValue = mFeature.attribute( eww->fieldIdx() );
149 +-
150 +- // Safety check, if we receive the same value again, no reason to do anything
151 +- if ( oldValue == value && oldValue.isNull() == value.isNull() )
152 +- return;
153 ++ bool signalEmitted = false;
154 +
155 + if ( mValuesInitialized )
156 + mDirty = true;
157 +@@ -707,7 +705,12 @@ void QgsAttributeForm::onAttributeChanged( const QVariant &value )
158 + case IdentifyMode:
159 + case AddFeatureMode:
160 + {
161 ++ Q_NOWARN_DEPRECATED_PUSH
162 + emit attributeChanged( eww->field().name(), value );
163 ++ Q_NOWARN_DEPRECATED_PUSH
164 ++ emit widgetValueChanged( eww->field().name(), value, !mIsSettingFeature );
165 ++
166 ++ signalEmitted = true;
167 +
168 + updateJoinedFields( *eww );
169 +
170 +@@ -739,7 +742,13 @@ void QgsAttributeForm::onAttributeChanged( const QVariant &value )
171 +
172 + updateConstraints( eww );
173 +
174 +- emit attributeChanged( eww->field().name(), value );
175 ++ if ( !signalEmitted )
176 ++ {
177 ++ Q_NOWARN_DEPRECATED_PUSH
178 ++ emit attributeChanged( eww->field().name(), value );
179 ++ Q_NOWARN_DEPRECATED_PUSH
180 ++ emit widgetValueChanged( eww->field().name(), value, !mIsSettingFeature );
181 ++ }
182 + }
183 +
184 + void QgsAttributeForm::updateAllConstraints()
185 +diff --git a/src/gui/qgsattributeform.h b/src/gui/qgsattributeform.h
186 +index 6102825b286..41f16cd8614 100644
187 +--- a/src/gui/qgsattributeform.h
188 ++++ b/src/gui/qgsattributeform.h
189 +@@ -178,8 +178,19 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
190 + *
191 + * \param attribute The name of the attribute that changed.
192 + * \param value The new value of the attribute.
193 ++ * \deprecated since 3.0
194 + */
195 +- void attributeChanged( const QString &attribute, const QVariant &value );
196 ++ Q_DECL_DEPRECATED void attributeChanged( const QString &attribute, const QVariant &value );
197 ++
198 ++ /**
199 ++ * Notifies about changes of attributes
200 ++ *
201 ++ * \param attribute The name of the attribute that changed.
202 ++ * \param value The new value of the attribute.
203 ++ * \param attributeChanged If true, it corresponds to an actual change of the feature attribute
204 ++ * \since QGIS 3.0.1
205 ++ */
206 ++ void widgetValueChanged( const QString &attribute, const QVariant &value, bool attributeChanged );
207 +
208 + /**
209 + * Will be emitted before the feature is saved. Use this signal to perform sanity checks.
210 +@@ -367,6 +378,7 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
211 + QMap<const QgsVectorLayerJoinInfo *, QgsFeature> mJoinedFeatures;
212 + bool mValuesInitialized = false;
213 + bool mDirty = false;
214 ++ bool mIsSettingFeature = false;
215 +
216 + struct ContainerInformation
217 + {
218 +diff --git a/tests/src/gui/testqgsattributeform.cpp b/tests/src/gui/testqgsattributeform.cpp
219 +index d4629cb0762..9b6d5c46444 100644
220 +--- a/tests/src/gui/testqgsattributeform.cpp
221 ++++ b/tests/src/gui/testqgsattributeform.cpp
222 +@@ -111,24 +111,24 @@ void TestQgsAttributeForm::testFieldConstraint()
223 + // build a form for this feature
224 + QgsAttributeForm form2( layer );
225 + form2.setFeature( ft );
226 +- QSignalSpy spy( &form2, SIGNAL( attributeChanged( QString, QVariant ) ) );
227 ++ QSignalSpy spy( &form2, SIGNAL( widgetValueChanged( QString, QVariant, bool ) ) );
228 + ww = qobject_cast<QgsEditorWidgetWrapper *>( form2.mWidgets[0] );
229 +
230 + // set value to 1
231 + ww->setValue( 1 );
232 +- QCOMPARE( spy.count(), 2 );
233 ++ QCOMPARE( spy.count(), 1 );
234 + QCOMPARE( constraintsLabel( &form2, ww )->text(), validLabel );
235 +
236 + // set value to null
237 + spy.clear();
238 + ww->setValue( QVariant() );
239 +- QCOMPARE( spy.count(), 2 );
240 ++ QCOMPARE( spy.count(), 1 );
241 + QCOMPARE( constraintsLabel( &form2, ww )->text(), invalidLabel );
242 +
243 + // set value to 1
244 + spy.clear();
245 + ww->setValue( 1 );
246 +- QCOMPARE( spy.count(), 2 );
247 ++ QCOMPARE( spy.count(), 1 );
248 + QCOMPARE( constraintsLabel( &form2, ww )->text(), validLabel );
249 +
250 + // set a soft constraint
251 +@@ -205,11 +205,11 @@ void TestQgsAttributeForm::testFieldMultiConstraints()
252 + ww1 = qobject_cast<QgsEditorWidgetWrapper *>( form2.mWidgets[1] );
253 + ww2 = qobject_cast<QgsEditorWidgetWrapper *>( form2.mWidgets[2] );
254 + ww3 = qobject_cast<QgsEditorWidgetWrapper *>( form2.mWidgets[3] );
255 +- QSignalSpy spy2( &form2, SIGNAL( attributeChanged( QString, QVariant ) ) );
256 ++ QSignalSpy spy2( &form2, SIGNAL( widgetValueChanged( QString, QVariant, bool ) ) );
257 +
258 + // change value
259 + ww0->setValue( 2 ); // update col0
260 +- QCOMPARE( spy2.count(), 2 );
261 ++ QCOMPARE( spy2.count(), 1 );
262 +
263 + QCOMPARE( constraintsLabel( &form2, ww0 )->text(), inv ); // 2 < ( 1 + 2 )
264 + QCOMPARE( constraintsLabel( &form2, ww1 )->text(), QString() );
265 +@@ -219,7 +219,7 @@ void TestQgsAttributeForm::testFieldMultiConstraints()
266 + // change value
267 + spy2.clear();
268 + ww0->setValue( 1 ); // update col0
269 +- QCOMPARE( spy2.count(), 2 );
270 ++ QCOMPARE( spy2.count(), 1 );
271 +
272 + QCOMPARE( constraintsLabel( &form2, ww0 )->text(), val ); // 1 < ( 1 + 2 )
273 + QCOMPARE( constraintsLabel( &form2, ww1 )->text(), QString() );
274
275 diff --git a/sci-geosciences/qgis/files/qgis-3.0.1-qt-5.11.patch b/sci-geosciences/qgis/files/qgis-3.0.1-qt-5.11.patch
276 new file mode 100644
277 index 00000000000..c78c0dec3bb
278 --- /dev/null
279 +++ b/sci-geosciences/qgis/files/qgis-3.0.1-qt-5.11.patch
280 @@ -0,0 +1,199 @@
281 +From 0a903118389029fd25fbf4eddd20f60c8856ab4e Mon Sep 17 00:00:00 2001
282 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
283 +Date: Wed, 28 Mar 2018 20:48:58 +0200
284 +Subject: [PATCH] Fix build with Qt-5.11 (missing headers)
285 +
286 +---
287 + src/app/layout/qgslayoutpolylinewidget.cpp | 2 ++
288 + src/app/layout/qgslayoutscalebarwidget.cpp | 1 +
289 + src/app/layout/qgslayoutscalebarwidget.h | 2 ++
290 + src/app/qgslabelinggui.cpp | 2 ++
291 + src/app/qgsrulebasedlabelingwidget.cpp | 1 +
292 + src/gui/layout/qgslayoutitemwidget.cpp | 2 ++
293 + src/gui/layout/qgslayoutnewitempropertiesdialog.cpp | 2 ++
294 + src/gui/qgscompoundcolorwidget.cpp | 1 +
295 + src/gui/qgsextentgroupbox.cpp | 1 +
296 + src/gui/qgsgradientcolorrampdialog.cpp | 1 +
297 + src/gui/qgsgroupwmsdatadialog.cpp | 1 +
298 + src/gui/qgstextformatwidget.cpp | 2 ++
299 + src/gui/symbology/qgssymbollayerwidget.cpp | 1 +
300 + src/providers/arcgisrest/qgsarcgisservicesourceselect.cpp | 1 +
301 + 14 files changed, 20 insertions(+)
302 +
303 +diff --git a/src/app/layout/qgslayoutpolylinewidget.cpp b/src/app/layout/qgslayoutpolylinewidget.cpp
304 +index 178968917a..28d5d25a4d 100644
305 +--- a/src/app/layout/qgslayoutpolylinewidget.cpp
306 ++++ b/src/app/layout/qgslayoutpolylinewidget.cpp
307 +@@ -21,6 +21,8 @@
308 + #include "qgslayoutitemregistry.h"
309 + #include "qgslayout.h"
310 + #include "qgslayoutundostack.h"
311 ++
312 ++#include <QButtonGroup>
313 + #include <QFileDialog>
314 +
315 + QgsLayoutPolylineWidget::QgsLayoutPolylineWidget( QgsLayoutItemPolyline *polyline )
316 +diff --git a/src/app/layout/qgslayoutscalebarwidget.cpp b/src/app/layout/qgslayoutscalebarwidget.cpp
317 +index c1b8ad1509..569a4e0573 100644
318 +--- a/src/app/layout/qgslayoutscalebarwidget.cpp
319 ++++ b/src/app/layout/qgslayoutscalebarwidget.cpp
320 +@@ -19,6 +19,7 @@
321 + #include "qgslayoutitemscalebar.h"
322 + #include "qgslayout.h"
323 + #include "qgsguiutils.h"
324 ++
325 + #include <QColorDialog>
326 + #include <QFontDialog>
327 + #include <QWidget>
328 +diff --git a/src/app/layout/qgslayoutscalebarwidget.h b/src/app/layout/qgslayoutscalebarwidget.h
329 +index a60b777bfa..ec7cc46cca 100644
330 +--- a/src/app/layout/qgslayoutscalebarwidget.h
331 ++++ b/src/app/layout/qgslayoutscalebarwidget.h
332 +@@ -20,6 +20,8 @@
333 + #include "ui_qgslayoutscalebarwidgetbase.h"
334 + #include "qgslayoutitemwidget.h"
335 +
336 ++#include <QButtonGroup>
337 ++
338 + class QgsLayoutItemScaleBar;
339 +
340 + /**
341 +diff --git a/src/app/qgslabelinggui.cpp b/src/app/qgslabelinggui.cpp
342 +index e5cf8ff626..4d6a83700d 100644
343 +--- a/src/app/qgslabelinggui.cpp
344 ++++ b/src/app/qgslabelinggui.cpp
345 +@@ -24,6 +24,8 @@
346 + #include "qgsauxiliarystorage.h"
347 + #include "qgsnewauxiliarylayerdialog.h"
348 +
349 ++#include <QButtonGroup>
350 ++
351 + QgsExpressionContext QgsLabelingGui::createExpressionContext() const
352 + {
353 + QgsExpressionContext expContext;
354 +diff --git a/src/app/qgsrulebasedlabelingwidget.cpp b/src/app/qgsrulebasedlabelingwidget.cpp
355 +index 6f1f77ef9a..57b7d34799 100644
356 +--- a/src/app/qgsrulebasedlabelingwidget.cpp
357 ++++ b/src/app/qgsrulebasedlabelingwidget.cpp
358 +@@ -26,6 +26,7 @@
359 + #include "qgsvectorlayerlabeling.h"
360 + #include "qgslogger.h"
361 +
362 ++#include <QAction>
363 + #include <QClipboard>
364 + #include <QMessageBox>
365 +
366 +diff --git a/src/gui/layout/qgslayoutitemwidget.cpp b/src/gui/layout/qgslayoutitemwidget.cpp
367 +index 1d3d4f8171..d68799234b 100644
368 +--- a/src/gui/layout/qgslayoutitemwidget.cpp
369 ++++ b/src/gui/layout/qgslayoutitemwidget.cpp
370 +@@ -21,6 +21,8 @@
371 + #include "qgsprintlayout.h"
372 + #include "qgslayoutatlas.h"
373 +
374 ++#include <QButtonGroup>
375 ++
376 + //
377 + // QgsLayoutConfigObject
378 + //
379 +diff --git a/src/gui/layout/qgslayoutnewitempropertiesdialog.cpp b/src/gui/layout/qgslayoutnewitempropertiesdialog.cpp
380 +index 9fa5f98358..c53d002acb 100644
381 +--- a/src/gui/layout/qgslayoutnewitempropertiesdialog.cpp
382 ++++ b/src/gui/layout/qgslayoutnewitempropertiesdialog.cpp
383 +@@ -19,6 +19,8 @@
384 + #include "qgslayoutpagecollection.h"
385 + #include "qgsgui.h"
386 +
387 ++#include <QButtonGroup>
388 ++
389 + QgsLayoutItemPropertiesDialog::QgsLayoutItemPropertiesDialog( QWidget *parent, Qt::WindowFlags flags )
390 + : QDialog( parent, flags )
391 + {
392 +diff --git a/src/gui/qgscompoundcolorwidget.cpp b/src/gui/qgscompoundcolorwidget.cpp
393 +index a7dbb77501..48032a2456 100644
394 +--- a/src/gui/qgscompoundcolorwidget.cpp
395 ++++ b/src/gui/qgscompoundcolorwidget.cpp
396 +@@ -20,6 +20,7 @@
397 + #include "qgsapplication.h"
398 + #include "qgssettings.h"
399 +
400 ++#include <QHeaderView>
401 + #include <QPushButton>
402 + #include <QMenu>
403 + #include <QToolButton>
404 +diff --git a/src/gui/qgsextentgroupbox.cpp b/src/gui/qgsextentgroupbox.cpp
405 +index ffc8ab7195..d5d77db6a0 100644
406 +--- a/src/gui/qgsextentgroupbox.cpp
407 ++++ b/src/gui/qgsextentgroupbox.cpp
408 +@@ -24,6 +24,7 @@
409 +
410 + #include <QMenu>
411 + #include <QAction>
412 ++#include <QDoubleValidator>
413 +
414 + QgsExtentGroupBox::QgsExtentGroupBox( QWidget *parent )
415 + : QgsCollapsibleGroupBox( parent )
416 +diff --git a/src/gui/qgsgradientcolorrampdialog.cpp b/src/gui/qgsgradientcolorrampdialog.cpp
417 +index fcc93d74fb..317f373423 100644
418 +--- a/src/gui/qgsgradientcolorrampdialog.cpp
419 ++++ b/src/gui/qgsgradientcolorrampdialog.cpp
420 +@@ -22,6 +22,7 @@
421 + #include "qgssettings.h"
422 +
423 + #include <QColorDialog>
424 ++#include <QHeaderView>
425 + #include <QInputDialog>
426 + #include <QPainter>
427 + #include <QTableWidget>
428 +diff --git a/src/gui/qgsgroupwmsdatadialog.cpp b/src/gui/qgsgroupwmsdatadialog.cpp
429 +index 456c813f5f..f9bb15ab6d 100644
430 +--- a/src/gui/qgsgroupwmsdatadialog.cpp
431 ++++ b/src/gui/qgsgroupwmsdatadialog.cpp
432 +@@ -16,6 +16,7 @@
433 + #include "qgsapplication.h"
434 + #include "qgsgroupwmsdatadialog.h"
435 +
436 ++#include <QRegExpValidator>
437 +
438 + QgsGroupWmsDataDialog::QgsGroupWmsDataDialog( QWidget *parent, Qt::WindowFlags fl )
439 + : QDialog( parent, fl )
440 +diff --git a/src/gui/qgstextformatwidget.cpp b/src/gui/qgstextformatwidget.cpp
441 +index 8c3c67d8e9..9005a40081 100644
442 +--- a/src/gui/qgstextformatwidget.cpp
443 ++++ b/src/gui/qgstextformatwidget.cpp
444 +@@ -29,6 +29,8 @@
445 + #include "qgseffectstack.h"
446 + #include "qgspainteffectregistry.h"
447 +
448 ++#include <QButtonGroup>
449 ++
450 + QgsTextFormatWidget::QgsTextFormatWidget( const QgsTextFormat &format, QgsMapCanvas *mapCanvas, QWidget *parent )
451 + : QWidget( parent )
452 + , mMapCanvas( mapCanvas )
453 +diff --git a/src/gui/symbology/qgssymbollayerwidget.cpp b/src/gui/symbology/qgssymbollayerwidget.cpp
454 +index 3a5f3c5314..da599a27ae 100644
455 +--- a/src/gui/symbology/qgssymbollayerwidget.cpp
456 ++++ b/src/gui/symbology/qgssymbollayerwidget.cpp
457 +@@ -43,6 +43,7 @@
458 + #include "qgsauxiliarystorage.h"
459 +
460 + #include <QAbstractButton>
461 ++#include <QButtonGroup>
462 + #include <QColorDialog>
463 + #include <QCursor>
464 + #include <QDir>
465 +diff --git a/src/providers/arcgisrest/qgsarcgisservicesourceselect.cpp b/src/providers/arcgisrest/qgsarcgisservicesourceselect.cpp
466 +index 4cc3e8b301..d377d718b7 100644
467 +--- a/src/providers/arcgisrest/qgsarcgisservicesourceselect.cpp
468 ++++ b/src/providers/arcgisrest/qgsarcgisservicesourceselect.cpp
469 +@@ -29,6 +29,7 @@
470 + #include "qgssettings.h"
471 + #include "qgsmapcanvas.h"
472 +
473 ++#include <QButtonGroup>
474 + #include <QListWidgetItem>
475 + #include <QMessageBox>
476 + #include <QFileDialog>
477 +--
478 +2.16.3
479 +
480
481 diff --git a/sci-geosciences/qgis/qgis-3.0.1.ebuild b/sci-geosciences/qgis/qgis-3.0.1.ebuild
482 new file mode 100644
483 index 00000000000..fcf4f8846c7
484 --- /dev/null
485 +++ b/sci-geosciences/qgis/qgis-3.0.1.ebuild
486 @@ -0,0 +1,222 @@
487 +# Copyright 1999-2018 Gentoo Foundation
488 +# Distributed under the terms of the GNU General Public License v2
489 +
490 +EAPI=6
491 +
492 +PYTHON_COMPAT=( python3_5 )
493 +PYTHON_REQ_USE="sqlite"
494 +QT_MIN_VER="5.9.1"
495 +
496 +if [[ ${PV} != *9999 ]]; then
497 + SRC_URI="https://qgis.org/downloads/${P}.tar.bz2
498 + examples? ( https://qgis.org/downloads/data/qgis_sample_data.tar.gz -> qgis_sample_data-2.8.14.tar.gz )"
499 + KEYWORDS="~amd64 ~x86"
500 +else
501 + GIT_ECLASS="git-r3"
502 + EGIT_REPO_URI="https://github.com/${PN}/${PN^^}.git"
503 +fi
504 +inherit cmake-utils eutils ${GIT_ECLASS} gnome2-utils python-single-r1 qmake-utils xdg-utils
505 +unset GIT_ECLASS
506 +
507 +DESCRIPTION="User friendly Geographic Information System"
508 +HOMEPAGE="https://www.qgis.org/"
509 +
510 +LICENSE="GPL-2+ GPL-3+"
511 +SLOT="0"
512 +IUSE="3d examples georeferencer grass mapserver oracle polar postgres python webkit"
513 +
514 +REQUIRED_USE="
515 + mapserver? ( python )
516 + python? ( ${PYTHON_REQUIRED_USE} )"
517 +
518 +COMMON_DEPEND="
519 + app-crypt/qca:2[qt5(+),ssl]
520 + >=dev-db/spatialite-4.2.0
521 + dev-db/sqlite:3
522 + dev-libs/expat
523 + dev-libs/libzip:=
524 + dev-libs/qtkeychain[qt5(+)]
525 + >=dev-qt/designer-${QT_MIN_VER}:5
526 + >=dev-qt/qtconcurrent-${QT_MIN_VER}:5
527 + >=dev-qt/qtcore-${QT_MIN_VER}:5
528 + >=dev-qt/qtgui-${QT_MIN_VER}:5
529 + >=dev-qt/qtnetwork-${QT_MIN_VER}:5[ssl]
530 + >=dev-qt/qtpositioning-${QT_MIN_VER}:5
531 + >=dev-qt/qtprintsupport-${QT_MIN_VER}:5
532 + >=dev-qt/qtsvg-${QT_MIN_VER}:5
533 + >=dev-qt/qtsql-${QT_MIN_VER}:5
534 + >=dev-qt/qtwidgets-${QT_MIN_VER}:5
535 + >=dev-qt/qtxml-${QT_MIN_VER}:5
536 + >=sci-libs/gdal-2.2.3:=[geos,python?,${PYTHON_USEDEP}]
537 + sci-libs/geos
538 + sci-libs/libspatialindex:=
539 + sci-libs/proj
540 + >=x11-libs/qscintilla-2.10.1:=[qt5(+)]
541 + >=x11-libs/qwt-6.1.2:6=[qt5(+),svg]
542 + 3d? ( >=dev-qt/qt3d-${QT_MIN_VER}:5 )
543 + georeferencer? ( sci-libs/gsl:= )
544 + grass? ( >=sci-geosciences/grass-7.0.0:= )
545 + mapserver? ( dev-libs/fcgi )
546 + oracle? (
547 + dev-db/oracle-instantclient:=
548 + sci-libs/gdal:=[oracle]
549 + )
550 + polar? ( >=x11-libs/qwtpolar-1.1.1-r1[qt5(+)] )
551 + postgres? ( dev-db/postgresql:= )
552 + python? ( ${PYTHON_DEPS}
553 + dev-python/future[${PYTHON_USEDEP}]
554 + dev-python/httplib2[${PYTHON_USEDEP}]
555 + dev-python/jinja[${PYTHON_USEDEP}]
556 + dev-python/markupsafe[${PYTHON_USEDEP}]
557 + dev-python/owslib[${PYTHON_USEDEP}]
558 + dev-python/pygments[${PYTHON_USEDEP}]
559 + dev-python/PyQt5[designer,network,sql,svg,webkit?,${PYTHON_USEDEP}]
560 + dev-python/python-dateutil[${PYTHON_USEDEP}]
561 + dev-python/pytz[${PYTHON_USEDEP}]
562 + dev-python/pyyaml[${PYTHON_USEDEP}]
563 + >=dev-python/qscintilla-python-2.10.1[qt5(+),${PYTHON_USEDEP}]
564 + dev-python/requests[${PYTHON_USEDEP}]
565 + dev-python/sip:=[${PYTHON_USEDEP}]
566 + dev-python/six[${PYTHON_USEDEP}]
567 + postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] )
568 + )
569 + webkit? ( >=dev-qt/qtwebkit-${QT_MIN_VER}:5 )
570 +"
571 +DEPEND="${COMMON_DEPEND}
572 + >=dev-qt/linguist-tools-${QT_MIN_VER}:5
573 + >=dev-qt/qttest-${QT_MIN_VER}:5
574 + >=dev-qt/qtxmlpatterns-${QT_MIN_VER}:5
575 + sys-devel/bison
576 + sys-devel/flex
577 +"
578 +RDEPEND="${COMMON_DEPEND}
579 + sci-geosciences/gpsbabel
580 +"
581 +
582 +# Disabling test suite because upstream disallow running from install path
583 +RESTRICT="test"
584 +
585 +PATCHES=(
586 + # git master
587 + "${FILESDIR}/${PN}-2.18.12-cmake-lib-suffix.patch"
588 + # release-3_0 branch
589 + "${FILESDIR}/${P}-check-constraints.patch"
590 + # TODO upstream
591 + "${FILESDIR}/${P}-qt-5.11.patch"
592 + "${FILESDIR}/${PN}-3.0.0-featuresummary.patch"
593 +)
594 +
595 +pkg_setup() {
596 + python-single-r1_pkg_setup
597 +}
598 +
599 +src_prepare() {
600 + cmake-utils_src_prepare
601 +
602 + sed -e "s:\${QT_BINARY_DIR}:$(qt5_get_bindir):" \
603 + -i CMakeLists.txt || die "Failed to fix lrelease path"
604 +
605 + sed -e "/QT_LRELEASE_EXECUTABLE/d" \
606 + -e "/QT_LUPDATE_EXECUTABLE/s/set/find_program/" \
607 + -e "s:lupdate-qt5:NAMES lupdate PATHS $(qt5_get_bindir) NO_DEFAULT_PATH:" \
608 + -i cmake/modules/ECMQt4To5Porting.cmake || die "Failed to fix ECMQt4To5Porting.cmake"
609 +
610 + cd src/plugins || die
611 +}
612 +
613 +src_configure() {
614 + local mycmakeargs=(
615 + -DQGIS_MANUAL_SUBDIR=/share/man/
616 + -DBUILD_SHARED_LIBS=ON
617 + -DQGIS_LIB_SUBDIR=$(get_libdir)
618 + -DQGIS_PLUGIN_SUBDIR=$(get_libdir)/qgis
619 + -DQWT_INCLUDE_DIR=/usr/include/qwt6
620 + -DQWT_LIBRARY=/usr/$(get_libdir)/libqwt6-qt5.so
621 + -DPEDANTIC=OFF
622 + -DWITH_APIDOC=OFF
623 + -DWITH_QSPATIALITE=ON
624 + -DENABLE_TESTS=OFF
625 + -DWITH_3D=$(usex 3d)
626 + -DWITH_GEOREFERENCER=$(usex georeferencer)
627 + -DWITH_GRASS=$(usex grass)
628 + -DWITH_SERVER=$(usex mapserver)
629 + -DWITH_ORACLE=$(usex oracle)
630 + -DWITH_QWTPOLAR=$(usex polar)
631 + -DWITH_POSTGRESQL=$(usex postgres)
632 + -DWITH_BINDINGS=$(usex python)
633 + -DWITH_CUSTOM_WIDGETS=$(usex python)
634 + -DWITH_QTWEBKIT=$(usex webkit)
635 + )
636 +
637 + if use grass; then
638 + mycmakeargs+=(
639 + -DWITH_GRASS7=ON
640 + -DGRASS_PREFIX7=/usr/$(get_libdir)/grass70
641 + )
642 + fi
643 +
644 + use python && mycmakeargs+=( -DBINDINGS_GLOBAL_INSTALL=ON )
645 +
646 + # bugs 612956, 648726
647 + addpredict /dev/dri/renderD128
648 + addpredict /dev/dri/renderD129
649 +
650 + cmake-utils_src_configure
651 +}
652 +
653 +src_install() {
654 + cmake-utils_src_install
655 +
656 + domenu debian/qgis.desktop
657 +
658 + local size type
659 + for size in 16 22 24 32 48 64 96 128 256; do
660 + newicon -s ${size} debian/icons/${PN}-icon${size}x${size}.png ${PN}.png
661 + newicon -c mimetypes -s ${size} debian/icons/${PN}-mime-icon${size}x${size}.png ${PN}-mime.png
662 + for type in qgs qml qlr qpt; do
663 + newicon -c mimetypes -s ${size} debian/icons/${PN}-${type}${size}x${size}.png ${PN}-${type}.png
664 + done
665 + done
666 + newicon -s scalable images/icons/qgis_icon.svg qgis.svg
667 +
668 + insinto /usr/share/mime/packages
669 + doins debian/qgis.xml
670 +
671 + if use examples; then
672 + docinto examples
673 + dodoc -r "${WORKDIR}"/qgis_sample_data/.
674 + docompress -x /usr/share/doc/${PF}/examples
675 + fi
676 +
677 + python_optimize "${ED%/}"/usr/share/qgis/python
678 +
679 + if use grass; then
680 + python_fix_shebang "${ED%/}"/usr/share/qgis/grass/scripts
681 + fi
682 +}
683 +
684 +pkg_postinst() {
685 + if use postgres; then
686 + elog "If you don't intend to use an external PostGIS server"
687 + elog "you should install:"
688 + elog " dev-db/postgis"
689 + elif use python; then
690 + elog "Support of PostgreSQL is disabled."
691 + elog "But some installed python-plugins import the psycopg2 module."
692 + elog "If you do not need these plugins just disable them"
693 + elog "in the Plugins menu, else you need to set USE=\"postgres\""
694 + fi
695 + if has_version "<sci-geosciences/qgis-3"; then
696 + elog "QGIS is now based on PyQt5. Old scripts may not work anymore."
697 + fi
698 +
699 + gnome2_icon_cache_update
700 + xdg_mimeinfo_database_update
701 + xdg_desktop_database_update
702 +}
703 +
704 +pkg_postrm() {
705 + gnome2_icon_cache_update
706 + xdg_mimeinfo_database_update
707 + xdg_desktop_database_update
708 +}