Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: lxqt-base/lxqt-config/files/, lxqt-base/lxqt-config/
Date: Sat, 03 Jun 2017 13:03:59
Message-Id: 1496495027.e2f83d73f5912804606cc55a49cbb645c41b2284.kensington@gentoo
1 commit: e2f83d73f5912804606cc55a49cbb645c41b2284
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 3 13:03:33 2017 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 3 13:03:47 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2f83d73
7
8 lxqt-base/lxqt-config: backport patch from upstream solving build failure with cmake-3.8
9
10 Gentoo-bug: 616324
11 Package-Manager: Portage-2.3.5, Repoman-2.3.2
12
13 .../files/lxqt-config-0.11.0-cmake-3.8.patch | 221 +++++++++++++++++++++
14 lxqt-base/lxqt-config/lxqt-config-0.11.0.ebuild | 4 +-
15 2 files changed, 224 insertions(+), 1 deletion(-)
16
17 diff --git a/lxqt-base/lxqt-config/files/lxqt-config-0.11.0-cmake-3.8.patch b/lxqt-base/lxqt-config/files/lxqt-config-0.11.0-cmake-3.8.patch
18 new file mode 100644
19 index 00000000000..8088225e30d
20 --- /dev/null
21 +++ b/lxqt-base/lxqt-config/files/lxqt-config-0.11.0-cmake-3.8.patch
22 @@ -0,0 +1,221 @@
23 +From bca652a75f8a497a69b1fbc1c7eaa353f6b4eef8 Mon Sep 17 00:00:00 2001
24 +From: =?UTF-8?q?Lu=C3=ADs=20Pereira?= <luis.artur.pereira@×××××.com>
25 +Date: Wed, 19 Apr 2017 12:56:45 +0100
26 +Subject: [PATCH] Fixes a FTBFS with CMake v3.8
27 +
28 +CMake v3.8 AUTOUIC changed the directory where the file is generated to:
29 +<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include. The changes makes
30 +us fail.
31 +The change is actually just an sympton and not a root cause. We shouldn't
32 +include a ui generated file in public header.
33 +
34 +Closes https://github.com/lxde/lxqt/issues/1277
35 +---
36 + liblxqt-config-cursor/selectwnd.cpp | 64 ++++++++++++++++++++-----------------
37 + liblxqt-config-cursor/selectwnd.h | 9 ++++--
38 + 2 files changed, 41 insertions(+), 32 deletions(-)
39 +
40 +diff --git a/liblxqt-config-cursor/selectwnd.cpp b/liblxqt-config-cursor/selectwnd.cpp
41 +index e76840b..8a1fa18 100644
42 +--- a/liblxqt-config-cursor/selectwnd.cpp
43 ++++ b/liblxqt-config-cursor/selectwnd.cpp
44 +@@ -13,6 +13,7 @@
45 + #include <QDebug>
46 +
47 + #include "selectwnd.h"
48 ++#include "ui_selectwnd.h"
49 +
50 + #include <QKeyEvent>
51 + #include <QMessageBox>
52 +@@ -37,22 +38,24 @@
53 +
54 + #define HOME_ICON_DIR QDir::homePath() + "/.icons"
55 +
56 +-SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent) : QWidget(parent), mSettings(settings)
57 ++SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent)
58 ++ : QWidget(parent),
59 ++ mSettings(settings),
60 ++ ui(new Ui::SelectWnd)
61 + {
62 +- setupUi(this);
63 +-
64 +- warningLabel->hide();
65 ++ ui->setupUi(this);
66 ++ ui->warningLabel->hide();
67 +
68 + mModel = new XCursorThemeModel(this);
69 +
70 + int size = style()->pixelMetric(QStyle::PM_LargeIconSize);
71 +- lbThemes->setModel(mModel);
72 +- lbThemes->setItemDelegate(new ItemDelegate(this));
73 +- lbThemes->setIconSize(QSize(size, size));
74 +- lbThemes->setSelectionMode(QAbstractItemView::SingleSelection);
75 ++ ui->lbThemes->setModel(mModel);
76 ++ ui->lbThemes->setItemDelegate(new ItemDelegate(this));
77 ++ ui->lbThemes->setIconSize(QSize(size, size));
78 ++ ui->lbThemes->setSelectionMode(QAbstractItemView::SingleSelection);
79 +
80 + // Make sure we find out about selection changes
81 +- connect(lbThemes->selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
82 ++ connect(ui->lbThemes->selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
83 + SLOT(currentChanged(const QModelIndex &, const QModelIndex &)));
84 + // display/hide warning label
85 + connect(mModel, SIGNAL(modelReset()),
86 +@@ -62,15 +65,15 @@ SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent) : QWidget(parent
87 + connect(mModel, SIGNAL(rowsRemoved(const QModelIndex&, int, int)),
88 + this, SLOT(handleWarning()));
89 +
90 +- connect(warningLabel, SIGNAL(showDirInfo()),
91 ++ connect(ui->warningLabel, SIGNAL(showDirInfo()),
92 + this, SLOT(showDirInfo()));
93 +
94 + // Disable the install button if we can't install new themes to ~/.icons,
95 + // or Xcursor isn't set up to look for cursor themes there
96 +- btInstall->setEnabled(mModel->searchPaths().contains(HOME_ICON_DIR) && iconsIsWritable());
97 ++ ui->btInstall->setEnabled(mModel->searchPaths().contains(HOME_ICON_DIR) && iconsIsWritable());
98 + // TODO/FIXME: btInstall functionality
99 +- btInstall->hide();
100 +- btRemove->hide();
101 ++ ui->btInstall->hide();
102 ++ ui->btRemove->hide();
103 +
104 + //QTimer::singleShot(0, this, SLOT(setCurrent()));
105 +
106 +@@ -80,11 +83,12 @@ SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent) : QWidget(parent
107 +
108 + SelectWnd::~SelectWnd()
109 + {
110 ++ delete ui;
111 + }
112 +
113 + void SelectWnd::setCurrent()
114 + {
115 +- lbThemes->selectionModel()->clear();
116 ++ ui->lbThemes->selectionModel()->clear();
117 +
118 + QString ct = getCurrentTheme();
119 + mAppliedIndex = mModel->defaultIndex();
120 +@@ -97,9 +101,9 @@ void SelectWnd::setCurrent()
121 + const XCursorThemeData *theme = mModel->theme(mAppliedIndex);
122 + // Select the current theme
123 + selectRow(mAppliedIndex);
124 +- lbThemes->scrollTo(mAppliedIndex, QListView::PositionAtCenter);
125 ++ ui->lbThemes->scrollTo(mAppliedIndex, QListView::PositionAtCenter);
126 + // Update the preview widget as well
127 +- if (theme) preview->setTheme(*theme);// else preview->clearTheme();
128 ++ if (theme) ui->preview->setTheme(*theme);// else ui->preview->clearTheme();
129 + }
130 + }
131 +
132 +@@ -123,8 +127,8 @@ void SelectWnd::selectRow(int row) const
133 + QModelIndex from = mModel->index(row, 0);
134 + QModelIndex to = mModel->index(row, mModel->columnCount()-1);
135 + QItemSelection selection(from, to);
136 +- lbThemes->selectionModel()->select(selection, QItemSelectionModel::Select);
137 +- lbThemes->selectionModel()->setCurrentIndex(mAppliedIndex, QItemSelectionModel::NoUpdate);
138 ++ ui->lbThemes->selectionModel()->select(selection, QItemSelectionModel::Select);
139 ++ ui->lbThemes->selectionModel()->setCurrentIndex(mAppliedIndex, QItemSelectionModel::NoUpdate);
140 + }
141 +
142 + void SelectWnd::currentChanged(const QModelIndex &current, const QModelIndex &previous)
143 +@@ -133,16 +137,16 @@ void SelectWnd::currentChanged(const QModelIndex &current, const QModelIndex &pr
144 + if (current.isValid()) {
145 + const XCursorThemeData *theme = mModel->theme(current);
146 + if (theme) {
147 +- preview->setTheme(*theme);
148 +- btRemove->setEnabled(theme->isWritable());
149 ++ ui->preview->setTheme(*theme);
150 ++ ui->btRemove->setEnabled(theme->isWritable());
151 + } else {
152 +- preview->clearTheme();
153 ++ ui->preview->clearTheme();
154 + }
155 +
156 + // directly apply the current settings
157 + applyCurrent();
158 + } else {
159 +- preview->clearTheme();
160 ++ ui->preview->clearTheme();
161 + }
162 + //emit changed(mAppliedIndex != current);
163 + }
164 +@@ -155,7 +159,7 @@ void SelectWnd::on_btInstall_clicked()
165 + void SelectWnd::applyCurrent()
166 + {
167 + //qDebug() << "'set' clicked";
168 +- const XCursorThemeData *theme = mModel->theme(lbThemes->currentIndex());
169 ++ const XCursorThemeData *theme = mModel->theme(ui->lbThemes->currentIndex());
170 + if (!theme) return;
171 + applyTheme(*theme);
172 + fixXDefaults(theme->name());
173 +@@ -200,7 +204,7 @@ void SelectWnd::applyCurrent()
174 + void SelectWnd::on_btRemove_clicked()
175 + {
176 + qDebug() << "'remove' clicked";
177 +- const XCursorThemeData *theme = mModel->theme(lbThemes->currentIndex());
178 ++ const XCursorThemeData *theme = mModel->theme(ui->lbThemes->currentIndex());
179 + if (!theme) return;
180 + QString ct = getCurrentTheme();
181 + if (ct == theme->name())
182 +@@ -210,20 +214,20 @@ void SelectWnd::on_btRemove_clicked()
183 + return;
184 + }
185 + QDir d(theme->path());
186 +- preview->clearTheme();
187 +- mModel->removeTheme(lbThemes->currentIndex());
188 ++ ui->preview->clearTheme();
189 ++ mModel->removeTheme(ui->lbThemes->currentIndex());
190 + removeXCursorTheme(d);
191 + }
192 +
193 + void SelectWnd::handleWarning()
194 + {
195 + bool empty = mModel->rowCount();
196 +- warningLabel->setVisible(!empty);
197 +- preview->setVisible(empty);
198 +- infoLabel->setVisible(empty);
199 ++ ui->warningLabel->setVisible(!empty);
200 ++ ui->preview->setVisible(empty);
201 ++ ui->infoLabel->setVisible(empty);
202 + }
203 +
204 + void SelectWnd::showDirInfo()
205 + {
206 +- QToolTip::showText(mapToGlobal(warningLabel->buttonPos()), mModel->searchPaths().join("\n"));
207 ++ QToolTip::showText(mapToGlobal(ui->warningLabel->buttonPos()), mModel->searchPaths().join("\n"));
208 + }
209 +diff --git a/liblxqt-config-cursor/selectwnd.h b/liblxqt-config-cursor/selectwnd.h
210 +index c9bc428..200cfa0 100644
211 +--- a/liblxqt-config-cursor/selectwnd.h
212 ++++ b/liblxqt-config-cursor/selectwnd.h
213 +@@ -15,16 +15,20 @@
214 +
215 + #include <QObject>
216 + #include <QWidget>
217 ++#include <QPersistentModelIndex>
218 + #include <lxqtglobals.h>
219 +
220 + namespace LXQt {
221 + class Settings;
222 + }
223 +
224 ++namespace Ui {
225 ++class SelectWnd;
226 ++}
227 ++
228 + class XCursorThemeModel;
229 +
230 +-#include "ui_selectwnd.h"
231 +-class LXQT_API SelectWnd : public QWidget, private Ui_SelectWnd
232 ++class LXQT_API SelectWnd : public QWidget
233 + {
234 + Q_OBJECT
235 +
236 +@@ -55,6 +59,7 @@ private slots:
237 + XCursorThemeModel *mModel;
238 + QPersistentModelIndex mAppliedIndex;
239 + LXQt::Settings* mSettings;
240 ++ Ui::SelectWnd *ui;
241 + };
242 +
243 + #endif
244
245 diff --git a/lxqt-base/lxqt-config/lxqt-config-0.11.0.ebuild b/lxqt-base/lxqt-config/lxqt-config-0.11.0.ebuild
246 index ced7407231e..268a49e56e4 100644
247 --- a/lxqt-base/lxqt-config/lxqt-config-0.11.0.ebuild
248 +++ b/lxqt-base/lxqt-config/lxqt-config-0.11.0.ebuild
249 @@ -1,4 +1,4 @@
250 -# Copyright 1999-2016 Gentoo Foundation
251 +# Copyright 1999-2017 Gentoo Foundation
252 # Distributed under the terms of the GNU General Public License v2
253
254 EAPI=5
255 @@ -43,6 +43,8 @@ DEPEND="${CDEPEND}
256 RDEPEND="${CDEPEND}
257 x11-apps/setxkbmap"
258
259 +PATCHES=( "${FILESDIR}/${P}-cmake-3.8.patch" )
260 +
261 src_configure() {
262 local mycmakeargs=( -DPULL_TRANSLATIONS=OFF )
263 cmake-utils_src_configure