blob: f0509b88abf175c4eb5d267ec00724d74a0d4eec (
plain)
1 # Description: Time-stretching and pitch-shifting audio library and utility.
2 # URL: https://www.breakfastquay.com/rubberband/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: fftw libsamplerate meson ninja vamp-plugin-sdk
5 # Optional: openjdk8 openjdk11 openjdk15 ladspa libogg libvorbis opus
6
7 name=rubberband
8 version=3.1.2
9 release=1
10 source=(https://github.com/breakfastquay/$name/archive/v$version/$name-v$version.tar.gz)
11
12 build() {
13 if [ -e '/usr/lib/java' ]; then
14 [ -n "${JAVA_HOME}" ] || export JAVA_HOME="/usr/lib/java/openjdk8"
15
16 if prt-get isinst openjdk8; then
17 local java_major="$($JAVA_HOME/bin/java -version 2>&1 | awk '/openjdk/ {split($3,java,"."); print java[2]}')"
18 PKGMK_RUBBERBAND+=" -D extra_include_dirs=/usr/lib/java/openjdk${java_major}/include,/usr/lib/java/openjdk${java_major}/include/linux"
19 export PATH="/usr/lib/java/openjdk${java_major}/bin:$PATH"
20 else
21 #local java_major=$($JAVA_HOME/bin/java -version 2>&1 | awk '/openjdk/ {split($3,java,"."); print java[1]}' | awk -F'"' '{print $1}')
22 local java_major="$($JAVA_HOME/bin/java -version 2>&1 | awk '/OpenJDK 64-Bit/ {split($6,java,"."); print java[1]}')"
23 PKGMK_RUBBERBAND+=" -D extra_include_dirs=/usr/lib/java/openjdk${java_major}-jdk/include,/usr/lib/java/openjdk${java_major}-jdk/include/linux"
24 export PATH="/usr/lib/java/openjdk${java_major}-jdk/bin:$PATH"
25 fi
26 fi
27
28 meson setup build $name-$version ${PKGMK_RUBBERBAND} \
29 --prefix=/usr \
30 --buildtype=plain \
31 -D fft=fftw \
32 -D resampler=libsamplerate
33
34 meson compile -C build -j ${JOBS:-1}
35 DESTDIR=$PKG meson install -C build
36 }
|