fix the fallback directories paths
This commit is contained in:
parent
c01d024769
commit
be71daf83e
@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Qt 5 implementation of freedesktop.org XDG specification
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="Simeon Huang <symeon@librehat.com>"
|
||||
TERMUX_PKG_VERSION=3.7.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL="https://github.com/lxqt/${TERMUX_PKG_NAME}/releases/download/${TERMUX_PKG_VERSION}/${TERMUX_PKG_NAME}-${TERMUX_PKG_VERSION}.tar.xz"
|
||||
TERMUX_PKG_SHA256=477cbe76b3305071ff5f5bfa31dbcddcc51f3434b9ed75d91988219296d88a9b
|
||||
TERMUX_PKG_DEPENDS="qt5-qtbase, qt5-qtsvg, glib"
|
||||
|
40
x11-packages/libqtxdg/xdgdirs_termux_prefix.patch
Normal file
40
x11-packages/libqtxdg/xdgdirs_termux_prefix.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- src/src/qtxdg/xdgdirs.cpp 2021-04-16 09:29:21.000000000 +0000
|
||||
+++ src.mod/src/qtxdg/xdgdirs.cpp 2021-05-12 16:50:56.461844000 +0000
|
||||
@@ -46,6 +46,8 @@
|
||||
QLatin1String("Videos")
|
||||
};
|
||||
|
||||
+static const char* TERMUX_PREFIX = "/data/data/com.termux/files/usr";
|
||||
+
|
||||
// Helper functions prototypes
|
||||
void fixBashShortcuts(QString &s);
|
||||
void removeEndingSlash(QString &s);
|
||||
@@ -108,7 +110,7 @@
|
||||
const QString home = QFile::decodeName(qgetenv("HOME"));
|
||||
|
||||
if (home.isEmpty())
|
||||
- return QString::fromLatin1("/tmp");
|
||||
+ return QString::fromLatin1(TERMUX_PREFIX) + QString::fromLatin1("/tmp");
|
||||
else if (dir == XdgDirs::Desktop)
|
||||
fallback = QString::fromLatin1("%1/%2").arg(home, QLatin1String("Desktop"));
|
||||
else
|
||||
@@ -270,8 +272,8 @@
|
||||
#endif
|
||||
|
||||
if (dirs.isEmpty()) {
|
||||
- dirs.append(QString::fromLatin1("/usr/local/share"));
|
||||
- dirs.append(QString::fromLatin1("/usr/share"));
|
||||
+ dirs.append(QString::fromLatin1(TERMUX_PREFIX) + QString::fromLatin1("/usr/local/share"));
|
||||
+ dirs.append(QString::fromLatin1(TERMUX_PREFIX) + QString::fromLatin1("/usr/share"));
|
||||
} else {
|
||||
QMutableListIterator<QString> it(dirs);
|
||||
while (it.hasNext()) {
|
||||
@@ -293,7 +295,7 @@
|
||||
QStringList dirs;
|
||||
const QString env = QFile::decodeName(qgetenv("XDG_CONFIG_DIRS"));
|
||||
if (env.isEmpty())
|
||||
- dirs.append(QString::fromLatin1("/etc/xdg"));
|
||||
+ dirs.append(QString::fromLatin1(TERMUX_PREFIX) + QString::fromLatin1("/etc/xdg"));
|
||||
else
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5,15,0))
|
||||
dirs = env.split(QLatin1Char(':'), Qt::SkipEmptyParts);
|
Loading…
Reference in New Issue
Block a user