Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/soundconverter/
Date: Tue, 31 May 2022 04:07:15
Message-Id: 1653970020.5faee21836cdcd724ca89df47ae28620d5a56ad9.sam@gentoo
1 commit: 5faee21836cdcd724ca89df47ae28620d5a56ad9
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 04:03:46 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 04:07:00 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5faee218
7
8 media-sound/soundconverter: add partial test infrastructure; minor QA touchups
9
10 Closes: https://bugs.gentoo.org/758197
11 Bug: https://bugs.gentoo.org/846092
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 .../soundconverter/soundconverter-4.0.3.ebuild | 47 +++++++++++++++++++---
15 1 file changed, 41 insertions(+), 6 deletions(-)
16
17 diff --git a/media-sound/soundconverter/soundconverter-4.0.3.ebuild b/media-sound/soundconverter/soundconverter-4.0.3.ebuild
18 index 9840037dc60f..334ca9cba906 100644
19 --- a/media-sound/soundconverter/soundconverter-4.0.3.ebuild
20 +++ b/media-sound/soundconverter/soundconverter-4.0.3.ebuild
21 @@ -7,7 +7,7 @@ DISTUTILS_SINGLE_IMPL=1
22 DISTUTILS_USE_PEP517=setuptools
23 PYTHON_COMPAT=( python3_{8..10} )
24 PYTHON_REQ_USE="xml(+)"
25 -inherit distutils-r1 xdg
26 +inherit gnome2-utils distutils-r1 virtualx xdg
27
28 MY_PV="${PV/_/-}"
29 DESCRIPTION="A simple audiofile converter application for the GNOME environment"
30 @@ -16,8 +16,7 @@ SRC_URI="https://github.com/kassoulet/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.
31
32 LICENSE="GPL-3"
33 SLOT="0"
34 -KEYWORDS="amd64 x86"
35 -
36 +KEYWORDS="~amd64 ~x86"
37 IUSE="aac flac mp3 ogg opus vorbis"
38
39 # gst-plugins-meta for any decoders, USE flags for specific encoders used by code
40 @@ -47,18 +46,54 @@ BDEPEND="
41 $(python_gen_cond_dep '
42 dev-python/python-distutils-extra[${PYTHON_USEDEP}]
43 ')
44 + test? (
45 + media-plugins/gst-plugins-flac:1.0
46 + media-libs/gst-plugins-bad:1.0
47 + media-libs/gst-plugins-ugly:1.0
48 + media-plugins/gst-plugins-lame:1.0
49 + media-plugins/gst-plugins-faac:1.0
50 + media-plugins/gst-plugins-opus:1.0
51 + )
52 "
53
54 +# Before PEP517: tests seem to hang and also fail to find fdkaacenc from gst?
55 +# After: need to trick it into finding the data (inc. glade files)
56 +RESTRICT="test"
57 +
58 python_prepare_all() {
59 + gnome2_environment_reset
60 distutils-r1_python_prepare_all
61 - rm -v "${S}/CHANGELOG.old"
62 +
63 + rm -v "${S}/CHANGELOG.old" || die
64 +
65 # workaround incorrect behavior when LINGUAS is set to an empty string
66 # https://bugs.launchpad.net/python-distutils-extra/+bug/1133594
67 ! [[ -v LINGUAS && -z ${LINGUAS} ]] || rm po/*.po || die
68 }
69
70 +src_test() {
71 + virtx distutils-r1_src_test
72 +}
73 +
74 +python_test() {
75 + export GSETTINGS_SCHEMA_DIR="${S}/data"
76 + "${BROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}"/data || die
77 +
78 + "${EPYTHON}" tests/test.py || die
79 +}
80 +
81 python_install_all() {
82 - rm -v "${D}/usr/share/glib-2.0/schemas/gschemas.compiled"
83 - mv -v "${D}/usr/share/doc/${PN}" "${D}/usr/share/doc/${P}"
84 + rm -v "${ED}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
85 + mv -v "${ED}"/usr/share/doc/${PN} "${ED}"/usr/share/doc/${PF} || die
86 distutils-r1_python_install_all
87 }
88 +
89 +pkg_postrm() {
90 + xdg_pkg_postrm
91 + gnome2_schemas_update
92 +}
93 +
94 +pkg_postinst() {
95 + xdg_pkg_postinst
96 + gnome2_schemas_update
97 +}