mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 22:18:55 +02:00
kdiff3: fix whitespace issue in patch to allow hp --no-git-repo (#2147)
to work. Previously, it only worked without the "--no-git-repo". Shrink the patch a bit by dropping an unneeded indentation change. Use commandBinDir & commandSuffix to move kdiff3 to $prefix/bin/. Switch SOURCE_URI to https and fix COPYRIGHT.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
From f67abf36fc26fcc9e86c16fef5ef86c89f995378 Mon Sep 17 00:00:00 2001
|
||||
From b1e5b43476070d319d12d9f5632b9b6d54810ad8 Mon Sep 17 00:00:00 2001
|
||||
From: Bach Nguyen <bach5000@gci.test>
|
||||
Date: Tue, 26 Dec 2017 21:45:17 +0000
|
||||
Subject: Fix settings dir
|
||||
|
||||
|
||||
diff --git a/src-QT4/kreplacements/kreplacements.cpp b/src-QT4/kreplacements/kreplacements.cpp
|
||||
index 6564ae8..ebda855 100644
|
||||
index 6564ae8..1e648a2 100644
|
||||
--- a/src-QT4/kreplacements/kreplacements.cpp
|
||||
+++ b/src-QT4/kreplacements/kreplacements.cpp
|
||||
@@ -48,6 +48,9 @@
|
||||
@@ -18,24 +18,20 @@ index 6564ae8..ebda855 100644
|
||||
|
||||
static QString s_copyright;
|
||||
static QString s_email;
|
||||
@@ -419,12 +422,18 @@ QString KStandardDirs::findResource(const QString& resource, const QString& /*ap
|
||||
{
|
||||
#if defined(_WIN32) || defined(Q_OS_OS2)
|
||||
QString exePath = QCoreApplication::applicationDirPath();
|
||||
@@ -422,9 +425,15 @@ QString KStandardDirs::findResource(const QString& resource, const QString& /*ap
|
||||
QString configPath = exePath + "/.kdiff3rc"; // This is useful for portable installations (e.g. on USB-Stick)
|
||||
if ( QFile::exists( configPath ) )
|
||||
return configPath;
|
||||
-#endif
|
||||
+#elif defined(__HAIKU__)
|
||||
+ char hdir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
||||
+ find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, hdir, sizeof(hdir));
|
||||
+ QString settings = hdir;
|
||||
+ return settings + "/kdiff3rc";
|
||||
+#else
|
||||
+ QString home = QDir::homePath();
|
||||
+ return home + "/.kdiff3rc";
|
||||
#endif
|
||||
- QString home = QDir::homePath();
|
||||
- return home + "/.kdiff3rc";
|
||||
QString home = QDir::homePath();
|
||||
return home + "/.kdiff3rc";
|
||||
+#endif
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user