Gentoo Archives: gentoo-commits

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