Skip to content

Commit

Permalink
fix(x11/qt6-qtbase): Relocate hardcoded paths (#20785)
Browse files Browse the repository at this point in the history
  • Loading branch information
Biswa96 authored Jul 7, 2024
1 parent c145666 commit fff29a7
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions x11-packages/qt6-qtbase/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_LICENSE_FILE="LICENSES/GPL-3.0-only.txt"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="6.7.2"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/${TERMUX_PKG_VERSION%.*}/${TERMUX_PKG_VERSION}/submodules/qtbase-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=c5f22a5e10fb162895ded7de0963328e7307611c688487b5d152c9ee64767599
TERMUX_PKG_DEPENDS="brotli, double-conversion, freetype, glib, harfbuzz, libandroid-posix-semaphore, libandroid-shmem, libc++, libdrm, libice, libicu, libjpeg-turbo, libpng, libsm, libsqlite, libuuid, libx11, libxcb, libxi, libxkbcommon, libwayland, opengl, openssl, pcre2, vulkan-loader, xcb-util-cursor, xcb-util-image, xcb-util-keysyms, xcb-util-renderutil, xcb-util-wm, zlib, zstd"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/src/corelib/io/qstandardpaths_unix.cpp
+++ b/src/corelib/io/qstandardpaths_unix.cpp
@@ -394,7 +394,7 @@

QStringList dirs = dirsList(xdgDataDirsEnv);
if (dirs.isEmpty())
- dirs = QStringList{u"/usr/local/share"_s, u"/usr/share"_s};
+ dirs = QStringList{u"@TERMUX_PREFIX@/local/share"_s, u"@TERMUX_PREFIX@/share"_s};

return dirs;
}
@@ -406,7 +406,7 @@

QStringList dirs = dirsList(xdgConfigDirs);
if (dirs.isEmpty())
- dirs.push_back(u"/etc/xdg"_s);
+ dirs.push_back(u"@TERMUX_PREFIX@/etc/xdg"_s);

return dirs;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/dbus/qdbusserver.cpp
+++ b/src/dbus/qdbusserver.cpp
@@ -51,7 +51,7 @@
: QDBusServer(
#ifdef Q_OS_UNIX
// Use Unix sockets on Unix systems only
- QStringLiteral("unix:tmpdir=/tmp"),
+ QStringLiteral("unix:tmpdir=@TERMUX_PREFIX@/tmp"),
#else
QStringLiteral("tcp:"),
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/gui/platform/unix/qgenericunixthemes.cpp
+++ b/src/gui/platform/unix/qgenericunixthemes.cpp
@@ -454,7 +454,7 @@
QStringList QGenericUnixTheme::iconFallbackPaths()
{
QStringList paths;
- const QFileInfo pixmapsIconsDir(QStringLiteral("/usr/share/pixmaps"));
+ const QFileInfo pixmapsIconsDir(QStringLiteral("@TERMUX_PREFIX@/share/pixmaps"));
if (pixmapsIconsDir.isDir())
paths.append(pixmapsIconsDir.absoluteFilePath());

0 comments on commit fff29a7

Please sign in to comment.