From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/baka-mplayer/, media-video/baka-mplayer/files/
Date: Mon, 7 Nov 2022 19:30:23 +0000 (UTC) [thread overview]
Message-ID: <1667849278.bdcb223fad2a600ea42f49186a0c6377e8725173.ionen@gentoo> (raw)
commit: bdcb223fad2a600ea42f49186a0c6377e8725173
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 6 16:18:46 2022 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> 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 <ionen <AT> 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 <qydwhotmail@gmail.com>
+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"));
next reply other threads:[~2022-11-07 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 19:30 Ionen Wolkens [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-01-21 19:11 [gentoo-commits] repo/gentoo:master commit in: media-video/baka-mplayer/, media-video/baka-mplayer/files/ Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1667849278.bdcb223fad2a600ea42f49186a0c6377e8725173.ionen@gentoo \
--to=ionen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox