1 |
commit: bf5e888dc8750035086b4e51358335f1d4ade924 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 14 01:21:10 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 14 01:23:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf5e888d |
7 |
|
8 |
kde-frameworks/syntax-highlighting: Fix another bash/zsh syntax bug |
9 |
|
10 |
See also: https://invent.kde.org/frameworks/syntax-highlighting/-/issues/5 |
11 |
|
12 |
Reported-by: Toralf Förster <toralf <AT> gentoo.org> |
13 |
Package-Manager: Portage-3.0.13, Repoman-3.0.2 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
.../syntax-highlighting-5.77.0-bash-zsh-fix.patch | 122 +++++++++++++++++++++ |
17 |
...ntax-highlighting-5.77.0-bash-zsh-version.patch | 39 +++++++ |
18 |
.../syntax-highlighting-5.77.0-r2.ebuild | 37 +++++++ |
19 |
.../syntax-highlighting-5.78.0-r1.ebuild | 33 ++++++ |
20 |
4 files changed, 231 insertions(+) |
21 |
|
22 |
diff --git a/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bash-zsh-fix.patch b/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bash-zsh-fix.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..2ec92edb9c8 |
25 |
--- /dev/null |
26 |
+++ b/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bash-zsh-fix.patch |
27 |
@@ -0,0 +1,122 @@ |
28 |
+From ba9b3c5e0ed2fb33b9a896ec910590410978befe Mon Sep 17 00:00:00 2001 |
29 |
+From: Jonathan Poelen <jonathan.poelen@×××××.com> |
30 |
+Date: Mon, 11 Jan 2021 01:29:01 +0100 |
31 |
+Subject: [PATCH] Bash: fix #5: $ at the end of a double quoted string |
32 |
+ |
33 |
+--- |
34 |
+ autotests/folding/highlight.sh.fold | 1 + |
35 |
+ autotests/html/highlight.sh.dark.html | 1 + |
36 |
+ autotests/html/highlight.sh.html | 1 + |
37 |
+ autotests/input/highlight.sh | 1 + |
38 |
+ autotests/reference/highlight.sh.ref | 1 + |
39 |
+ data/syntax/bash.xml | 5 +++-- |
40 |
+ data/syntax/zsh.xml | 3 +-- |
41 |
+ 7 files changed, 9 insertions(+), 4 deletions(-) |
42 |
+ |
43 |
+diff --git a/autotests/folding/highlight.sh.fold b/autotests/folding/highlight.sh.fold |
44 |
+index 652fef8f..d7a6b210 100644 |
45 |
+--- a/autotests/folding/highlight.sh.fold |
46 |
++++ b/autotests/folding/highlight.sh.fold |
47 |
+@@ -16,6 +16,7 @@ echo 'single quoted string' |
48 |
+ echo "double quoted string" |
49 |
+ echo $'string with esc\apes\x0din it' |
50 |
+ echo $"string meant to be translated" |
51 |
++echo "$" |
52 |
+ |
53 |
+ |
54 |
+ # comments: |
55 |
+diff --git a/autotests/html/highlight.sh.dark.html b/autotests/html/highlight.sh.dark.html |
56 |
+index d1d4fb8a..8cbd0929 100644 |
57 |
+--- a/autotests/html/highlight.sh.dark.html |
58 |
++++ b/autotests/html/highlight.sh.dark.html |
59 |
+@@ -22,6 +22,7 @@ |
60 |
+ <span style="color:#7f8c8d;">echo</span> <span style="color:#f44f4f;">"double quoted string"</span> |
61 |
+ <span style="color:#7f8c8d;">echo</span> <span style="color:#f44f4f;">$'string with esc</span><span style="color:#2980b9;">\a</span><span style="color:#f44f4f;">pes</span><span style="color:#2980b9;">\x0d</span><span style="color:#f44f4f;">in it'</span> |
62 |
+ <span style="color:#7f8c8d;">echo</span> <span style="color:#f44f4f;">$"</span><span style="color:#f44f4f;">string meant to be translated"</span> |
63 |
++<span style="color:#7f8c8d;">echo</span> <span style="color:#f44f4f;">"$"</span> |
64 |
+ |
65 |
+ |
66 |
+ <span style="color:#7a7c7d;"># comments:</span> |
67 |
+diff --git a/autotests/html/highlight.sh.html b/autotests/html/highlight.sh.html |
68 |
+index 5d687d86..d176b1cb 100644 |
69 |
+--- a/autotests/html/highlight.sh.html |
70 |
++++ b/autotests/html/highlight.sh.html |
71 |
+@@ -22,6 +22,7 @@ |
72 |
+ <span style="color:#644a9b;font-weight:bold;">echo</span> <span style="color:#bf0303;">"double quoted string"</span> |
73 |
+ <span style="color:#644a9b;font-weight:bold;">echo</span> <span style="color:#bf0303;">$'string with esc</span><span style="color:#0057ae;">\a</span><span style="color:#bf0303;">pes</span><span style="color:#0057ae;">\x0d</span><span style="color:#bf0303;">in it'</span> |
74 |
+ <span style="color:#644a9b;font-weight:bold;">echo</span> <span style="color:#bf0303;">$"</span><span style="color:#bf0303;">string meant to be translated"</span> |
75 |
++<span style="color:#644a9b;font-weight:bold;">echo</span> <span style="color:#bf0303;">"$"</span> |
76 |
+ |
77 |
+ |
78 |
+ <span style="color:#898887;"># comments:</span> |
79 |
+diff --git a/autotests/input/highlight.sh b/autotests/input/highlight.sh |
80 |
+index 177e104f..5c2ae7b1 100644 |
81 |
+--- a/autotests/input/highlight.sh |
82 |
++++ b/autotests/input/highlight.sh |
83 |
+@@ -16,6 +16,7 @@ echo 'single quoted string' |
84 |
+ echo "double quoted string" |
85 |
+ echo $'string with esc\apes\x0din it' |
86 |
+ echo $"string meant to be translated" |
87 |
++echo "$" |
88 |
+ |
89 |
+ |
90 |
+ # comments: |
91 |
+diff --git a/autotests/reference/highlight.sh.ref b/autotests/reference/highlight.sh.ref |
92 |
+index 181c36af..edaf18ab 100644 |
93 |
+--- a/autotests/reference/highlight.sh.ref |
94 |
++++ b/autotests/reference/highlight.sh.ref |
95 |
+@@ -16,6 +16,7 @@ |
96 |
+ <Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"double quoted string"</String DoubleQ><br/> |
97 |
+ <Builtin>echo</Builtin><Normal Text> </Normal Text><String SingleQ>$'string with esc</String SingleQ><String Escape>\a</String Escape><String SingleQ>pes</String SingleQ><String Escape>\x0d</String Escape><String SingleQ>in it'</String SingleQ><br/> |
98 |
+ <Builtin>echo</Builtin><Normal Text> </Normal Text><String Transl.>$"</String Transl.><String DoubleQ>string meant to be translated"</String DoubleQ><br/> |
99 |
++<Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"$"</String DoubleQ><br/> |
100 |
+ <Normal Text></Normal Text><br/> |
101 |
+ <Normal Text></Normal Text><br/> |
102 |
+ <Comment># comments:</Comment><br/> |
103 |
+diff --git a/data/syntax/bash.xml b/data/syntax/bash.xml |
104 |
+index 3171247b..3b804f90 100644 |
105 |
+--- a/data/syntax/bash.xml |
106 |
++++ b/data/syntax/bash.xml |
107 |
+@@ -30,7 +30,7 @@ |
108 |
+ <!ENTITY heredocq "(?|"([^"]+)"|'([^']+)'|\\(.[^&wordseps;&substseps;]*))"> |
109 |
+ ]> |
110 |
+ |
111 |
+-<language name="Bash" version="20" kateversion="5.62" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@×××.nl)" license="LGPL"> |
112 |
++<language name="Bash" version="21" kateversion="5.62" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@×××.nl)" license="LGPL"> |
113 |
+ |
114 |
+ <!-- (c) 2004 by Wilbert Berendsen (wilbert@×××.nl) |
115 |
+ Changes by Matthew Woehlke (mw_triad@×××××××××××××××××.net) |
116 |
+@@ -943,7 +943,8 @@ |
117 |
+ <DetectChar attribute="Backquote" context="RegularBackq" char="`"/> |
118 |
+ </context> |
119 |
+ <context attribute="String DoubleQ" lineEndContext="#stay" name="StringDQDispatchVariables"> |
120 |
+- <IncludeRules context="DispatchVariables"/> |
121 |
++ <IncludeRules context="DispatchSubstVariables"/> |
122 |
++ <IncludeRules context="DispatchVarnameVariables"/> |
123 |
+ <DetectChar attribute="String DoubleQ" context="#pop" char="$"/> |
124 |
+ </context> |
125 |
+ <context attribute="String DoubleQ" lineEndContext="#pop" name="StringDQEscape"> |
126 |
+diff --git a/data/syntax/zsh.xml b/data/syntax/zsh.xml |
127 |
+index ada258c8..5aa83290 100644 |
128 |
+--- a/data/syntax/zsh.xml |
129 |
++++ b/data/syntax/zsh.xml |
130 |
+@@ -55,7 +55,7 @@ |
131 |
+ <!ENTITY int "(?:[0-9]++(_++[0-9]++)*+)"> |
132 |
+ <!ENTITY exp "(?:[eE][-+]?∫)"> |
133 |
+ ]> |
134 |
+-<language name="Zsh" version="12" kateversion="5.62" section="Scripts" extensions="*.sh;*.zsh;.zshrc;.zprofile;.zlogin;.zlogout;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Jonathan Poelen (jonathan.poelen@×××××.com)" license="MIT"> |
135 |
++<language name="Zsh" version="13" kateversion="5.62" section="Scripts" extensions="*.sh;*.zsh;.zshrc;.zprofile;.zlogin;.zlogout;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Jonathan Poelen (jonathan.poelen@×××××.com)" license="MIT"> |
136 |
+ |
137 |
+ <highlighting> |
138 |
+ <list name="keywords"> |
139 |
+@@ -893,7 +893,6 @@ |
140 |
+ </context> |
141 |
+ <context attribute="String DoubleQ" lineEndContext="#stay" name="StringDQDispatchVariables"> |
142 |
+ <IncludeRules context="DispatchSubstVariables"/> |
143 |
+- <Detect2Chars attribute="String SingleQ" context="#pop!StringEsc" char="$" char1="'"/> |
144 |
+ <IncludeRules context="DispatchVarNameVariables"/> |
145 |
+ <DetectChar attribute="String DoubleQ" context="#pop" char="$"/> |
146 |
+ </context> |
147 |
+-- |
148 |
+GitLab |
149 |
+ |
150 |
|
151 |
diff --git a/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bash-zsh-version.patch b/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bash-zsh-version.patch |
152 |
new file mode 100644 |
153 |
index 00000000000..2a7f2684bfb |
154 |
--- /dev/null |
155 |
+++ b/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bash-zsh-version.patch |
156 |
@@ -0,0 +1,39 @@ |
157 |
+From 70b56cf8b3d1a85e15d1e09aa8490e5183967de0 Mon Sep 17 00:00:00 2001 |
158 |
+From: Christoph Cullmann <cullmann@×××.org> |
159 |
+Date: Wed, 30 Dec 2020 17:35:48 +0100 |
160 |
+Subject: [PATCH] increment version |
161 |
+ |
162 |
+--- |
163 |
+ data/syntax/bash.xml | 2 +- |
164 |
+ data/syntax/zsh.xml | 2 +- |
165 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
166 |
+ |
167 |
+diff --git a/data/syntax/bash.xml b/data/syntax/bash.xml |
168 |
+index 676b630d..3171247b 100644 |
169 |
+--- a/data/syntax/bash.xml |
170 |
++++ b/data/syntax/bash.xml |
171 |
+@@ -30,7 +30,7 @@ |
172 |
+ <!ENTITY heredocq "(?|"([^"]+)"|'([^']+)'|\\(.[^&wordseps;&substseps;]*))"> |
173 |
+ ]> |
174 |
+ |
175 |
+-<language name="Bash" version="19" kateversion="5.62" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@×××.nl)" license="LGPL"> |
176 |
++<language name="Bash" version="20" kateversion="5.62" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@×××.nl)" license="LGPL"> |
177 |
+ |
178 |
+ <!-- (c) 2004 by Wilbert Berendsen (wilbert@×××.nl) |
179 |
+ Changes by Matthew Woehlke (mw_triad@×××××××××××××××××.net) |
180 |
+diff --git a/data/syntax/zsh.xml b/data/syntax/zsh.xml |
181 |
+index 120b345e..ada258c8 100644 |
182 |
+--- a/data/syntax/zsh.xml |
183 |
++++ b/data/syntax/zsh.xml |
184 |
+@@ -55,7 +55,7 @@ |
185 |
+ <!ENTITY int "(?:[0-9]++(_++[0-9]++)*+)"> |
186 |
+ <!ENTITY exp "(?:[eE][-+]?∫)"> |
187 |
+ ]> |
188 |
+-<language name="Zsh" version="11" kateversion="5.62" section="Scripts" extensions="*.sh;*.zsh;.zshrc;.zprofile;.zlogin;.zlogout;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Jonathan Poelen (jonathan.poelen@×××××.com)" license="MIT"> |
189 |
++<language name="Zsh" version="12" kateversion="5.62" section="Scripts" extensions="*.sh;*.zsh;.zshrc;.zprofile;.zlogin;.zlogout;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Jonathan Poelen (jonathan.poelen@×××××.com)" license="MIT"> |
190 |
+ |
191 |
+ <highlighting> |
192 |
+ <list name="keywords"> |
193 |
+-- |
194 |
+2.30.0 |
195 |
+ |
196 |
|
197 |
diff --git a/kde-frameworks/syntax-highlighting/syntax-highlighting-5.77.0-r2.ebuild b/kde-frameworks/syntax-highlighting/syntax-highlighting-5.77.0-r2.ebuild |
198 |
new file mode 100644 |
199 |
index 00000000000..3d8083137a2 |
200 |
--- /dev/null |
201 |
+++ b/kde-frameworks/syntax-highlighting/syntax-highlighting-5.77.0-r2.ebuild |
202 |
@@ -0,0 +1,37 @@ |
203 |
+# Copyright 1999-2021 Gentoo Authors |
204 |
+# Distributed under the terms of the GNU General Public License v2 |
205 |
+ |
206 |
+EAPI=7 |
207 |
+ |
208 |
+ECM_TEST="forceoptional" |
209 |
+QTMIN=5.15.1 |
210 |
+inherit ecm kde.org |
211 |
+ |
212 |
+DESCRIPTION="Framework for syntax highlighting" |
213 |
+SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${P}-bash-zsh-fixes.patch.xz" |
214 |
+ |
215 |
+LICENSE="MIT" |
216 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
217 |
+IUSE="nls" |
218 |
+ |
219 |
+BDEPEND=" |
220 |
+ dev-lang/perl |
221 |
+ nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 ) |
222 |
+" |
223 |
+DEPEND=" |
224 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
225 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
226 |
+ >=dev-qt/qtxmlpatterns-${QTMIN}:5 |
227 |
+" |
228 |
+RDEPEND="${DEPEND}" |
229 |
+ |
230 |
+PATCHES=( |
231 |
+ "${WORKDIR}"/${P}-bash-zsh-fixes.patch |
232 |
+ "${FILESDIR}"/${PN}-5.77.0-bash-zsh-version.patch |
233 |
+ "${FILESDIR}"/${PN}-5.77.0-bash-zsh-fix.patch |
234 |
+) |
235 |
+ |
236 |
+src_install() { |
237 |
+ ecm_src_install |
238 |
+ dobin "${BUILD_DIR}"/bin/katehighlightingindexer |
239 |
+} |
240 |
|
241 |
diff --git a/kde-frameworks/syntax-highlighting/syntax-highlighting-5.78.0-r1.ebuild b/kde-frameworks/syntax-highlighting/syntax-highlighting-5.78.0-r1.ebuild |
242 |
new file mode 100644 |
243 |
index 00000000000..4dabf263ae7 |
244 |
--- /dev/null |
245 |
+++ b/kde-frameworks/syntax-highlighting/syntax-highlighting-5.78.0-r1.ebuild |
246 |
@@ -0,0 +1,33 @@ |
247 |
+# Copyright 1999-2021 Gentoo Authors |
248 |
+# Distributed under the terms of the GNU General Public License v2 |
249 |
+ |
250 |
+EAPI=7 |
251 |
+ |
252 |
+ECM_TEST="forceoptional" |
253 |
+QTMIN=5.15.1 |
254 |
+inherit ecm kde.org |
255 |
+ |
256 |
+DESCRIPTION="Framework for syntax highlighting" |
257 |
+LICENSE="MIT" |
258 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
259 |
+IUSE="nls" |
260 |
+ |
261 |
+BDEPEND=" |
262 |
+ dev-lang/perl |
263 |
+ nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 ) |
264 |
+" |
265 |
+DEPEND=" |
266 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
267 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
268 |
+ >=dev-qt/qtxmlpatterns-${QTMIN}:5 |
269 |
+" |
270 |
+RDEPEND="${DEPEND}" |
271 |
+ |
272 |
+PATCHES=( |
273 |
+ "${FILESDIR}"/${PN}-5.77.0-bash-zsh-fix.patch |
274 |
+) |
275 |
+ |
276 |
+src_install() { |
277 |
+ ecm_src_install |
278 |
+ dobin "${BUILD_DIR}"/bin/katehighlightingindexer |
279 |
+} |