summaryrefslogtreecommitdiff
path: root/media-video/gaupol
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
commite23a08d0c97a0cc415aaa165da840b056f93c997 (patch)
tree4c5f7db60483518201fef36f8cc0712789a08db2 /media-video/gaupol
parent391b5b359a346aff490103da7dddc85047f83830 (diff)
gentoo resync : 08.10.2021
Diffstat (limited to 'media-video/gaupol')
-rw-r--r--media-video/gaupol/Manifest5
-rw-r--r--media-video/gaupol/files/gaupol-1.8-fix-audio-tracks-order.patch174
-rw-r--r--media-video/gaupol/gaupol-1.10.1.ebuild (renamed from media-video/gaupol/gaupol-1.8-r2.ebuild)17
3 files changed, 9 insertions, 187 deletions
diff --git a/media-video/gaupol/Manifest b/media-video/gaupol/Manifest
index bc30fd775f23..1a302d8f08aa 100644
--- a/media-video/gaupol/Manifest
+++ b/media-video/gaupol/Manifest
@@ -1,6 +1,5 @@
-AUX gaupol-1.8-fix-audio-tracks-order.patch 6462 BLAKE2B 96e09112adf27ece07b65eee4b69d7dd1813c3b882afe790b8e35237e8e3c996809a0e71c00ce64f3c7cd0efbaf325933473f52439db31ba60869035c5a59feb SHA512 f7c001f698650c8c757818d44624201888aefe0d65689ee0fd357d85d45bd712a9f09b57e833a503c5b639ec430a6df2eebf02a40bed03a091abcd0da0bfae69
-DIST gaupol-1.8.tar.gz 558627 BLAKE2B a7243310b97fe7187311585762faaff512364ca043630eb43c1ee99c55fa5400e14698e391b410b67f70f1bc7a741adb0737868d7b40c868bb4c6badacd14fb1 SHA512 a6b65316b5750a4d636b39b75393b0b2f2c44d978f1fc8cc3bd2cd2d2bcf9ba68d0161afb41bdca5b381ec39e5a2e06440f4f4676f344019966b297c4112e691
+DIST gaupol-1.10.1.tar.gz 580890 BLAKE2B eb3f5bc3f9ec371d4169a9517f83bd42371aa41532f99f650b51e4649f813f0a37c0de5a01f69ee0c73f38cf2b57dd3260b5cac88f4c09785e86da2ec82c0cba SHA512 f294ea10c73dcf9941f70988ae58066917d7b321141e3a3ba3e12810e5f20a4711feca45d354dddc0e104a1ee2496fad24e529b129bdeee1cdb92010ec20be1d
DIST gaupol-1.9.tar.gz 579382 BLAKE2B c326e800ebd56bab53757d13e075c7499d9b37c6677a3f2ef710e71ab427bc9d502d1539778e87625e43a6218a358b15dfc3c84fd22b42e95d808fc8495feb43 SHA512 c115409afe68a0981f7c29e5d6d3e23950081f186b74de460045de9976a6c7a674701d316214ee2b91bc59f1dd856fdc9cf999e328aba8abeb8eaf71911c68d2
-EBUILD gaupol-1.8-r2.ebuild 1731 BLAKE2B b5af853dde513fb149ec2d2e9389caa2cc53c645ac676d832d5200ae6c5b278175de30eeda28639c6602cf27a3e83bf692aac68d21d00e0825ca6c65870b2444 SHA512 442d211c393b5f2613616f15e73a58e253045431190cd9abe6f7f7fc2b6c3b018f29f9516f97bedb05d243b04119661cb15cfd970e6e9ede728ae33486705641
+EBUILD gaupol-1.10.1.ebuild 1613 BLAKE2B 77960f555aac48bfb01f1451a2c5e5b9e902ed75fb4ebd72c82494acab536cb196a8a9d687578780b0b50cca9e6c0d553fd7cb57570eabc0cf2ec8a562637e43 SHA512 0f5c5239924f2c97be2d575111002379c1c0bba66dad3bee9947f345e4ab3506e36482e2d60da9bff8ce5a45cb4ca948b57fbeae98d7a77f7b539db9be953290
EBUILD gaupol-1.9.ebuild 1618 BLAKE2B e039e80ce001fc413fd6b264d7b776db08944295ef166648b40b50e56de3e8c7bbf8ced7d74e93e22efba13a9346e20c555236db686749c73a828d9d19248cbb SHA512 2f5f6b9c00bfac63deb93f693ca5f17c2b0d974675c4568c67b8c56fa2cddabf60a085d87cadecc514ab54ae8bef41064c5743b63a135895eedb8c6b1c58bb89
MISC metadata.xml 533 BLAKE2B eb6d56dbe104832c594f306fc020b591b04e4f21d7533740ab613ecf105cdfdc4bc9232fe18bbfc4276cc08063a7a570a1c98025e9c74561b4abda0119e3801e SHA512 49859f8f6b75f20c6cf94f60764c1e688ddf907a7657815574b666fcc7873de0a3105cda9acd9f4bbdb7f658bd0003c67ec1ced72e3d84e15b5d86b64ca91abe
diff --git a/media-video/gaupol/files/gaupol-1.8-fix-audio-tracks-order.patch b/media-video/gaupol/files/gaupol-1.8-fix-audio-tracks-order.patch
deleted file mode 100644
index 3f554c4ef335..000000000000
--- a/media-video/gaupol/files/gaupol-1.8-fix-audio-tracks-order.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From e26cfcfe002c87a39eac63bbaa5ad0d4d69c95a4 Mon Sep 17 00:00:00 2001
-From: Quentin Gliosca <quentin.gliosca@gmail.com>
-Date: Tue, 12 May 2020 16:48:31 +0200
-Subject: [PATCH 1/3] Fix the order of languages in audio track selection
-
-Fix #129
----
- gaupol/player.py | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/gaupol/player.py b/gaupol/player.py
-index 836abea2..c266e0b9 100644
---- a/gaupol/player.py
-+++ b/gaupol/player.py
-@@ -118,7 +118,8 @@ def _ensure_default_segment(self):
-
- def get_audio_languages(self):
- """Return a sequence of audio languages or ``None``."""
-- return tuple(x.get_language() for x in self._info.get_audio_streams())
-+ return tuple(self._playbin.emit("get-audio-tags", i).get_string("language-code")[1]
-+ for i in range(self._playbin.props.n_audio))
-
- def get_duration(self, mode=None):
- """Return duration of video stream or ``None``."""
-@@ -356,6 +357,10 @@ def set_uri(self, uri):
- dialog.add_button(_("_OK"), Gtk.ResponseType.OK)
- dialog.set_default_response(Gtk.ResponseType.OK)
- gaupol.util.flash_dialog(dialog)
-+ else:
-+ # Make stream tags available from _playbin
-+ self._playbin.set_state(Gst.State.PAUSED)
-+ self._playbin.get_state(Gst.CLOCK_TIME_NONE)
-
- def stop(self):
- """Stop."""
-
-From 9ace4fefe5d246c5588538a715a185c796e218ef Mon Sep 17 00:00:00 2001
-From: Quentin Gliosca <quentin.gliosca@gmail.com>
-Date: Tue, 12 May 2020 17:27:35 +0200
-Subject: [PATCH 2/3] Improve names of audio tracks in menu
-
----
- gaupol/agents/video.py | 18 ++++++++++++++----
- gaupol/player.py | 20 ++++++++++++++++----
- 2 files changed, 30 insertions(+), 8 deletions(-)
-
-diff --git a/gaupol/agents/video.py b/gaupol/agents/video.py
-index d434255a..0f6b935c 100644
---- a/gaupol/agents/video.py
-+++ b/gaupol/agents/video.py
-@@ -27,7 +27,11 @@
- from gi.repository import Gtk
-
- with aeidon.util.silent(Exception):
-+ from gi import require_version
-+ require_version('GstTag', '1.0')
- from gi.repository import Gst
-+ from gi.repository import GstTag
-+
-
-
- class VideoAgent(aeidon.Delegate):
-@@ -348,11 +352,17 @@ def _update_languages_menu(self):
- """Update the audio language selection menu."""
- menu = self.get_menubar_section("audio-languages-placeholder")
- menu.remove_all()
-- languages = self.player.get_audio_languages()
-- for i, language in enumerate(languages):
-- language = language or _("Undefined")
-+ tracks = self.player.get_audio_infos()
-+ for i, track in enumerate(tracks):
-+ title = track.title or "{} {}".format(_("Track"), i + 1)
-+ lang = None
-+ if track.language_code is not None:
-+ lang = GstTag.tag_get_language_name(track.language_code)
-+ if lang is None:
-+ lang = track.language_name
-+ name = title if lang is None else "{} - [{}]".format(title, lang.title())
- action = "win.set-audio-language::{:d}".format(i)
-- menu.append(language, action)
-+ menu.append(name, action)
- if i == self.player.audio_track:
- action = self.get_action("set-audio-language")
- action.set_state(str(i))
-diff --git a/gaupol/player.py b/gaupol/player.py
-index c266e0b9..ee1e96dc 100644
---- a/gaupol/player.py
-+++ b/gaupol/player.py
-@@ -21,6 +21,7 @@
- import gaupol
- import time
-
-+from collections import namedtuple
- from aeidon.i18n import _
- from gi.repository import GLib
- from gi.repository import Gtk
-@@ -56,6 +57,8 @@ class VideoPlayer(aeidon.Observable):
-
- signals = ("state-changed",)
-
-+ TrackInfo = namedtuple("TrackInfo", ["title", "language_code", "language_name"])
-+
- def __init__(self):
- """Initialize a :class:`VideoPlayer` instance."""
- aeidon.Observable.__init__(self)
-@@ -116,10 +119,19 @@ def _ensure_default_segment(self):
- self._playbin.seek_simple(Gst.Format.TIME, seek_flags, pos)
- self._in_default_segment = True
-
-- def get_audio_languages(self):
-- """Return a sequence of audio languages or ``None``."""
-- return tuple(self._playbin.emit("get-audio-tags", i).get_string("language-code")[1]
-- for i in range(self._playbin.props.n_audio))
-+ def get_audio_infos(self):
-+ """Return a sequence of audio track infos."""
-+ return tuple(
-+ self._make_track_infos(self._playbin.emit("get-audio-tags", i))
-+ for i in range(self._playbin.props.n_audio)
-+ )
-+
-+ def _make_track_infos(self, tags):
-+ return self.TrackInfo(
-+ tags.get_string("title")[1],
-+ tags.get_string("language-code")[1],
-+ tags.get_string("language-name")[1]
-+ )
-
- def get_duration(self, mode=None):
- """Return duration of video stream or ``None``."""
-
-From f50b4e54dc9aa84fc1b3eb403d680b8a0be77dc3 Mon Sep 17 00:00:00 2001
-From: Quentin Gliosca <quentin.gliosca@gmail.com>
-Date: Wed, 13 May 2020 07:29:27 +0200
-Subject: [PATCH 3/3] Cosmetic changes
-
----
- gaupol/__init__.py | 1 +
- gaupol/agents/video.py | 4 +---
- 2 files changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/gaupol/__init__.py b/gaupol/__init__.py
-index f7a9663d..fc02287b 100644
---- a/gaupol/__init__.py
-+++ b/gaupol/__init__.py
-@@ -44,6 +44,7 @@
- "Gst": "1.0",
- "GstPbutils": "1.0",
- "GstVideo": "1.0",
-+ "GstTag": "1.0",
- }.items():
- with aeidon.util.silent(Exception):
- gi.require_version(module, version)
-diff --git a/gaupol/agents/video.py b/gaupol/agents/video.py
-index 0f6b935c..3c9e3113 100644
---- a/gaupol/agents/video.py
-+++ b/gaupol/agents/video.py
-@@ -27,8 +27,6 @@
- from gi.repository import Gtk
-
- with aeidon.util.silent(Exception):
-- from gi import require_version
-- require_version('GstTag', '1.0')
- from gi.repository import Gst
- from gi.repository import GstTag
-
-@@ -354,7 +352,7 @@ def _update_languages_menu(self):
- menu.remove_all()
- tracks = self.player.get_audio_infos()
- for i, track in enumerate(tracks):
-- title = track.title or "{} {}".format(_("Track"), i + 1)
-+ title = track.title or _("Track {:d}").format(i + 1)
- lang = None
- if track.language_code is not None:
- lang = GstTag.tag_get_language_name(track.language_code)
diff --git a/media-video/gaupol/gaupol-1.8-r2.ebuild b/media-video/gaupol/gaupol-1.10.1.ebuild
index 034cd5a9dd3d..cc4e0d9d820e 100644
--- a/media-video/gaupol/gaupol-1.8-r2.ebuild
+++ b/media-video/gaupol/gaupol-1.10.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_USE_SETUPTOOLS=no
inherit distutils-r1 virtualx xdg-utils
@@ -14,9 +14,8 @@ SRC_URI="https://github.com/otsaloma/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
-KEYWORDS="amd64 arm64 x86"
-IUSE="spell test"
-RESTRICT="!test? ( test )"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="spell"
RDEPEND="
app-text/iso-codes
@@ -28,17 +27,15 @@ RDEPEND="
BDEPEND="
sys-devel/gettext
test? (
- ${RDEPEND}
app-dicts/myspell-en
app-text/enchant[hunspell]
app-text/gspell[introspection]
- dev-python/pytest[${PYTHON_USEDEP}]
)
"
-DOCS=( AUTHORS.md NEWS.md TODO.md README.md README.aeidon.md )
+distutils_enable_tests pytest
-PATCHES=( "${FILESDIR}/${P}-fix-audio-tracks-order.patch" )
+DOCS=( AUTHORS.md NEWS.md README.md README.aeidon.md )
python_test() {
virtx pytest -vv