Skip to content

Commit 7991ba6

Browse files
authored
Merge branch 'markus-perl:master' into master
2 parents 901acea + 6728e84 commit 7991ba6

File tree

1 file changed

+51
-33
lines changed

1 file changed

+51
-33
lines changed

build-ffmpeg

Lines changed: 51 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
PROGNAME=$(basename "$0")
77
FFMPEG_VERSION=4.4
8-
SCRIPT_VERSION=1.31
8+
SCRIPT_VERSION=1.33
99
CWD=$(pwd)
1010
PACKAGES="$CWD/packages"
1111
WORKSPACE="$CWD/workspace"
@@ -93,6 +93,10 @@ download() {
9393

9494
make_dir "$DOWNLOAD_PATH/$TARGETDIR"
9595

96+
if [[ "$DOWNLOAD_FILE" == *"patch"* ]]; then
97+
return
98+
fi
99+
96100
if [ -n "$3" ]; then
97101
if ! tar -xvf "$DOWNLOAD_PATH/$DOWNLOAD_FILE" -C "$DOWNLOAD_PATH/$TARGETDIR" 2>/dev/null >/dev/null; then
98102
echo "Failed to extract $DOWNLOAD_FILE"
@@ -305,6 +309,17 @@ fi
305309
## build tools
306310
##
307311

312+
if build "giflib" "5.2.1"; then
313+
download "https://sourceforge.net/projects/giflib/files/giflib-5.2.1.tar.gz"
314+
if [[ "$OSTYPE" == "darwin"* ]]; then
315+
download "https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch"
316+
execute patch "${PACKAGES}/giflib-5.2.1/Makefile" ${PACKAGES}/Makefile.patch""
317+
fi
318+
execute make -j $MJOBS
319+
execute make PREFIX="${WORKSPACE}" install
320+
build_done "giflib" "5.2.1"
321+
fi
322+
308323
if build "pkg-config" "0.29.2"; then
309324
download "https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz"
310325
execute ./configure --silent --prefix="${WORKSPACE}" --with-pc-path="${WORKSPACE}"/lib/pkgconfig --with-internal-glib
@@ -336,7 +351,6 @@ if build "zlib" "1.2.11"; then
336351
execute make install
337352
build_done "zlib" "1.2.11"
338353
fi
339-
LDFLAGS+=" -L/zlib/lib"
340354

341355
if build "m4" "1.4.19"; then
342356
download "https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.gz"
@@ -386,12 +400,12 @@ if $NONFREE_AND_GPL; then
386400
CONFIGURE_OPTIONS+=("--enable-openssl")
387401
fi
388402

389-
if build "cmake" "3.21.2"; then
390-
download "https://cmake.org/files/LatestRelease/cmake-3.21.2.tar.gz"
403+
if build "cmake" "3.22.0"; then
404+
download "https://github.com/Kitware/CMake/releases/download/v3.22.0/cmake-3.22.0.tar.gz"
391405
execute ./configure --prefix="${WORKSPACE}" --parallel="${MJOBS}" -- -DCMAKE_USE_OPENSSL=OFF
392406
execute make -j $MJOBS
393407
execute make install
394-
build_done "cmake" "3.21.2"
408+
build_done "cmake" "3.22.0"
395409
fi
396410

397411
##
@@ -409,15 +423,17 @@ if command_exists "python3"; then
409423
fi
410424
done
411425
fi
412-
if build "dav1d" "0.9.2"; then
413-
download "https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz"
414-
make_dir build
415-
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
416-
execute ninja -C build
417-
execute ninja -C build install
418-
build_done "dav1d" "0.9.2"
426+
if command_exists "meson"; then
427+
if build "dav1d" "0.9.2"; then
428+
download "https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz"
429+
make_dir build
430+
execute meson build --prefix="${WORKSPACE}" --buildtype=release --default-library=static --libdir="${WORKSPACE}"/lib
431+
execute ninja -C build
432+
execute ninja -C build install
433+
build_done "dav1d" "0.9.2"
434+
fi
435+
CONFIGURE_OPTIONS+=("--enable-libdav1d")
419436
fi
420-
CONFIGURE_OPTIONS+=("--enable-libdav1d")
421437
fi
422438

423439
if ! $MACOS_M1; then
@@ -622,13 +638,13 @@ if command_exists "python3"; then
622638
execute ./waf install
623639
build_done "serd" "0.30.10"
624640
fi
625-
if build "pcre" "8.44"; then
626-
download "https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz" "pcre-8.44.tar.gz"
641+
if build "pcre" "8.45"; then
642+
download "https://altushost-swe.dl.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.gz" "pcre-8.45.tar.gz"
627643
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
628644
execute make -j $MJOBS
629645
execute make install
630646

631-
build_done "pcre" "8.44"
647+
build_done "pcre" "8.45"
632648
fi
633649
if build "sord" "0.16.8"; then
634650
download "https://gitlab.com/drobilla/sord/-/archive/v0.16.8/sord-v0.16.8.tar.gz" "sord-v0.16.8.tar.gz"
@@ -739,12 +755,12 @@ fi
739755
## image library
740756
##
741757

742-
if build "libtiff" "4.3.0"; then
743-
download "https://download.osgeo.org/libtiff/tiff-4.3.0.tar.gz"
744-
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
758+
if build "libtiff" "4.2.0"; then
759+
download "https://download.osgeo.org/libtiff/tiff-4.2.0.tar.gz"
760+
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static --disable-dependency-tracking --disable-lzma --disable-webp --disable-zstd --without-x
745761
execute make -j $MJOBS
746762
execute make install
747-
build_done "libtiff" "4.3.0"
763+
build_done "libtiff" "4.2.0"
748764
fi
749765
if build "libpng" "1.6.37"; then
750766
download "https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.gz/download?use_mirror=gigenet" "libpng-1.6.37.tar.gz"
@@ -755,22 +771,24 @@ if build "libpng" "1.6.37"; then
755771
execute make install
756772
build_done "libpng" "1.6.37"
757773
fi
758-
# libwebp can fail to compile on Ubuntu if these flags were left set to CFLAGS
759-
CPPFLAGS=
760774

761-
if build "libwebp" "1.2.0"; then
762-
download "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.0.tar.gz" "libwebp-1.2.0.tar.gz"
763-
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static
764-
make_dir build
765-
cd build || exit
766-
execute cmake -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include -DENABLE_SHARED=OFF -DENABLE_STATIC=ON ../
767-
execute make -j $MJOBS
768-
execute make install
775+
## does not compile on monterey -> _PrintGifError
776+
if [[ "$OSTYPE" != "darwin"* ]]; then
777+
if build "libwebp" "1.2.1"; then
778+
# libwebp can fail to compile on Ubuntu if these flags were left set to CFLAGS
779+
CPPFLAGS=
780+
download "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.1.tar.gz" "libwebp-1.2.1.tar.gz"
781+
execute ./configure --prefix="${WORKSPACE}" --disable-shared --enable-static --disable-dependency-tracking --disable-gl --with-zlib-include="${WORKSPACE}"/include/ --with-zlib-lib="${WORKSPACE}"/lib
782+
make_dir build
783+
cd build || exit
784+
execute cmake -DCMAKE_INSTALL_PREFIX="${WORKSPACE}" -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include -DENABLE_SHARED=OFF -DENABLE_STATIC=ON ../
785+
execute make -j $MJOBS
786+
execute make install
769787

770-
build_done "libwebp" "1.2.0"
788+
build_done "libwebp" "1.2.1"
789+
fi
790+
CONFIGURE_OPTIONS+=("--enable-libwebp")
771791
fi
772-
CONFIGURE_OPTIONS+=("--enable-libwebp")
773-
774792
##
775793
## other library
776794
##

0 commit comments

Comments
 (0)