From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A6213158020 for ; Mon, 7 Nov 2022 19:30:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0F12CE08CA; Mon, 7 Nov 2022 19:30:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E75DAE08CA for ; Mon, 7 Nov 2022 19:30:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 065E334109C for ; Mon, 7 Nov 2022 19:30:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0B561721 for ; Mon, 7 Nov 2022 19:30:23 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1667849278.bdcb223fad2a600ea42f49186a0c6377e8725173.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/baka-mplayer/, media-video/baka-mplayer/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/baka-mplayer/baka-mplayer-2.0.4-r2.ebuild media-video/baka-mplayer/baka-mplayer-9999.ebuild media-video/baka-mplayer/files/baka-mplayer-2.0.4-libmpv-api2.patch X-VCS-Directories: media-video/baka-mplayer/ media-video/baka-mplayer/files/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: bdcb223fad2a600ea42f49186a0c6377e8725173 X-VCS-Branch: master Date: Mon, 7 Nov 2022 19:30:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b7df5311-052a-4688-a129-0b0e3d40d057 X-Archives-Hash: 23fcb641ef75c2f82906372fa3aa5c98 commit: bdcb223fad2a600ea42f49186a0c6377e8725173 Author: Ionen Wolkens gentoo org> AuthorDate: Sun Nov 6 16:18:46 2022 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Mon Nov 7 19:27:58 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdcb223f media-video/baka-mplayer: use mpv subslot, backport api 2.0 fix libmpv.so.1 -> libmpv.so.2 Signed-off-by: Ionen Wolkens gentoo.org> ...er-9999.ebuild => baka-mplayer-2.0.4-r2.ebuild} | 23 +++++-- media-video/baka-mplayer/baka-mplayer-9999.ebuild | 2 +- .../files/baka-mplayer-2.0.4-libmpv-api2.patch | 78 ++++++++++++++++++++++ 3 files changed, 95 insertions(+), 8 deletions(-) diff --git a/media-video/baka-mplayer/baka-mplayer-9999.ebuild b/media-video/baka-mplayer/baka-mplayer-2.0.4-r2.ebuild similarity index 63% copy from media-video/baka-mplayer/baka-mplayer-9999.ebuild copy to media-video/baka-mplayer/baka-mplayer-2.0.4-r2.ebuild index 243a21f1b8af..824dc5776b15 100644 --- a/media-video/baka-mplayer/baka-mplayer-9999.ebuild +++ b/media-video/baka-mplayer/baka-mplayer-2.0.4-r2.ebuild @@ -1,17 +1,17 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit qmake-utils git-r3 xdg-utils +inherit qmake-utils xdg-utils DESCRIPTION="Cross-platform libmpv-based multimedia player with uncluttered design" HOMEPAGE="http://bakamplayer.u8sand.net/" -EGIT_REPO_URI="https://github.com/u8sand/Baka-MPlayer.git" +SRC_URI="https://github.com/u8sand/Baka-MPlayer/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" IUSE="" BDEPEND=" @@ -25,17 +25,26 @@ RDEPEND=" dev-qt/qtsvg:5 dev-qt/qtwidgets:5 dev-qt/qtx11extras:5 - media-video/mpv[libmpv] + media-video/mpv:=[libmpv] x11-libs/libX11 " DEPEND="${RDEPEND}" -S="${WORKDIR}/baka-mplayer-${PV}" +S="${WORKDIR}/Baka-MPlayer-${PV}" + +PATCHES=( + "${FILESDIR}/${P}-gcc5.patch" + "${FILESDIR}/${P}-mpv23.patch" + "${FILESDIR}/${P}-playlist-regression.patch" + "${FILESDIR}/${P}-libmpv-api2.patch" +) src_prepare() { default # don't install license, man.gz, install the latter manually - sed -e "/^INSTALLS/s/\sman\slicense//" -i src/Baka-MPlayer.pro || die + sed -e "/^INSTALLS/s:\sman\slicense::" \ + -e '/^manual.path/s:'${PN}':'${PF}':' \ + -i src/Baka-MPlayer.pro || die gunzip DOCS/baka-mplayer.1.gz || die } diff --git a/media-video/baka-mplayer/baka-mplayer-9999.ebuild b/media-video/baka-mplayer/baka-mplayer-9999.ebuild index 243a21f1b8af..8b7d359ed552 100644 --- a/media-video/baka-mplayer/baka-mplayer-9999.ebuild +++ b/media-video/baka-mplayer/baka-mplayer-9999.ebuild @@ -25,7 +25,7 @@ RDEPEND=" dev-qt/qtsvg:5 dev-qt/qtwidgets:5 dev-qt/qtx11extras:5 - media-video/mpv[libmpv] + media-video/mpv:=[libmpv] x11-libs/libX11 " DEPEND="${RDEPEND}" diff --git a/media-video/baka-mplayer/files/baka-mplayer-2.0.4-libmpv-api2.patch b/media-video/baka-mplayer/files/baka-mplayer-2.0.4-libmpv-api2.patch new file mode 100644 index 000000000000..9ae547b9291f --- /dev/null +++ b/media-video/baka-mplayer/files/baka-mplayer-2.0.4-libmpv-api2.patch @@ -0,0 +1,78 @@ +https://github.com/u8sand/Baka-MPlayer/commit/7864f248c3f +From: Fushan Wen +Date: Mon, 21 Feb 2022 18:50:46 +0800 +Subject: [PATCH] Port away from deprecated/removed APIs in mpv 2.0 + +Register observers as MPV_EVENT_IDLE is deprecated and +MPV_EVENT_PAUSE/MPV_EVENT_UNPAUSE have been removed. +--- a/src/mpvhandler.cpp ++++ b/src/mpvhandler.cpp +@@ -41,6 +41,8 @@ MpvHandler::MpvHandler(int64_t wid, QObject *parent): + mpv_observe_property(mpv, 0, "sub-visibility", MPV_FORMAT_FLAG); + mpv_observe_property(mpv, 0, "mute", MPV_FORMAT_FLAG); + mpv_observe_property(mpv, 0, "core-idle", MPV_FORMAT_FLAG); ++ mpv_observe_property(mpv, 0, "idle-active", MPV_FORMAT_FLAG); ++ mpv_observe_property(mpv, 0, "pause", MPV_FORMAT_FLAG); + mpv_observe_property(mpv, 0, "paused-for-cache", MPV_FORMAT_FLAG); + + // setup callback event handling +@@ -191,6 +193,31 @@ bool MpvHandler::event(QEvent *event) + ShowText(QString(), 0); + } + } ++ else if(QString(prop->name) == "idle-active") ++ { ++ if(prop->format == MPV_FORMAT_FLAG) ++ { ++ if((bool)*(unsigned*)prop->data) ++ { ++ fileInfo.length = 0; ++ setTime(0); ++ setPlayState(Mpv::Idle); ++ } ++ } ++ } ++ else if(QString(prop->name) == "pause") ++ { ++ if(prop->format == MPV_FORMAT_FLAG) ++ { ++ if((bool)*(unsigned*)prop->data) ++ { ++ setPlayState(Mpv::Paused); ++ ShowText(QString(), 0); ++ } ++ else ++ setPlayState(Mpv::Playing); ++ } ++ } + else if(QString(prop->name) == "paused-for-cache") + { + if(prop->format == MPV_FORMAT_FLAG) +@@ -203,12 +230,7 @@ bool MpvHandler::event(QEvent *event) + } + break; + } +- case MPV_EVENT_IDLE: +- fileInfo.length = 0; +- setTime(0); +- setPlayState(Mpv::Idle); +- break; +- // these two look like they're reversed but they aren't. the names are misleading. ++ // these two look like they're reversed but they aren't. the names are misleading. + case MPV_EVENT_START_FILE: + setPlayState(Mpv::Loaded); + break; +@@ -216,13 +238,6 @@ bool MpvHandler::event(QEvent *event) + setPlayState(Mpv::Started); + LoadFileInfo(); + SetProperties(); +- case MPV_EVENT_UNPAUSE: +- setPlayState(Mpv::Playing); +- break; +- case MPV_EVENT_PAUSE: +- setPlayState(Mpv::Paused); +- ShowText(QString(), 0); +- break; + case MPV_EVENT_END_FILE: + if(playState == Mpv::Loaded) + ShowText(tr("File couldn't be opened"));