add(x11): new package spotify-qt

Co-authored-by: Tee KOBAYASHI <xtkoba@gmail.com>
This commit is contained in:
Ansh Dadwal 2022-11-27 23:49:24 +05:30 committed by xtkoba
parent f86136acba
commit bdee3715f7
3 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,7 +76,7 @@
endif ()
# Create main executable
-if (ANDROID)
+if (FALSE)
add_library(spotify-qt SHARED ${SRC_FILES} res.qrc)
elseif (MSVC)
add_executable(spotify-qt WIN32 ${SRC_FILES} ${LIB_SRC} res.qrc

View File

@ -0,0 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://github.com/kraxarn/spotify-qt
TERMUX_PKG_DESCRIPTION="Lightweight Spotify client using Qt"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.9
TERMUX_PKG_SRCURL=https://github.com/kraxarn/spotify-qt/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=db1bc50fe4f31fc021db722eb85e59db543a104255a0a07f2e923d7a69195e42
TERMUX_PKG_DEPENDS="libc++, qt5-qtbase, qt5-qtsvg"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools"

View File

@ -0,0 +1,49 @@
diff '--color=auto' -uNr spotify-qt-3.9/lib/thirdparty/include/thirdparty/filesystem.hpp spotify-qt-3.9.mod/lib/thirdparty/include/thirdparty/filesystem.hpp
--- spotify-qt-3.9/lib/thirdparty/include/thirdparty/filesystem.hpp 2022-07-13 01:07:50.000000000 +0530
+++ spotify-qt-3.9.mod/lib/thirdparty/include/thirdparty/filesystem.hpp 2022-11-27 23:47:28.774600094 +0530
@@ -5069,7 +5069,7 @@
return path(temp_path);
}
}
- return path("/tmp");
+ return path("@TERMUX_PREFIX@/tmp");
#endif
}
diff '--color=auto' -uNr spotify-qt-3.9/src/spotifyclient/helper.cpp spotify-qt-3.9.mod/src/spotifyclient/helper.cpp
--- spotify-qt-3.9/src/spotifyclient/helper.cpp 2022-07-13 01:07:50.000000000 +0530
+++ spotify-qt-3.9.mod/src/spotifyclient/helper.cpp 2022-11-27 23:42:38.296679095 +0530
@@ -131,13 +131,13 @@
auto SpotifyClient::Helper::running(const QString &path) -> bool
{
- if (path.isEmpty() || !QFile("/usr/bin/ps").exists())
+ if (path.isEmpty() || !QFile("@TERMUX_PREFIX@/bin/ps").exists())
{
return false;
}
QProcess ps;
- ps.start("/usr/bin/ps", {"aux"});
+ ps.start("@TERMUX_PREFIX@/bin/ps", {"aux"});
ps.waitForFinished();
auto out = ps.readAllStandardOutput();
return QString(out).contains(path);
diff '--color=auto' -uNr spotify-qt-3.9/src/util/appinstalltype.cpp spotify-qt-3.9.mod/src/util/appinstalltype.cpp
--- spotify-qt-3.9/src/util/appinstalltype.cpp 2022-07-13 01:07:50.000000000 +0530
+++ spotify-qt-3.9.mod/src/util/appinstalltype.cpp 2022-11-27 23:43:59.700634507 +0530
@@ -30,12 +30,12 @@
auto AppInstallType::getInstallType(const QString &path) -> InstallType
{
- if (path.startsWith(QStringLiteral("/home/")))
+ if (path.startsWith(QStringLiteral("@TERMUX_HOME@/")))
{
return InstallType::User;
}
- if (path.startsWith(QStringLiteral("/usr/")))
+ if (path.startsWith(QStringLiteral("@TERMUX_PREFIX@/")))
{
return InstallType::System;
}