Add frei0r

Apparently, the code for this in ffmpeg is ancient, and does not use the
built in dlfcn compat code, so... adding the wrapper it is.
This commit is contained in:
BtbN 2021-08-23 03:52:40 +02:00
parent 69c3786546
commit 1949b4b73f
2 changed files with 67 additions and 0 deletions

21
scripts.d/50-dlfcn-win32.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
DLFCN_WIN32_REPO="https://github.com/dlfcn-win32/dlfcn-win32.git"
DLFCN_WIN32_COMMIT="010969070719fe14435f4b146ecef5e65df0098f"
ffbuild_enabled() {
[[ $TARGET != win* ]] && return -1
return 0
}
ffbuild_dockerbuild() {
git-mini-clone "$DLFCN_WIN32_REPO" "$DLFCN_WIN32_COMMIT" dlfcn-win32
cd dlfcn-win32
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
-DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF ..
make -j$(nproc)
make install
}

46
scripts.d/50-frei0r.sh Executable file
View File

@ -0,0 +1,46 @@
#!/bin/bash
FREI0R_REPO="https://github.com/dyne/frei0r.git"
FREI0R_COMMIT="86475d3e11e1061bf161e6ed3830fe2cf3d172ac"
ffbuild_enabled() {
[[ $VARIANT == lgpl* ]] && return -1
return 0
}
ffbuild_dockerbuild() {
git-mini-clone "$FREI0R_REPO" "$FREI0R_COMMIT" frei0r
cd frei0r
./autogen.sh
local myconf=(
--prefix="$FFBUILD_PREFIX"
--disable-shared
--enable-static
--with-pic
--enable-cpuflags
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
echo "Unknown target"
return -1
fi
./configure "${myconf[@]}"
make -C include -j$(nproc)
make -C include install
make install-pkgconfigDATA
}
ffbuild_configure() {
echo --enable-frei0r
}
ffbuild_unconfigure() {
echo --disable-frei0r
}