1 |
commit: e94d1d492b6f1a52a937a657a4b22d962cf6f551 |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 21 09:32:22 2022 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 21 09:32:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e94d1d49 |
7 |
|
8 |
media-libs/rubberband: bump to 2.0.1 |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org> |
12 |
|
13 |
media-libs/rubberband/Manifest | 1 + |
14 |
.../rubberband/files/rubberband-2.0.1-build.patch | 164 +++++++++++++++++++++ |
15 |
media-libs/rubberband/rubberband-2.0.1.ebuild | 61 ++++++++ |
16 |
3 files changed, 226 insertions(+) |
17 |
|
18 |
diff --git a/media-libs/rubberband/Manifest b/media-libs/rubberband/Manifest |
19 |
index cf8d1d550644..56cd5f0b3ba6 100644 |
20 |
--- a/media-libs/rubberband/Manifest |
21 |
+++ b/media-libs/rubberband/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST rubberband-1.9.2.tar.bz2 164178 BLAKE2B dc8e5b4c773dbb5c556331fa56e6cf4a5dd3f8a0fc7dcfed1fbe53d1a7635f12db6a884e775fbff8022e252d98b4e14a46a2395a5d4cb7645522ddf3e6b5482f SHA512 b1c763ab2a428aa2f1f8e5d0be6e9eb669808059ee5389e94f12de25f1a05cd89022656d98906c90b616773da11ab1f596ae2c5a9d300118e88049e1443121f2 |
24 |
DIST rubberband-2.0.0.tar.bz2 175527 BLAKE2B 5b4b8c98ade57f8b7776902166e8aa33e8f89d4de3fe659425a7ef14c1cf3c8a48ad474d2fe0f13483844b4f931ca8128ca57bb7e6dbf6e9d96deadac8856ee0 SHA512 a915a3eea75f0345e83010cc3ffd3c5e0c68a0c1d88da11b11a5fd5010196167c81db611a38c2c2b8d5c5a1f828f2c74a134e6ca8bb3a543af3ef70ce8d56101 |
25 |
+DIST rubberband-2.0.1.tar.bz2 179107 BLAKE2B 98449967ec099851197220d037c47aa2ade07b1c40994639f5f4c42763051b67027188a50a8e742c661b2289d0a655e24f639578ac21ff24db0152237a1776f9 SHA512 7e120dbf20625980462cf5910b933b9631fd8a0b0e2ea927ca2417b352327c6398dc1d9bb89e2a1ed79118c840ef39ba5c0c52a0a4d4b494d68ae1dbb74f1cb1 |
26 |
|
27 |
diff --git a/media-libs/rubberband/files/rubberband-2.0.1-build.patch b/media-libs/rubberband/files/rubberband-2.0.1-build.patch |
28 |
new file mode 100644 |
29 |
index 000000000000..5e7e023b4d8e |
30 |
--- /dev/null |
31 |
+++ b/media-libs/rubberband/files/rubberband-2.0.1-build.patch |
32 |
@@ -0,0 +1,164 @@ |
33 |
+diff --git a/meson.build b/meson.build |
34 |
+index 753d1df..005e638 100644 |
35 |
+--- a/meson.build |
36 |
++++ b/meson.build |
37 |
+@@ -99,18 +99,26 @@ endforeach |
38 |
+ |
39 |
+ fftw3_dep = dependency('fftw3', version: '>= 3.0.0', required: false) |
40 |
+ samplerate_dep = dependency('samplerate', version: '>= 0.1.8', required: false) |
41 |
+-sndfile_dep = dependency('sndfile', version: '>= 1.0.16', required: false) |
42 |
+-vamp_dep = dependency('vamp-sdk', version: '>= 2.9', required: false) |
43 |
++if get_option('programs') |
44 |
++ sndfile_dep = dependency('sndfile', version: '>= 1.0.16', required: false) |
45 |
++endif |
46 |
++if get_option('vamp') |
47 |
++ vamp_dep = dependency('vamp-sdk', version: '>= 2.9', required: false) |
48 |
++endif |
49 |
+ thread_dep = dependency('threads') |
50 |
+-have_ladspa = cpp.has_header('ladspa.h', args: extra_include_args) |
51 |
++if get_option('ladspa') |
52 |
++ have_ladspa = cpp.has_header('ladspa.h', args: extra_include_args) |
53 |
++endif |
54 |
+ have_lv2 = cpp.has_header('lv2.h', args: extra_include_args) |
55 |
+ have_sincos = cpp.has_function('sincos', |
56 |
+ prefix: '#define _GNU_SOURCE\n#include <math.h>', |
57 |
+ args: '-lm') |
58 |
+-have_jni = cpp.has_header('jni.h', args: extra_include_args) |
59 |
++if get_option('jni') |
60 |
++ have_jni = cpp.has_header('jni.h', args: extra_include_args) |
61 |
+ |
62 |
+-javac = find_program('javac', required: false) |
63 |
+-jar = find_program('jar', required: false) |
64 |
++ javac = find_program('javac', required: false) |
65 |
++ jar = find_program('jar', required: false) |
66 |
++endif |
67 |
+ |
68 |
+ |
69 |
+ # Check FFT and resampler options and set up dependencies and paths |
70 |
+@@ -281,37 +289,41 @@ if ipp_needed |
71 |
+ endif |
72 |
+ endif # ipp_needed |
73 |
+ |
74 |
+-if not vamp_dep.found() |
75 |
+- vamp_dep = cpp.find_library('VampPluginSDK', |
76 |
+- dirs: get_option('extra_lib_dirs'), |
77 |
+- has_headers: ['vamp-sdk.h'], |
78 |
+- header_args: extra_include_args, |
79 |
+- required: false) |
80 |
++if get_option('vamp') |
81 |
+ if not vamp_dep.found() |
82 |
+- vamp_dep = cpp.find_library('vamp-sdk', |
83 |
++ vamp_dep = cpp.find_library('VampPluginSDK', |
84 |
+ dirs: get_option('extra_lib_dirs'), |
85 |
+ has_headers: ['vamp-sdk.h'], |
86 |
+ header_args: extra_include_args, |
87 |
+ required: false) |
88 |
++ if not vamp_dep.found() |
89 |
++ vamp_dep = cpp.find_library('vamp-sdk', |
90 |
++ dirs: get_option('extra_lib_dirs'), |
91 |
++ has_headers: ['vamp-sdk.h'], |
92 |
++ header_args: extra_include_args, |
93 |
++ required: false) |
94 |
++ endif |
95 |
+ endif |
96 |
++ have_vamp = true |
97 |
+ endif |
98 |
+-have_vamp = vamp_dep.found() |
99 |
+- |
100 |
+-if not sndfile_dep.found() |
101 |
+- sndfile_dep = cpp.find_library('sndfile', |
102 |
+- dirs: get_option('extra_lib_dirs'), |
103 |
+- has_headers: ['sndfile.h'], |
104 |
+- header_args: extra_include_args, |
105 |
+- required: false) |
106 |
++ |
107 |
++if get_option('programs') |
108 |
+ if not sndfile_dep.found() |
109 |
+- sndfile_dep = cpp.find_library('sndfile-1', |
110 |
++ sndfile_dep = cpp.find_library('sndfile', |
111 |
+ dirs: get_option('extra_lib_dirs'), |
112 |
+ has_headers: ['sndfile.h'], |
113 |
+ header_args: extra_include_args, |
114 |
+ required: false) |
115 |
++ if not sndfile_dep.found() |
116 |
++ sndfile_dep = cpp.find_library('sndfile-1', |
117 |
++ dirs: get_option('extra_lib_dirs'), |
118 |
++ has_headers: ['sndfile.h'], |
119 |
++ header_args: extra_include_args, |
120 |
++ required: false) |
121 |
++ endif |
122 |
+ endif |
123 |
++ have_sndfile = true |
124 |
+ endif |
125 |
+-have_sndfile = sndfile_dep.found() |
126 |
+ |
127 |
+ |
128 |
+ # General platform and compiler expectations |
129 |
+@@ -514,7 +526,7 @@ if get_option('default_library') != 'shared' and rubberband_additional_static_li |
130 |
+ ) |
131 |
+ endif |
132 |
+ |
133 |
+-if have_jni and javac.found() and jar.found() |
134 |
++if get_option('jni') |
135 |
+ target_summary += { 'JNI library': [ true, 'Name: ' + rubberband_jni_name ] } |
136 |
+ message('Will build Java Native Interface') |
137 |
+ rubberband_jni = shared_library( |
138 |
+@@ -549,7 +561,7 @@ if have_jni and javac.found() and jar.found() |
139 |
+ ) |
140 |
+ else |
141 |
+ target_summary += { 'JNI library': false } |
142 |
+- if not have_jni |
143 |
++ if not get_option('jni') |
144 |
+ message('Not building Java Native Interface: jni.h header not found') |
145 |
+ else |
146 |
+ message('Not building Java Native Interface: Java compiler not found') |
147 |
+@@ -563,7 +575,7 @@ install_headers( |
148 |
+ subdir: 'rubberband' |
149 |
+ ) |
150 |
+ |
151 |
+-if have_ladspa |
152 |
++if get_option('ladspa') |
153 |
+ target_summary += { 'LADSPA plugin': [ true, 'Name: ' + rubberband_ladspa_name ] } |
154 |
+ message('Will build LADSPA plugin') |
155 |
+ rubberband_ladspa = shared_library( |
156 |
+@@ -630,7 +642,7 @@ else |
157 |
+ message('Not building LV2 plugin: lv2.h header not found') |
158 |
+ endif |
159 |
+ |
160 |
+-if have_vamp |
161 |
++if get_option('vamp') |
162 |
+ target_summary += { 'Vamp plugin': [ true, 'Name: ' + rubberband_vamp_name ] } |
163 |
+ message('Will build Vamp plugin') |
164 |
+ rubberband_vamp = shared_library( |
165 |
+@@ -662,7 +674,7 @@ else |
166 |
+ message('Not building Vamp plugin: Vamp dependency not found') |
167 |
+ endif |
168 |
+ |
169 |
+-if have_sndfile |
170 |
++if get_option('programs') |
171 |
+ target_summary += { 'Command-line utility': [ true, 'Name: ' + rubberband_program_name ] } |
172 |
+ message('Will build command-line utility') |
173 |
+ rubberband_program = executable( |
174 |
+diff --git a/meson_options.txt b/meson_options.txt |
175 |
+index c820c20..81710de 100644 |
176 |
+--- a/meson_options.txt |
177 |
++++ b/meson_options.txt |
178 |
+@@ -26,3 +26,18 @@ option('extra_lib_dirs', |
179 |
+ value: [], |
180 |
+ description: 'Additional local library directories to search for dependencies.') |
181 |
+ |
182 |
++option('jni', |
183 |
++ type: 'boolean', |
184 |
++ value: 'false') |
185 |
++ |
186 |
++option('ladspa', |
187 |
++ type: 'boolean', |
188 |
++ value: 'false') |
189 |
++ |
190 |
++option('programs', |
191 |
++ type: 'boolean', |
192 |
++ value: 'false') |
193 |
++ |
194 |
++option('vamp', |
195 |
++ type: 'boolean', |
196 |
++ value: 'false') |
197 |
|
198 |
diff --git a/media-libs/rubberband/rubberband-2.0.1.ebuild b/media-libs/rubberband/rubberband-2.0.1.ebuild |
199 |
new file mode 100644 |
200 |
index 000000000000..3a9d2a39197f |
201 |
--- /dev/null |
202 |
+++ b/media-libs/rubberband/rubberband-2.0.1.ebuild |
203 |
@@ -0,0 +1,61 @@ |
204 |
+# Copyright 1999-2022 Gentoo Authors |
205 |
+# Distributed under the terms of the GNU General Public License v2 |
206 |
+ |
207 |
+EAPI=8 |
208 |
+ |
209 |
+inherit meson-multilib flag-o-matic |
210 |
+ |
211 |
+DESCRIPTION="An audio time-stretching and pitch-shifting library and utility program" |
212 |
+HOMEPAGE="https://www.breakfastquay.com/rubberband/" |
213 |
+SRC_URI="https://breakfastquay.com/files/releases/${P}.tar.bz2" |
214 |
+ |
215 |
+LICENSE="GPL-2" |
216 |
+SLOT="0" |
217 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
218 |
+IUSE="ladspa jni static-libs +programs vamp" |
219 |
+ |
220 |
+BDEPEND=" |
221 |
+ virtual/pkgconfig |
222 |
+" |
223 |
+CDEPEND=" |
224 |
+ media-libs/libsamplerate[${MULTILIB_USEDEP}] |
225 |
+ sci-libs/fftw:3.0[${MULTILIB_USEDEP}] |
226 |
+ jni? ( >=virtual/jdk-1.8:* ) |
227 |
+ ladspa? ( media-libs/ladspa-sdk ) |
228 |
+ programs? ( media-libs/libsndfile ) |
229 |
+ vamp? ( media-libs/vamp-plugin-sdk[${MULTILIB_USEDEP}] ) |
230 |
+" |
231 |
+RDEPEND="${CDEPEND}" |
232 |
+DEPEND="${CDEPEND}" |
233 |
+ |
234 |
+PATCHES=( |
235 |
+ "${FILESDIR}/${PN}-2.0.1-build.patch" |
236 |
+) |
237 |
+ |
238 |
+multilib_src_configure() { |
239 |
+ if use ppc ; then |
240 |
+ # bug #827203 |
241 |
+ # meson doesn't respect/use LIBS but mangles LDFLAGS with libs |
242 |
+ # correctly. Use this until we get a Meson test for libatomic. |
243 |
+ append-ldflags -latomic |
244 |
+ fi |
245 |
+ |
246 |
+ local emesonargs=( |
247 |
+ --buildtype=release |
248 |
+ -Dfft=fftw |
249 |
+ -Dresampler=libsamplerate |
250 |
+ -Ddefault_library=$(use static-libs && echo "both" || echo "shared") |
251 |
+ $(meson_use ladspa) |
252 |
+ $(meson_use jni) |
253 |
+ $(meson_use programs) |
254 |
+ $(meson_use vamp) |
255 |
+ ) |
256 |
+ use jni && emesonargs+=( |
257 |
+ -Dextra_include_dirs="$(java-config -g JAVA_HOME)/include,$(java-config -g JAVA_HOME)/include/linux" |
258 |
+ ) |
259 |
+ meson_src_configure |
260 |
+} |
261 |
+ |
262 |
+multilib_src_install_all() { |
263 |
+ ! use jni && find "${ED}" -name "*.a" -delete |
264 |
+} |