Skip to content

Commit 76dd5d3

Browse files
committed
Add new libraries
- libmysofa (HRTF/sofalizer filter) - libspeex (Speex codec) - libshine (fixed-point MP3 encoder) - libgsm (GSM codec) - libbs2b (crossfeed DSP) - xevd/xeve (EVC codec, FFmpeg 7.0+)
1 parent 28ae751 commit 76dd5d3

8 files changed

Lines changed: 268 additions & 0 deletions

File tree

scripts.d/50-libbs2b.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
SCRIPT_REPO="https://github.com/alexmarsev/libbs2b.git"
4+
SCRIPT_COMMIT="5ca2d59888df047f1e4b028e3a2fd5be8b5a7277"
5+
6+
ffbuild_enabled() {
7+
return 0
8+
}
9+
10+
ffbuild_dockerdl() {
11+
default_dl .
12+
}
13+
14+
ffbuild_dockerbuild() {
15+
sed -i '/PKG_CHECK_EXISTS.*sndfile/,/^])$/d' configure.ac
16+
sed -i 's/bin_PROGRAMS =.*/bin_PROGRAMS =/' src/Makefile.am
17+
sed -i '/bs2bconvert/d; /bs2bstream/d' src/Makefile.am
18+
19+
autoreconf -isf
20+
21+
local myconf=(
22+
--prefix="$FFBUILD_PREFIX"
23+
--host="$FFBUILD_TOOLCHAIN"
24+
--disable-shared
25+
--enable-static
26+
)
27+
28+
./configure "${myconf[@]}"
29+
make -j$(nproc)
30+
make install DESTDIR="$FFBUILD_DESTDIR"
31+
}
32+
33+
ffbuild_configure() {
34+
echo --enable-libbs2b
35+
}
36+
37+
ffbuild_unconfigure() {
38+
echo --disable-libbs2b
39+
}

scripts.d/50-libgsm.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
SCRIPT_REPO="https://github.com/timothytylee/libgsm.git"
4+
SCRIPT_COMMIT="98f1708fb5e06a0dfebd58a3b40d610823db9715"
5+
6+
ffbuild_enabled() {
7+
return 0
8+
}
9+
10+
ffbuild_dockerbuild() {
11+
make CC="$CC" AR="$AR" RANLIB="$RANLIB" lib/libgsm.a -j$(nproc)
12+
13+
mkdir -p "$FFBUILD_DESTPREFIX"/lib "$FFBUILD_DESTPREFIX"/include/gsm
14+
cp lib/libgsm.a "$FFBUILD_DESTPREFIX"/lib/
15+
cp inc/gsm.h "$FFBUILD_DESTPREFIX"/include/gsm/
16+
}
17+
18+
ffbuild_configure() {
19+
echo --enable-libgsm
20+
}
21+
22+
ffbuild_unconfigure() {
23+
echo --disable-libgsm
24+
}

scripts.d/50-libmysofa.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
SCRIPT_REPO="https://github.com/hoene/libmysofa.git"
4+
SCRIPT_COMMIT="3f4cb663f171ecb5c6fc3262fb6156efb3f1ddd2"
5+
6+
ffbuild_depends() {
7+
echo base
8+
echo zlib
9+
}
10+
11+
ffbuild_enabled() {
12+
return 0
13+
}
14+
15+
ffbuild_dockerbuild() {
16+
mkdir ffbuild && cd ffbuild
17+
18+
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" \
19+
-DCMAKE_BUILD_TYPE=Release \
20+
-DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
21+
-DBUILD_SHARED_LIBS=OFF \
22+
-DBUILD_TESTS=OFF \
23+
..
24+
make -j$(nproc)
25+
make install DESTDIR="$FFBUILD_DESTDIR"
26+
27+
echo "Libs.private: -lz" >> "$FFBUILD_DESTPREFIX"/lib/pkgconfig/libmysofa.pc
28+
}
29+
30+
ffbuild_configure() {
31+
echo --enable-libmysofa
32+
}
33+
34+
ffbuild_unconfigure() {
35+
echo --disable-libmysofa
36+
}

scripts.d/50-libshine.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
SCRIPT_REPO="https://github.com/toots/shine.git"
4+
SCRIPT_COMMIT="ab5e3526b64af1a2eaa43aa6f441a7312e013519"
5+
6+
ffbuild_enabled() {
7+
return 0
8+
}
9+
10+
ffbuild_dockerdl() {
11+
default_dl .
12+
echo "./bootstrap"
13+
}
14+
15+
ffbuild_dockerbuild() {
16+
local myconf=(
17+
--prefix="$FFBUILD_PREFIX"
18+
--host="$FFBUILD_TOOLCHAIN"
19+
--disable-shared
20+
--enable-static
21+
)
22+
23+
./configure "${myconf[@]}"
24+
make -j$(nproc)
25+
make install DESTDIR="$FFBUILD_DESTDIR"
26+
}
27+
28+
ffbuild_configure() {
29+
echo --enable-libshine
30+
}
31+
32+
ffbuild_unconfigure() {
33+
echo --disable-libshine
34+
}

scripts.d/50-libspeex.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
SCRIPT_REPO="https://github.com/xiph/speex.git"
4+
SCRIPT_COMMIT="05895229896dc942d453446eba6f9f5ddcf95422"
5+
6+
ffbuild_depends() {
7+
echo base
8+
echo libogg
9+
}
10+
11+
ffbuild_enabled() {
12+
return 0
13+
}
14+
15+
ffbuild_dockerdl() {
16+
default_dl .
17+
echo "./autogen.sh"
18+
}
19+
20+
ffbuild_dockerbuild() {
21+
local myconf=(
22+
--prefix="$FFBUILD_PREFIX"
23+
--host="$FFBUILD_TOOLCHAIN"
24+
--disable-shared
25+
--enable-static
26+
--disable-binaries
27+
)
28+
29+
./configure "${myconf[@]}"
30+
make -j$(nproc)
31+
make install DESTDIR="$FFBUILD_DESTDIR"
32+
}
33+
34+
ffbuild_configure() {
35+
echo --enable-libspeex
36+
}
37+
38+
ffbuild_unconfigure() {
39+
echo --disable-libspeex
40+
}

scripts.d/50-xevd.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
SCRIPT_REPO="https://github.com/mpeg5/xevd.git"
4+
SCRIPT_COMMIT="4087f635624cf4ee6ebe3f9ea165ff939b32117f"
5+
6+
ffbuild_enabled() {
7+
(( $(ffbuild_ffver) >= 700 )) || return -1
8+
[[ $TARGET == *32 ]] && return -1
9+
[[ $TARGET == *arm* ]] && return -1
10+
return 0
11+
}
12+
13+
ffbuild_dockerdl() {
14+
default_dl .
15+
echo "git fetch --unshallow"
16+
}
17+
18+
ffbuild_dockerbuild() {
19+
sed -i '/add_subdirectory(app)/d' CMakeLists.txt
20+
21+
mkdir ffbuild && cd ffbuild
22+
23+
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" \
24+
-DCMAKE_BUILD_TYPE=Release \
25+
-DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
26+
..
27+
make -j$(nproc)
28+
make install DESTDIR="$FFBUILD_DESTDIR"
29+
30+
mv "$FFBUILD_DESTPREFIX"/lib/{xevd/libxevd.a,}
31+
rm -rf "$FFBUILD_DESTPREFIX"/lib/{libxevd.dll*,libxevd.so*,xevd,xevd_base}
32+
33+
echo "Cflags.private: -DXEVD_STATIC_DEFINE" >> "$FFBUILD_DESTPREFIX"/lib/pkgconfig/xevd.pc
34+
}
35+
36+
ffbuild_configure() {
37+
(( $(ffbuild_ffver) >= 700 )) || return 0
38+
echo --enable-libxevd
39+
}
40+
41+
ffbuild_unconfigure() {
42+
(( $(ffbuild_ffver) >= 700 )) || return 0
43+
echo --disable-libxevd
44+
}

scripts.d/50-xeve.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
SCRIPT_REPO="https://github.com/mpeg5/xeve.git"
4+
SCRIPT_COMMIT="429c18a7736ffc010e1c550e8015ff18a242d06c"
5+
6+
ffbuild_enabled() {
7+
(( $(ffbuild_ffver) >= 700 )) || return -1
8+
[[ $TARGET == *32 ]] && return -1
9+
[[ $TARGET == *arm* ]] && return -1
10+
return 0
11+
}
12+
13+
ffbuild_dockerdl() {
14+
default_dl .
15+
echo "git fetch --unshallow"
16+
}
17+
18+
ffbuild_dockerbuild() {
19+
sed -i '/add_subdirectory(app)/d' CMakeLists.txt
20+
21+
mkdir ffbuild && cd ffbuild
22+
23+
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" \
24+
-DCMAKE_BUILD_TYPE=Release \
25+
-DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
26+
..
27+
make -j$(nproc)
28+
make install DESTDIR="$FFBUILD_DESTDIR"
29+
30+
mv "$FFBUILD_DESTPREFIX"/lib/{xeve/libxeve.a,}
31+
rm -rf "$FFBUILD_DESTPREFIX"/lib/{libxeve.dll*,libxeve.so*,xeve,xeve_base}
32+
33+
echo "Cflags.private: -DXEVE_STATIC_DEFINE" >> "$FFBUILD_DESTPREFIX"/lib/pkgconfig/xeve.pc
34+
}
35+
36+
ffbuild_configure() {
37+
(( $(ffbuild_ffver) >= 700 )) || return 0
38+
echo --enable-libxeve
39+
}
40+
41+
ffbuild_unconfigure() {
42+
(( $(ffbuild_ffver) >= 700 )) || return 0
43+
echo --disable-libxeve
44+
}

scripts.d/zz-final.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,16 @@ ffbuild_depends() {
3434
echo libaribcaption
3535
echo libass
3636
echo libbluray
37+
echo libbs2b
38+
echo libgsm
3739
echo libjxl
3840
echo libmp3lame
41+
echo libmysofa
3942
echo libopus
4043
echo libplacebo
4144
echo librist
45+
echo libshine
46+
echo libspeex
4247
echo libssh
4348
echo libtheora
4449
echo libvpx
@@ -69,6 +74,8 @@ ffbuild_depends() {
6974
echo x264
7075
echo x265
7176
echo xavs2
77+
echo xevd
78+
echo xeve
7279
echo xvid
7380
echo zimg
7481
echo zvbi

0 commit comments

Comments
 (0)