Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/, dev-libs/libclangformat-ide/files/, dev-libs/libclangformat-ide/
Date: Thu, 31 Dec 2020 08:58:18
Message-Id: 1609404961.b59c592cb7fc3de9e1b3ffb30b83424facae8ed4.mgorny@gentoo
1 commit: b59c592cb7fc3de9e1b3ffb30b83424facae8ed4
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 31 08:56:01 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 31 08:56:01 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b59c592c
7
8 dev-libs/libclangformat-ide: Remove last-rited pkg
9
10 Closes: https://bugs.gentoo.org/734732
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 dev-libs/libclangformat-ide/Manifest | 2 -
14 .../files/clang-qtcreator-compat.patch | 185 ---------------------
15 .../libclangformat-ide-10.0.0.ebuild | 72 --------
16 .../libclangformat-ide-9.0.1.ebuild | 72 --------
17 dev-libs/libclangformat-ide/metadata.xml | 8 -
18 profiles/package.mask | 7 -
19 6 files changed, 346 deletions(-)
20
21 diff --git a/dev-libs/libclangformat-ide/Manifest b/dev-libs/libclangformat-ide/Manifest
22 deleted file mode 100644
23 index 75e6601c583..00000000000
24 --- a/dev-libs/libclangformat-ide/Manifest
25 +++ /dev/null
26 @@ -1,2 +0,0 @@
27 -DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
28 -DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
29
30 diff --git a/dev-libs/libclangformat-ide/files/clang-qtcreator-compat.patch b/dev-libs/libclangformat-ide/files/clang-qtcreator-compat.patch
31 deleted file mode 100644
32 index 72b9453ce7a..00000000000
33 --- a/dev-libs/libclangformat-ide/files/clang-qtcreator-compat.patch
34 +++ /dev/null
35 @@ -1,185 +0,0 @@
36 -From fa1b9053729ec6a4425a44ec5502dd388928274a Mon Sep 17 00:00:00 2001
37 -From: Ivan Donchevskii <ivan.donchevskii@××.io>
38 -Date: Fri, 12 Oct 2018 08:19:25 +0200
39 -Subject: [PATCH] [clang-format] Introduce the flag which allows not to shrink
40 - lines
41 -
42 ---------------------------------------------------------------------------
43 -* https://reviews.llvm.org/D53072
44 ---------------------------------------------------------------------------
45 -
46 -Currently there's no way to prevent to lines optimization even
47 -if you have intentionally put <CR> to split the line.
48 -
49 -In general case it's fine. So I would prefer to have such option
50 -which you can enable in special cases (for me it's an IDE related use case).
51 -
52 -Revert this change if upstream clang-format offers better solution.
53 -
54 -This is a cherry pick from commits b748c82e3664c2e2e3d29645ede472d87b8cde63
55 -and 1817513d4f3a2e4e26be124dbe395340f798fd51.
56 -
57 -Change-Id: I9d2935b937bb68ea8dc59fac8463718475e9c080
58 -Reviewed-by: Orgad Shaneh <orgads@×××××.com>
59 ----
60 - include/clang/Format/Format.h | 13 +++++++++++++
61 - lib/Format/Format.cpp | 4 ++++
62 - lib/Format/UnwrappedLineFormatter.cpp | 9 +++++----
63 - lib/Format/UnwrappedLineParser.cpp | 2 ++
64 - unittests/Format/FormatTest.cpp | 16 ++++++++++++++++
65 - 5 files changed, 40 insertions(+), 4 deletions(-)
66 -
67 -diff --git a/include/clang/Format/Format.h b/include/clang/Format/Format.h
68 -index cb37b0c890c..b9c4df3d1af 100644
69 ---- a/include/clang/Format/Format.h
70 -+++ b/include/clang/Format/Format.h
71 -@@ -22,6 +22,8 @@
72 - #include "llvm/Support/Regex.h"
73 - #include <system_error>
74 -
75 -+#define KEEP_LINE_BREAKS_FOR_NON_EMPTY_LINES_BACKPORTED
76 -+
77 - namespace llvm {
78 - namespace vfs {
79 - class FileSystem;
80 -@@ -1200,6 +1202,16 @@ struct FormatStyle {
81 - /// \endcode
82 - bool JavaScriptWrapImports;
83 -
84 -+ /// If true, no line breaks are optimized out (works only with ColumnLimit = 0)
85 -+ /// \code
86 -+ /// true: false:
87 -+ /// int foo(int a, vs. int foo(int a, int b) {
88 -+ /// int b) {
89 -+ /// bar(); bar();
90 -+ /// } }
91 -+ /// \endcode
92 -+ bool KeepLineBreaksForNonEmptyLines;
93 -+
94 - /// If true, the empty line at the start of blocks is kept.
95 - /// \code
96 - /// true: false:
97 -@@ -1767,6 +1779,7 @@ struct FormatStyle {
98 - JavaImportGroups == R.JavaImportGroups &&
99 - JavaScriptQuotes == R.JavaScriptQuotes &&
100 - JavaScriptWrapImports == R.JavaScriptWrapImports &&
101 -+ KeepLineBreaksForNonEmptyLines == R.KeepLineBreaksForNonEmptyLines &&
102 - KeepEmptyLinesAtTheStartOfBlocks ==
103 - R.KeepEmptyLinesAtTheStartOfBlocks &&
104 - MacroBlockBegin == R.MacroBlockBegin &&
105 -diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
106 -index 2c4f8760540..61ea88626ee 100644
107 ---- a/lib/Format/Format.cpp
108 -+++ b/lib/Format/Format.cpp
109 -@@ -417,6 +417,8 @@ template <> struct MappingTraits<FormatStyle> {
110 - IO.mapOptional("JavaImportGroups", Style.JavaImportGroups);
111 - IO.mapOptional("JavaScriptQuotes", Style.JavaScriptQuotes);
112 - IO.mapOptional("JavaScriptWrapImports", Style.JavaScriptWrapImports);
113 -+ IO.mapOptional("KeepLineBreaksForNonEmptyLines",
114 -+ Style.KeepLineBreaksForNonEmptyLines);
115 - IO.mapOptional("KeepEmptyLinesAtTheStartOfBlocks",
116 - Style.KeepEmptyLinesAtTheStartOfBlocks);
117 - IO.mapOptional("MacroBlockBegin", Style.MacroBlockBegin);
118 -@@ -678,6 +680,7 @@ FormatStyle getLLVMStyle() {
119 - LLVMStyle.JavaScriptWrapImports = true;
120 - LLVMStyle.TabWidth = 8;
121 - LLVMStyle.MaxEmptyLinesToKeep = 1;
122 -+ LLVMStyle.KeepLineBreaksForNonEmptyLines = false;
123 - LLVMStyle.KeepEmptyLinesAtTheStartOfBlocks = true;
124 - LLVMStyle.NamespaceIndentation = FormatStyle::NI_None;
125 - LLVMStyle.ObjCBinPackProtocolList = FormatStyle::BPS_Auto;
126 -@@ -745,6 +748,7 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
127 - {"^<ext/.*\\.h>", 2}, {"^<.*\\.h>", 1}, {"^<.*", 2}, {".*", 3}};
128 - GoogleStyle.IncludeStyle.IncludeIsMainRegex = "([-_](test|unittest))?$";
129 - GoogleStyle.IndentCaseLabels = true;
130 -+ GoogleStyle.KeepLineBreaksForNonEmptyLines = false;
131 - GoogleStyle.KeepEmptyLinesAtTheStartOfBlocks = false;
132 - GoogleStyle.ObjCBinPackProtocolList = FormatStyle::BPS_Never;
133 - GoogleStyle.ObjCSpaceAfterProperty = false;
134 -diff --git a/lib/Format/UnwrappedLineFormatter.cpp b/lib/Format/UnwrappedLineFormatter.cpp
135 -index 6b6a9aff461..c88efbc6867 100644
136 ---- a/lib/Format/UnwrappedLineFormatter.cpp
137 -+++ b/lib/Format/UnwrappedLineFormatter.cpp
138 -@@ -684,7 +684,7 @@ public:
139 - LineFormatter(ContinuationIndenter *Indenter, WhitespaceManager *Whitespaces,
140 - const FormatStyle &Style,
141 - UnwrappedLineFormatter *BlockFormatter)
142 -- : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style),
143 -+ : Indenter(Indenter), Style(Style), Whitespaces(Whitespaces),
144 - BlockFormatter(BlockFormatter) {}
145 - virtual ~LineFormatter() {}
146 -
147 -@@ -727,7 +727,8 @@ protected:
148 - // assert so that we can simply call this function for all tokens.
149 - return true;
150 -
151 -- if (NewLine) {
152 -+ if (NewLine || (Previous.Children[0]->First->MustBreakBefore &&
153 -+ Style.KeepLineBreaksForNonEmptyLines)) {
154 - int AdditionalIndent = State.Stack.back().Indent -
155 - Previous.Children[0]->Level * Style.IndentWidth;
156 -
157 -@@ -772,10 +773,10 @@ protected:
158 - }
159 -
160 - ContinuationIndenter *Indenter;
161 -+ const FormatStyle &Style;
162 -
163 - private:
164 - WhitespaceManager *Whitespaces;
165 -- const FormatStyle &Style;
166 - UnwrappedLineFormatter *BlockFormatter;
167 - };
168 -
169 -@@ -798,7 +799,7 @@ public:
170 - while (State.NextToken) {
171 - bool Newline =
172 - Indenter->mustBreak(State) ||
173 -- (Indenter->canBreak(State) && State.NextToken->NewlinesBefore > 0);
174 -+ (State.NextToken->NewlinesBefore > 0 && Indenter->canBreak(State));
175 - unsigned Penalty = 0;
176 - formatChildren(State, Newline, /*DryRun=*/false, Penalty);
177 - Indenter->addTokenToState(State, Newline, /*DryRun=*/false);
178 -diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
179 -index 3cd3c8f9cdf..3aa30c7cb3f 100644
180 ---- a/lib/Format/UnwrappedLineParser.cpp
181 -+++ b/lib/Format/UnwrappedLineParser.cpp
182 -@@ -2554,6 +2554,8 @@ void UnwrappedLineParser::nextToken(int LevelDifference) {
183 - else
184 - readTokenWithJavaScriptASI();
185 - FormatTok->Previous = Previous;
186 -+ if (FormatTok->NewlinesBefore && Style.KeepLineBreaksForNonEmptyLines)
187 -+ FormatTok->MustBreakBefore = true;
188 - }
189 -
190 - void UnwrappedLineParser::distributeComments(
191 -diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
192 -index c05fceb4766..38906d9ee31 100644
193 ---- a/unittests/Format/FormatTest.cpp
194 -+++ b/unittests/Format/FormatTest.cpp
195 -@@ -385,6 +385,22 @@ TEST_F(FormatTest, RemovesEmptyLines) {
196 - " void funk() {}\n"
197 - "};",
198 - Style));
199 -+
200 -+ Style.KeepLineBreaksForNonEmptyLines = true;
201 -+ Style.ColumnLimit = 0;
202 -+ EXPECT_EQ("int foo(int a,\n"
203 -+ " int b)\n"
204 -+ "{\n"
205 -+ "}",
206 -+ format("int foo(int a,\n"
207 -+ "int b) {}",
208 -+ Style));
209 -+
210 -+ EXPECT_EQ("[]() {\n"
211 -+ " foo(); }",
212 -+ format("[]() {\n"
213 -+ "foo(); }",
214 -+ Style));
215 - }
216 -
217 - TEST_F(FormatTest, RecognizesBinaryOperatorKeywords) {
218 ---
219 -2.26.2
220 -
221
222 diff --git a/dev-libs/libclangformat-ide/libclangformat-ide-10.0.0.ebuild b/dev-libs/libclangformat-ide/libclangformat-ide-10.0.0.ebuild
223 deleted file mode 100644
224 index 768bfe1f0f4..00000000000
225 --- a/dev-libs/libclangformat-ide/libclangformat-ide-10.0.0.ebuild
226 +++ /dev/null
227 @@ -1,72 +0,0 @@
228 -# Copyright 1999-2020 Gentoo Authors
229 -# Distributed under the terms of the GNU General Public License v2
230 -
231 -EAPI=7
232 -
233 -inherit cmake llvm llvm.org toolchain-funcs
234 -
235 -DESCRIPTION="A static clangformat library patched for IDE use"
236 -HOMEPAGE="https://www.qt.io/blog/2019/04/17/clangformat-plugin-qt-creator-4-9"
237 -LLVM_COMPONENTS=( clang )
238 -
239 -llvm.org_set_globals
240 -
241 -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
242 -SLOT="$(ver_cut 1)"
243 -KEYWORDS="~amd64 ~arm ~x86"
244 -IUSE="debug"
245 -
246 -DEPEND="~sys-devel/llvm-${PV}:${SLOT}=[debug=]"
247 -
248 -# least intrusive of all
249 -CMAKE_BUILD_TYPE=RelWithDebInfo
250 -
251 -PATCHES=( "${FILESDIR}/clang-qtcreator-compat.patch" )
252 -
253 -pkg_setup() {
254 - LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
255 -}
256 -
257 -src_unpack() {
258 - llvm.org_src_unpack
259 -}
260 -
261 -src_configure() {
262 - local mycmakeargs=(
263 - -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
264 - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
265 - -DBUILD_SHARED_LIBS=OFF
266 - -DLLVM_ENABLE_EH=ON
267 - -DLLVM_ENABLE_RTTI=ON
268 - )
269 -
270 - if [[ -n ${EPREFIX} ]]; then
271 - mycmakeargs+=(
272 - -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
273 - )
274 - fi
275 -
276 - if tc-is-cross-compiler; then
277 - [[ -x "/usr/bin/clang-tblgen" ]] \
278 - || die "/usr/bin/clang-tblgen not found or usable"
279 - mycmakeargs+=(
280 - -DCMAKE_CROSSCOMPILING=ON
281 - -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
282 - )
283 - fi
284 -
285 - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
286 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
287 - cmake_src_configure
288 -}
289 -
290 -src_compile() {
291 - cmake_src_compile libclangFormat.a
292 -}
293 -
294 -src_install() {
295 - into usr/lib/llvm/${SLOT}
296 - newlib.a "${BUILD_DIR}/$(get_libdir)/libclangFormat.a" libclangFormatIDE.a
297 - insinto usr/lib/llvm/${SLOT}/include/clang/Format
298 - newins "${S}/include/clang/Format/Format.h" FormatIDE.h
299 -}
300
301 diff --git a/dev-libs/libclangformat-ide/libclangformat-ide-9.0.1.ebuild b/dev-libs/libclangformat-ide/libclangformat-ide-9.0.1.ebuild
302 deleted file mode 100644
303 index 5c04b67cf27..00000000000
304 --- a/dev-libs/libclangformat-ide/libclangformat-ide-9.0.1.ebuild
305 +++ /dev/null
306 @@ -1,72 +0,0 @@
307 -# Copyright 1999-2020 Gentoo Authors
308 -# Distributed under the terms of the GNU General Public License v2
309 -
310 -EAPI=7
311 -
312 -inherit cmake llvm llvm.org toolchain-funcs
313 -
314 -DESCRIPTION="A static clangformat library patched for IDE use"
315 -HOMEPAGE="https://www.qt.io/blog/2019/04/17/clangformat-plugin-qt-creator-4-9"
316 -LLVM_COMPONENTS=( clang )
317 -
318 -llvm.org_set_globals
319 -
320 -LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
321 -SLOT="$(ver_cut 1)"
322 -KEYWORDS="~amd64 ~x86"
323 -IUSE="debug"
324 -
325 -DEPEND="~sys-devel/llvm-${PV}:${SLOT}=[debug=]"
326 -
327 -# least intrusive of all
328 -CMAKE_BUILD_TYPE=RelWithDebInfo
329 -
330 -PATCHES=( "${FILESDIR}/clang-qtcreator-compat.patch" )
331 -
332 -pkg_setup() {
333 - LLVM_MAX_SLOT=${SLOT} llvm_pkg_setup
334 -}
335 -
336 -src_unpack() {
337 - llvm.org_src_unpack
338 -}
339 -
340 -src_configure() {
341 - local mycmakeargs=(
342 - -DLLVM_CMAKE_PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)/cmake/llvm"
343 - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
344 - -DBUILD_SHARED_LIBS=OFF
345 - -DLLVM_ENABLE_EH=ON
346 - -DLLVM_ENABLE_RTTI=ON
347 - )
348 -
349 - if [[ -n ${EPREFIX} ]]; then
350 - mycmakeargs+=(
351 - -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
352 - )
353 - fi
354 -
355 - if tc-is-cross-compiler; then
356 - [[ -x "/usr/bin/clang-tblgen" ]] \
357 - || die "/usr/bin/clang-tblgen not found or usable"
358 - mycmakeargs+=(
359 - -DCMAKE_CROSSCOMPILING=ON
360 - -DCLANG_TABLEGEN=/usr/bin/clang-tblgen
361 - )
362 - fi
363 -
364 - # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
365 - use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
366 - cmake_src_configure
367 -}
368 -
369 -src_compile() {
370 - cmake_src_compile libclangFormat.a
371 -}
372 -
373 -src_install() {
374 - into usr/lib/llvm/${SLOT}
375 - newlib.a "${BUILD_DIR}/$(get_libdir)/libclangFormat.a" libclangFormatIDE.a
376 - insinto usr/lib/llvm/${SLOT}/include/clang/Format
377 - newins "${S}/include/clang/Format/Format.h" FormatIDE.h
378 -}
379
380 diff --git a/dev-libs/libclangformat-ide/metadata.xml b/dev-libs/libclangformat-ide/metadata.xml
381 deleted file mode 100644
382 index 915f0022706..00000000000
383 --- a/dev-libs/libclangformat-ide/metadata.xml
384 +++ /dev/null
385 @@ -1,8 +0,0 @@
386 -<?xml version="1.0" encoding="UTF-8"?>
387 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
388 -<pkgmetadata>
389 - <maintainer type="person">
390 - <email>zx2c4@g.o</email>
391 - <name>Jason A. Donenfeld</name>
392 - </maintainer>
393 -</pkgmetadata>
394
395 diff --git a/profiles/package.mask b/profiles/package.mask
396 index f1bf529c7a0..a408ebecc2a 100644
397 --- a/profiles/package.mask
398 +++ b/profiles/package.mask
399 @@ -258,13 +258,6 @@ app-emulation/qt-virt-manager
400 # Dead upstream. Removal in 30 days.
401 net-analyzer/dosdetector
402
403 -# Michał Górny <mgorny@g.o> (2020-11-29)
404 -# An awful hack-package that was dumped on others, and not touched
405 -# by the person adding it since. Depends on obsolete LLVM versions
406 -# and needs a version bump.
407 -# Removal in 30 days. Bug #734732.
408 -dev-libs/libclangformat-ide
409 -
410 # Thomas Deutschmann <whissi@g.o> (2020-11-24)
411 # Serious data corruption bug when using XFS, see https://www.spinics.net/lists/linux-xfs/msg47004.html
412 # Feel free to manually unmask when not using XFS.