Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/cantor/, kde-apps/cantor/files/
Date: Sat, 11 Feb 2017 23:35:13
Message-Id: 1486856086.adb1ff04a2bddaf9a934bc7698aa10301dc1e2e2.asturm@gentoo
1 commit: adb1ff04a2bddaf9a934bc7698aa10301dc1e2e2
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 11 21:49:09 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 11 23:34:46 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adb1ff04
7
8 kde-apps/cantor: Fix build w/ USE=julia and KF-5.31
9
10 Package-Manager: portage-2.3.3
11
12 kde-apps/cantor/cantor-16.12.2.ebuild | 1 +
13 .../{cantor-16.12.2.ebuild => cantor-9999.ebuild} | 7 +-
14 .../files/cantor-16.12.2-julia-kf-5.31.patch | 190 +++++++++++++++++++++
15 3 files changed, 193 insertions(+), 5 deletions(-)
16
17 diff --git a/kde-apps/cantor/cantor-16.12.2.ebuild b/kde-apps/cantor/cantor-16.12.2.ebuild
18 index 669532f809..2e6883b3b3 100644
19 --- a/kde-apps/cantor/cantor-16.12.2.ebuild
20 +++ b/kde-apps/cantor/cantor-16.12.2.ebuild
21 @@ -59,6 +59,7 @@ RESTRICT+=" test"
22 PATCHES=(
23 "${FILESDIR}"/${P}-bashism.patch
24 "${FILESDIR}"/${P}-python-kf-5.31.patch
25 + "${FILESDIR}"/${P}-julia-kf-5.31.patch
26 )
27
28 pkg_pretend() {
29
30 diff --git a/kde-apps/cantor/cantor-16.12.2.ebuild b/kde-apps/cantor/cantor-9999.ebuild
31 similarity index 96%
32 copy from kde-apps/cantor/cantor-16.12.2.ebuild
33 copy to kde-apps/cantor/cantor-9999.ebuild
34 index 669532f809..fb71acbf56 100644
35 --- a/kde-apps/cantor/cantor-16.12.2.ebuild
36 +++ b/kde-apps/cantor/cantor-9999.ebuild
37 @@ -12,7 +12,7 @@ inherit kde5 python-r1
38
39 DESCRIPTION="Interface for doing mathematics and scientific computing"
40 HOMEPAGE="https://www.kde.org/applications/education/cantor https://edu.kde.org/cantor"
41 -KEYWORDS="~amd64 ~x86"
42 +KEYWORDS=""
43 IUSE="analitza julia lua postscript python qalculate +R"
44
45 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
46 @@ -56,10 +56,7 @@ RDEPEND="${RDEPEND}"
47
48 RESTRICT+=" test"
49
50 -PATCHES=(
51 - "${FILESDIR}"/${P}-bashism.patch
52 - "${FILESDIR}"/${P}-python-kf-5.31.patch
53 -)
54 +PATCHES=( "${FILESDIR}"/${PN}-16.12.2-bashism.patch )
55
56 pkg_pretend() {
57 kde5_pkg_pretend
58
59 diff --git a/kde-apps/cantor/files/cantor-16.12.2-julia-kf-5.31.patch b/kde-apps/cantor/files/cantor-16.12.2-julia-kf-5.31.patch
60 new file mode 100644
61 index 0000000000..425c61eb48
62 --- /dev/null
63 +++ b/kde-apps/cantor/files/cantor-16.12.2-julia-kf-5.31.patch
64 @@ -0,0 +1,190 @@
65 +From 45322d9f58f50df3d4d5755d4199e579f6fd8646 Mon Sep 17 00:00:00 2001
66 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
67 +Date: Sat, 11 Feb 2017 22:46:35 +0100
68 +Subject: [PATCH] [julia] Fix build with -fno-operator-names
69 +
70 +REVIEW: 129942
71 +---
72 + src/backends/julia/juliaexpression.cpp | 6 +++---
73 + src/backends/julia/juliaextensions.cpp | 4 ++--
74 + src/backends/julia/juliahighlighter.cpp | 4 ++--
75 + src/backends/julia/juliakeywords.cpp | 10 +++++-----
76 + src/backends/julia/juliaserver/juliaserver.cpp | 4 ++--
77 + src/backends/julia/juliaserver/main.cpp | 4 ++--
78 + src/backends/julia/juliasession.cpp | 4 ++--
79 + 7 files changed, 18 insertions(+), 18 deletions(-)
80 +
81 +diff --git a/src/backends/julia/juliaexpression.cpp b/src/backends/julia/juliaexpression.cpp
82 +index 27cdd85..618200d 100644
83 +--- a/src/backends/julia/juliaexpression.cpp
84 ++++ b/src/backends/julia/juliaexpression.cpp
85 +@@ -40,7 +40,7 @@ void JuliaExpression::evaluate()
86 +
87 + // Plots integration
88 + m_plot_filename.clear();
89 +- if (juliaSession->integratePlots() and checkPlotShowingCommands()) {
90 ++ if (juliaSession->integratePlots() && checkPlotShowingCommands()) {
91 + // Simply add plot saving command to the end of execution
92 + QStringList inlinePlotFormats;
93 + inlinePlotFormats << QLatin1String("svg");
94 +@@ -73,8 +73,8 @@ void JuliaExpression::finalize()
95 + setResult(new Cantor::TextResult(juliaSession->getOutput()));
96 + setStatus(Cantor::Expression::Error);
97 + } else {
98 +- if (not m_plot_filename.isEmpty()
99 +- and QFileInfo(m_plot_filename).exists()) {
100 ++ if (!m_plot_filename.isEmpty()
101 ++ && QFileInfo(m_plot_filename).exists()) {
102 + // If we have plot in result, show it
103 + setResult(
104 + new Cantor::ImageResult(QUrl::fromLocalFile(m_plot_filename)));
105 +diff --git a/src/backends/julia/juliaextensions.cpp b/src/backends/julia/juliaextensions.cpp
106 +index 4585c6f..ad5e3a9 100644
107 +--- a/src/backends/julia/juliaextensions.cpp
108 ++++ b/src/backends/julia/juliaextensions.cpp
109 +@@ -138,7 +138,7 @@ QString JuliaPlotExtension::plotFunction2d(
110 + {
111 + auto new_left = left;
112 + auto new_right = right;
113 +- if (new_left.isEmpty() and new_right.isEmpty()) {
114 ++ if (new_left.isEmpty() && new_right.isEmpty()) {
115 + new_left = QLatin1String("-1");
116 + new_right = QLatin1String("1");
117 + } else if (new_left.isEmpty()) {
118 +@@ -165,7 +165,7 @@ QString JuliaPlotExtension::plotFunction3d(
119 + {
120 +
121 + auto update_interval = [](Interval &interval) {
122 +- if (interval.first.isEmpty() and interval.second.isEmpty()) {
123 ++ if (interval.first.isEmpty() && interval.second.isEmpty()) {
124 + interval.first = QLatin1String("-1");
125 + interval.second = QLatin1String("1");
126 + } else if (interval.first.isEmpty()) {
127 +diff --git a/src/backends/julia/juliahighlighter.cpp b/src/backends/julia/juliahighlighter.cpp
128 +index 4795361..f7d3622 100644
129 +--- a/src/backends/julia/juliahighlighter.cpp
130 ++++ b/src/backends/julia/juliahighlighter.cpp
131 +@@ -98,7 +98,7 @@ void JuliaHighlighter::highlightBlock(const QString &text)
132 + while (pos < text.length()) {
133 + // Trying to close current environments
134 + bool triggered = false;
135 +- for (int i = 0; i < flags.size() and not triggered; i++) {
136 ++ for (int i = 0; i < flags.size() && !triggered; i++) {
137 + int flag = flags[i];
138 + QRegExp &regexp = regexps_ends[i];
139 + QTextCharFormat &format = formats[i];
140 +@@ -144,7 +144,7 @@ void JuliaHighlighter::highlightBlock(const QString &text)
141 + singleLineCommentStart.indexIn(text, pos);
142 +
143 + if (singleLineCommentStartPos != -1
144 +- and singleLineCommentStartPos < minPos) {
145 ++ && singleLineCommentStartPos < minPos) {
146 + // single line comment starts earlier
147 + setFormat(pos, text.length() - pos, commentFormat());
148 + break;
149 +diff --git a/src/backends/julia/juliakeywords.cpp b/src/backends/julia/juliakeywords.cpp
150 +index f0a5846..8a0efec 100644
151 +--- a/src/backends/julia/juliakeywords.cpp
152 ++++ b/src/backends/julia/juliakeywords.cpp
153 +@@ -62,11 +62,11 @@ void JuliaKeywords::loadFromFile()
154 + const QStringRef name = xml.name();
155 +
156 + if (name == QLatin1String("keywords")
157 +- or name == QLatin1String("variables")
158 +- or name == QLatin1String("plot_showing_commands")) {
159 ++ || name == QLatin1String("variables")
160 ++ || name == QLatin1String("plot_showing_commands")) {
161 + while (xml.readNextStartElement()) {
162 + Q_ASSERT(
163 +- xml.isStartElement() and xml.name() == QLatin1String("word")
164 ++ xml.isStartElement() && xml.name() == QLatin1String("word")
165 + );
166 +
167 + const QString text = xml.readElementText();
168 +@@ -91,7 +91,7 @@ void JuliaKeywords::loadFromFile()
169 +
170 + void JuliaKeywords::addVariable(const QString &variable)
171 + {
172 +- if (not m_variables.contains(variable)) {
173 ++ if (!m_variables.contains(variable)) {
174 + m_variables << variable;
175 + }
176 + }
177 +@@ -104,7 +104,7 @@ void JuliaKeywords::clearVariables()
178 +
179 + void JuliaKeywords::addFunction(const QString &function)
180 + {
181 +- if (not m_functions.contains(function)) {
182 ++ if (!m_functions.contains(function)) {
183 + m_functions << function;
184 + }
185 + }
186 +diff --git a/src/backends/julia/juliaserver/juliaserver.cpp b/src/backends/julia/juliaserver/juliaserver.cpp
187 +index c9beb4c..91585cf 100644
188 +--- a/src/backends/julia/juliaserver/juliaserver.cpp
189 ++++ b/src/backends/julia/juliaserver/juliaserver.cpp
190 +@@ -47,7 +47,7 @@ void JuliaServer::runJuliaCommand(const QString &command)
191 + {
192 + // Redirect stdout, stderr to temprorary files
193 + QTemporaryFile output, error;
194 +- if (not output.open() or not error.open()) {
195 ++ if (!output.open() || !error.open()) {
196 + qFatal("Unable to create temprorary files for stdout/stderr");
197 + return;
198 + }
199 +@@ -90,7 +90,7 @@ void JuliaServer::runJuliaCommand(const QString &command)
200 + bool is_nothing = jl_unbox_bool(
201 + static_cast<jl_value_t *>(jl_call2(equality, nothing, val))
202 + );
203 +- if (not is_nothing) {
204 ++ if (!is_nothing) {
205 + jl_static_show(JL_STDOUT, val);
206 + }
207 + m_was_exception = false;
208 +diff --git a/src/backends/julia/juliaserver/main.cpp b/src/backends/julia/juliaserver/main.cpp
209 +index ad7e4d9..11687ec 100644
210 +--- a/src/backends/julia/juliaserver/main.cpp
211 ++++ b/src/backends/julia/juliaserver/main.cpp
212 +@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
213 + {
214 + QCoreApplication app(argc, argv);
215 +
216 +- if (not QDBusConnection::sessionBus().isConnected()) {
217 ++ if (!QDBusConnection::sessionBus().isConnected()) {
218 + qWarning() << "Can't connect to the D-Bus session bus.\n"
219 + "To start it, run: eval `dbus-launch --auto-syntax`";
220 + return 1;
221 +@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
222 + const QString &serviceName =
223 + QString::fromLatin1("org.kde.Cantor.Julia-%1").arg(app.applicationPid());
224 +
225 +- if (not QDBusConnection::sessionBus().registerService(serviceName)) {
226 ++ if (!QDBusConnection::sessionBus().registerService(serviceName)) {
227 + qWarning() << QDBusConnection::sessionBus().lastError().message();
228 + return 2;
229 + }
230 +diff --git a/src/backends/julia/juliasession.cpp b/src/backends/julia/juliasession.cpp
231 +index 425e6cb..9183e11 100644
232 +--- a/src/backends/julia/juliasession.cpp
233 ++++ b/src/backends/julia/juliasession.cpp
234 +@@ -86,7 +86,7 @@ void JuliaSession::login()
235 + QDBusConnection::sessionBus()
236 + );
237 +
238 +- if (not m_interface->isValid()) {
239 ++ if (!m_interface->isValid()) {
240 + qWarning() << QDBusConnection::sessionBus().lastError().message();
241 + return;
242 + }
243 +@@ -213,7 +213,7 @@ bool JuliaSession::getWasException()
244 + {
245 + const QDBusReply<bool> &reply =
246 + m_interface->call(QLatin1String("getWasException"));
247 +- return reply.isValid() and reply.value();
248 ++ return reply.isValid() && reply.value();
249 + }
250 +
251 + void JuliaSession::listVariables()
252 +--
253 +2.10.2
254 +