media-video/haruna: new package, add 1.3.2

Closes: https://bugs.gentoo.org/938705
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Andreas Sturmlechner
2025-02-21 22:40:17 +01:00
parent 85a1a6bc5b
commit eb4184eb26
4 changed files with 159 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
DIST haruna-1.3.2.tar.xz 662788 BLAKE2B cccca2d8102272ca4ddb78590ef7818de7970d9073484cdb4d343842c30318f262a01eab45ed0de8fc41c2824a33a2f2bec495df3fe0b9d1b9dfd022de2748ca SHA512 839ff8818064ae89dfbb44cd476f7b2e0e7048258c38294a5fe570434e07796033a161d3a6c788c2317dba6af6cfe3f6472a719e78e15388d649ff72519644ea
@@ -0,0 +1,94 @@
From 11a36a50558bdbc9c42253b937c8a832d896248f Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Fri, 21 Feb 2025 22:28:27 +0100
Subject: [PATCH] Make it possible to build against system kdsingleapplication
Bundling must be avoided wherever possible.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
CMakeLists.txt | 7 +++++++
src/CMakeLists.txt | 23 ++++++++++++++++++++---
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac49e01f..990ff871 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,6 +112,13 @@ set_package_properties(Ytdlp PROPERTIES TYPE RUNTIME
URL "https://github.com/yt-dlp/yt-dlp"
DESCRIPTION "needed to play videos from youtube and other online sources")
+find_package(KDSingleApplication-qt6 QUIET)
+if(KDSingleApplication-qt6_FOUND)
+ message(STATUS "Using system KDSingleApplication")
+else()
+ message(STATUS "Using bundled KDSingleApplication")
+endif()
+
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
include(KDEInstallDirs)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ef334a52..da9dd493 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,8 +16,6 @@ target_sources(haruna
application.h application.cpp
framedecoder.h framedecoder.cpp
global.h global.cpp
- KDSingleApplication/kdsingleapplication_localsocket_p.h KDSingleApplication/kdsingleapplication_localsocket.cpp
- KDSingleApplication/kdsingleapplication.h KDSingleApplication/kdsingleapplication.cpp
main.cpp
models/actionsmodel.h models/actionsmodel.cpp
models/chaptersmodel.h models/chaptersmodel.cpp
@@ -34,6 +32,14 @@ target_sources(haruna
${ICONS_SRCS}
)
+if (NOT KDSingleApplication-qt6_FOUND)
+ target_sources(haruna
+ PRIVATE
+ KDSingleApplication/kdsingleapplication_localsocket_p.h KDSingleApplication/kdsingleapplication_localsocket.cpp
+ KDSingleApplication/kdsingleapplication.h KDSingleApplication/kdsingleapplication.cpp
+ )
+endif()
+
if (CMAKE_SYSTEM_NAME IN_LIST DBUS_PLATFORMS)
qt_add_dbus_interface(haruna_screensaver_inhibit_SRCS ../org.freedesktop.ScreenSaver.xml screensaverdbusinterface)
target_sources(haruna
@@ -126,12 +132,18 @@ qt_add_qml_module(haruna
target_include_directories(haruna
PRIVATE
- KDSingleApplication
models
mpv
${FFMPEG_INCLUDE_DIRS}
)
+if (NOT KDSingleApplication-qt6_FOUND)
+ target_include_directories(haruna
+ PRIVATE
+ KDSingleApplication
+ )
+endif()
+
target_compile_definitions(haruna PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(haruna PRIVATE
@@ -161,6 +173,11 @@ target_link_libraries(haruna PRIVATE
${AVCODEC_LIBRARIES}
${SWSCALE_LIBRARIES}
)
+if(KDSingleApplication-qt6_FOUND)
+ target_link_libraries(haruna PRIVATE
+ KDAB::kdsingleapplication
+ )
+endif()
if (CMAKE_SYSTEM_NAME IN_LIST DBUS_PLATFORMS)
target_link_libraries(haruna PRIVATE
--
2.48.1
+52
View File
@@ -0,0 +1,52 @@
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ECM_HANDBOOK="forceoptional"
KFMIN=6.9.0
QTMIN=6.8.1
inherit ecm kde.org xdg
if [[ ${KDE_BUILD_TYPE} == release ]]; then
SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
KEYWORDS="~amd64"
fi
DESCRIPTION="Simple video player"
HOMEPAGE="https://apps.kde.org/dragonplayer/"
LICENSE="GPL-2+ GPL-3+"
SLOT="0"
IUSE=""
DEPEND="
dev-libs/kdsingleapplication
>=dev-qt/qt5compat-${QTMIN}:6[qml]
>=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network,widgets]
>=dev-qt/qtdeclarative-${QTMIN}:6
>=kde-frameworks/kcolorscheme-${KFMIN}:6
>=kde-frameworks/kconfig-${KFMIN}:6
>=kde-frameworks/kcoreaddons-${KFMIN}:6
>=kde-frameworks/kcrash-${KFMIN}:6
>=kde-frameworks/kdbusaddons-${KFMIN}:6
>=kde-frameworks/kfilemetadata-${KFMIN}:6
>=kde-frameworks/ki18n-${KFMIN}:6
>=kde-frameworks/kiconthemes-${KFMIN}:6
>=kde-frameworks/kio-${KFMIN}:6
>=kde-frameworks/kirigami-${KFMIN}:6
>=kde-frameworks/kjobwidgets-${KFMIN}:6
>=kde-frameworks/kparts-${KFMIN}:6
>=kde-frameworks/kservice-${KFMIN}:6
>=kde-frameworks/kwindowsystem-${KFMIN}:6
>=kde-frameworks/kxmlgui-${KFMIN}:6
>=kde-frameworks/solid-${KFMIN}:6
media-libs/mpvqt:6
media-video/ffmpeg:=
"
RDEPEND="${DEPEND}
net-misc/yt-dlp
"
# Upstream MR: https://invent.kde.org/multimedia/haruna/-/merge_requests/56
PATCHES=( "${FILESDIR}/${P}-system-kdsingleapplication.patch" )
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>kde@gentoo.org</email>
<name>Gentoo KDE Project</name>
</maintainer>
<upstream>
<bugs-to>https://bugs.kde.org/enter_bug.cgi?product=Haruna</bugs-to>
<remote-id type="kde-invent">multimedia/haruna</remote-id>
</upstream>
</pkgmetadata>