QMPlay2: bump version

This commit is contained in:
Gerasim Troeglazov
2021-12-18 21:39:55 +10:00
parent 192d010484
commit cbfa930f26
2 changed files with 24 additions and 24 deletions

View File

@@ -1,11 +1,11 @@
From 05b0ece22464f2510cf91ecd35417e83d13733f2 Mon Sep 17 00:00:00 2001
From 7bd1b2f5bb03eb0569ae1e2d00b83cb6beac2a19 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 27 Jun 2021 23:45:17 +1000
Date: Sat, 18 Dec 2021 21:36:25 +1000
Subject: Add haiku support
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1146667..1cec2aa 100644
index 210b1fa..7cfa9ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
@@ -37,12 +37,12 @@ index 1146667..1cec2aa 100644
add_feature_info(MPRIS2 USE_MPRIS2 "Build Extensions with MPRIS2 support")
endif()
diff --git a/src/gui/Main.cpp b/src/gui/Main.cpp
index 284c2c5..2e59957 100644
index 1360cba..73d4cd8 100644
--- a/src/gui/Main.cpp
+++ b/src/gui/Main.cpp
@@ -610,6 +610,10 @@ int main(int argc, char *argv[])
checkForEGL();
#endif
@@ -606,6 +606,10 @@ int main(int argc, char *argv[])
qputenv("QT_QPA_UPDATE_IDLE_TIME", "0");
+#ifdef Q_OS_HAIKU
+ setenv("HOME", "/boot/home", 1);
@@ -51,7 +51,7 @@ index 284c2c5..2e59957 100644
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#ifndef USE_OPENGL
QGuiApplication::setAttribute(Qt::AA_ForceRasterWidgets);
@@ -706,7 +710,7 @@ int main(int argc, char *argv[])
@@ -707,7 +711,7 @@ int main(int argc, char *argv[])
}
if (!cmakeBuildFound)
{
@@ -60,7 +60,7 @@ index 284c2c5..2e59957 100644
sharePath = QCoreApplication::applicationDirPath() + "/../share/qmplay2";
libPath = QMPlay2CoreClass::getLibDir();
if (libPath.isEmpty() || !QDir(libPath).exists("qmplay2"))
@@ -912,5 +916,9 @@ int main(int argc, char *argv[])
@@ -913,5 +917,9 @@ int main(int argc, char *argv[])
if (canDeleteApp)
#endif
delete qApp;
@@ -746,7 +746,7 @@ index bac1b16..2bc3175 100644
m_priv->socketNotifier = new QSocketNotifier(m_priv->fd, QSocketNotifier::Read, this);
connect(m_priv->socketNotifier, SIGNAL(activated(int)), this, SLOT(socketReadActive()));
diff --git a/src/qmplay2/QMPlay2Core.cpp b/src/qmplay2/QMPlay2Core.cpp
index b0bc28e..402b81b 100644
index a8e2d65..137e18e 100644
--- a/src/qmplay2/QMPlay2Core.cpp
+++ b/src/qmplay2/QMPlay2Core.cpp
@@ -45,7 +45,7 @@
@@ -758,7 +758,7 @@ index b0bc28e..402b81b 100644
#include <QDBusConnection>
#include <QDBusInterface>
#endif
@@ -236,7 +236,7 @@ void QMPlay2CoreClass::init(bool loadModules, bool modulesInSubdirs, const QStri
@@ -239,7 +239,7 @@ void QMPlay2CoreClass::init(bool loadModules, bool modulesInSubdirs, const QStri
}
else
{
@@ -767,7 +767,7 @@ index b0bc28e..402b81b 100644
settingsDir = QFileInfo(QSettings(QSettings::IniFormat, QSettings::UserScope, QString()).fileName()).absolutePath() + "/QMPlay2/";
#elif defined(Q_OS_MACOS)
settingsDir = Functions::cleanPath(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).value(0));
@@ -484,6 +484,11 @@ QStringList QMPlay2CoreClass::getModules(const QString &type, int typeLen) const
@@ -487,6 +487,11 @@ QStringList QMPlay2CoreClass::getModules(const QString &type, int typeLen) const
#elif defined Q_OS_WIN
if (type == "videoWriters")
defaultModules << "OpenGL 2" << "DirectDraw";
@@ -780,24 +780,24 @@ index b0bc28e..402b81b 100644
if (type == "decoders")
defaultModules << "FFmpeg Decoder";
diff --git a/src/qmplay2/YouTubeDL.cpp b/src/qmplay2/YouTubeDL.cpp
index 3319df0..8f6567f 100644
index 5659018..63256fa 100644
--- a/src/qmplay2/YouTubeDL.cpp
+++ b/src/qmplay2/YouTubeDL.cpp
@@ -36,9 +36,13 @@ static QMutex g_mutex(QMutex::Recursive);
@@ -37,9 +37,13 @@ static QMutex g_mutex(QMutex::Recursive);
QString YouTubeDL::getFilePath()
{
+#ifdef Q_OS_HAIKU
+ return "/bin/youtube-dl"
+ return "/bin/yt-dlp"
+#else
return QMPlay2Core.getSettingsDir() + "youtube-dl"
return QMPlay2Core.getSettingsDir() + "yt-dlp"
#ifdef Q_OS_WIN
".exe"
"_x86.exe"
+#endif
#endif
;
}
@@ -257,6 +261,9 @@ void YouTubeDL::abort()
@@ -258,6 +262,9 @@ void YouTubeDL::abort()
bool YouTubeDL::prepare()
{
@@ -807,7 +807,7 @@ index 3319df0..8f6567f 100644
#ifdef Q_OS_ANDROID
return false;
#endif
@@ -303,6 +310,9 @@ bool YouTubeDL::prepare()
@@ -304,6 +311,9 @@ bool YouTubeDL::prepare()
bool YouTubeDL::download()
{
@@ -816,8 +816,8 @@ index 3319df0..8f6567f 100644
+#endif
// Mutex must be locked here
const QString downloadUrl = "https://yt-dl.org/downloads/latest/youtube-dl"
@@ -356,6 +366,9 @@ bool YouTubeDL::download()
const QString downloadUrl = "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp"
@@ -357,6 +367,9 @@ bool YouTubeDL::download()
}
bool YouTubeDL::update()
{
@@ -827,7 +827,7 @@ index 3319df0..8f6567f 100644
// Mutex must be locked here
qDebug() << "\"youtube-dl\" updates will be checked";
@@ -425,7 +438,7 @@ bool YouTubeDL::update()
@@ -408,7 +421,7 @@ bool YouTubeDL::update()
void YouTubeDL::ensureExecutable()
{

View File

@@ -8,7 +8,7 @@ COPYRIGHT="2010-2021 Błażej Szczygieł"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/zaps166/QMPlay2/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="a1139f50d87393e37ce9263a1afbd2d5064f6f0ad35a5f5a513094eeef27fc62"
CHECKSUM_SHA256="58fc996d1982f91003abe84ac0fc3b6069e6c88c3588aa8bd984bff526e73a68"
SOURCE_DIR="QMPlay2-$portVersion"
PATCHES="qmplay2-$portVersion.patchset"
ADDITIONAL_FILES="
@@ -25,7 +25,7 @@ PROVIDES="
"
REQUIRES="
haiku${secondaryArchSuffix}
cmd:youtube_dl
cmd:yt_dlp
lib:libass$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libavformat$secondaryArchSuffix