1 |
commit: ff8efc6a420864e0a2150530cdbc07e401501690 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 17 23:00:27 2021 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 18 00:31:40 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff8efc6a |
7 |
|
8 |
media-sound/pulseeffects: improve dependencies |
9 |
|
10 |
1. Both dev-libs/appstream-glib and sys-devel/gettext are *build-time* |
11 |
dependencies so they should have been moved from DEPEND to BDEPEND |
12 |
when this package got bumped to EAPI 7. Do it now; |
13 |
2. Add missing (if optional) BDEPEND dev-util/desktop-file-utils; |
14 |
3. Add an explanation of why media-libs/libsamplerate is in BDEPEND |
15 |
rather than DEPEND; |
16 |
4. Clearly separate dependencies which meson looks for (in |
17 |
DEPEND+RDEPEND) from those which are auto-loaded at run time (in |
18 |
RDEPEND only); |
19 |
5. Add RDEPEND=gnome-extra/yelp so that it is possible to display |
20 |
built-in help; |
21 |
6. Add DEPEND="media-libs/libsndfile (implicitly pulled in by |
22 |
media-libs/lilv but meson looks for it and pulseffects is linked |
23 |
against it) media-libs/gst-plugins-base (pulled in by other GStreamer |
24 |
plug-in packs but meson explicitly looks for gstreamer-audio and |
25 |
gstreamer-fft)"; |
26 |
7. The pitch plug-in only works properly if media-libs/rubberband has |
27 |
USE=ladspa set; |
28 |
8. Optionally enable rnnoise and webrtc plug-ins; |
29 |
8. Patch meson scripts so that if USE-flags: bs2db and rnnoise are |
30 |
disabled, the relevant dependencies are not pulled in even if present |
31 |
at build time. |
32 |
|
33 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
34 |
|
35 |
.../pulseeffects-4.8.5-meson_no_automagic.patch | 55 ++++++++++++++ |
36 |
.../pulseeffects/pulseeffects-4.8.5-r1.ebuild | 83 ++++++++++++++++++++++ |
37 |
2 files changed, 138 insertions(+) |
38 |
|
39 |
diff --git a/media-sound/pulseeffects/files/pulseeffects-4.8.5-meson_no_automagic.patch b/media-sound/pulseeffects/files/pulseeffects-4.8.5-meson_no_automagic.patch |
40 |
new file mode 100644 |
41 |
index 00000000000..2ad89e62977 |
42 |
--- /dev/null |
43 |
+++ b/media-sound/pulseeffects/files/pulseeffects-4.8.5-meson_no_automagic.patch |
44 |
@@ -0,0 +1,55 @@ |
45 |
+--- a/meson.build |
46 |
++++ b/meson.build |
47 |
+@@ -4,7 +4,7 @@ |
48 |
+ 'cpp', |
49 |
+ default_options : ['cpp_std=c++17','buildtype=debugoptimized'], |
50 |
+ version: '4.8.5', |
51 |
+- meson_version: '>= 0.40.0' |
52 |
++ meson_version: '>= 0.47.0' |
53 |
+ ) |
54 |
+ |
55 |
+ add_global_arguments('-DG_LOG_DOMAIN="pulseeffects"', language : 'c') |
56 |
+--- a/meson_options.txt |
57 |
++++ b/meson_options.txt |
58 |
+@@ -0,0 +1,12 @@ |
59 |
++option( |
60 |
++ 'bs2b', |
61 |
++ type: 'feature', |
62 |
++ value: 'auto', |
63 |
++ description: 'Enable bs2b-based Crossfeed plug-in for improving headphone listening of stereo audio records' |
64 |
++) |
65 |
++option( |
66 |
++ 'rnnoise', |
67 |
++ type: 'feature', |
68 |
++ value: 'auto', |
69 |
++ description: 'Enable rnnoise-based Noise Reduction plug-in' |
70 |
++) |
71 |
+--- a/src/meson.build |
72 |
++++ b/src/meson.build |
73 |
+@@ -108,7 +108,7 @@ |
74 |
+ dependency('gstreamer-plugins-bad-1.0', version: '>=1.12.5'), |
75 |
+ dependency('gstreamer-fft-1.0'), |
76 |
+ dependency('lilv-0', version: '>=0.22', required: false), |
77 |
+- dependency('libbs2b', required: false), |
78 |
++ dependency('libbs2b', required: get_option('bs2b')), |
79 |
+ dependency('boost', version: '>=1.72', modules:['system','filesystem']), |
80 |
+ dependency('sndfile'), |
81 |
+ dependency('threads') |
82 |
+--- a/src/rnnoise/meson.build |
83 |
++++ b/src/rnnoise/meson.build |
84 |
+@@ -1,4 +1,5 @@ |
85 |
+-dep_rnnoise = dependency('rnnoise', required: false) |
86 |
++opt_rnnoise = get_option('rnnoise') |
87 |
++dep_rnnoise = dependency('rnnoise', required: opt_rnnoise) |
88 |
+ |
89 |
+ if dep_rnnoise.found() |
90 |
+ |
91 |
+@@ -28,7 +29,7 @@ |
92 |
+ cpp_args: plugins_cxx_args |
93 |
+ ) |
94 |
+ |
95 |
+-else |
96 |
++elif opt_rnnoise.auto() |
97 |
+ |
98 |
+ message('could not find the RNNoise library') |
99 |
+ |
100 |
|
101 |
diff --git a/media-sound/pulseeffects/pulseeffects-4.8.5-r1.ebuild b/media-sound/pulseeffects/pulseeffects-4.8.5-r1.ebuild |
102 |
new file mode 100644 |
103 |
index 00000000000..2525d6bef1d |
104 |
--- /dev/null |
105 |
+++ b/media-sound/pulseeffects/pulseeffects-4.8.5-r1.ebuild |
106 |
@@ -0,0 +1,83 @@ |
107 |
+# Copyright 1999-2021 Gentoo Authors |
108 |
+# Distributed under the terms of the GNU General Public License v2 |
109 |
+ |
110 |
+EAPI=7 |
111 |
+ |
112 |
+inherit gnome2-utils meson |
113 |
+ |
114 |
+DESCRIPTION="Limiter, compressor, reverberation, equalizer auto volume effects for Pulseaudio" |
115 |
+HOMEPAGE="https://github.com/wwmm/easyeffects/tree/pulseaudio-legacy" |
116 |
+ |
117 |
+if [[ ${PV} == *9999 ]]; then |
118 |
+ inherit git-r3 |
119 |
+ EGIT_REPO_URI="https://github.com/wwmm/easyeffects" |
120 |
+ EGIT_BRANCH="pulseaudio-legacy" |
121 |
+else |
122 |
+ SRC_URI="https://github.com/wwmm/easyeffects/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
123 |
+ KEYWORDS="~amd64 ~x86" |
124 |
+fi |
125 |
+ |
126 |
+LICENSE="GPL-3" |
127 |
+SLOT="0" |
128 |
+IUSE="bs2b calf rnnoise rubberband webrtc" |
129 |
+ |
130 |
+DEPEND=">=dev-libs/boost-1.72:= |
131 |
+ >=dev-cpp/glibmm-2.56.0:2 |
132 |
+ >=dev-cpp/gtkmm-3.24:3.0 |
133 |
+ >=dev-libs/glib-2.56:2 |
134 |
+ >=dev-libs/libsigc++-2.10:2 |
135 |
+ >=media-libs/gstreamer-1.12.5:1.0 |
136 |
+ media-libs/gst-plugins-base |
137 |
+ >=media-libs/gst-plugins-bad-1.12.5:1.0 |
138 |
+ media-libs/libebur128 |
139 |
+ media-libs/libsndfile |
140 |
+ >=media-libs/lilv-0.24.2-r1 |
141 |
+ >=media-libs/zita-convolver-3.0.0 |
142 |
+ media-sound/pulseaudio |
143 |
+ >=x11-libs/gtk+-3.20:3 |
144 |
+ bs2b? ( >=media-plugins/gst-plugins-bs2b-1.12.5:1.0 ) |
145 |
+ rnnoise? ( media-libs/rnnoise )" |
146 |
+RDEPEND="!media-sound/easyeffects |
147 |
+ ${DEPEND} |
148 |
+ gnome-extra/yelp |
149 |
+ >=media-libs/gst-plugins-good-1.12.5:1.0 |
150 |
+ >=media-libs/lsp-plugins-1.1.24[lv2] |
151 |
+ >=media-plugins/gst-plugins-ladspa-1.12.5:1.0 |
152 |
+ >=media-plugins/gst-plugins-lv2-1.12.5:1.0 |
153 |
+ >=media-plugins/gst-plugins-pulse-1.12.5:1.0 |
154 |
+ sys-apps/dbus |
155 |
+ calf? ( >=media-plugins/calf-0.90.1[lv2] ) |
156 |
+ rubberband? ( media-libs/rubberband[ladspa] ) |
157 |
+ webrtc? ( media-plugins/gst-plugins-webrtc )" |
158 |
+# Only header files are used from libsamplerate so put it here rather than DEPEND |
159 |
+# to avoid unnecessary cross-compilation. |
160 |
+BDEPEND="dev-libs/appstream-glib |
161 |
+ dev-util/desktop-file-utils |
162 |
+ dev-util/itstool |
163 |
+ media-libs/libsamplerate |
164 |
+ sys-devel/gettext |
165 |
+ virtual/pkgconfig" |
166 |
+ |
167 |
+PATCHES=( |
168 |
+ "${FILESDIR}"/${PN}-4.8.5-meson_no_automagic.patch |
169 |
+) |
170 |
+ |
171 |
+src_configure() { |
172 |
+ local emesonargs=( |
173 |
+ $(meson_feature bs2b) |
174 |
+ $(meson_feature rnnoise) |
175 |
+ ) |
176 |
+ meson_src_configure |
177 |
+} |
178 |
+ |
179 |
+pkg_postinst() { |
180 |
+ gnome2_gconf_install |
181 |
+ gnome2_schemas_update |
182 |
+ xdg_icon_cache_update |
183 |
+} |
184 |
+ |
185 |
+pkg_postrm() { |
186 |
+ gnome2_gconf_uninstall |
187 |
+ gnome2_schemas_update |
188 |
+ xdg_icon_cache_update |
189 |
+} |