xmw         14/10/09 23:16:33

  Added:                cppcheck-1.65-r1-tinyxml2.patch
  Log:
  Remove bundled tinyxml2 by adjusting Makefile generator (bug 522368).
  
  (Portage version: 2.2.14_rc1/cvs/Linux x86_64, signed Manifest commit with 
key 62EEF090)

Revision  Changes    Path
1.1                  dev-util/cppcheck/files/cppcheck-1.65-r1-tinyxml2.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cppcheck/files/cppcheck-1.65-r1-tinyxml2.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/cppcheck/files/cppcheck-1.65-r1-tinyxml2.patch?rev=1.1&content-type=text/plain

Index: cppcheck-1.65-r1-tinyxml2.patch
===================================================================
--- cppcheck-1.65/tools/dmake.cpp
+++ cppcheck-1.65/tools/dmake.cpp
@@ -170,7 +170,6 @@
     }
 
     std::vector<std::string> externalfiles;
-    getCppFiles(externalfiles, "externals/");
 
 
     // QMAKE - lib/lib.pri
@@ -179,10 +178,6 @@
         if (fout1.is_open()) {
             fout1 << "# no manual edits - this file is autogenerated by 
dmake\n\n";
             fout1 << "include($$PWD/pcrerules.pri)\n";
-            fout1 << "BASEPATH = ../externals/tinyxml/\n";
-            fout1 << "include($$PWD/../externals/tinyxml/tinyxml.pri)\n";
-            fout1 << "BASEPATH = ../lib/\n";
-            fout1 << "INCLUDEPATH += ../externals/tinyxml\n";
             fout1 << "HEADERS += $${BASEPATH}check.h \\\n";
             for (unsigned int i = 0; i < libfiles.size(); ++i) {
                 std::string fname(libfiles[i].substr(4));
@@ -208,7 +203,6 @@
         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));
@@ -354,9 +348,9 @@
 
     makeConditionalVariable(fout, "CXX", "g++");
     makeConditionalVariable(fout, "PREFIX", "/usr");
-    makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib 
-Iexternals/tinyxml");
-    makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib 
-Iexternals/tinyxml");
-    makeConditionalVariable(fout, "INCLUDE_FOR_TEST", "-Ilib -Icli 
-Iexternals/tinyxml");
+    makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib");
+    makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib");
+    makeConditionalVariable(fout, "INCLUDE_FOR_TEST", "-Ilib -Icli");
 
     fout << "BIN=$(DESTDIR)$(PREFIX)/bin\n\n";
     fout << "# For 'make man': sudo apt-get install xsltproc docbook-xsl 
docbook-xml on Linux\n";
@@ -394,10 +388,10 @@
     fout << "dmake:\ttools/dmake.o cli/filelister.o lib/path.o\n";
     fout << "\t$(CXX) $(CXXFLAGS) -std=c++0x -o dmake tools/dmake.o 
cli/filelister.o lib/path.o -Ilib $(LDFLAGS)\n";
     fout << "\t./dmake\n\n";
-    fout << "reduce:\ttools/reduce.o externals/tinyxml/tinyxml2.o $(LIBOBJ)\n";
-    fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++0x -g -o reduce 
tools/reduce.o -Ilib -Iexternals/tinyxml $(LIBOBJ) $(LIBS) 
externals/tinyxml/tinyxml2.o $(LDFLAGS) $(RDYNAMIC)\n\n";
+    fout << "reduce:\ttools/reduce.o $(LIBOBJ)\n";
+    fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++0x -g -o reduce 
tools/reduce.o -Ilib $(LIBOBJ) $(LIBS) $(LDFLAGS) $(RDYNAMIC)\n\n";
     fout << "clean:\n";
-    fout << "\trm -f build/*.o lib/*.o cli/*.o test/*.o externals/tinyxml/*.o 
testrunner reduce dmake cppcheck cppcheck.1\n\n";
+    fout << "\trm -f build/*.o lib/*.o cli/*.o test/*.o testrunner reduce 
dmake cppcheck cppcheck.1\n\n";
     fout << "man:\tman/cppcheck.1\n\n";
     fout << "man/cppcheck.1:\t$(MAN_SOURCE)\n\n";
     fout << "\t$(XP) $(DB2MAN) $(MAN_SOURCE)\n\n";
--- cppcheck-1.65/gui/gui.pro
+++ cppcheck-1.65/gui/gui.pro
@@ -15,7 +15,7 @@
     LIBS += -l../bin/cppcheck-core
     DEFINES += CPPCHECKLIB_IMPORT
 }
-LIBS += -L../externals
+LIBS += `pkg-config --libs tinyxml2`
 
 DESTDIR = .
 RCC_DIR = temp




Reply via email to