1 |
commit: 1e2ade0e9fecfd14846864cf21067d9e03375cf2 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 30 16:25:33 2019 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 30 18:19:23 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e2ade0e |
7 |
|
8 |
dev-util/cppcheck: version bump to 1.88 |
9 |
|
10 |
- Cannot reproduce test failure with new version |
11 |
|
12 |
Closes: https://bugs.gentoo.org/688764 |
13 |
Package-Manager: Portage-2.3.67, Repoman-2.3.16 |
14 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
15 |
|
16 |
dev-util/cppcheck/Manifest | 1 + |
17 |
dev-util/cppcheck/cppcheck-1.88.ebuild | 113 +++++++++++++++++++++ |
18 |
.../cppcheck/files/cppcheck-1.88-ldflags.patch | 17 ++++ |
19 |
.../cppcheck/files/cppcheck-1.88-tinyxml2.patch | 101 ++++++++++++++++++ |
20 |
4 files changed, 232 insertions(+) |
21 |
|
22 |
diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest |
23 |
index 3c9ce707e0c..2d4d3044aea 100644 |
24 |
--- a/dev-util/cppcheck/Manifest |
25 |
+++ b/dev-util/cppcheck/Manifest |
26 |
@@ -1,2 +1,3 @@ |
27 |
DIST cppcheck-1.86.tar.gz 2184186 BLAKE2B 8b488ec72d0998d6b037de2b1204373c8b3de475ad165bf108bb331399356cb0d1e20a7bc6f368f1a038ec886ad7a84ad694172d0a96a203a6877f3838c21001 SHA512 59cec55b8408e8f2e2e7172bce69350c248bc3185a0938b523c44a58f98b344e11aef957ec1b7a7b2bc7a876660b2683e51f54b76f0b550f9549497c29453655 |
28 |
DIST cppcheck-1.87.tar.gz 2243258 BLAKE2B ffe42bfb2e896163678c5bb24e46ae2391ba8254cbe7c1c19c3c1b16cd38adf9c773de6aaefe70af08b9c1dca8b0b0b5e9939323368a2f81491fd6981ff18139 SHA512 b0149002b40260c1488904929296403722a66b84263b41d0097c3caed28265332766c114f0d1f378ea6c7e73ab973ea71ab89c6744f6cc818f22de08933e6766 |
29 |
+DIST cppcheck-1.88.tar.gz 2364053 BLAKE2B b688974ff83019422cc5b2ec575d9838bdff4ada17d71fb3d436f07eea50429490c222659163b845667d98c0ec186b3288464827894e379fd017dd0c3fea645f SHA512 fa4ede0665546341af0ba3dae09a00b6efae09ec7838c616c580be01ff6902594d61168a059539779be0c78e1708d2bd9c8e7987dd0bb67dc8fa332a10d1de6a |
30 |
|
31 |
diff --git a/dev-util/cppcheck/cppcheck-1.88.ebuild b/dev-util/cppcheck/cppcheck-1.88.ebuild |
32 |
new file mode 100644 |
33 |
index 00000000000..69aa5c7a1ad |
34 |
--- /dev/null |
35 |
+++ b/dev-util/cppcheck/cppcheck-1.88.ebuild |
36 |
@@ -0,0 +1,113 @@ |
37 |
+# Copyright 1999-2019 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=7 |
41 |
+PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} ) |
42 |
+inherit distutils-r1 qmake-utils toolchain-funcs |
43 |
+ |
44 |
+DESCRIPTION="Static analyzer of C/C++ code" |
45 |
+HOMEPAGE="https://github.com/danmar/cppcheck" |
46 |
+SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
47 |
+ |
48 |
+LICENSE="GPL-3+" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~sparc ~x86" |
51 |
+IUSE="htmlreport pcre qt5" |
52 |
+ |
53 |
+RDEPEND=" |
54 |
+ dev-libs/tinyxml2:= |
55 |
+ htmlreport? ( dev-python/pygments[${PYTHON_USEDEP}] ) |
56 |
+ pcre? ( dev-libs/libpcre ) |
57 |
+ qt5? ( |
58 |
+ dev-qt/qtcore:5 |
59 |
+ dev-qt/qtgui:5 |
60 |
+ dev-qt/qtprintsupport:5 |
61 |
+ ) |
62 |
+" |
63 |
+DEPEND="${RDEPEND} |
64 |
+ app-text/docbook-xsl-stylesheets |
65 |
+ dev-libs/libxslt |
66 |
+ virtual/pkgconfig |
67 |
+" |
68 |
+PATCHES=( |
69 |
+ "${FILESDIR}"/${PN}-1.88-tinyxml2.patch |
70 |
+ "${FILESDIR}"/${PN}-1.88-ldflags.patch |
71 |
+) |
72 |
+ |
73 |
+src_prepare() { |
74 |
+ default |
75 |
+ |
76 |
+ rm -r externals/tinyxml || die |
77 |
+} |
78 |
+ |
79 |
+src_configure() { |
80 |
+ tc-export CXX PKG_CONFIG |
81 |
+ export LIBS="$(${PKG_CONFIG} --libs tinyxml2)" |
82 |
+ |
83 |
+ emake dmake |
84 |
+ ./dmake || die |
85 |
+ |
86 |
+ if use pcre ; then |
87 |
+ sed -e '/HAVE_RULES=/s:=no:=yes:' \ |
88 |
+ -i Makefile || die |
89 |
+ fi |
90 |
+ |
91 |
+ if use qt5 ; then |
92 |
+ pushd gui || die |
93 |
+ eqmake5 |
94 |
+ popd || die |
95 |
+ fi |
96 |
+} |
97 |
+ |
98 |
+src_compile() { |
99 |
+ emake ${PN} man \ |
100 |
+ CFGDIR="${EROOT}/usr/share/${PN}/cfg" \ |
101 |
+ DB2MAN="${EROOT}/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl" |
102 |
+ |
103 |
+ if use qt5 ; then |
104 |
+ pushd gui || die |
105 |
+ emake |
106 |
+ popd || die |
107 |
+ fi |
108 |
+ |
109 |
+ if use htmlreport ; then |
110 |
+ pushd htmlreport || die |
111 |
+ distutils-r1_src_compile |
112 |
+ popd || die |
113 |
+ fi |
114 |
+} |
115 |
+ |
116 |
+src_test() { |
117 |
+ # safe final version |
118 |
+ mv -v ${PN}{,.final} || die |
119 |
+ mv -v lib/library.o{,.final} || die |
120 |
+ mv -v cli/cppcheckexecutor.o{,.final} || die |
121 |
+ #trigger recompile with CFGDIR inside ${S} |
122 |
+ emake check CFGDIR="${S}/cfg" |
123 |
+ # restore |
124 |
+ mv -v ${PN}{.final,} || die |
125 |
+ mv -v lib/library.o{.final,} || die |
126 |
+ mv -v cli/cppcheckexecutor.o{.final,} || die |
127 |
+} |
128 |
+ |
129 |
+src_install() { |
130 |
+ # it's not autotools-based, so "${ED}" here, not "${D}", bug 531760 |
131 |
+ emake install DESTDIR="${ED}" |
132 |
+ |
133 |
+ insinto "/usr/share/${PN}/cfg" |
134 |
+ doins cfg/*.cfg |
135 |
+ if use qt5 ; then |
136 |
+ dobin gui/${PN}-gui |
137 |
+ dodoc gui/{projectfile.txt,gui.${PN}} |
138 |
+ fi |
139 |
+ if use htmlreport ; then |
140 |
+ pushd htmlreport || die |
141 |
+ distutils-r1_src_install |
142 |
+ popd || die |
143 |
+ find "${D}" -name "*.egg-info" -delete |
144 |
+ else |
145 |
+ rm "${ED}/usr/bin/cppcheck-htmlreport" || die |
146 |
+ fi |
147 |
+ doman ${PN}.1 |
148 |
+ dodoc -r tools/triage |
149 |
+} |
150 |
|
151 |
diff --git a/dev-util/cppcheck/files/cppcheck-1.88-ldflags.patch b/dev-util/cppcheck/files/cppcheck-1.88-ldflags.patch |
152 |
new file mode 100644 |
153 |
index 00000000000..ef7e01212a3 |
154 |
--- /dev/null |
155 |
+++ b/dev-util/cppcheck/files/cppcheck-1.88-ldflags.patch |
156 |
@@ -0,0 +1,17 @@ |
157 |
+diff --git a/tools/dmake.cpp b/tools/dmake.cpp |
158 |
+index c3afd26..5c3a0a6 100644 |
159 |
+--- a/tools/dmake.cpp |
160 |
++++ b/tools/dmake.cpp |
161 |
+@@ -370,10 +370,10 @@ int main(int argc, char **argv) |
162 |
+ fout << ".PHONY: run-dmake tags\n\n"; |
163 |
+ fout << "\n###### Targets\n\n"; |
164 |
+ fout << "cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)\n"; |
165 |
+- fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS) $(RDYNAMIC)\n\n"; |
166 |
++ fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(RDYNAMIC) $(LIBS)\n\n"; |
167 |
+ fout << "all:\tcppcheck testrunner\n\n"; |
168 |
+ fout << "testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o\n"; |
169 |
+- fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS) $(RDYNAMIC)\n\n"; |
170 |
++ fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(RDYNAMIC) $(LIBS)\n\n"; |
171 |
+ fout << "test:\tall\n"; |
172 |
+ fout << "\t./testrunner\n\n"; |
173 |
+ fout << "check:\tall\n"; |
174 |
|
175 |
diff --git a/dev-util/cppcheck/files/cppcheck-1.88-tinyxml2.patch b/dev-util/cppcheck/files/cppcheck-1.88-tinyxml2.patch |
176 |
new file mode 100644 |
177 |
index 00000000000..0ad79ebf4d0 |
178 |
--- /dev/null |
179 |
+++ b/dev-util/cppcheck/files/cppcheck-1.88-tinyxml2.patch |
180 |
@@ -0,0 +1,101 @@ |
181 |
+diff --git a/gui/gui.pro b/gui/gui.pro |
182 |
+index 0cbaebf..cb381dd 100644 |
183 |
+--- a/gui/gui.pro |
184 |
++++ b/gui/gui.pro |
185 |
+@@ -15,6 +15,7 @@ contains(LINKCORE, [yY][eE][sS]) { |
186 |
+ DEFINES += CPPCHECKLIB_IMPORT |
187 |
+ } |
188 |
+ LIBS += -L$$PWD/../externals |
189 |
++LIBS += $(shell $(PKG_CONFIG) --libs tinyxml2) |
190 |
+ |
191 |
+ DESTDIR = . |
192 |
+ RCC_DIR = temp |
193 |
+diff --git a/tools/dmake.cpp b/tools/dmake.cpp |
194 |
+index 298cb98..c3afd26 100644 |
195 |
+--- a/tools/dmake.cpp |
196 |
++++ b/tools/dmake.cpp |
197 |
+@@ -122,7 +122,6 @@ int main(int argc, char **argv) |
198 |
+ |
199 |
+ std::vector<std::string> extfiles; |
200 |
+ extfiles.push_back("externals/simplecpp/simplecpp.cpp"); |
201 |
+- extfiles.push_back("externals/tinyxml/tinyxml2.cpp"); |
202 |
+ |
203 |
+ std::vector<std::string> clifiles; |
204 |
+ getCppFiles(clifiles, "cli/", false); |
205 |
+@@ -171,7 +170,6 @@ int main(int argc, char **argv) |
206 |
+ std::ofstream fout1("test/testfiles.pri"); |
207 |
+ if (fout1.is_open()) { |
208 |
+ fout1 << "# no manual edits - this file is autogenerated by dmake\n\n"; |
209 |
+- fout1 << "INCLUDEPATH += ../externals/tinyxml\n"; |
210 |
+ fout1 << "\n\nSOURCES += "; |
211 |
+ for (unsigned int i = 0; i < testfiles.size(); ++i) { |
212 |
+ const std::string filename(testfiles[i].substr(5)); |
213 |
+@@ -341,9 +339,9 @@ int main(int argc, char **argv) |
214 |
+ << "endif\n\n"; |
215 |
+ |
216 |
+ makeConditionalVariable(fout, "PREFIX", "/usr"); |
217 |
+- makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib -isystem externals -isystem externals/simplecpp -isystem externals/tinyxml"); |
218 |
+- makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib -isystem externals/simplecpp -isystem externals/tinyxml"); |
219 |
+- makeConditionalVariable(fout, "INCLUDE_FOR_TEST", "-Ilib -Icli -isystem externals/simplecpp -isystem externals/tinyxml"); |
220 |
++ makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib -isystem externals -isystem externals/simplecpp"); |
221 |
++ makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib -isystem externals/simplecpp"); |
222 |
++ makeConditionalVariable(fout, "INCLUDE_FOR_TEST", "-Ilib -Icli -isystem externals/simplecpp"); |
223 |
+ |
224 |
+ fout << "BIN=$(DESTDIR)$(PREFIX)/bin\n\n"; |
225 |
+ fout << "# For 'make man': sudo apt-get install xsltproc docbook-xsl docbook-xml on Linux\n"; |
226 |
+diff --git a/oss-fuzz/Makefile b/oss-fuzz/Makefile |
227 |
+index 81cf654..26f9da9 100644 |
228 |
+--- a/oss-fuzz/Makefile |
229 |
++++ b/oss-fuzz/Makefile |
230 |
+@@ -6,8 +6,8 @@ |
231 |
+ # make CXX=clang++-6.0 CXXFLAGS="-fsanitize=address" fuzz-client |
232 |
+ |
233 |
+ CPPCHECK_DIR=.. |
234 |
+-INCLUDE_DIR=-I ${CPPCHECK_DIR}/lib -I ${CPPCHECK_DIR}/externals/simplecpp -I ${CPPCHECK_DIR}/externals/tinyxml -I ${CPPCHECK_DIR}/externals |
235 |
+-SRC_FILES=main.cpp type2.cpp ${CPPCHECK_DIR}/externals/simplecpp/simplecpp.cpp ${CPPCHECK_DIR}/externals/tinyxml/tinyxml2.cpp ${CPPCHECK_DIR}/lib/*.cpp |
236 |
++INCLUDE_DIR=-I ${CPPCHECK_DIR}/lib -I ${CPPCHECK_DIR}/externals/simplecpp -I ${CPPCHECK_DIR}/externals |
237 |
++SRC_FILES=main.cpp type2.cpp ${CPPCHECK_DIR}/externals/simplecpp/simplecpp.cpp ${CPPCHECK_DIR}/lib/*.cpp |
238 |
+ |
239 |
+ all: oss-fuzz-client translate |
240 |
+ |
241 |
+diff --git a/Makefile b/Makefile |
242 |
+index 372647e..9d65717 100644 |
243 |
+--- a/Makefile |
244 |
++++ b/Makefile |
245 |
+@@ -179,8 +179,7 @@ LIBOBJ = $(libcppdir)/analyzerinfo.o \ |
246 |
+ $(libcppdir)/tokenlist.o \ |
247 |
+ $(libcppdir)/valueflow.o |
248 |
+ |
249 |
+-EXTOBJ = externals/simplecpp/simplecpp.o \ |
250 |
+- externals/tinyxml/tinyxml2.o |
251 |
++EXTOBJ = externals/simplecpp/simplecpp.o |
252 |
+ |
253 |
+ CLIOBJ = cli/cmdlineparser.o \ |
254 |
+ cli/cppcheckexecutor.o \ |
255 |
+@@ -689,9 +688,6 @@ test/testvarid.o: test/testvarid.cpp lib/platform.h lib/config.h lib/settings.h |
256 |
+ externals/simplecpp/simplecpp.o: externals/simplecpp/simplecpp.cpp externals/simplecpp/simplecpp.h |
257 |
+ $(CXX) $(CPPFLAGS) $(CFG) $(CXXFLAGS) -w $(UNDEF_STRICT_ANSI) -c -o externals/simplecpp/simplecpp.o externals/simplecpp/simplecpp.cpp |
258 |
+ |
259 |
+-externals/tinyxml/tinyxml2.o: externals/tinyxml/tinyxml2.cpp externals/tinyxml/tinyxml2.h |
260 |
+- $(CXX) $(CPPFLAGS) $(CFG) $(CXXFLAGS) -w $(UNDEF_STRICT_ANSI) -c -o externals/tinyxml/tinyxml2.o externals/tinyxml/tinyxml2.cpp |
261 |
+- |
262 |
+ tools/clang-ast.o: tools/clang-ast.cpp |
263 |
+ $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CFG) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o tools/clang-ast.o tools/clang-ast.cpp |
264 |
+ |
265 |
+diff --git a/externals/externals.pri b/externals/externals.pri |
266 |
+index 7f0be8d..b1e94e0 100644 |
267 |
+--- a/externals/externals.pri |
268 |
++++ b/externals/externals.pri |
269 |
+@@ -1,9 +1,6 @@ |
270 |
+ INCLUDEPATH += $${PWD} \ |
271 |
+- $${PWD}/simplecpp \ |
272 |
+- $${PWD}/tinyxml |
273 |
++ $${PWD}/simplecpp |
274 |
+ |
275 |
+-HEADERS += $${PWD}/simplecpp/simplecpp.h \ |
276 |
+- $${PWD}/tinyxml/tinyxml2.h |
277 |
++HEADERS += $${PWD}/simplecpp/simplecpp.h |
278 |
+ |
279 |
+-SOURCES += $${PWD}/simplecpp/simplecpp.cpp \ |
280 |
+- $${PWD}/tinyxml/tinyxml2.cpp |
281 |
++SOURCES += $${PWD}/simplecpp/simplecpp.cpp |