@@ -91,22 +91,15 @@ download() {
9191
9292 make_dir " $DOWNLOAD_PATH /$TARGETDIR "
9393
94- if [[ $DOWNLOAD_FILE == * .zip ] ]; then
95- if ! unzip " $DOWNLOAD_PATH /$DOWNLOAD_FILE " -d " $DOWNLOAD_PATH /$TARGETDIR " 2> /dev/null > /dev/null; then
96- echo " Failed to extract $DOWNLOAD_FILE " ;
97- exit 1;
94+ if [ -n " $3 " ]; then
95+ if ! tar -xvf " $DOWNLOAD_PATH /$DOWNLOAD_FILE " -C " $DOWNLOAD_PATH /$TARGETDIR " 2> /dev/null > /dev/null; then
96+ echo " Failed to extract $DOWNLOAD_FILE "
97+ exit 1
9898 fi
9999 else
100- if [ -n " $3 " ]; then
101- if ! tar -xvf " $DOWNLOAD_PATH /$DOWNLOAD_FILE " -C " $DOWNLOAD_PATH /$TARGETDIR " 2> /dev/null > /dev/null; then
102- echo " Failed to extract $DOWNLOAD_FILE "
103- exit 1
104- fi
105- else
106- if ! tar -xvf " $DOWNLOAD_PATH /$DOWNLOAD_FILE " -C " $DOWNLOAD_PATH /$TARGETDIR " --strip-components 1 2> /dev/null > /dev/null; then
107- echo " Failed to extract $DOWNLOAD_FILE "
108- exit 1
109- fi
100+ if ! tar -xvf " $DOWNLOAD_PATH /$DOWNLOAD_FILE " -C " $DOWNLOAD_PATH /$TARGETDIR " --strip-components 1 2> /dev/null > /dev/null; then
101+ echo " Failed to extract $DOWNLOAD_FILE "
102+ exit 1
110103 fi
111104 fi
112105
@@ -298,10 +291,6 @@ if ! command_exists "curl"; then
298291 exit 1
299292fi
300293
301- if ! command_exists " libtoolize" ; then
302- echo " libtool not installed. libzimg (z.lib) will not be available."
303- fi
304-
305294if ! command_exists " cargo" ; then
306295 echo " cargo not installed. rav1e will not be available."
307296fi
@@ -382,9 +371,9 @@ if command_exists "python"; then
382371 execute ./waf configure --prefix=" ${WORKSPACE} " --static --no-shared --no-utils
383372 execute ./waf
384373 execute ./waf install
385- CFLAGS+=" -I$WORKSPACE /include/lilv-0"
386374 build_done " lilv" " 0.24.12"
387375 fi
376+ CFLAGS+=" -I$WORKSPACE /include/lilv-0"
388377
389378 CONFIGURE_OPTIONS+=(" --enable-lv2" )
390379fi
@@ -410,9 +399,41 @@ if build "zlib" "1.2.11"; then
410399 execute ./configure --static --prefix=" ${WORKSPACE} "
411400 execute make -j $MJOBS
412401 execute make install
413- LDFLAGS+=" -L/zlib/lib"
414402 build_done " zlib" " 1.2.11"
415403fi
404+ LDFLAGS+=" -L/zlib/lib"
405+
406+ if build " m4" " 1.4.19" ; then
407+ download " https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.gz"
408+ execute ./configure --prefix=" ${WORKSPACE} "
409+ execute make -j $MJOBS
410+ execute make install
411+ build_done " m4" " 1.4.19"
412+ fi
413+
414+ if build " autoconf" " 2.71" ; then
415+ download " https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz"
416+ execute ./configure --prefix=" ${WORKSPACE} "
417+ execute make -j $MJOBS
418+ execute make install
419+ build_done " autoconf" " 2.71"
420+ fi
421+
422+ if build " automake" " 1.16.4" ; then
423+ download " https://ftp.gnu.org/gnu/automake/automake-1.16.4.tar.gz"
424+ execute ./configure --prefix=" ${WORKSPACE} "
425+ execute make -j $MJOBS
426+ execute make install
427+ build_done " automake" " 1.16.4"
428+ fi
429+
430+ if build " libtool" " 2.4.6" ; then
431+ download " https://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz"
432+ execute ./configure --prefix=" ${WORKSPACE} " --enable-static --disable-shared
433+ execute make -j $MJOBS
434+ execute make install
435+ build_done " libtool" " 2.4.6"
436+ fi
416437
417438if $NONFREE_AND_GPL ; then
418439 if build " openssl" " 1.1.1l" ; then
440461
441462if ! $MACOS_M1 ; then
442463 if build " svtav1" $( date -I) ; then
464+ execute rm -f " ${PACKAGES} /SVT-AV1-master.tar.gz"
443465 download " https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/master/SVT-AV1-master.tar.gz"
444466 cd Build/linux || exit
445467 execute cmake -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DENABLE_SHARED=off -DBUILD_SHARED_LIBS=OFF ../.. -G" Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
@@ -667,6 +689,8 @@ if build "libpng" "1.6.37"; then
667689 execute make install
668690 build_done " libpng" " 1.6.37"
669691fi
692+ # libwebp can fail to compile on Ubuntu if these flags were left set to CFLAGS
693+ CPPFLAGS=
670694
671695# #
672696# # image library
@@ -685,17 +709,18 @@ if build "libwebp" "1.2.0"; then
685709fi
686710CONFIGURE_OPTIONS+=(" --enable-libwebp" )
687711
688- if command_exists " libtoolize" ; then
689- if build " zimg" " 3.0.3" ; then
690- download " https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.3.tar.gz"
691- execute ./autogen.sh
692- execute ./configure --prefix=" ${WORKSPACE} "
693- execute make -j $MJOBS
694- execute make install
695- build_done " zimg" " 3.0.3"
696- fi
697- CONFIGURE_OPTIONS+=(" --enable-libzimg" )
712+ if build " zimg" " 3.0.3" ; then
713+ download " https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.3.tar.gz" " zimg-3.0.3.tar.gz" " zimg"
714+ cd zimg-release-3.0.3 || exit
715+ execute ${WORKSPACE} /bin/libtoolize -i -f -q
716+ execute ./autogen.sh --prefix=" ${WORKSPACE} "
717+ execute ./configure --prefix=" ${WORKSPACE} " --enable-static --disable-shared
718+ execute make -j $MJOBS
719+ execute make install
720+ build_done " zimg" " 3.0.3"
698721fi
722+ CONFIGURE_OPTIONS+=(" --enable-libzimg" )
723+
699724
700725# #
701726# # other library
@@ -763,18 +788,14 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
763788 fi
764789 fi
765790
766- # Only build AMF support if the amdgpu drivers are in use on the system
767- lspci -v | grep " Kernel driver in use: amdgpu" > /dev/null
768- if [ $? -eq 0 ]; then
769- if build " amf" " 1.4.21.0" ; then
770- download " https://github.com/GPUOpen-LibrariesAndSDKs/AMF/releases/download/v.1.4.21/AMF_SDK_1.4.21.0-2021-07-20.zip"
771- execute rm -rf ${WORKSPACE} /include/AMF
772- execute mkdir -p ${WORKSPACE} /include/AMF
773- execute cp -r ${PACKAGES} /AMF_SDK_1.4.21.0-2021-07-20/AMF_SDK_1.4.21.0/amf/public/include/* ${WORKSPACE} /include/AMF/
774- build_done " amf" " 1.4.21.0"
775- fi
776- CONFIGURE_OPTIONS+=(" --enable-amf" )
791+ if build " amf" " 1.4.21.0" ; then
792+ download " https://github.com/GPUOpen-LibrariesAndSDKs/AMF/archive/refs/tags/v.1.4.21.tar.gz" " AMF-1.4.21.tar.gz" " AMF-1.4.21"
793+ execute rm -rf ${WORKSPACE} /include/AMF
794+ execute mkdir -p ${WORKSPACE} /include/AMF
795+ execute cp -r ${PACKAGES} /AMF-1.4.21/AMF-v.1.4.21/amf/public/include/* ${WORKSPACE} /include/AMF/
796+ build_done " amf" " 1.4.21.0"
777797 fi
798+ CONFIGURE_OPTIONS+=(" --enable-amf" )
778799fi
779800
780801# #
@@ -827,7 +848,7 @@ if [[ "$AUTOINSTALL" == "yes" ]]; then
827848 else
828849 cp " $WORKSPACE /bin/ffmpeg" " $INSTALL_FOLDER /ffmpeg"
829850 cp " $WORKSPACE /bin/ffprobe" " $INSTALL_FOLDER /ffprobe"
830- sudo cp " $WORKSPACE /bin/ffplay" " $INSTALL_FOLDER /ffplay"
851+ cp " $WORKSPACE /bin/ffplay" " $INSTALL_FOLDER /ffplay"
831852 echo " Done. FFmpeg is now installed to your system."
832853 fi
833854elif [[ ! " $SKIPINSTALL " == " yes" ]]; then
0 commit comments