summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-03-13 12:03:46 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2021-03-13 12:05:09 +0100
commit4ac7a4e99291ba9cee4c4469a298791b8fdeafd0 (patch)
tree94e0577aab8c1b4c9e1d3d96a305ff54e2b01648 /media-libs/rubberband
parentdev-java/openjdk-bin: add support for x64-macos (diff)
downloadgentoo-4ac7a4e99291ba9cee4c4469a298791b8fdeafd0.tar.gz
gentoo-4ac7a4e99291ba9cee4c4469a298791b8fdeafd0.tar.bz2
gentoo-4ac7a4e99291ba9cee4c4469a298791b8fdeafd0.zip
media-libs/rubberband: bump to 1.9.1, switch to mason, updated use flags
Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'media-libs/rubberband')
-rw-r--r--media-libs/rubberband/Manifest1
-rw-r--r--media-libs/rubberband/files/rubberband-1.9.1-build.patch177
-rw-r--r--media-libs/rubberband/metadata.xml1
-rw-r--r--media-libs/rubberband/rubberband-1.9.1.ebuild62
4 files changed, 241 insertions, 0 deletions
diff --git a/media-libs/rubberband/Manifest b/media-libs/rubberband/Manifest
index 0717b1732f26..7d2a54820f15 100644
--- a/media-libs/rubberband/Manifest
+++ b/media-libs/rubberband/Manifest
@@ -1 +1,2 @@
DIST rubberband-1.9.0.tar.bz2 192240 BLAKE2B dd97f80e01b05883645bf7c78730f8a3f873a60379cc209887591a28d0b6292e083c2f522db35ef9435c0a446eaa9b5acab8b5e2c9703514019491a939a804c9 SHA512 2226cfec98f280a12f874f60620c3bf09f7399a7808af5e9f5c9a5154b989cfbf3c4220e162d722e319a4ef046f81c6a07eac2b8c6035c8f6230f0a20b1577a8
+DIST rubberband-1.9.1.tar.bz2 164644 BLAKE2B 1bbbd0056b2131ac16bf427db93e19bdd6adb5433733e62523f4a04c8a74d1a48e82dbace09e7ffe6dddfeec699e3aeee8e84344c9e7cbe75067316dde6268d6 SHA512 cb20ef8fb717a9e6b5b0b921541bd701e94326e12cdb20d50bed344d12fa1b4fd731335c3a0a7f2d2a5ce96031d965b209e7667c4d55fd8494b8e20d3409f0d3
diff --git a/media-libs/rubberband/files/rubberband-1.9.1-build.patch b/media-libs/rubberband/files/rubberband-1.9.1-build.patch
new file mode 100644
index 000000000000..2d8faaee795b
--- /dev/null
+++ b/media-libs/rubberband/files/rubberband-1.9.1-build.patch
@@ -0,0 +1,177 @@
+diff --git a/meson.build b/meson.build
+index 65ee113..0c089fa 100644
+--- a/meson.build
++++ b/meson.build
+@@ -97,14 +97,21 @@ endforeach
+
+ fftw3_dep = dependency('fftw3', version: '>= 3.0.0', required: false)
+ samplerate_dep = dependency('samplerate', version: '>= 0.1.8', required: false)
+-sndfile_dep = dependency('sndfile', version: '>= 1.0.16', required: false)
+-vamp_dep = dependency('vamp-sdk', version: '>= 2.9', required: false)
++if get_option('programs')
++ sndfile_dep = dependency('sndfile', version: '>= 1.0.16', required: false)
++endif
++if get_option('vamp')
++ vamp_dep = dependency('vamp-sdk', version: '>= 2.9', required: false)
++endif
+ thread_dep = dependency('threads')
+-have_ladspa = cpp.has_header('ladspa.h', args: extra_include_args)
+-have_jni = cpp.has_header('jni.h', args: extra_include_args)
+-
+-javac = find_program('javac', required: false)
+-jar = find_program('jar', required: false)
++if get_option('ladspa')
++ have_ladspa = cpp.has_header('ladspa.h', args: extra_include_args)
++endif
++if get_option('jni')
++ have_jni = cpp.has_header('jni.h', args: extra_include_args)
++ javac = find_program('javac', required: false)
++ jar = find_program('jar', required: false)
++endif
+
+
+ # Check FFT and resampler options and set up dependencies and paths
+@@ -255,37 +262,41 @@ if ipp_needed
+ endif
+ endif # ipp_needed
+
+-if not vamp_dep.found()
+- vamp_dep = cpp.find_library('VampPluginSDK',
+- dirs: get_option('extra_lib_dirs'),
+- has_headers: ['vamp-sdk.h'],
+- header_args: extra_include_args,
+- required: false)
++if get_option('vamp')
+ if not vamp_dep.found()
+- vamp_dep = cpp.find_library('vamp-sdk',
++ vamp_dep = cpp.find_library('VampPluginSDK',
+ dirs: get_option('extra_lib_dirs'),
+ has_headers: ['vamp-sdk.h'],
+ header_args: extra_include_args,
+ required: false)
++ if not vamp_dep.found()
++ vamp_dep = cpp.find_library('vamp-sdk',
++ dirs: get_option('extra_lib_dirs'),
++ has_headers: ['vamp-sdk.h'],
++ header_args: extra_include_args,
++ required: false)
++ endif
+ endif
++ have_vamp = true
+ endif
+-have_vamp = vamp_dep.found()
+-
+-if not sndfile_dep.found()
+- sndfile_dep = cpp.find_library('sndfile',
+- dirs: get_option('extra_lib_dirs'),
+- has_headers: ['sndfile.h'],
+- header_args: extra_include_args,
+- required: false)
++
++if get_option('programs')
+ if not sndfile_dep.found()
+- sndfile_dep = cpp.find_library('sndfile-1',
++ sndfile_dep = cpp.find_library('sndfile',
+ dirs: get_option('extra_lib_dirs'),
+ has_headers: ['sndfile.h'],
+ header_args: extra_include_args,
+ required: false)
++ if not sndfile_dep.found()
++ sndfile_dep = cpp.find_library('sndfile-1',
++ dirs: get_option('extra_lib_dirs'),
++ has_headers: ['sndfile.h'],
++ header_args: extra_include_args,
++ required: false)
++ endif
+ endif
++ have_sndfile = true
+ endif
+-have_sndfile = sndfile_dep.found()
+
+
+ # General platform and compiler expectations
+@@ -386,8 +397,10 @@ endif
+ # And the build targets: Static and dynamic libraries, command-line
+ # utility, LADSPA plugin, Vamp plugin, JNI library
+
+-message('Will build Rubber Band Library static library')
+-target_summary += { 'Static library': [ true, 'Name: ' + rubberband_static_name ] }
++if get_option('static')
++ message('Will build Rubber Band Library static library')
++ target_summary += { 'Static library': [ true, 'Name: ' + rubberband_static_name ] }
++endif
+ rubberband_static = static_library(
+ rubberband_static_name,
+ library_sources,
+@@ -425,7 +438,7 @@ else
+ message('Not building Rubber Band Library dynamic library: no_shared option set')
+ endif
+
+-if have_jni and javac.found() and jar.found()
++if get_option('jni')
+ target_summary += { 'JNI library': [ true, 'Name: ' + rubberband_jni_name ] }
+ message('Will build Java Native Interface')
+ rubberband_jni = shared_library(
+@@ -460,7 +473,7 @@ if have_jni and javac.found() and jar.found()
+ )
+ else
+ target_summary += { 'JNI library': false }
+- if not have_jni
++ if not get_option('jni')
+ message('Not building Java Native Interface: jni.h header not found')
+ else
+ message('Not building Java Native Interface: Java compiler not found')
+@@ -474,7 +487,7 @@ install_headers(
+ subdir: 'rubberband'
+ )
+
+-if have_ladspa
++if get_option('ladspa')
+ target_summary += { 'LADSPA plugin': [ true, 'Name: ' + rubberband_ladspa_name ] }
+ message('Will build LADSPA plugin')
+ rubberband_ladspa = shared_library(
+@@ -509,7 +522,7 @@ else
+ message('Not building LADSPA plugin: ladspa.h header not found')
+ endif
+
+-if have_vamp
++if get_option('vamp')
+ target_summary += { 'Vamp plugin': [ true, 'Name: ' + rubberband_vamp_name ] }
+ message('Will build Vamp plugin')
+ rubberband_vamp = shared_library(
+@@ -541,7 +554,7 @@ else
+ message('Not building Vamp plugin: Vamp dependency not found')
+ endif
+
+-if have_sndfile
++if get_option('programs')
+ target_summary += { 'Command-line utility': [ true, 'Name: ' + rubberband_program_name ] }
+ message('Will build command-line utility')
+ rubberband_program = executable(
+diff --git a/meson_options.txt b/meson_options.txt
+index 1703806..cd637f1 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -31,3 +31,22 @@ option('no_shared',
+ value: 'false',
+ description: 'Do not build shared libraries. On Windows this will also ensure that the static library is called simply rubberband.lib, not rubberband-static.lib as it is in the default build.')
+
++option('jni',
++ type: 'boolean',
++ value: 'false')
++
++option('ladspa',
++ type: 'boolean',
++ value: 'false')
++
++option('programs',
++ type: 'boolean',
++ value: 'false')
++
++option('static',
++ type: 'boolean',
++ value: 'false')
++
++option('vamp',
++ type: 'boolean',
++ value: 'false')
diff --git a/media-libs/rubberband/metadata.xml b/media-libs/rubberband/metadata.xml
index 652b82c85b99..01203b0efece 100644
--- a/media-libs/rubberband/metadata.xml
+++ b/media-libs/rubberband/metadata.xml
@@ -6,6 +6,7 @@
<name>Gentoo ProAudio Project</name>
</maintainer>
<use>
+ <flag name="jni">Enables building of Java Native Interface library</flag>
<flag name="programs">Builds also executable applications</flag>
<flag name="vamp">Enables vamp plugins support (Audio analysing plugins)</flag>
</use>
diff --git a/media-libs/rubberband/rubberband-1.9.1.ebuild b/media-libs/rubberband/rubberband-1.9.1.ebuild
new file mode 100644
index 000000000000..68850acca726
--- /dev/null
+++ b/media-libs/rubberband/rubberband-1.9.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit meson multilib-minimal
+
+DESCRIPTION="An audio time-stretching and pitch-shifting library and utility program"
+HOMEPAGE="https://www.breakfastquay.com/rubberband/"
+SRC_URI="https://breakfastquay.com/files/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ladspa jni static-libs +programs vamp"
+
+BDEPEND="
+ virtual/pkgconfig
+"
+CDEPEND="
+ media-libs/libsamplerate[${MULTILIB_USEDEP}]
+ sci-libs/fftw:3.0[${MULTILIB_USEDEP}]
+ jni? ( virtual/jdk:* )
+ ladspa? ( media-libs/ladspa-sdk )
+ programs? ( media-libs/libsndfile )
+ vamp? ( media-libs/vamp-plugin-sdk[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-build.patch"
+)
+
+multilib_src_configure() {
+ local emesonargs=(
+ --buildtype=release
+ -Dfft=fftw
+ -Dresampler=libsamplerate
+ -Dstatic=$(usex static-libs true false)
+ $(meson_use ladspa)
+ $(meson_use jni)
+ $(meson_use programs)
+ $(meson_use vamp)
+ )
+ use jni && emesonargs+=(
+ -Dextra_include_dirs="$(java-config -g JAVA_HOME)/include,$(java-config -g JAVA_HOME)/include/linux"
+ )
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ meson_src_compile
+}
+
+multilib_src_install() {
+ meson_src_install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+}