Description: Set configuration directory and python version
Author: Joachim Reichel <reichel@debian.org>

Index: cppcheck-1.89/gui/main.cpp
===================================================================
--- cppcheck-1.89.orig/gui/main.cpp
+++ cppcheck-1.89/gui/main.cpp
@@ -62,6 +62,12 @@ int main(int argc, char *argv[])
 
     QSettings* settings = new QSettings("Cppcheck", "Cppcheck-GUI", &app);
 
+    // Set some default settings
+    if( settings->value("DATADIR", QString()).toString().isEmpty())
+        settings->setValue("DATADIR", FILESDIR);
+    if( settings->value(SETTINGS_PYTHON_PATH, QString()).toString().isEmpty())
+        settings->setValue(SETTINGS_PYTHON_PATH, QString("/usr/bin/python3"));
+
     // Set data dir..
     foreach (const QString arg, app.arguments()) {
         if (arg.startsWith("--data-dir=")) {
Index: cppcheck-1.89/gui/gui.pro
===================================================================
--- cppcheck-1.89.orig/gui/gui.pro
+++ cppcheck-1.89/gui/gui.pro
@@ -9,6 +9,7 @@ INCLUDEPATH += . \
     ../lib
 QT += widgets
 QT += printsupport
+DEFINES += FILESDIR=\\\"/usr/share/cppcheck\\\"
 
 contains(LINKCORE, [yY][eE][sS]) {
     LIBS += -l../bin/cppcheck-core
Index: cppcheck-1.89/cli/cppcheckexecutor.cpp
===================================================================
--- cppcheck-1.89.orig/cli/cppcheckexecutor.cpp
+++ cppcheck-1.89/cli/cppcheckexecutor.cpp
@@ -1075,7 +1075,7 @@ FILE* CppCheckExecutor::getExceptionOutp
 
 bool CppCheckExecutor::tryLoadLibrary(Library& destination, const char* basepath, const char* filename)
 {
-    const Library::Error err = destination.load(basepath, filename);
+    const Library::Error err = destination.load(FILESDIR "/cfg", filename);
 
     if (err.errorcode == Library::UNKNOWN_ELEMENT)
         std::cout << "cppcheck: Found unknown elements in configuration file '" << filename << "': " << err.reason << std::endl;
Description: Use /usr/bin/python3
Author: Joachim Reichel <reichel@debian.org>

Index: cppcheck-1.89/Makefile
===================================================================
--- cppcheck-1.89.orig/Makefile
+++ cppcheck-1.89/Makefile
@@ -12,9 +12,9 @@ ifeq ($(SRCDIR),build)
 endif
 ifeq ($(MATCHCOMPILER),yes)
     ifdef VERIFY
-        matchcompiler_S := $(shell python tools/matchcompiler.py --verify)
+        matchcompiler_S := $(shell python3 tools/matchcompiler.py --verify)
     else
-        matchcompiler_S := $(shell python tools/matchcompiler.py)
+        matchcompiler_S := $(shell python3 tools/matchcompiler.py)
     endif
     libcppdir:=build
 else
