Files
haikuports/app-admin/keepassx/patches/keepassx-2.0a6.patchset
2014-11-13 21:23:54 -07:00

86 lines
2.7 KiB
Plaintext

From 13f3d262fd9c6c0cf9f32f7ec8bef110b0aa71ca Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Thu, 13 Nov 2014 19:28:44 -0700
Subject: Add Haiku support
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 35642eb..73763a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -159,7 +159,7 @@ if(WITH_TESTS)
endif(WITH_TESTS)
set(QT_REQUIRED_MODULES QtCore QtGui QtTest)
-if(UNIX AND NOT APPLE)
+if(UNIX AND NOT APPLE AND NOT HAIKU)
set(QT_REQUIRED_MODULES ${QT_REQUIRED_MODULES} QtDBus)
endif()
diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt
index 7069c6c..cef431e 100644
--- a/share/CMakeLists.txt
+++ b/share/CMakeLists.txt
@@ -17,7 +17,7 @@ file(GLOB DATABASE_ICONS icons/database/*.png)
install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database)
-if(UNIX AND NOT APPLE)
+if(UNIX AND NOT APPLE AND NOT HAIKU)
install(DIRECTORY icons/application/ DESTINATION share/icons/hicolor
FILES_MATCHING PATTERN "keepassx.png" PATTERN "keepassx.svgz")
install(DIRECTORY icons/application/ DESTINATION share/icons/hicolor
diff --git a/src/config-keepassx.h.cmake b/src/config-keepassx.h.cmake
index 9a3f495..e4efe17 100644
--- a/src/config-keepassx.h.cmake
+++ b/src/config-keepassx.h.cmake
@@ -9,6 +9,8 @@
#define KEEPASSX_PLUGIN_DIR "${PLUGIN_INSTALL_DIR}"
+#define KEEPASSX_DATA_DIR "${DATA_INSTALL_DIR}"
+
#cmakedefine HAVE_PR_SET_DUMPABLE 1
#cmakedefine HAVE_RLIMIT_CORE 1
#cmakedefine HAVE_PT_DENY_ATTACH 1
diff --git a/src/core/FilePath.cpp b/src/core/FilePath.cpp
index 52db1ed..8688ea9 100644
--- a/src/core/FilePath.cpp
+++ b/src/core/FilePath.cpp
@@ -182,6 +182,10 @@ FilePath::FilePath()
else if (testSetDir(QCoreApplication::applicationDirPath() + "/share")) {
}
#endif
+#ifdef KEEPASSX_DATA_DIR
+ else if (testSetDir(QString(KEEPASSX_DATA_DIR))) {
+ }
+#endif
if (m_dataPath.isEmpty()) {
qWarning("FilePath::DataPath: can't find data dir");
diff --git a/src/gui/Clipboard.cpp b/src/gui/Clipboard.cpp
index eb77d2b..958eacb 100644
--- a/src/gui/Clipboard.cpp
+++ b/src/gui/Clipboard.cpp
@@ -21,7 +21,7 @@
#include <QClipboard>
#include <QTimer>
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_HAIKU)
#include <QDBusConnection>
#include <QDBusMessage>
#endif
@@ -70,7 +70,7 @@ void Clipboard::clearClipboard()
clipboard->clear(QClipboard::Selection);
}
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_HAIKU)
QDBusMessage message = QDBusMessage::createMethodCall("org.kde.klipper", "/klipper", "", "clearClipboardHistory");
QDBusConnection::sessionBus().send(message);
#endif
--
1.8.3.4