- updated to ffmpeg 7.1
- built under Debian, so all codecs can be enabled - binaries are installed in a scratch container for a smaller download...no distro overhead
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,11 +1,12 @@
|
||||
FROM alpine AS tmp
|
||||
FROM debian AS tmp
|
||||
COPY build-ffmpeg /root/build-ffmpeg
|
||||
RUN apk add --no-cache gcc g++ musl-dev make automake autoconf bash curl linux-headers diffutils patch && \
|
||||
cd /root/ && \
|
||||
chmod +x build-ffmpeg && \
|
||||
# https://github.com/markus-perl/ffmpeg-build-script/pull/227 git needed or x265 won't build
|
||||
RUN apt update && apt install -y build-essential curl git
|
||||
WORKDIR /root
|
||||
RUN chmod +x build-ffmpeg && \
|
||||
NUMJOBS=12 ./build-ffmpeg -b --enable-gpl-and-non-free --full-static
|
||||
|
||||
FROM alpine
|
||||
FROM scratch
|
||||
COPY --from=tmp /usr/local/bin/ff* /usr/bin/
|
||||
ENTRYPOINT ["/usr/bin/ffmpeg"]
|
||||
CMD ["-h"]
|
||||
|
||||
10
README.md
10
README.md
@@ -1,17 +1,15 @@
|
||||
ffmpeg-docker
|
||||
=============
|
||||
|
||||
This is an adaptation of
|
||||
[this ffmpeg build script](https://github.com/markus-perl/ffmpeg-build-script),
|
||||
set up to build a containerized ffmpeg. It's a static build atop Alpine
|
||||
Linux, with "non-free" codecs enabled, and with Theora disabled (because it
|
||||
didn't build under Alpine last time I tried).
|
||||
This is a static-build [ffmpeg](https://ffmpeg.org/), built with
|
||||
[this script](https://github.com/markus-perl/ffmpeg-build-script),
|
||||
in a scratch container for easy use anywhere, with "non-free" codecs enabled.
|
||||
|
||||
Invoke it with something like this:
|
||||
|
||||
```
|
||||
docker run -it --rm -v /path/to/files:/path/to/files \
|
||||
cr.gitlab.alfter.us:443/salfter/ffmpeg-docker \
|
||||
cr.gitlab.alfter.us/salfter/ffmpeg-docker \
|
||||
/path/to/files/infile.mkv -c copy -f mp4 /path/to/files/outfile.m4v
|
||||
```
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
VERSION=7.0
|
||||
VERSION=7.1
|
||||
docker build -t salfter/ffmpeg:latest . &&
|
||||
docker push salfter/ffmpeg:latest &&
|
||||
for tag in salfter/ffmpeg:$VERSION \
|
||||
cr.gitlab.alfter.us:443/salfter/ffmpeg-docker:latest \
|
||||
cr.gitlab.alfter.us:443/salfter/ffmpeg-docker:$VERSION
|
||||
cr.gitlab.alfter.us/salfter/ffmpeg-docker:latest \
|
||||
cr.gitlab.alfter.us/salfter/ffmpeg-docker:$VERSION
|
||||
do
|
||||
docker tag salfter/ffmpeg:latest $tag
|
||||
docker push $tag
|
||||
|
||||
330
build-ffmpeg
Normal file → Executable file
330
build-ffmpeg
Normal file → Executable file
@@ -4,18 +4,19 @@
|
||||
# LICENSE: https://github.com/markus-perl/ffmpeg-build-script/blob/master/LICENSE
|
||||
|
||||
PROGNAME=$(basename "$0")
|
||||
FFMPEG_VERSION=7.0
|
||||
SCRIPT_VERSION=1.51
|
||||
FFMPEG_VERSION=7.1
|
||||
SCRIPT_VERSION=1.53
|
||||
CWD=$(pwd)
|
||||
PACKAGES="$CWD/packages"
|
||||
WORKSPACE="$CWD/workspace"
|
||||
CFLAGS="-I$WORKSPACE/include"
|
||||
CFLAGS="-I$WORKSPACE/include -Wno-int-conversion"
|
||||
LDFLAGS="-L$WORKSPACE/lib"
|
||||
LDEXEFLAGS=""
|
||||
EXTRALIBS="-ldl -lpthread -lm -lz"
|
||||
MACOS_M1=false
|
||||
CONFIGURE_OPTIONS=()
|
||||
NONFREE_AND_GPL=false
|
||||
DISABLE_LV2=false
|
||||
LATEST=false
|
||||
MANPAGES=1
|
||||
CURRENT_PACKAGE_VERSION=0
|
||||
@@ -25,6 +26,7 @@ if [[ ("$(uname -m)" == "arm64") && ("$OSTYPE" == "darwin"*) ]]; then
|
||||
# If arm64 AND darwin (macOS)
|
||||
export ARCH=arm64
|
||||
export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
export CXX=$(which clang++)
|
||||
MACOS_M1=true
|
||||
fi
|
||||
|
||||
@@ -52,7 +54,7 @@ make_dir() {
|
||||
|
||||
remove_dir() {
|
||||
if [ -d "$1" ]; then
|
||||
rm -r "$1"
|
||||
rm -rf "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -119,7 +121,16 @@ download() {
|
||||
)
|
||||
}
|
||||
|
||||
print_flags () {
|
||||
echo "Flags: CFLAGS \"$CFLAGS\", CXXFLAGS \"$CXXFLAGS\", LDFLAGS \"$LDFLAGS\", LDEXEFLAGS \"$LDEXEFLAGS\""
|
||||
}
|
||||
|
||||
execute() {
|
||||
|
||||
if [[ "$1" == *configure* ]]; then
|
||||
print_flags
|
||||
fi
|
||||
|
||||
echo "$ $*"
|
||||
|
||||
OUTPUT=$("$@" 2>&1)
|
||||
@@ -206,6 +217,7 @@ usage() {
|
||||
echo " --version Display version information"
|
||||
echo " -b, --build Starts the build process"
|
||||
echo " --enable-gpl-and-non-free Enable GPL and non-free codecs - https://ffmpeg.org/legal.html"
|
||||
echo " --disable-lv2 Disable LV2 libraries"
|
||||
echo " -c, --cleanup Remove all working dirs"
|
||||
echo " --latest Build latest version of dependencies if newer available"
|
||||
echo " --small Prioritize small size over speed and usability; don't build manpages"
|
||||
@@ -237,6 +249,9 @@ while (($# > 0)); do
|
||||
CONFIGURE_OPTIONS+=("--enable-gpl")
|
||||
NONFREE_AND_GPL=true
|
||||
fi
|
||||
if [[ "$1" == "--disable-lv2" ]]; then
|
||||
DISABLE_LV2=true
|
||||
fi
|
||||
if [[ "$1" == "--cleanup" || "$1" =~ '-c' && ! "$1" =~ '--' ]]; then
|
||||
cflag='-c'
|
||||
cleanup
|
||||
@@ -246,7 +261,9 @@ while (($# > 0)); do
|
||||
echo "Error: A full static binary can only be build on Linux."
|
||||
exit 1
|
||||
fi
|
||||
LDEXEFLAGS="-static"
|
||||
LDEXEFLAGS="-static -fPIC"
|
||||
CFLAGS+=" -fPIC"
|
||||
CXXFLAGS+=" -fPIC"
|
||||
fi
|
||||
if [[ "$1" == "--latest" ]]; then
|
||||
LATEST=true
|
||||
@@ -333,6 +350,10 @@ fi
|
||||
|
||||
if build "pkg-config" "0.29.2"; then
|
||||
download "https://pkgconfig.freedesktop.org/releases/pkg-config-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
export XXFLAGS +=" -Wno-int-conversion" # pkg-config 0.29.2 has a warning that is treated as an error
|
||||
export CFLAGS +=" -Wno-error=int-conversion"
|
||||
fi
|
||||
execute ./configure --silent --prefix="${WORKSPACE}" --with-pc-path="${WORKSPACE}"/lib/pkgconfig --with-internal-glib
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
@@ -355,7 +376,7 @@ if build "nasm" "2.16.01"; then
|
||||
build_done "nasm" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
|
||||
if build "zlib" "1.2.13"; then
|
||||
if build "zlib" "1.3.1"; then
|
||||
download "https://github.com/madler/zlib/releases/download/v$CURRENT_PACKAGE_VERSION/zlib-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./configure --static --prefix="${WORKSPACE}"
|
||||
execute make -j $MJOBS
|
||||
@@ -396,6 +417,14 @@ if build "libtool" "2.4.7"; then
|
||||
fi
|
||||
|
||||
if $NONFREE_AND_GPL; then
|
||||
if build "gettext" "0.22.5"; then
|
||||
download "https://ftpmirror.gnu.org/gettext/gettext-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --enable-static --disable-shared
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
build_done "gettext" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
|
||||
if build "openssl" "1.1.1w"; then
|
||||
download "https://www.openssl.org/source/openssl-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
if $MACOS_M1; then
|
||||
@@ -438,12 +467,15 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if build "cmake" "3.27.7"; then
|
||||
if build "cmake" "3.31.0"; then
|
||||
CXXFLAGS_BACKUP=$CXXFLAGS
|
||||
export CXXFLAGS+=" -std=c++11"
|
||||
download "https://github.com/Kitware/CMake/releases/download/v$CURRENT_PACKAGE_VERSION/cmake-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --parallel="${MJOBS}" -- -DCMAKE_USE_OPENSSL=OFF
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
build_done "cmake" $CURRENT_PACKAGE_VERSION
|
||||
export CXXFLAGS=$CXXFLAGS_BACKUP
|
||||
fi
|
||||
|
||||
##
|
||||
@@ -453,17 +485,34 @@ fi
|
||||
if command_exists "python3"; then
|
||||
# dav1d needs meson and ninja along with nasm to be built
|
||||
if command_exists "pip3"; then
|
||||
# meson and ninja can be installed via pip3
|
||||
execute pip3 install pip setuptools --quiet --upgrade --no-cache-dir --disable-pip-version-check
|
||||
for r in meson ninja; do
|
||||
if ! command_exists ${r}; then
|
||||
execute pip3 install ${r} --quiet --upgrade --no-cache-dir --disable-pip-version-check
|
||||
|
||||
#set variable meson and ninja installed to false
|
||||
MESON_INSTALLED=false
|
||||
|
||||
#check if macOs and brew is available
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
if command_exists "brew"; then
|
||||
brew install python-setuptools meson ninja
|
||||
MESON_INSTALLED=true
|
||||
fi
|
||||
export PATH=$PATH:~/Library/Python/3.9/bin
|
||||
done
|
||||
else
|
||||
#check if meson and ninja are installed MESON_INSTALLED AND system is not MacOS
|
||||
if ! $MESON_INSTALLED; then
|
||||
|
||||
# meson and ninja can be installed via pip3
|
||||
execute pip3 install pip setuptools --quiet --upgrade --no-cache-dir --disable-pip-version-check
|
||||
for r in meson ninja; do
|
||||
if ! command_exists ${r}; then
|
||||
execute pip3 install ${r} --quiet --upgrade --no-cache-dir --disable-pip-version-check
|
||||
fi
|
||||
export PATH=$PATH:~/Library/Python/3.9/bin
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
if command_exists "meson"; then
|
||||
if build "dav1d" "1.1.0"; then
|
||||
if build "dav1d" "1.4.2"; then
|
||||
download "https://code.videolan.org/videolan/dav1d/-/archive/$CURRENT_PACKAGE_VERSION/dav1d-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
make_dir build
|
||||
|
||||
@@ -486,7 +535,7 @@ if command_exists "python3"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if build "svtav1" "1.7.0"; then
|
||||
if build "svtav1" "2.1.0"; then
|
||||
# Last known working commit which passed CI Tests from HEAD branch
|
||||
download "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v$CURRENT_PACKAGE_VERSION/SVT-AV1-v$CURRENT_PACKAGE_VERSION.tar.gz" "svtav1-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
cd "${PACKAGES}"/svtav1-$CURRENT_PACKAGE_VERSION//Build/linux || exit
|
||||
@@ -502,9 +551,11 @@ CONFIGURE_OPTIONS+=("--enable-libsvtav1")
|
||||
|
||||
if command_exists "cargo"; then
|
||||
if [[ ! "$SKIPRAV1E" == "yes" ]]; then
|
||||
if build "rav1e" "0.6.6"; then
|
||||
execute cargo install --version "0.9.20+cargo-0.71" cargo-c
|
||||
if build "rav1e" "0.7.1"; then
|
||||
echo "if you get the message 'cannot be built because it requires rustc x.xx or newer, try to run 'rustup update'"
|
||||
execute cargo install cargo-c
|
||||
download "https://github.com/xiph/rav1e/archive/refs/tags/v$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
export RUSTFLAGS="-C target-cpu=native"
|
||||
execute cargo cinstall --prefix="${WORKSPACE}" --library-type=staticlib --crt-static --release
|
||||
build_done "rav1e" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
@@ -514,7 +565,7 @@ fi
|
||||
|
||||
if $NONFREE_AND_GPL; then
|
||||
|
||||
if build "x264" "941cae6d"; then
|
||||
if build "x264" "be4f0200"; then
|
||||
download "https://code.videolan.org/videolan/x264/-/archive/$CURRENT_PACKAGE_VERSION/x264-$CURRENT_PACKAGE_VERSION.tar.gz" "x264-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
cd "${PACKAGES}"/x264-$CURRENT_PACKAGE_VERSION || exit
|
||||
|
||||
@@ -534,8 +585,8 @@ if $NONFREE_AND_GPL; then
|
||||
fi
|
||||
|
||||
if $NONFREE_AND_GPL; then
|
||||
if build "x265" "3.5"; then
|
||||
download "https://github.com/videolan/x265/archive/Release_$CURRENT_PACKAGE_VERSION.tar.gz" "x265-$CURRENT_PACKAGE_VERSION.tar.gz" # This is actually 3.4 if looking at x265Version.txt
|
||||
if build "x265" "3.6"; then
|
||||
download "https://bitbucket.org/multicoreware/x265_git/downloads/x265_$CURRENT_PACKAGE_VERSION.tar.gz" "x265-$CURRENT_PACKAGE_VERSION.tar.gz" # This is actually 3.4 if looking at x265Version.txt
|
||||
cd build/linux || exit
|
||||
rm -rf 8bit 10bit 12bit 2>/dev/null
|
||||
mkdir -p 8bit 10bit 12bit
|
||||
@@ -577,7 +628,7 @@ EOF
|
||||
CONFIGURE_OPTIONS+=("--enable-libx265")
|
||||
fi
|
||||
|
||||
if build "libvpx" "1.13.1"; then
|
||||
if build "libvpx" "1.14.1"; then
|
||||
download "https://github.com/webmproject/libvpx/archive/refs/tags/v$CURRENT_PACKAGE_VERSION.tar.gz" "libvpx-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
@@ -633,8 +684,8 @@ if $NONFREE_AND_GPL; then
|
||||
CONFIGURE_OPTIONS+=("--enable-libvidstab")
|
||||
fi
|
||||
|
||||
if build "av1" "7b5f665"; then
|
||||
# libaom bcfe6fb == v3.5.0
|
||||
if build "av1" "42dfaa1d47022650bc157dbe20d210591d14bae4"; then
|
||||
# libaom 42dfaa1d47022650bc157dbe20d210591d14bae4 == v3.9.0
|
||||
download "https://aomedia.googlesource.com/aom/+archive/$CURRENT_PACKAGE_VERSION.tar.gz" "av1.tar.gz" "av1"
|
||||
make_dir "$PACKAGES"/aom_build
|
||||
cd "$PACKAGES"/aom_build || exit
|
||||
@@ -665,61 +716,63 @@ CONFIGURE_OPTIONS+=("--enable-libzimg")
|
||||
##
|
||||
## audio library
|
||||
##
|
||||
if ! $DISABLE_LV2 ; then
|
||||
|
||||
if command_exists "python3"; then
|
||||
|
||||
if command_exists "meson"; then
|
||||
|
||||
if build "lv2" "1.18.10"; then
|
||||
download "https://lv2plug.in/spec/lv2-$CURRENT_PACKAGE_VERSION.tar.xz" "lv2-$CURRENT_PACKAGE_VERSION.tar.xz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "lv2" $CURRENT_PACKAGE_VERSION
|
||||
if command_exists "python3"; then
|
||||
|
||||
if command_exists "meson"; then
|
||||
|
||||
if build "lv2" "1.18.10"; then
|
||||
download "https://lv2plug.in/spec/lv2-$CURRENT_PACKAGE_VERSION.tar.xz" "lv2-$CURRENT_PACKAGE_VERSION.tar.xz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "lv2" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "waflib" "b600c92"; then
|
||||
download "https://gitlab.com/drobilla/autowaf/-/archive/$CURRENT_PACKAGE_VERSION/autowaf-$CURRENT_PACKAGE_VERSION.tar.gz" "autowaf.tar.gz"
|
||||
build_done "waflib" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "serd" "0.30.16"; then
|
||||
download "https://gitlab.com/drobilla/serd/-/archive/v$CURRENT_PACKAGE_VERSION/serd-v$CURRENT_PACKAGE_VERSION.tar.gz" "serd-v$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "serd" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "pcre" "8.45"; then
|
||||
download "https://altushost-swe.dl.sourceforge.net/project/pcre/pcre/$CURRENT_PACKAGE_VERSION/pcre-$CURRENT_PACKAGE_VERSION.tar.gz" "pcre-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
build_done "pcre" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "sord" "0.16.14"; then
|
||||
download "https://gitlab.com/drobilla/sord/-/archive/v$CURRENT_PACKAGE_VERSION/sord-v$CURRENT_PACKAGE_VERSION.tar.gz" "sord-v$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "sord" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "sratom" "0.6.14"; then
|
||||
download "https://gitlab.com/lv2/sratom/-/archive/v$CURRENT_PACKAGE_VERSION/sratom-v$CURRENT_PACKAGE_VERSION.tar.gz" "sratom-v$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "sratom" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "lilv" "0.24.20"; then
|
||||
download "https://gitlab.com/lv2/lilv/-/archive/v$CURRENT_PACKAGE_VERSION/lilv-v$CURRENT_PACKAGE_VERSION.tar.gz" "lilv-v$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "lilv" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
CFLAGS+=" -I$WORKSPACE/include/lilv-0"
|
||||
|
||||
CONFIGURE_OPTIONS+=("--enable-lv2")
|
||||
|
||||
fi
|
||||
if build "waflib" "b600c92"; then
|
||||
download "https://gitlab.com/drobilla/autowaf/-/archive/$CURRENT_PACKAGE_VERSION/autowaf-$CURRENT_PACKAGE_VERSION.tar.gz" "autowaf.tar.gz"
|
||||
build_done "waflib" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "serd" "0.30.16"; then
|
||||
download "https://gitlab.com/drobilla/serd/-/archive/v$CURRENT_PACKAGE_VERSION/serd-v$CURRENT_PACKAGE_VERSION.tar.gz" "serd-v$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "serd" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "pcre" "8.45"; then
|
||||
download "https://altushost-swe.dl.sourceforge.net/project/pcre/pcre/$CURRENT_PACKAGE_VERSION/pcre-$CURRENT_PACKAGE_VERSION.tar.gz" "pcre-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
build_done "pcre" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "sord" "0.16.14"; then
|
||||
download "https://gitlab.com/drobilla/sord/-/archive/v$CURRENT_PACKAGE_VERSION/sord-v$CURRENT_PACKAGE_VERSION.tar.gz" "sord-v$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "sord" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "sratom" "0.6.14"; then
|
||||
download "https://gitlab.com/lv2/sratom/-/archive/v$CURRENT_PACKAGE_VERSION/sratom-v$CURRENT_PACKAGE_VERSION.tar.gz" "sratom-v$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "sratom" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "lilv" "0.24.20"; then
|
||||
download "https://gitlab.com/lv2/lilv/-/archive/v$CURRENT_PACKAGE_VERSION/lilv-v$CURRENT_PACKAGE_VERSION.tar.gz" "lilv-v$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
|
||||
execute ninja -C build
|
||||
execute ninja -C build install
|
||||
build_done "lilv" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
CFLAGS+=" -I$WORKSPACE/include/lilv-0"
|
||||
|
||||
CONFIGURE_OPTIONS+=("--enable-lv2")
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -743,7 +796,7 @@ if build "lame" "3.100"; then
|
||||
fi
|
||||
CONFIGURE_OPTIONS+=("--enable-libmp3lame")
|
||||
|
||||
if build "opus" "1.4"; then
|
||||
if build "opus" "1.5.2"; then
|
||||
download "https://downloads.xiph.org/releases/opus/opus-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
|
||||
execute make -j $MJOBS
|
||||
@@ -763,6 +816,10 @@ fi
|
||||
|
||||
if build "libvorbis" "1.3.7"; then
|
||||
download "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
sed "s/-force_cpusubtype_ALL//g" configure.ac >configure.ac.patched
|
||||
rm configure.ac
|
||||
mv configure.ac.patched configure.ac
|
||||
execute ./autogen.sh --prefix="${WORKSPACE}"
|
||||
execute ./configure --prefix="${WORKSPACE}" --with-ogg-libraries="${WORKSPACE}"/lib --with-ogg-includes="${WORKSPACE}"/include/ --enable-static --disable-shared --disable-oggtest
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
@@ -771,30 +828,30 @@ if build "libvorbis" "1.3.7"; then
|
||||
fi
|
||||
CONFIGURE_OPTIONS+=("--enable-libvorbis")
|
||||
|
||||
#if build "libtheora" "1.1.1"; then
|
||||
# download "https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
# sed "s/-fforce-addr//g" configure >configure.patched
|
||||
# chmod +x configure.patched
|
||||
# mv configure.patched configure
|
||||
#
|
||||
# if ! $MACOS_M1; then
|
||||
# ##BEGIN CONFIG.GUESS PATCH -- Updating config.guess file. Which allowed me to compile on aarch64 (ARMv8) [linux kernel 4.9 Ubuntu 20.04]
|
||||
# rm config.guess
|
||||
# curl -L --silent -o "config.guess" "https://raw.githubusercontent.com/gcc-mirror/gcc/master/config.guess"
|
||||
# chmod +x config.guess
|
||||
# ##END OF CONFIG.GUESS PATCH
|
||||
# fi
|
||||
#
|
||||
# execute ./configure --prefix="${WORKSPACE}" --with-ogg-libraries="${WORKSPACE}"/lib --with-ogg-includes="${WORKSPACE}"/include/ --with-vorbis-libraries="${WORKSPACE}"/lib --with-vorbis-includes="${WORKSPACE}"/include/ --enable-static --disable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm --disable-spec
|
||||
# execute make -j $MJOBS
|
||||
# execute make install
|
||||
#
|
||||
# build_done "libtheora" $CURRENT_PACKAGE_VERSION
|
||||
#fi
|
||||
CONFIGURE_OPTIONS+=("--disable-libtheora")
|
||||
if build "libtheora" "1.1.1"; then
|
||||
download "https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
sed "s/-fforce-addr//g" configure >configure.patched
|
||||
chmod +x configure.patched
|
||||
mv configure.patched configure
|
||||
|
||||
if ! $MACOS_M1; then
|
||||
##BEGIN CONFIG.GUESS PATCH -- Updating config.guess file. Which allowed me to compile on aarch64 (ARMv8) [linux kernel 4.9 Ubuntu 20.04]
|
||||
rm config.guess
|
||||
curl -L --silent -o "config.guess" "https://raw.githubusercontent.com/gcc-mirror/gcc/master/config.guess"
|
||||
chmod +x config.guess
|
||||
##END OF CONFIG.GUESS PATCH
|
||||
fi
|
||||
|
||||
execute ./configure --prefix="${WORKSPACE}" --with-ogg-libraries="${WORKSPACE}"/lib --with-ogg-includes="${WORKSPACE}"/include/ --with-vorbis-libraries="${WORKSPACE}"/lib --with-vorbis-includes="${WORKSPACE}"/include/ --enable-static --disable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm --disable-spec
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
|
||||
build_done "libtheora" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
CONFIGURE_OPTIONS+=("--enable-libtheora")
|
||||
|
||||
if $NONFREE_AND_GPL; then
|
||||
if build "fdk_aac" "2.0.2"; then
|
||||
if build "fdk_aac" "2.0.3"; then
|
||||
download "https://sourceforge.net/projects/opencore-amr/files/fdk-aac/fdk-aac-$CURRENT_PACKAGE_VERSION.tar.gz/download?use_mirror=gigenet" "fdk-aac-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static --enable-pic
|
||||
execute make -j $MJOBS
|
||||
@@ -809,14 +866,14 @@ fi
|
||||
## image library
|
||||
##
|
||||
|
||||
if build "libtiff" "4.5.0"; then
|
||||
if build "libtiff" "4.6.0"; then
|
||||
download "https://download.osgeo.org/libtiff/tiff-$CURRENT_PACKAGE_VERSION.tar.xz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static --disable-dependency-tracking --disable-lzma --disable-webp --disable-zstd --without-x
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
build_done "libtiff" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
if build "libpng" "1.6.39"; then
|
||||
if build "libpng" "1.6.43"; then
|
||||
download "https://sourceforge.net/projects/libpng/files/libpng16/$CURRENT_PACKAGE_VERSION/libpng-$CURRENT_PACKAGE_VERSION.tar.gz" "libpng-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
export LDFLAGS="${LDFLAGS}"
|
||||
export CPPFLAGS="${CFLAGS}"
|
||||
@@ -826,28 +883,42 @@ if build "libpng" "1.6.39"; then
|
||||
build_done "libpng" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
|
||||
## does not compile on monterey -> _PrintGifError
|
||||
if [[ "$OSTYPE" != "darwin"* ]]; then
|
||||
if build "libwebp" "1.2.2"; then
|
||||
# libwebp can fail to compile on Ubuntu if these flags were left set to CFLAGS
|
||||
CPPFLAGS=
|
||||
download "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$CURRENT_PACKAGE_VERSION.tar.gz" "libwebp-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static --disable-dependency-tracking --disable-gl --with-zlib-include="${WORKSPACE}"/include/ --with-zlib-lib="${WORKSPACE}"/lib
|
||||
make_dir build
|
||||
cd build || exit
|
||||
execute cmake -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include -DENABLE_SHARED=OFF -DENABLE_STATIC=ON ../
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
|
||||
build_done "libwebp" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
CONFIGURE_OPTIONS+=("--enable-libwebp")
|
||||
if build "libjxl" "0.11.0"; then
|
||||
download "https://github.com/libjxl/libjxl/archive/refs/tags/v$CURRENT_PACKAGE_VERSION.tar.gz" "libjxl-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
# currently needed to fix linking of static builds in non-C++ applications
|
||||
sed "s/-ljxl_threads/-ljxl_threads @JPEGXL_THREADS_PUBLIC_LIBS@/g" lib/threads/libjxl_threads.pc.in >lib/threads/libjxl_threads.pc.in.patched
|
||||
rm lib/threads/libjxl_threads.pc.in
|
||||
mv lib/threads/libjxl_threads.pc.in.patched lib/threads/libjxl_threads.pc.in
|
||||
sed 's/set(JPEGXL_REQUIRES_TYPE "Requires")/set(JPEGXL_REQUIRES_TYPE "Requires")\'$'\n'' set(JPEGXL_THREADS_PUBLIC_LIBS "-lm ${PKGCONFIG_CXX_LIB}")/g' lib/jxl_threads.cmake >lib/jxl_threads.cmake.patched
|
||||
rm lib/jxl_threads.cmake
|
||||
mv lib/jxl_threads.cmake.patched lib/jxl_threads.cmake
|
||||
execute ./deps.sh
|
||||
execute cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include -DENABLE_SHARED=off -DENABLE_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF -DJPEGXL_ENABLE_JPEGLI=ON -DJPEGXL_TEST_TOOLS=OFF -DJPEGXL_ENABLE_JNI=OFF -DBUILD_TESTING=OFF .
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
build_done "libjxl" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
CONFIGURE_OPTIONS+=("--enable-libjxl")
|
||||
|
||||
if build "libwebp" "1.4.0"; then
|
||||
# libwebp can fail to compile on Ubuntu if these flags were left set to CFLAGS
|
||||
CPPFLAGS=
|
||||
download "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$CURRENT_PACKAGE_VERSION.tar.gz" "libwebp-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
make_dir build
|
||||
cd build || exit
|
||||
execute cmake -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include -DENABLE_SHARED=OFF -DENABLE_STATIC=ON -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF -DWEBP_BUILD_VWEBP=OFF ../
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
|
||||
build_done "libwebp" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
CONFIGURE_OPTIONS+=("--enable-libwebp")
|
||||
|
||||
##
|
||||
## other library
|
||||
##
|
||||
|
||||
if build "libsdl" "2.28.5"; then
|
||||
if build "libsdl" "2.30.1"; then
|
||||
download "https://github.com/libsdl-org/SDL/releases/download/release-$CURRENT_PACKAGE_VERSION/SDL2-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
|
||||
execute make -j $MJOBS
|
||||
@@ -856,7 +927,7 @@ if build "libsdl" "2.28.5"; then
|
||||
build_done "libsdl" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
|
||||
if build "FreeType2" "2.11.1"; then
|
||||
if build "FreeType2" "2.13.2"; then
|
||||
download "https://downloads.sourceforge.net/freetype/freetype-$CURRENT_PACKAGE_VERSION.tar.xz"
|
||||
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
|
||||
execute make -j $MJOBS
|
||||
@@ -882,18 +953,31 @@ if $NONFREE_AND_GPL; then
|
||||
build_done "srt" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
CONFIGURE_OPTIONS+=("--enable-libsrt")
|
||||
|
||||
if build "zvbi" "0.2.42"; then
|
||||
download "https://github.com/zapping-vbi/zvbi/archive/refs/tags/v$CURRENT_PACKAGE_VERSION.tar.gz" "zvbi-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
execute ./autogen.sh --prefix="${WORKSPACE}"
|
||||
execute ./configure CFLAGS="-I${WORKSPACE}/include/libpng16 ${CFLAGS}" --prefix="${WORKSPACE}" --enable-static --disable-shared
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
build_done "zvbi" $CURRENT_PACKAGE_VERSION
|
||||
fi
|
||||
CONFIGURE_OPTIONS+=("--enable-libzvbi")
|
||||
fi
|
||||
|
||||
##
|
||||
## zmq library
|
||||
##
|
||||
|
||||
if build "libzmq" "4.3.1"; then
|
||||
if build "libzmq" "4.3.5"; then
|
||||
download "https://github.com/zeromq/libzmq/releases/download/v$CURRENT_PACKAGE_VERSION/zeromq-$CURRENT_PACKAGE_VERSION.tar.gz"
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
export XML_CATALOG_FILES=/usr/local/etc/xml/catalog
|
||||
fi
|
||||
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
|
||||
sed "s/stats_proxy stats = {0}/stats_proxy stats = {{{0, 0}, {0, 0}}, {{0, 0}, {0, 0}}}/g" src/proxy.cpp >src/proxy.cpp.patched
|
||||
rm src/proxy.cpp
|
||||
mv src/proxy.cpp.patched src/proxy.cpp
|
||||
execute make -j $MJOBS
|
||||
execute make install
|
||||
build_done "libzmq" $CURRENT_PACKAGE_VERSION
|
||||
@@ -941,7 +1025,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if build "amf" "1.4.30"; then
|
||||
if build "amf" "1.4.33"; then
|
||||
download "https://github.com/GPUOpen-LibrariesAndSDKs/AMF/archive/refs/tags/v$CURRENT_PACKAGE_VERSION.tar.gz" "AMF-$CURRENT_PACKAGE_VERSION.tar.gz" "AMF-$CURRENT_PACKAGE_VERSION"
|
||||
execute rm -rf "${WORKSPACE}/include/AMF"
|
||||
execute mkdir -p "${WORKSPACE}/include/AMF"
|
||||
@@ -969,7 +1053,7 @@ fi
|
||||
build "ffmpeg" "$FFMPEG_VERSION"
|
||||
download "https://github.com/FFmpeg/FFmpeg/archive/refs/heads/release/$FFMPEG_VERSION.tar.gz" "FFmpeg-release-$FFMPEG_VERSION.tar.gz"
|
||||
# shellcheck disable=SC2086
|
||||
./configure "${CONFIGURE_OPTIONS[@]}" \
|
||||
execute ./configure "${CONFIGURE_OPTIONS[@]}" \
|
||||
--disable-debug \
|
||||
--disable-shared \
|
||||
--enable-pthreads \
|
||||
|
||||
Reference in New Issue
Block a user