Skip to content

Commit ee89e8c

Browse files
committed
Add opencore-amr
1 parent 1a12452 commit ee89e8c

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

scripts.d/50-opencore-amr.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
3+
OAMR_SRC="https://sourceforge.net/projects/opencore-amr/files/opencore-amr/opencore-amr-0.1.5.tar.gz/download"
4+
5+
ffbuild_enabled() {
6+
return 0
7+
}
8+
9+
ffbuild_dockerstage() {
10+
to_df "ADD $SELF /stage.sh"
11+
to_df "RUN run_stage"
12+
}
13+
14+
ffbuild_dockerbuild() {
15+
mkdir opencore
16+
cd opencore
17+
wget -O opencore.tar.gz "$OAMR_SRC"
18+
tar xaf opencore.tar.gz
19+
rm opencore.tar.gz
20+
cd opencore*
21+
22+
autoreconf -i
23+
24+
local myconf=(
25+
--prefix="$FFBUILD_PREFIX"
26+
--disable-shared
27+
--enable-static
28+
--with-pic
29+
--enable-amrnb-encoder
30+
--enable-amrnb-decoder
31+
--disable-examples
32+
)
33+
34+
if [[ $TARGET == win* ]]; then
35+
myconf+=(
36+
--host="$FFBUILD_TOOLCHAIN"
37+
)
38+
else
39+
echo "Unknown target"
40+
return -1
41+
fi
42+
43+
./configure "${myconf[@]}"
44+
make -j$(nproc)
45+
make install
46+
47+
cd ..
48+
rm -rf opencore
49+
}
50+
51+
ffbuild_configure() {
52+
echo --enable-libopencore-amrnb --enable-libopencore-amrwb
53+
}
54+
55+
ffbuild_unconfigure() {
56+
echo --disable-libopencore-amrnb --disable-libopencore-amrwb
57+
}

0 commit comments

Comments
 (0)