5
5
6
6
PROGNAME=$( basename " $0 " )
7
7
FFMPEG_VERSION=4.4
8
- SCRIPT_VERSION=1.31rc1
8
+ SCRIPT_VERSION=1.33rc1
9
9
CWD=$( pwd)
10
10
PACKAGES=" $CWD /packages"
11
11
WORKSPACE=" $CWD /workspace"
@@ -95,6 +95,10 @@ download() {
95
95
96
96
make_dir " $DOWNLOAD_PATH /$TARGETDIR "
97
97
98
+ if [[ " $DOWNLOAD_FILE " == * " patch" * ]]; then
99
+ return
100
+ fi
101
+
98
102
if [ -n " $3 " ]; then
99
103
if ! tar -xvf " $DOWNLOAD_PATH /$DOWNLOAD_FILE " -C " $DOWNLOAD_PATH /$TARGETDIR " 2> /dev/null > /dev/null; then
100
104
echo " Failed to extract $DOWNLOAD_FILE "
334
338
# # build tools
335
339
# #
336
340
341
+ if build " giflib" " 5.2.1" ; then
342
+ download " https://sourceforge.net/projects/giflib/files/giflib-5.2.1.tar.gz"
343
+ if [[ " $OSTYPE " == " darwin" * ]]; then
344
+ download " https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch"
345
+ execute patch " ${PACKAGES} /giflib-5.2.1/Makefile" ${PACKAGES} /Makefile.patch" "
346
+ fi
347
+ execute make -j $MJOBS
348
+ execute make PREFIX=" ${WORKSPACE} " install
349
+ build_done " giflib" " 5.2.1"
350
+ fi
351
+
337
352
if build " pkg-config" " 0.29.2" ; then
338
353
download " https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz"
339
354
execute ./configure --silent --prefix=" ${WORKSPACE} " --with-pc-path=" ${WORKSPACE} " /lib/pkgconfig --with-internal-glib
@@ -373,7 +388,6 @@ if build "zlib" "1.2.11"; then
373
388
execute make install
374
389
build_done " zlib" " 1.2.11"
375
390
fi
376
- LDFLAGS+=" -L/zlib/lib"
377
391
378
392
if build " m4" " 1.4.19" ; then
379
393
download " https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.gz"
@@ -427,12 +441,12 @@ if $NONFREE_AND_GPL; then
427
441
CONFIGURE_OPTIONS+=(" --enable-openssl" )
428
442
fi
429
443
430
- if build " cmake" " 3.21.2 " ; then
431
- download " https://cmake.org/files/LatestRelease/ cmake-3.21.2 .tar.gz"
444
+ if build " cmake" " 3.22.0 " ; then
445
+ download " https://github.com/Kitware/CMake/releases/download/v3.22.0/ cmake-3.22.0 .tar.gz"
432
446
execute ./configure --prefix=" ${WORKSPACE} " --parallel=" ${MJOBS} " -- -DCMAKE_USE_OPENSSL=OFF
433
447
execute make -j $MJOBS
434
448
execute make install
435
- build_done " cmake" " 3.21.2 "
449
+ build_done " cmake" " 3.22.0 "
436
450
fi
437
451
438
452
# #
@@ -450,30 +464,31 @@ if command_exists "python3"; then
450
464
fi
451
465
done
452
466
fi
453
- if build " dav1d" " 0.9.2" ; then
454
- download " https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz"
455
- make_dir build
456
- # [ Descript - cvanwink ]
457
- # Set extra CFLAGS for arm64
458
- # https://github.com/markus-perl/ffmpeg-build-script/issues/115
459
- if $MACOS_M1 ; then
460
- export CFLAGS=" -arch arm64"
461
- fi
462
- if $SHARED_LIBRARIES ; then
463
- execute meson build --prefix=" ${WORKSPACE} " --buildtype=release --default-library=shared --libdir=" ${WORKSPACE} " /lib
464
- else
465
- execute meson build --prefix=" ${WORKSPACE} " --buildtype=release --default-library=static --libdir=" ${WORKSPACE} " /lib
466
- fi
467
- execute ninja -C build
468
- execute ninja -C build install
469
- # [ Descript - cvanwink ]
470
- # Restore default CFLAGS from line 12
471
- if $MACOS_M1 ; then
472
- CFLAGS=" -I$WORKSPACE /include"
467
+ if command_exists " meson" ; then
468
+ if build " dav1d" " 0.9.2" ; then
469
+ download " https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz"
470
+ make_dir build
471
+ # [ Descript - cvanwink ]
472
+ # Set extra CFLAGS for arm64
473
+ # https://github.com/markus-perl/ffmpeg-build-script/issues/115
474
+ if $MACOS_M1 ; then
475
+ export CFLAGS=" -arch arm64"
476
+ fi
477
+ if $SHARED_LIBRARIES ; then
478
+ execute meson build --prefix=" ${WORKSPACE} " --buildtype=release --default-library=shared --libdir=" ${WORKSPACE} " /lib
479
+ else
480
+ execute meson build --prefix=" ${WORKSPACE} " --buildtype=release --default-library=static --libdir=" ${WORKSPACE} " /lib
481
+ fi
482
+ execute ninja -C build
483
+ execute ninja -C build install
484
+ # [ Descript - cvanwink ]
485
+ # Restore default CFLAGS from line 12
486
+ if $MACOS_M1 ; then
487
+ CFLAGS=" -I$WORKSPACE /include"
488
+ fi
489
+ build_done " dav1d" " 0.9.2"
473
490
fi
474
- build_done " dav1d" " 0.9.2"
475
491
fi
476
- CONFIGURE_OPTIONS+=(" --enable-libdav1d" )
477
492
fi
478
493
479
494
if ! $MACOS_M1 ; then
@@ -731,22 +746,17 @@ if command_exists "python3"; then
731
746
execute ./waf install
732
747
build_done " serd" " 0.30.10"
733
748
fi
734
-
735
- # [ Descript - cvanwink ]
736
- # FTP for pcre looks to be down
737
- if false ; then
738
- if build " pcre" " 8.44" ; then
739
- download " https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz" " pcre-8.44.tar.gz"
740
- if $SHARED_LIBRARIES ; then
741
- execute ./configure --prefix=" ${WORKSPACE} " --enable-shared --disable-static
742
- else
743
- execute ./configure --prefix=" ${WORKSPACE} " --disable-shared --enable-static
744
- fi
745
- execute make -j $MJOBS
746
- execute make install
747
-
748
- build_done " pcre" " 8.44"
749
+ if build " pcre" " 8.45" ; then
750
+ download " https://altushost-swe.dl.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.gz" " pcre-8.45.tar.gz"
751
+ if $SHARED_LIBRARIES ; then
752
+ execute ./configure --prefix=" ${WORKSPACE} " --enable-shared --disable-static
753
+ else
754
+ execute ./configure --prefix=" ${WORKSPACE} " --disable-shared --enable-static
749
755
fi
756
+ execute make -j $MJOBS
757
+ execute make install
758
+
759
+ build_done " pcre" " 8.45"
750
760
fi
751
761
752
762
if build " sord" " 0.16.8" ; then
911
921
# # image library
912
922
# #
913
923
914
- # [ Descript - cvanwink ]
915
- # Disable libtiff on arm64 and x86_64 as it doesn't compile
916
- # ../version:1:1: error: expected unqualified-id
917
- # 4.3.0
918
- # ^
919
- if false ; then
920
- if build " libtiff" " 4.3.0" ; then
921
- download " https://download.osgeo.org/libtiff/tiff-4.3.0.tar.gz"
922
- if $SHARED_LIBRARIES ; then
923
- execute ./configure --prefix=" ${WORKSPACE} " --enable-shared --disable-static
924
- else
925
- execute ./configure --prefix=" ${WORKSPACE} " --disable-shared --enable-static
926
- fi
927
- execute make -j $MJOBS
928
- execute make install
929
- build_done " libtiff" " 4.3.0"
924
+ if build " libtiff" " 4.2.0" ; then
925
+ download " https://download.osgeo.org/libtiff/tiff-4.2.0.tar.gz"
926
+ if $SHARED_LIBRARIES ; then
927
+ execute ./configure --prefix=" ${WORKSPACE} " --enable-shared --disable-static --disable-dependency-tracking --disable-lzma --disable-webp --disable-zstd --without-x
928
+ else
929
+ execute ./configure --prefix=" ${WORKSPACE} " --disable-shared --enable-static --disable-dependency-tracking --disable-lzma --disable-webp --disable-zstd --without-x
930
930
fi
931
+ execute make -j $MJOBS
932
+ execute make install
933
+ build_done " libtiff" " 4.2.0"
931
934
fi
932
935
if build " libpng" " 1.6.37" ; then
933
936
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"
@@ -942,37 +945,24 @@ if build "libpng" "1.6.37"; then
942
945
execute make install
943
946
build_done " libpng" " 1.6.37"
944
947
fi
945
- # libwebp can fail to compile on Ubuntu if these flags were left set to CFLAGS
946
- CPPFLAGS=
947
948
948
- # [ Descript - cvanwink ]
949
- # Disable libwebp on arm64 and x86_64 as it doesn't compile on x86_64
950
- # Undefined symbols for architecture x86_64:
951
- # "_PrintGifError", referenced from:
952
- # _GIFDisplayError in gifdec.c.o
953
- if false ; then
954
- if build " libwebp" " 1.2.0" ; then
955
- download " https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.0.tar.gz" " libwebp-1.2.0.tar.gz"
956
- if $SHARED_LIBRARIES ; then
957
- execute ./configure --prefix=" ${WORKSPACE} " --enable-shared --disable-static
958
- else
959
- execute ./configure --prefix=" ${WORKSPACE} " --disable-shared --enable-static
960
- fi
949
+ # # does not compile on monterey -> _PrintGifError
950
+ if [[ " $OSTYPE " != " darwin" * ]]; then
951
+ if build " libwebp" " 1.2.1" ; then
952
+ # libwebp can fail to compile on Ubuntu if these flags were left set to CFLAGS
953
+ CPPFLAGS=
954
+ download " https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.1.tar.gz" " libwebp-1.2.1.tar.gz"
955
+ execute ./configure --prefix=" ${WORKSPACE} " --disable-shared --enable-static --disable-dependency-tracking --disable-gl --with-zlib-include=" ${WORKSPACE} " /include/ --with-zlib-lib=" ${WORKSPACE} " /lib
961
956
make_dir build
962
957
cd build || exit
963
- if $SHARED_LIBRARIES ; then
964
- execute cmake -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include -DENABLE_SHARED=ON -DENABLE_STATIC=OFF ../
965
- else
966
- execute cmake -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include -DENABLE_SHARED=OFF -DENABLE_STATIC=ON ../
967
- fi
958
+ execute cmake -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include -DENABLE_SHARED=OFF -DENABLE_STATIC=ON ../
968
959
execute make -j $MJOBS
969
960
execute make install
970
961
971
- build_done " libwebp" " 1.2.0 "
962
+ build_done " libwebp" " 1.2.1 "
972
963
fi
973
964
CONFIGURE_OPTIONS+=(" --enable-libwebp" )
974
965
fi
975
-
976
966
# #
977
967
# # other library
978
968
# #
@@ -1082,6 +1072,7 @@ if $SHARED_LIBRARIES; then
1082
1072
--extra-ldflags=" ${LDFLAGS} " \
1083
1073
--extra-libs=" ${EXTRALIBS} " \
1084
1074
--pkgconfigdir=" $WORKSPACE /lib/pkgconfig" \
1075
+ --pkg-config-flags=" --static" \
1085
1076
--prefix=" ${WORKSPACE} " \
1086
1077
--extra-version=" ${EXTRA_VERSION} "
1087
1078
else
0 commit comments