KTorrent: switch to release source

* add dbus autostart
* disable infowidget plugin
* enable mediaplayer plugin
This commit is contained in:
Gerasim Troeglazov
2019-08-17 22:31:31 +10:00
parent 417f49eb1a
commit 0a283df2fd
2 changed files with 75 additions and 10 deletions

View File

@@ -27,11 +27,11 @@ need enabled.
HOMEPAGE="https://www.kde.org/applications/internet/ktorrent/"
COPYRIGHT="2010-2018 KDE Organisation"
LICENSE="GNU LGPL v2"
REVISION="2"
srcGitRev="d018720d638197683c24dbcd2603128149367a76"
SOURCE_URI="https://github.com/KDE/ktorrent/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="e68de0196f11acff49d5fd5c9d7b89f40c08ec95eb2ff9aef67b6fd0dba77528"
SOURCE_DIR="ktorrent-$srcGitRev"
REVISION="3"
SOURCE_URI="https://github.com/KDE/ktorrent/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="1b74da23ffdff4923f882919264bef9938c677449337546c37279b754089e9bb"
SOURCE_DIR="ktorrent-$portVersion"
PATCHES="ktorrent-$portVersion.patchset"
ADDITIONAL_FILES="ktorrent.rdef.in"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
@@ -45,7 +45,7 @@ PROVIDES="
"
REQUIRES="
haiku$secondaryArchSuffix
dbus$secondaryArchSuffix
cmd:dbus_launch
lib:libgcrypt$secondaryArchSuffix
lib:libgmp$secondaryArchSuffix
lib:libKF5Archive$secondaryArchSuffix
@@ -67,9 +67,12 @@ REQUIRES="
lib:libKF5KIOCore$secondaryArchSuffix
lib:libKF5KIOFileWidgets$secondaryArchSuffix
lib:libKF5KIOWidgets$secondaryArchSuffix
lib:libKF5KrossCore$secondaryArchSuffix
lib:libKF5KrossUi$secondaryArchSuffix
lib:libKF5Notifications$secondaryArchSuffix
lib:libKF5NotifyConfig$secondaryArchSuffix
lib:libKF5Parts$secondaryArchSuffix
lib:libKF5Plotting$secondaryArchSuffix
lib:libKF5Service$secondaryArchSuffix
lib:libKF5Solid$secondaryArchSuffix
lib:libKF5SonnetUi$secondaryArchSuffix
@@ -78,17 +81,20 @@ REQUIRES="
lib:libKF5WidgetsAddons$secondaryArchSuffix
lib:libKF5WindowSystem$secondaryArchSuffix
lib:libKF5XmlGui$secondaryArchSuffix
lib:libphonon4qt5$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5DBus$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libQt5Xml$secondaryArchSuffix
lib:libtag$secondaryArchSuffix
lib:libtag_c$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
extra_cmake_modules$secondaryArchSuffix >= 5.39
extra_cmake_modules$secondaryArchSuffix >= 5.55
devel:libboost_system$secondaryArchSuffix
devel:libgcrypt$secondaryArchSuffix
devel:libgmp$secondaryArchSuffix
@@ -108,9 +114,11 @@ BUILD_REQUIRES="
devel:libKF5JobWidgets$secondaryArchSuffix
devel:libKF5KCMUtils$secondaryArchSuffix
devel:libKF5KIOCore$secondaryArchSuffix
devel:libKF5KrossCore$secondaryArchSuffix
devel:libKF5Notifications$secondaryArchSuffix
devel:libKF5NotifyConfig$secondaryArchSuffix
devel:libKF5Parts$secondaryArchSuffix
devel:libKF5Plotting$secondaryArchSuffix
devel:libKF5Service$secondaryArchSuffix
devel:libKF5Solid$secondaryArchSuffix
devel:libKF5SonnetUi$secondaryArchSuffix
@@ -119,13 +127,16 @@ BUILD_REQUIRES="
devel:libKF5WidgetsAddons$secondaryArchSuffix
devel:libKF5WindowSystem$secondaryArchSuffix
devel:libKF5XmlGui$secondaryArchSuffix
devel:libphonon4qt5$secondaryArchSuffix
devel:libqca$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix >= 5.7
devel:libQt5Core$secondaryArchSuffix >= 5.13
devel:libtag$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python2
@@ -144,7 +155,8 @@ BUILD()
-DCMAKE_INSTALL_PREFIX=$appsDir/KTorrent \
-DCMAKE_INSTALL_DATAROOTDIR=$dataDir \
-DKDE_INSTALL_PLUGINDIR=$addOnsDir/Qt5 \
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake \
-DENABLE_INFOWIDGET_PLUGIN=OFF
make $jobArgs
}
@@ -159,7 +171,7 @@ INSTALL()
APP_SIGNATURE="application/x-vnd.ktorrent"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="0"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \

View File

@@ -0,0 +1,53 @@
From 4d69b3890f171c31c05cc7cc5f97c74794e5e9fe Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 17 Aug 2019 20:06:49 +1000
Subject: Dbus autostart
diff --git a/ktorrent/main.cpp b/ktorrent/main.cpp
index d296bb3..1d4441a 100644
--- a/ktorrent/main.cpp
+++ b/ktorrent/main.cpp
@@ -36,6 +36,10 @@
#include <QDir>
#include <QFile>
+#ifdef __HAIKU__
+#include <QProcess>
+#endif
+
#include <KAboutData>
#include <KCrash>
#include <KDBusService>
@@ -93,6 +97,18 @@ bool GrabPIDLock()
int main(int argc, char** argv)
{
+#ifdef __HAIKU__
+ int status=0;
+ QProcess dbusProcess;
+ QString exec = QString::fromStdString("/bin/dbus-launch");
+ QStringList params;
+ dbusProcess.start(exec, params);
+ dbusProcess.waitForFinished();
+ QString output = QString::fromStdString(dbusProcess.readAllStandardOutput().data());
+ QStringList list = output.split(QString::fromStdString("\n"), QString::SkipEmptyParts);
+ foreach (const QString &str, list)
+ putenv(str.toLatin1().data());
+#endif
#ifndef Q_WS_WIN
// ignore SIGPIPE and SIGXFSZ
signal(SIGPIPE, SIG_IGN);
@@ -252,6 +268,9 @@ int main(int argc, char** argv)
Out(SYS_GEN | LOG_IMPORTANT) << "Uncaught unknown exception " << endl;
}
bt::Globals::cleanup();
+#ifdef __HAIKU__
+ system("kill -9 $DBUS_SESSION_BUS_PID");
+#endif
return 0;
}
--
2.21.0