summaryrefslogtreecommitdiff
path: root/media-sound/whipper
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-09 00:01:03 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-09 00:01:03 +0100
commita0ce545d52f231499bf9f3644493113d8af58ec9 (patch)
tree4d67c09eed0c2ae28d1317f72d7f7b08b4f6aeea /media-sound/whipper
parent5181ced3f3566a9610b85922b083c8f84f20d78f (diff)
gentoo auto-resync : 09:05:2024 - 00:01:03
Diffstat (limited to 'media-sound/whipper')
-rw-r--r--media-sound/whipper/Manifest2
-rw-r--r--media-sound/whipper/files/whipper-0.10.0-ruamel-yaml.patch109
-rw-r--r--media-sound/whipper/whipper-0.10.0-r2.ebuild56
3 files changed, 167 insertions, 0 deletions
diff --git a/media-sound/whipper/Manifest b/media-sound/whipper/Manifest
index dcbfb4c14630..d12c6fa229dc 100644
--- a/media-sound/whipper/Manifest
+++ b/media-sound/whipper/Manifest
@@ -1,4 +1,6 @@
+AUX whipper-0.10.0-ruamel-yaml.patch 3317 BLAKE2B acee6df0afacec79cd2d98610803f2882099c0dc49a1ecc50b7b5b449c6b55bc20890f980477701e5cc0ac3af0606d2dd89e261024d0b3f0969d7b9917281be6 SHA512 893e2f23717633971410e0f9917345eaec5af313d83702b36a2693b51eaf54d755d58db864de82e13e8506dc98ab548334d7ba6d02fd6c200bd0670e4bca73bf
AUX whipper-0.7.0-cdparanoia-name-fix.patch 2036 BLAKE2B 54d0c70f0ccf89e46607e67d3b1bd3288dc0c34da27d6111df98810d85369c51f953e415a6415c0c08649a2e7fed10cfea77e3a7695f8c4f03445948a8f83c64 SHA512 13edc4bd713409e8fa6d871ce5f9316895edb0156eeed7eef401e72c19f188a8067c45c16a3fe1c3e21209fd8ec6bdf2478e4d4376f210d535993c7ef1575453
DIST whipper-0.10.0.tar.gz 256546 BLAKE2B c673aaefa8fe621e11a1140c2927bb2f62d5b07e94f6cec5b95ba290e5eab215c98b9a59c144b26c71bde211a45d603ba08c477d12b12ed1c73f9f8c2ebdb9a7 SHA512 728ad98185aa2d29f4fb215a597136691bb2c3590b3cac4f659238f90a3b4328c377fafe830a725b655f050538739f404b3eca853db4c39001d1b9d721dc7fd8
EBUILD whipper-0.10.0-r1.ebuild 1748 BLAKE2B 0aa45feb70b980e423f80551ce4e2e0a4811ea9cafe11afc8bcb046aff5ece9af5ec0868104c93404c801ffaf7194a84f208b03c5c932c087abd95b843d8a579 SHA512 510581d73f13e3de3447bf07f9c8804910194fb9dcf606a23ebc690157418e66e72a558e638e9b1be6d59fe6c11f469baf8b63792a46751d175eef7a9c875edb
+EBUILD whipper-0.10.0-r2.ebuild 1363 BLAKE2B b4fe303d499f1c795f02d9a10fa496043510467bb46fffe322e23bd86aebbf207aa9b3e53b46d78860cde263bf95c0a16941b67fe635e8d911bd0b39430421c0 SHA512 c82c4718bf66ad1b27ca8df01fec2012b5afc8d56f9c27595b8e9c6fecb91ca6650ea4cb80004114521bc7abf8222f964a551ddb761bd7b2c3d4ef8df7116365
MISC metadata.xml 660 BLAKE2B 5cd7471def3d4a0cdf0f391ba307d071ef474c9121db39b72371190b05d857b2488226ff5c7fa66aa54447bfec2b2c4c30d9fc3439da6c82937c6dc17fa52c6a SHA512 233494f7efc67d89a4f7fbf01f94c8fe47054d1a311ce88163c527de6c582a6ecde56f00b3f6e003a986afb41ccd2fa92c044e7d35ffcca290cf17778ae30ef2
diff --git a/media-sound/whipper/files/whipper-0.10.0-ruamel-yaml.patch b/media-sound/whipper/files/whipper-0.10.0-ruamel-yaml.patch
new file mode 100644
index 000000000000..206547e4b3e9
--- /dev/null
+++ b/media-sound/whipper/files/whipper-0.10.0-ruamel-yaml.patch
@@ -0,0 +1,109 @@
+From e0942417a1c267781a8b676789730457dcb2e6fa Mon Sep 17 00:00:00 2001
+From: Martin Weinelt <hexa@darmstadt.ccc.de>
+Date: Sun, 20 Jun 2021 15:18:37 +0200
+Subject: [PATCH] Use custom YAML subclass to be compatible with
+ ruamel_yaml>=0.17
+
+Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
+---
+ whipper/common/yaml.py | 18 ++++++++++++++++++
+ whipper/result/logger.py | 11 ++++++-----
+ whipper/test/test_result_logger.py | 14 ++++++--------
+ 3 files changed, 30 insertions(+), 13 deletions(-)
+ create mode 100644 whipper/common/yaml.py
+
+diff --git a/whipper/common/yaml.py b/whipper/common/yaml.py
+new file mode 100644
+index 00000000..4edb0b36
+--- /dev/null
++++ b/whipper/common/yaml.py
+@@ -0,0 +1,18 @@
++from ruamel.yaml import YAML as ruamel_YAML
++from ruamel.yaml.compat import StringIO
++
++# https://yaml.readthedocs.io/en/latest/example.html#output-of-dump-as-a-string
++class YAML(ruamel_YAML):
++ def __init__(self, *args, **kwargs):
++ super().__init__()
++ self.width = 4000
++ self.default_flow_style = False
++
++ def dump(self, data, stream=None, **kw):
++ inefficient = False
++ if stream is None:
++ inefficient = True
++ stream = StringIO()
++ ruamel_YAML.dump(self, data, stream, **kw)
++ if inefficient:
++ return stream.getvalue()
+diff --git a/whipper/result/logger.py b/whipper/result/logger.py
+index b7043adc..f4471a00 100644
+--- a/whipper/result/logger.py
++++ b/whipper/result/logger.py
+@@ -1,12 +1,12 @@
+ import time
+ import hashlib
+ import re
+-import ruamel.yaml as yaml
+ from ruamel.yaml.comments import CommentedMap as OrderedDict
+
+ import whipper
+
+ from whipper.common import common
++from whipper.common.yaml import YAML
+ from whipper.result import result
+
+
+@@ -148,11 +148,12 @@ def logRip(self, ripResult, epoch):
+ data["EOF"] = "End of status report"
+ riplog["Conclusive status report"] = data
+
++ yaml = YAML(
++ typ="rt",
++ pure=True
++ )
+ riplog = yaml.dump(
+- riplog,
+- default_flow_style=False,
+- width=4000,
+- Dumper=yaml.RoundTripDumper
++ riplog
+ )
+ # Add a newline after the "Log creation date" line
+ riplog = re.sub(
+diff --git a/whipper/test/test_result_logger.py b/whipper/test/test_result_logger.py
+index 411b61af..98c89ab5 100644
+--- a/whipper/test/test_result_logger.py
++++ b/whipper/test/test_result_logger.py
+@@ -3,8 +3,8 @@
+ import os
+ import re
+ import unittest
+-import ruamel.yaml
+
++from whipper.common.yaml import YAML
+ from whipper.result.result import TrackResult, RipResult
+ from whipper.result.logger import WhipperLogger
+
+@@ -163,16 +163,14 @@ def testLogger(self):
+ ))
+ )
+
+- yaml = ruamel.yaml.YAML()
++ yaml = YAML(
++ typ='rt',
++ pure=True
++ )
+ parsedLog = yaml.load(actual)
+ self.assertEqual(
+ actual,
+- ruamel.yaml.dump(
+- parsedLog,
+- default_flow_style=False,
+- width=4000,
+- Dumper=ruamel.yaml.RoundTripDumper
+- )
++ yaml.dump(parsedLog)
+ )
+ log_body = "\n".join(actualLines[:-1]).encode()
+ self.assertEqual(
diff --git a/media-sound/whipper/whipper-0.10.0-r2.ebuild b/media-sound/whipper/whipper-0.10.0-r2.ebuild
new file mode 100644
index 000000000000..4458574acf2f
--- /dev/null
+++ b/media-sound/whipper/whipper-0.10.0-r2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_PEP517="setuptools"
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="A Python CD-DA ripper preferring accuracy over speed (forked from morituri)"
+HOMEPAGE="https://github.com/whipper-team/whipper"
+SRC_URI="https://github.com/whipper-team/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ media-libs/libsndfile:=
+"
+RDEPEND="
+ ${DEPEND}
+ app-cdr/cdrdao
+ >=dev-libs/libcdio-paranoia-0.94_p2
+ dev-python/musicbrainzngs[${PYTHON_USEDEP}]
+ >=dev-python/pycdio-2.1.0[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ dev-python/discid[${PYTHON_USEDEP}]
+ dev-python/ruamel-yaml[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ media-libs/mutagen[${PYTHON_USEDEP}]
+ media-sound/sox[flac]
+"
+BDEPEND="
+ dev-python/setuptools-scm[${PYTHON_USEDEP}]
+ test? (
+ dev-python/twisted[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests unittest
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.7.0-cdparanoia-name-fix.patch"
+ "${FILESDIR}/${PN}-0.10.0-ruamel-yaml.patch"
+)
+
+python_prepare_all() {
+ # accurip test totally depends on network access
+ rm "${PN}"/test/test_common_accurip.py || die
+
+ export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
+
+ distutils-r1_python_prepare_all
+}