Add soxr
This commit is contained in:
parent
27523d3705
commit
d354210896
3 changed files with 54 additions and 1 deletions
4
build.sh
4
build.sh
|
@ -25,12 +25,14 @@ for script in scripts.d/*.sh; do
|
|||
FF_CFLAGS+=" $(get_output $script cflags)"
|
||||
FF_CXXFLAGS+=" $(get_output $script cxxflags)"
|
||||
FF_LDFLAGS+=" $(get_output $script ldflags)"
|
||||
FF_LIBS+=" $(get_output $script libs)"
|
||||
done
|
||||
|
||||
FF_CONFIGURE="$(xargs <<< "$FF_CONFIGURE")"
|
||||
FF_CFLAGS="$(xargs <<< "$FF_CFLAGS")"
|
||||
FF_CXXFLAGS="$(xargs <<< "$FF_CXXFLAGS")"
|
||||
FF_LDFLAGS="$(xargs <<< "$FF_LDFLAGS")"
|
||||
FF_LIBS="$(xargs <<< "$FF_LIBS")"
|
||||
|
||||
rm -rf ffbuild
|
||||
mkdir ffbuild
|
||||
|
@ -44,7 +46,7 @@ docker run --rm -i -u "$(id -u):$(id -g)" -v $PWD/ffbuild:/ffbuild "$IMAGE" bash
|
|||
cd ffmpeg
|
||||
git checkout $GIT_BRANCH
|
||||
|
||||
./configure --prefix=/ffbuild/prefix --pkg-config-flags="--static" \$FFBUILD_TARGET_FLAGS $FF_CONFIGURE --extra-cflags="$FF_CFLAGS" --extra-cxxflags="$FF_CXXFLAGS" --extra-ldflags="$FF_LDFLAGS"
|
||||
./configure --prefix=/ffbuild/prefix --pkg-config-flags="--static" \$FFBUILD_TARGET_FLAGS $FF_CONFIGURE --extra-cflags="$FF_CFLAGS" --extra-cxxflags="$FF_CXXFLAGS" --extra-ldflags="$FF_LDFLAGS" --extra-libs="$FF_LIBS"
|
||||
make -j\$(nproc)
|
||||
make install
|
||||
EOF
|
||||
|
|
43
scripts.d/50-soxr.sh
Executable file
43
scripts.d/50-soxr.sh
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
SOXR_REPO="https://git.code.sf.net/p/soxr/code"
|
||||
SOXR_COMMIT="945b592b70470e29f917f4de89b4281fbbd540c0"
|
||||
|
||||
ffbuild_enabled() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerstage() {
|
||||
to_df "ADD $SELF /stage.sh"
|
||||
to_df "RUN run_stage"
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git-mini-clone "$SOXR_REPO" "$SOXR_COMMIT" soxr
|
||||
cd soxr
|
||||
|
||||
mkdir build && cd build
|
||||
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF ..
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
cd ../..
|
||||
rm -rf soxr
|
||||
}
|
||||
|
||||
ffbuild_configure() {
|
||||
echo --enable-libsoxr
|
||||
}
|
||||
|
||||
ffbuild_unconfigure() {
|
||||
echo --disable-libsoxr
|
||||
}
|
||||
|
||||
ffbuild_ldflags() {
|
||||
echo -pthread
|
||||
}
|
||||
|
||||
ffbuild_libs() {
|
||||
echo -lgomp
|
||||
}
|
|
@ -41,3 +41,11 @@ ffbuild_ldflags() {
|
|||
ffbuild_unldflags() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_libs() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_unlibs() {
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue