summaryrefslogtreecommitdiff
path: root/media-video/gaupol
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-23 09:44:00 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-23 09:44:00 +0000
commit8d15cb8238a384acdb70250a0cd213f2ab5f0ab6 (patch)
tree547dd4d959be6b14e702d37e94063dc2104319a5 /media-video/gaupol
parent71fb24e4cc15fe73651423df81c5e6a79fa8c142 (diff)
gentoo auto-resync : 23:02:2023 - 09:44:00
Diffstat (limited to 'media-video/gaupol')
-rw-r--r--media-video/gaupol/Manifest3
-rw-r--r--media-video/gaupol/files/gaupol-1.12-fix-prefix.patch30
-rw-r--r--media-video/gaupol/gaupol-1.12.ebuild69
3 files changed, 102 insertions, 0 deletions
diff --git a/media-video/gaupol/Manifest b/media-video/gaupol/Manifest
index f7c7749c37b8..2d071e562a44 100644
--- a/media-video/gaupol/Manifest
+++ b/media-video/gaupol/Manifest
@@ -1,3 +1,6 @@
+AUX gaupol-1.12-fix-prefix.patch 1266 BLAKE2B 0d2c5ae5cb76099f9e91e78e3a7d3c1b1bec73c223a4c5dfcb407a6efd60f42b4d9174faba318005400f2df346929baee5224ebc2d0b6b8f23a868a6f5451b0c SHA512 1d56b2793821a19d3dddb95c7c3a52e2f1e6af54886f77862cde1b3e7585b60990b1a8a61b4056b4676bce4ce722dc77ce0bd1116668118c8f4168884260da6e
DIST gaupol-1.11.tar.gz 581799 BLAKE2B d0f4ad7c71086f585138bde79ba49f43e8e71eba7bc5ef5f0ac324ab962049cd1c71030f5a7d6ec859d4ac32dc7a07c8255ab01d98114629055f777f11210a2e SHA512 8c623f6ed8d189a79a994545be3dd96ae7fec399216520bfe89587a9c0b5917e07b6d80fe1f8a7b2d016b9fb1aa544bdabe103428dc97ea78e6d8c05666d0e9c
+DIST gaupol-1.12.tar.gz 575537 BLAKE2B acedc1b73b6bea35d2853aa26117a7823767aeff3f9cd59ed828aa173c0ab4a46ef1433d169cd551b9d453289412aec31ede32e388dfc22d14e60e18b4c5ec0a SHA512 7e8002ceeff0a6c1144a6c23743aff006101a63aee394c4a4eb2742ad37635fe45425964d60ab2d6f10f9e212c72db673f5f1d849f738efcd7d9389054a1de36
EBUILD gaupol-1.11-r1.ebuild 1579 BLAKE2B 6b4b012eb2b23a0351a92706aeab919a2e75356439bc8371a8028c1727f93f02fd7d1fe7d79120af3fad0f6c3c970fe656f05d28f85964c8ac55ea8a135f1522 SHA512 be2264a81132469c3709608374a01a38b0aa345e68162b9f3316e4da1a9d0eee84f2b2be8f99083a998639b26314346bc8f6e8b8587ebabee8db13c2add7d20f
+EBUILD gaupol-1.12.ebuild 1700 BLAKE2B e2399d20cc7efa05f80c177215ad3f07527be55038f6244d197ddedc15018aa269bfcddbaa51f63134dcc4e7ec18fad895c6118220ce79270c8bf76b7f227144 SHA512 4c27d3cab33af1a4f1fa5d9651027892b072baecfc325844e3333a2eadcab9e6667e2a6c537af8040f60e87ecef9d0a19587c4ba6cb4ab8af6a4e1062ed11196
MISC metadata.xml 533 BLAKE2B eb6d56dbe104832c594f306fc020b591b04e4f21d7533740ab613ecf105cdfdc4bc9232fe18bbfc4276cc08063a7a570a1c98025e9c74561b4abda0119e3801e SHA512 49859f8f6b75f20c6cf94f60764c1e688ddf907a7657815574b666fcc7873de0a3105cda9acd9f4bbdb7f658bd0003c67ec1ced72e3d84e15b5d86b64ca91abe
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
+}