From 0a283df2fdc48292c83e07a2b7e43de4f74ef4d6 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 17 Aug 2019 22:31:31 +1000 Subject: [PATCH] KTorrent: switch to release source * add dbus autostart * disable infowidget plugin * enable mediaplayer plugin --- net-p2p/ktorrent/ktorrent-5.1.1.recipe | 32 +++++++---- .../ktorrent/patches/ktorrent-5.1.1.patchset | 53 +++++++++++++++++++ 2 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 net-p2p/ktorrent/patches/ktorrent-5.1.1.patchset diff --git a/net-p2p/ktorrent/ktorrent-5.1.1.recipe b/net-p2p/ktorrent/ktorrent-5.1.1.recipe index d2c71b756..054e3247f 100644 --- a/net-p2p/ktorrent/ktorrent-5.1.1.recipe +++ b/net-p2p/ktorrent/ktorrent-5.1.1.recipe @@ -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|" \ diff --git a/net-p2p/ktorrent/patches/ktorrent-5.1.1.patchset b/net-p2p/ktorrent/patches/ktorrent-5.1.1.patchset new file mode 100644 index 000000000..d0c3244cf --- /dev/null +++ b/net-p2p/ktorrent/patches/ktorrent-5.1.1.patchset @@ -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 + #include + ++#ifdef __HAIKU__ ++#include ++#endif ++ + #include + #include + #include +@@ -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 +