dev-util/cppcheck: refresh tinyxml2 patch for live ebuild
authorSergei Trofimovich <slyfox@gentoo.org>
Wed, 12 Jun 2019 06:44:25 +0000 (07:44 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Wed, 12 Jun 2019 06:46:32 +0000 (07:46 +0100)
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
dev-util/cppcheck/cppcheck-9999.ebuild
dev-util/cppcheck/files/cppcheck-9999-tinyxml2.patch [new file with mode: 0644]

index 4eb9053d43124ba0ee2c97eecb9780d56302b324..9ebb17a4dbd897d1d9a306489276a9995d60c847 100644 (file)
@@ -30,7 +30,7 @@ DEPEND="${RDEPEND}
        virtual/pkgconfig
 "
 PATCHES=(
-       "${FILESDIR}"/${PN}-1.75-tinyxml2.patch
+       "${FILESDIR}"/${PN}-9999-tinyxml2.patch
 )
 
 src_prepare() {
diff --git a/dev-util/cppcheck/files/cppcheck-9999-tinyxml2.patch b/dev-util/cppcheck/files/cppcheck-9999-tinyxml2.patch
new file mode 100644 (file)
index 0000000..7a2a037
--- /dev/null
@@ -0,0 +1,56 @@
+--- a/externals/externals.pri
++++ b/externals/externals.pri
+@@ -1,9 +1,6 @@
+ INCLUDEPATH += $${PWD} \\r
+-               $${PWD}/simplecpp \\r
+-               $${PWD}/tinyxml\r
++               $${PWD}/simplecpp\r
\r
+-HEADERS += $${PWD}/simplecpp/simplecpp.h \\r
+-           $${PWD}/tinyxml/tinyxml2.h\r
++HEADERS += $${PWD}/simplecpp/simplecpp.h\r
\r
+-SOURCES += $${PWD}/simplecpp/simplecpp.cpp \\r
+-           $${PWD}/tinyxml/tinyxml2.cpp\r
++SOURCES += $${PWD}/simplecpp/simplecpp.cpp\r
+--- 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
+--- a/tools/dmake.cpp
++++ b/tools/dmake.cpp
+@@ -122,7 +122,6 @@ int main(int argc, char **argv)
+     std::vector<std::string> extfiles;
+     extfiles.push_back("externals/simplecpp/simplecpp.cpp");
+-    extfiles.push_back("externals/tinyxml/tinyxml2.cpp");
+     std::vector<std::string> 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));
+@@ -335,9 +333,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";