From 51af5f0eb4cddbe6aa7953717873691d77aae9ff Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 10 Jul 2019 23:40:16 +0100 Subject: gentoo resync : 11.07.2019 --- dev-util/cppcheck/Manifest | 4 + dev-util/cppcheck/cppcheck-1.88.ebuild | 113 +++++++++++++++++++++ .../cppcheck/files/cppcheck-1.88-ldflags.patch | 17 ++++ .../cppcheck/files/cppcheck-1.88-tinyxml2.patch | 101 ++++++++++++++++++ 4 files changed, 235 insertions(+) create mode 100644 dev-util/cppcheck/cppcheck-1.88.ebuild create mode 100644 dev-util/cppcheck/files/cppcheck-1.88-ldflags.patch create mode 100644 dev-util/cppcheck/files/cppcheck-1.88-tinyxml2.patch (limited to 'dev-util/cppcheck') diff --git a/dev-util/cppcheck/Manifest b/dev-util/cppcheck/Manifest index 8760ce3325b1..c0e810fc7ad8 100644 --- a/dev-util/cppcheck/Manifest +++ b/dev-util/cppcheck/Manifest @@ -1,9 +1,13 @@ AUX cppcheck-1.75-tinyxml2.patch 2232 BLAKE2B 389e8678fca9eee616640fc535b0c71d0476f6a2a3eb8700238d85bbc32823c92fe9b72e1a4a3b01143e23df60996a21a669625b418e579441d85ef460fd38b5 SHA512 575dfe090885cbd8157b089def7a47750519b8ea459404d3755ce23ea98e0fde2da5f0c7551a69ac195c2e3c5d03ce5a71c3d66b3fb119609eba6aaa31c39899 AUX cppcheck-1.85-ldflags.patch 1503 BLAKE2B 0458ff66d61b9cd759839d31bc0fbe611e7d23e8d720a4b0a861d53b3fc54b30d67c481c22dfbb5254a6160eac04505f00dee01c4283214e15e21b26e0b7a76c SHA512 7cad7d456c8d3bfa5efab1c67bcd0f7e509e10e539ee9941055caad41ff3b4737d3ff82cfa172ad867651817bdd4a518a98d22732ce0df5227c149dd2122e9f7 +AUX cppcheck-1.88-ldflags.patch 967 BLAKE2B c88cf4c199e686b6befe353c25d1507969c3c48d9f30e6a0e6bf18389f28acf4c6b62a0f6a6521da453090140ed77dd86102811b296918dde238e928ff0c8cac SHA512 62f8bd8ed415bafd57cd204d51d29de73832e2510f329e57e51d19605d4df1681cbf2c1813b88681cb3b203d093ef0ec0edf44c45b7bbdb610bde7406e400035 +AUX cppcheck-1.88-tinyxml2.patch 4689 BLAKE2B a4ad83cfa7e9edf7c52493ae78c72f730dea604be12ef8ae885c82b65fcbd5dc1a3b36c154da0c2c691a0f445b44a256f48de74f00daba7d544fd14d8237ee77 SHA512 2d8a90d2698607abfedcbeda806ad6e0589fd637c2b5b755cab2f6ba99f144ff11dce05162fa6a2b4b753f7814a3fc1cc83510bbbd5ed8811b6353ed30c27d5f AUX cppcheck-9999-tinyxml2.patch 2491 BLAKE2B df8130302d06dde1c7f21cb4aa49daf0b1cb7e39593a6e8a08716feb44e8c34cf453c4ff4eb68a8e5cdf088ee8556d54cf1d351f4732ebdc0799579e80579986 SHA512 a8ff7854bffbb7e578cf6f0ccefd66ab02b7f3dd707540d2de140054440efd45528b5aea57e8ac7dffd7f7e44e48df04a48bd2693d5345fa39ccb23b08bc10b2 DIST cppcheck-1.86.tar.gz 2184186 BLAKE2B 8b488ec72d0998d6b037de2b1204373c8b3de475ad165bf108bb331399356cb0d1e20a7bc6f368f1a038ec886ad7a84ad694172d0a96a203a6877f3838c21001 SHA512 59cec55b8408e8f2e2e7172bce69350c248bc3185a0938b523c44a58f98b344e11aef957ec1b7a7b2bc7a876660b2683e51f54b76f0b550f9549497c29453655 DIST cppcheck-1.87.tar.gz 2243258 BLAKE2B ffe42bfb2e896163678c5bb24e46ae2391ba8254cbe7c1c19c3c1b16cd38adf9c773de6aaefe70af08b9c1dca8b0b0b5e9939323368a2f81491fd6981ff18139 SHA512 b0149002b40260c1488904929296403722a66b84263b41d0097c3caed28265332766c114f0d1f378ea6c7e73ab973ea71ab89c6744f6cc818f22de08933e6766 +DIST cppcheck-1.88.tar.gz 2364053 BLAKE2B b688974ff83019422cc5b2ec575d9838bdff4ada17d71fb3d436f07eea50429490c222659163b845667d98c0ec186b3288464827894e379fd017dd0c3fea645f SHA512 fa4ede0665546341af0ba3dae09a00b6efae09ec7838c616c580be01ff6902594d61168a059539779be0c78e1708d2bd9c8e7987dd0bb67dc8fa332a10d1de6a EBUILD cppcheck-1.86.ebuild 2314 BLAKE2B de0698614f2f1790971fe198662fd235e5456a1f9a046f10d628889517bc5809fac6c76222ca7a5b0d7909c7842d77244c81c9606812450118e61c476492f08b SHA512 8d8502abb416704964aacb1267c2814e5cf50fe02c4a245bbb217a4cadbffa6efc1f288a94143b36f739d6f89e5f75133b1aa691565c76ac92a49cb0984d0c1e EBUILD cppcheck-1.87.ebuild 2328 BLAKE2B 0472eb40d75e394e37b3ce4d5089978619164875bd5fb722c0d622f2a0891520de4102b2a5f8c020f8b3dd8b3f571b4b1c5ea088cfffef6bf96d1a8d260fc329 SHA512 7f0672ae4560ae3bc9abaa575dbfa0e0835f3e2081ba4b3f80f9e8b0e8faf59a97ded20c68e68def32e9807d0eeb805945260e3a5d7120fe31857b4f5eb877bd +EBUILD cppcheck-1.88.ebuild 2328 BLAKE2B 59e8ad03e399ef45c478ab60332f4191871d4f8114e904d438b8b87b6fe414c566bd2c893b6d36836c22f5f86de91b3ded3d1084b5003b4b47b8b1c6c87b8c61 SHA512 d385be61ae7c1e37dbe739818f900deb6222791f49431c3afe15ed11b4824359e644d4a44e39ea4cc08c0d632961eecd419ebfd28577b279af43e412fa4145f6 EBUILD cppcheck-9999.ebuild 2222 BLAKE2B abd4fb4a91ac18e5e3c7280e1d180039f2a251bcf63d3e436fea917e79343cb84034eae35e42ec101f5fca91dd8a1334141991afd4d0c0a1ad66da30b6511d77 SHA512 fc2c2565d1979f5cd43222a22fd1df2c8d9eebfe8906acb0092d3ee6ddbc54d221651e156c35fa791a0cab8146e84cbfc6daa8d51df384f6a59c647244c15490 MISC metadata.xml 401 BLAKE2B b48cd9d365773e4c050d1ce2f58a108fa33bf28fb669a8fbe99a9b15d33cf203fa4a94d3411674892efb4cb5e5bd1cb5a08d97a3054b7fbdacc462695f0d1874 SHA512 08b51c30fcc21277bf320c1c9f36cd9efc7c39261b52f70f686953731c2d075482fc1959457dbe276877d508510b32a23d8f7def4ca52044fabc44a23c56a8f4 diff --git a/dev-util/cppcheck/cppcheck-1.88.ebuild b/dev-util/cppcheck/cppcheck-1.88.ebuild new file mode 100644 index 000000000000..69aa5c7a1adf --- /dev/null +++ b/dev-util/cppcheck/cppcheck-1.88.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} ) +inherit distutils-r1 qmake-utils toolchain-funcs + +DESCRIPTION="Static analyzer of C/C++ code" +HOMEPAGE="https://github.com/danmar/cppcheck" +SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~sparc ~x86" +IUSE="htmlreport pcre qt5" + +RDEPEND=" + dev-libs/tinyxml2:= + htmlreport? ( dev-python/pygments[${PYTHON_USEDEP}] ) + pcre? ( dev-libs/libpcre ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtprintsupport:5 + ) +" +DEPEND="${RDEPEND} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + virtual/pkgconfig +" +PATCHES=( + "${FILESDIR}"/${PN}-1.88-tinyxml2.patch + "${FILESDIR}"/${PN}-1.88-ldflags.patch +) + +src_prepare() { + default + + rm -r externals/tinyxml || die +} + +src_configure() { + tc-export CXX PKG_CONFIG + export LIBS="$(${PKG_CONFIG} --libs tinyxml2)" + + emake dmake + ./dmake || die + + if use pcre ; then + sed -e '/HAVE_RULES=/s:=no:=yes:' \ + -i Makefile || die + fi + + if use qt5 ; then + pushd gui || die + eqmake5 + popd || die + fi +} + +src_compile() { + emake ${PN} man \ + CFGDIR="${EROOT}/usr/share/${PN}/cfg" \ + DB2MAN="${EROOT}/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl" + + if use qt5 ; then + pushd gui || die + emake + popd || die + fi + + if use htmlreport ; then + pushd htmlreport || die + distutils-r1_src_compile + popd || die + fi +} + +src_test() { + # safe final version + mv -v ${PN}{,.final} || die + mv -v lib/library.o{,.final} || die + mv -v cli/cppcheckexecutor.o{,.final} || die + #trigger recompile with CFGDIR inside ${S} + emake check CFGDIR="${S}/cfg" + # restore + mv -v ${PN}{.final,} || die + mv -v lib/library.o{.final,} || die + mv -v cli/cppcheckexecutor.o{.final,} || die +} + +src_install() { + # it's not autotools-based, so "${ED}" here, not "${D}", bug 531760 + emake install DESTDIR="${ED}" + + insinto "/usr/share/${PN}/cfg" + doins cfg/*.cfg + if use qt5 ; then + dobin gui/${PN}-gui + dodoc gui/{projectfile.txt,gui.${PN}} + fi + if use htmlreport ; then + pushd htmlreport || die + distutils-r1_src_install + popd || die + find "${D}" -name "*.egg-info" -delete + else + rm "${ED}/usr/bin/cppcheck-htmlreport" || die + fi + doman ${PN}.1 + dodoc -r tools/triage +} diff --git a/dev-util/cppcheck/files/cppcheck-1.88-ldflags.patch b/dev-util/cppcheck/files/cppcheck-1.88-ldflags.patch new file mode 100644 index 000000000000..ef7e01212a3f --- /dev/null +++ b/dev-util/cppcheck/files/cppcheck-1.88-ldflags.patch @@ -0,0 +1,17 @@ +diff --git a/tools/dmake.cpp b/tools/dmake.cpp +index c3afd26..5c3a0a6 100644 +--- a/tools/dmake.cpp ++++ b/tools/dmake.cpp +@@ -370,10 +370,10 @@ int main(int argc, char **argv) + fout << ".PHONY: run-dmake tags\n\n"; + fout << "\n###### Targets\n\n"; + fout << "cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)\n"; +- fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS) $(RDYNAMIC)\n\n"; ++ fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(RDYNAMIC) $(LIBS)\n\n"; + fout << "all:\tcppcheck testrunner\n\n"; + fout << "testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o\n"; +- fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS) $(RDYNAMIC)\n\n"; ++ fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(RDYNAMIC) $(LIBS)\n\n"; + fout << "test:\tall\n"; + fout << "\t./testrunner\n\n"; + fout << "check:\tall\n"; diff --git a/dev-util/cppcheck/files/cppcheck-1.88-tinyxml2.patch b/dev-util/cppcheck/files/cppcheck-1.88-tinyxml2.patch new file mode 100644 index 000000000000..0ad79ebf4d0d --- /dev/null +++ b/dev-util/cppcheck/files/cppcheck-1.88-tinyxml2.patch @@ -0,0 +1,101 @@ +diff --git a/gui/gui.pro b/gui/gui.pro +index 0cbaebf..cb381dd 100644 +--- a/gui/gui.pro ++++ b/gui/gui.pro +@@ -15,6 +15,7 @@ contains(LINKCORE, [yY][eE][sS]) { + DEFINES += CPPCHECKLIB_IMPORT + } + LIBS += -L$$PWD/../externals ++LIBS += $(shell $(PKG_CONFIG) --libs tinyxml2) + + DESTDIR = . + RCC_DIR = temp +diff --git a/tools/dmake.cpp b/tools/dmake.cpp +index 298cb98..c3afd26 100644 +--- a/tools/dmake.cpp ++++ b/tools/dmake.cpp +@@ -122,7 +122,6 @@ int main(int argc, char **argv) + + std::vector extfiles; + extfiles.push_back("externals/simplecpp/simplecpp.cpp"); +- extfiles.push_back("externals/tinyxml/tinyxml2.cpp"); + + std::vector clifiles; + getCppFiles(clifiles, "cli/", false); +@@ -171,7 +170,6 @@ int main(int argc, char **argv) + std::ofstream fout1("test/testfiles.pri"); + if (fout1.is_open()) { + fout1 << "# no manual edits - this file is autogenerated by dmake\n\n"; +- fout1 << "INCLUDEPATH += ../externals/tinyxml\n"; + fout1 << "\n\nSOURCES += "; + for (unsigned int i = 0; i < testfiles.size(); ++i) { + const std::string filename(testfiles[i].substr(5)); +@@ -341,9 +339,9 @@ int main(int argc, char **argv) + << "endif\n\n"; + + makeConditionalVariable(fout, "PREFIX", "/usr"); +- makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib -isystem externals -isystem externals/simplecpp -isystem externals/tinyxml"); +- makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib -isystem externals/simplecpp -isystem externals/tinyxml"); +- makeConditionalVariable(fout, "INCLUDE_FOR_TEST", "-Ilib -Icli -isystem externals/simplecpp -isystem externals/tinyxml"); ++ makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib -isystem externals -isystem externals/simplecpp"); ++ makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib -isystem externals/simplecpp"); ++ makeConditionalVariable(fout, "INCLUDE_FOR_TEST", "-Ilib -Icli -isystem externals/simplecpp"); + + fout << "BIN=$(DESTDIR)$(PREFIX)/bin\n\n"; + fout << "# For 'make man': sudo apt-get install xsltproc docbook-xsl docbook-xml on Linux\n"; +diff --git a/oss-fuzz/Makefile b/oss-fuzz/Makefile +index 81cf654..26f9da9 100644 +--- a/oss-fuzz/Makefile ++++ b/oss-fuzz/Makefile +@@ -6,8 +6,8 @@ + # make CXX=clang++-6.0 CXXFLAGS="-fsanitize=address" fuzz-client + + CPPCHECK_DIR=.. +-INCLUDE_DIR=-I ${CPPCHECK_DIR}/lib -I ${CPPCHECK_DIR}/externals/simplecpp -I ${CPPCHECK_DIR}/externals/tinyxml -I ${CPPCHECK_DIR}/externals +-SRC_FILES=main.cpp type2.cpp ${CPPCHECK_DIR}/externals/simplecpp/simplecpp.cpp ${CPPCHECK_DIR}/externals/tinyxml/tinyxml2.cpp ${CPPCHECK_DIR}/lib/*.cpp ++INCLUDE_DIR=-I ${CPPCHECK_DIR}/lib -I ${CPPCHECK_DIR}/externals/simplecpp -I ${CPPCHECK_DIR}/externals ++SRC_FILES=main.cpp type2.cpp ${CPPCHECK_DIR}/externals/simplecpp/simplecpp.cpp ${CPPCHECK_DIR}/lib/*.cpp + + all: oss-fuzz-client translate + +diff --git a/Makefile b/Makefile +index 372647e..9d65717 100644 +--- a/Makefile ++++ b/Makefile +@@ -179,8 +179,7 @@ LIBOBJ = $(libcppdir)/analyzerinfo.o \ + $(libcppdir)/tokenlist.o \ + $(libcppdir)/valueflow.o + +-EXTOBJ = externals/simplecpp/simplecpp.o \ +- externals/tinyxml/tinyxml2.o ++EXTOBJ = externals/simplecpp/simplecpp.o + + CLIOBJ = cli/cmdlineparser.o \ + cli/cppcheckexecutor.o \ +@@ -689,9 +688,6 @@ test/testvarid.o: test/testvarid.cpp lib/platform.h lib/config.h lib/settings.h + externals/simplecpp/simplecpp.o: externals/simplecpp/simplecpp.cpp externals/simplecpp/simplecpp.h + $(CXX) $(CPPFLAGS) $(CFG) $(CXXFLAGS) -w $(UNDEF_STRICT_ANSI) -c -o externals/simplecpp/simplecpp.o externals/simplecpp/simplecpp.cpp + +-externals/tinyxml/tinyxml2.o: externals/tinyxml/tinyxml2.cpp externals/tinyxml/tinyxml2.h +- $(CXX) $(CPPFLAGS) $(CFG) $(CXXFLAGS) -w $(UNDEF_STRICT_ANSI) -c -o externals/tinyxml/tinyxml2.o externals/tinyxml/tinyxml2.cpp +- + tools/clang-ast.o: tools/clang-ast.cpp + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CFG) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o tools/clang-ast.o tools/clang-ast.cpp + +diff --git a/externals/externals.pri b/externals/externals.pri +index 7f0be8d..b1e94e0 100644 +--- a/externals/externals.pri ++++ b/externals/externals.pri +@@ -1,9 +1,6 @@ + INCLUDEPATH += $${PWD} \ +- $${PWD}/simplecpp \ +- $${PWD}/tinyxml ++ $${PWD}/simplecpp + +-HEADERS += $${PWD}/simplecpp/simplecpp.h \ +- $${PWD}/tinyxml/tinyxml2.h ++HEADERS += $${PWD}/simplecpp/simplecpp.h + +-SOURCES += $${PWD}/simplecpp/simplecpp.cpp \ +- $${PWD}/tinyxml/tinyxml2.cpp ++SOURCES += $${PWD}/simplecpp/simplecpp.cpp -- cgit v1.2.3