* [gentoo-commits] repo/gentoo:master commit in: media-video/gaupol/files/, media-video/gaupol/
@ 2021-10-02 21:46 Louis Sautier
0 siblings, 0 replies; 2+ messages in thread
From: Louis Sautier @ 2021-10-02 21:46 UTC (permalink / raw
To: gentoo-commits
commit: 8acf3d7b2b3a407a837b3f573c1bb0c5a164949e
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 2 21:42:04 2021 +0000
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Sat Oct 2 21:44:41 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8acf3d7b
media-video/gaupol: drop 1.8-r2
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
media-video/gaupol/Manifest | 1 -
.../files/gaupol-1.8-fix-audio-tracks-order.patch | 174 ---------------------
media-video/gaupol/gaupol-1.8-r2.ebuild | 68 --------
3 files changed, 243 deletions(-)
diff --git a/media-video/gaupol/Manifest b/media-video/gaupol/Manifest
index f47bd5ba76f..aa31e6a0215 100644
--- a/media-video/gaupol/Manifest
+++ b/media-video/gaupol/Manifest
@@ -1,3 +1,2 @@
DIST gaupol-1.10.tar.gz 580538 BLAKE2B 834e4ae6681588a9bc70cc56a7977449fc2409f47299990a6ec63c63bd6e617dc7b5d366ce9b55a2681fb7c1656a7b5c1f2949d9337e420cbd89d122bf7cfd2a SHA512 56440730a636d602b3bc96aac1430252536d01127dd155d970d4f0ee647cb3a530931a1f512c87e575eabdbc0608072e909638d5ade80414bbe419a393ff06e3
-DIST gaupol-1.8.tar.gz 558627 BLAKE2B a7243310b97fe7187311585762faaff512364ca043630eb43c1ee99c55fa5400e14698e391b410b67f70f1bc7a741adb0737868d7b40c868bb4c6badacd14fb1 SHA512 a6b65316b5750a4d636b39b75393b0b2f2c44d978f1fc8cc3bd2cd2d2bcf9ba68d0161afb41bdca5b381ec39e5a2e06440f4f4676f344019966b297c4112e691
DIST gaupol-1.9.tar.gz 579382 BLAKE2B c326e800ebd56bab53757d13e075c7499d9b37c6677a3f2ef710e71ab427bc9d502d1539778e87625e43a6218a358b15dfc3c84fd22b42e95d808fc8495feb43 SHA512 c115409afe68a0981f7c29e5d6d3e23950081f186b74de460045de9976a6c7a674701d316214ee2b91bc59f1dd856fdc9cf999e328aba8abeb8eaf71911c68d2
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 3f554c4ef33..00000000000
--- 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.8-r2.ebuild
deleted file mode 100644
index 034cd5a9dd3..00000000000
--- a/media-video/gaupol/gaupol-1.8-r2.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-DISTUTILS_USE_SETUPTOOLS=no
-
-inherit distutils-r1 virtualx xdg-utils
-
-DESCRIPTION="A subtitle editor for text-based subtitles"
-HOMEPAGE="https://otsaloma.io/gaupol/"
-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 )"
-
-RDEPEND="
- app-text/iso-codes
- dev-python/chardet[${PYTHON_USEDEP}]
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- x11-libs/gtk+:3[introspection]
- spell? ( app-text/gspell[introspection] )
-"
-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 )
-
-PATCHES=( "${FILESDIR}/${P}-fix-audio-tracks-order.patch" )
-
-python_test() {
- virtx pytest -vv
-}
-
-pkg_postinst() {
- xdg_desktop_database_update
- xdg_icon_cache_update
- if [[ -z ${REPLACING_VERSIONS} ]]; then
- elog "The integrated video player requires media-plugins/gst-plugins-gtk."
- elog ""
- elog "External video previewing support requires MPV, MPlayer or VLC."
- if use spell; then
- elog ""
- elog "Spell-checking requires a dictionary, any of app-dicts/myspell-*"
- elog "or app-text/aspell with the appropriate L10N variable."
- elog ""
- elog "Additionally, make sure that app-text/enchant has the correct flags enabled:"
- elog "USE=hunspell for myspell dictionaries and USE=aspell for aspell dictionaries."
- fi
- fi
-}
-
-pkg_postrm() {
- xdg_desktop_database_update
- xdg_icon_cache_update
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/gaupol/files/, media-video/gaupol/
@ 2023-02-22 22:17 Louis Sautier
0 siblings, 0 replies; 2+ messages in thread
From: Louis Sautier @ 2023-02-22 22:17 UTC (permalink / raw
To: gentoo-commits
commit: 1209f9f0bd96f5bf326f7ccd780da84053fb1b97
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 22 12:54:56 2023 +0000
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Wed Feb 22 22:15:29 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1209f9f0
media-video/gaupol: add 1.12, switch to PEP517
In order to use PEP517, we need to prevent setup.py from using
setuptools-related variables to define the location of data files.
Closes: https://bugs.gentoo.org/839267
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
media-video/gaupol/Manifest | 1 +
.../gaupol/files/gaupol-1.12-fix-prefix.patch | 30 ++++++++++
media-video/gaupol/gaupol-1.12.ebuild | 69 ++++++++++++++++++++++
3 files changed, 100 insertions(+)
diff --git a/media-video/gaupol/Manifest b/media-video/gaupol/Manifest
index 9ac89580c751..204e968018aa 100644
--- a/media-video/gaupol/Manifest
+++ b/media-video/gaupol/Manifest
@@ -1 +1,2 @@
DIST gaupol-1.11.tar.gz 581799 BLAKE2B d0f4ad7c71086f585138bde79ba49f43e8e71eba7bc5ef5f0ac324ab962049cd1c71030f5a7d6ec859d4ac32dc7a07c8255ab01d98114629055f777f11210a2e SHA512 8c623f6ed8d189a79a994545be3dd96ae7fec399216520bfe89587a9c0b5917e07b6d80fe1f8a7b2d016b9fb1aa544bdabe103428dc97ea78e6d8c05666d0e9c
+DIST gaupol-1.12.tar.gz 575537 BLAKE2B acedc1b73b6bea35d2853aa26117a7823767aeff3f9cd59ed828aa173c0ab4a46ef1433d169cd551b9d453289412aec31ede32e388dfc22d14e60e18b4c5ec0a SHA512 7e8002ceeff0a6c1144a6c23743aff006101a63aee394c4a4eb2742ad37635fe45425964d60ab2d6f10f9e212c72db673f5f1d849f738efcd7d9389054a1de36
diff --git a/media-video/gaupol/files/gaupol-1.12-fix-prefix.patch b/media-video/gaupol/files/gaupol-1.12-fix-prefix.patch
new file mode 100644
index 000000000000..9aa0dd582c04
--- /dev/null
+++ b/media-video/gaupol/files/gaupol-1.12-fix-prefix.patch
@@ -0,0 +1,30 @@
+From b638bf5352194ba08b1139375e27523ce43834b0 Mon Sep 17 00:00:00 2001
+From: Louis Sautier <sautier.louis@gmail.com>
+Date: Wed, 22 Feb 2023 13:49:26 +0100
+Subject: [PATCH] Rely on sys.prefix instead of setuptools-computed prefix
+
+When using PEP517 mode, we ended up with
+DATA_DIR = '/gaupol-1.12.data/data/share/gaupol'
+LOCALE_DIR = '/gaupol-1.11.data/data/share/locale'
+
+By relying on sys.prefix instead, we work around the issue.
+Bug: https://bugs.gentoo.org/839267
+--- a/setup.py
++++ b/setup.py
+@@ -335,11 +335,11 @@ class InstallLib(install_lib):
+ path = os.path.join(self.build_dir, "aeidon", "paths.py")
+ text = open(path, "r", encoding="utf_8").read()
+ patt = r"^DATA_DIR = .*$"
+- repl = "DATA_DIR = {!r}".format(data_dir)
++ repl = 'DATA_DIR = os.path.join(sys.prefix, "share", "gaupol")'
+ text = re.sub(patt, repl, text, flags=re.MULTILINE)
+ assert text.count(repl) == 1
+ patt = r"^LOCALE_DIR = .*$"
+- repl = "LOCALE_DIR = {!r}".format(locale_dir)
++ repl = 'LOCALE_DIR = os.path.join(sys.prefix, "share", "locale")'
+ text = re.sub(patt, repl, text, flags=re.MULTILINE)
+ assert text.count(repl) == 1
+ open(path, "w", encoding="utf_8").write(text)
+--
+2.39.2
+
diff --git a/media-video/gaupol/gaupol-1.12.ebuild b/media-video/gaupol/gaupol-1.12.ebuild
new file mode 100644
index 000000000000..17ce40934060
--- /dev/null
+++ b/media-video/gaupol/gaupol-1.12.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit distutils-r1 virtualx xdg-utils
+
+DESCRIPTION="A subtitle editor for text-based subtitles"
+HOMEPAGE="https://otsaloma.io/gaupol/ https://github.com/otsaloma/gaupol/"
+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"
+
+RDEPEND="
+ app-text/iso-codes
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ x11-libs/gtk+:3[introspection]
+ spell? ( app-text/gspell[introspection] )
+"
+BDEPEND="
+ sys-devel/gettext
+ test? (
+ app-dicts/myspell-en
+ app-text/enchant[hunspell]
+ app-text/gspell[introspection]
+ )
+"
+
+distutils_enable_tests pytest
+
+DOCS=( AUTHORS.md NEWS.md README.md README.aeidon.md )
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-prefix.patch"
+)
+
+python_test() {
+ virtx epytest
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The integrated video player requires media-plugins/gst-plugins-gtk."
+ elog ""
+ elog "External video previewing support requires MPV, MPlayer or VLC."
+ if use spell; then
+ elog ""
+ elog "Spell-checking requires a dictionary, any of app-dicts/myspell-*"
+ elog "or app-text/aspell with the appropriate L10N variable."
+ elog ""
+ elog "Additionally, make sure that app-text/enchant has the correct flags enabled:"
+ elog "USE=hunspell for myspell dictionaries and USE=aspell for aspell dictionaries."
+ fi
+ fi
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-22 22:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-02 21:46 [gentoo-commits] repo/gentoo:master commit in: media-video/gaupol/files/, media-video/gaupol/ Louis Sautier
-- strict thread matches above, loose matches on Subject: below --
2023-02-22 22:17 Louis Sautier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox