From 12188bbf2c7d0e6ac893ff9b235218f1db822ebf Mon Sep 17 00:00:00 2001 From: Michaek Korneev Date: Fri, 1 Mar 2024 13:51:27 +0200 Subject: [PATCH 1/7] libzimg support --- ffmpeg/cppbuild.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) mode change 100755 => 100644 ffmpeg/cppbuild.sh diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh old mode 100755 new mode 100644 index 85475eb7adc..67e9f884088 --- a/ffmpeg/cppbuild.sh +++ b/ffmpeg/cppbuild.sh @@ -8,7 +8,7 @@ if [[ -z "$PLATFORM" ]]; then fi DISABLE="--disable-iconv --disable-opencl --disable-sdl2 --disable-bzlib --disable-lzma --disable-linux-perf --disable-xlib" -ENABLE="--enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-libxml2 --enable-libsrt --enable-libwebp --enable-libaom --enable-libsvtav1" +ENABLE="--enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-libxml2 --enable-libsrt --enable-libwebp --enable-libaom --enable-libsvtav1 --enable-libzimg" ENABLE_VULKAN="--enable-vulkan --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=av1_vulkan" if [[ "$EXTENSION" == *gpl ]]; then @@ -47,6 +47,7 @@ LIBSRT_VERSION=1.5.3 WEBP_VERSION=1.3.2 AOMAV1_VERSION=3.8.0 SVTAV1_VERSION=1.8.0 +ZIMGLIB=3.0.5 FFMPEG_VERSION=6.1.1 download https://download.videolan.org/contrib/nasm/nasm-$NASM_VERSION.tar.gz nasm-$NASM_VERSION.tar.gz download http://zlib.net/$ZLIB.tar.gz $ZLIB.tar.gz @@ -69,6 +70,7 @@ download https://github.com/FFmpeg/nv-codec-headers/archive/n$NVCODEC_VERSION.ta download https://github.com/webmproject/libwebp/archive/refs/tags/v$WEBP_VERSION.tar.gz libwebp-$WEBP_VERSION.tar.gz download https://storage.googleapis.com/aom-releases/libaom-$AOMAV1_VERSION.tar.gz aom-$AOMAV1_VERSION.tar.gz download https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v$SVTAV1_VERSION/SVT-AV1-v$SVTAV1_VERSION.tar.gz SVT-AV1-$SVTAV1_VERSION.tar.gz +download https://github.com/sekrit-twc/zimg/archive/refs/tags/release-$ZIMGLIB.tar.gz zimg-$ZIMGLIB.tar.gz download http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2 ffmpeg-$FFMPEG_VERSION.tar.bz2 mkdir -p $PLATFORM$EXTENSION @@ -95,12 +97,20 @@ tar --totals -xzf ../$XML2.tar.gz tar --totals -xzf ../libwebp-$WEBP_VERSION.tar.gz tar --totals -xzf ../aom-$AOMAV1_VERSION.tar.gz tar --totals -xzf ../SVT-AV1-$SVTAV1_VERSION.tar.gz +tar --totals -xzf ../zimg-$ZIMGLIB.tar.gz tar --totals -xjf ../ffmpeg-$FFMPEG_VERSION.tar.bz2 if [[ "${ACLOCAL_PATH:-}" == C:\\msys64\\* ]]; then export ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal fi +cd zimg-release-$ZIMGLIB +autoreconf -iv +./configure --prefix=$INSTALL_PATH +make -j $MAKEJ V=0 +make install +cd .. + cd nasm-$NASM_VERSION # fix for build with GCC 8.x sedinplace 's/void pure_func/void/g' include/nasmlib.h From 7c6f9e3900ee1fd2a433e041eda6b7b7d96b3cb9 Mon Sep 17 00:00:00 2001 From: Michaek Korneev Date: Mon, 4 Mar 2024 21:56:23 +0200 Subject: [PATCH 2/7] fix for libzimg --- ffmpeg/cppbuild.sh | 157 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 138 insertions(+), 19 deletions(-) diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh index 67e9f884088..b18a2fa4ef3 100644 --- a/ffmpeg/cppbuild.sh +++ b/ffmpeg/cppbuild.sh @@ -104,13 +104,6 @@ if [[ "${ACLOCAL_PATH:-}" == C:\\msys64\\* ]]; then export ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal fi -cd zimg-release-$ZIMGLIB -autoreconf -iv -./configure --prefix=$INSTALL_PATH -make -j $MAKEJ V=0 -make install -cd .. - cd nasm-$NASM_VERSION # fix for build with GCC 8.x sedinplace 's/void pure_func/void/g' include/nasmlib.h @@ -142,10 +135,21 @@ case $PLATFORM in export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH ---host=arm-linux + make -j $MAKEJ V=0 + make install + cd .. + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=arm-linux make -j $MAKEJ V=0 make install @@ -288,10 +292,21 @@ EOF export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH ---host=aarch64-linux + make -j $MAKEJ V=0 + make install + cd .. + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=aarch64-linux make -j $MAKEJ V=0 make install @@ -433,10 +448,20 @@ EOF export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --host=i686-linux + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=i686-linux make -j $MAKEJ V=0 make install @@ -575,10 +600,20 @@ EOF export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --host=x86_64-linux + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=x86_64-linux make -j $MAKEJ V=0 make install @@ -712,10 +747,20 @@ EOF export AS="nasm" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --host=i686-linux + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB CC="gcc -m32 -fPIC" ./configure --prefix=$INSTALL_PATH --static make -j $MAKEJ V=0 make install @@ -1003,12 +1048,22 @@ EOF echo "Detected non arm arch so cross compiling"; fi + echo "" + echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --host=arm-linux-gnueabihf + make -j $MAKEJ V=0 + make install echo "" echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB CC="arm-linux-gnueabihf-gcc -fPIC" ./configure --prefix=$INSTALL_PATH --static make -j $MAKEJ V=0 make install @@ -1203,10 +1258,20 @@ EOF HOST_ARCH="$(uname -m)" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --host=aarch64-linux-gnu + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB CC="aarch64-linux-gnu-gcc -fPIC" ./configure --prefix=$INSTALL_PATH --static make -j $MAKEJ V=0 make install @@ -1340,10 +1405,24 @@ EOF MACHINE_TYPE=$( uname -m ) echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + if [[ "$MACHINE_TYPE" =~ ppc64 ]]; then + CC="gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH + else + CC="powerpc64le-linux-gnu-gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH --host=powerpc64le-linux-gnu + fi + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB if [[ "$MACHINE_TYPE" =~ ppc64 ]]; then CC="gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH --static else @@ -1555,10 +1634,20 @@ EOF export CPPFLAGS="$CFLAGS" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --host=aarch64-apple-darwin + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB CC="clang -arch arm64 -fPIC" ./configure --prefix=$INSTALL_PATH --static make -j $MAKEJ V=0 make install @@ -1680,10 +1769,20 @@ EOF export AS="nasm" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB CC="clang -fPIC" ./configure --prefix=$INSTALL_PATH --static make -j $MAKEJ V=0 make install @@ -1801,12 +1900,22 @@ EOF ;; windows-x86) + echo "" + echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH + make -j $MAKEJ V=0 + make install echo "" echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB make -j $MAKEJ install -fwin32/Makefile.gcc BINARY_PATH=$INSTALL_PATH/bin/ INCLUDE_PATH=$INSTALL_PATH/include/ LIBRARY_PATH=$INSTALL_PATH/lib/ echo "" echo "--------------------" @@ -1932,12 +2041,22 @@ EOF ;; windows-x86_64) + echo "" + echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH + make -j $MAKEJ V=0 + make install echo "" echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB make -j $MAKEJ install -fwin32/Makefile.gcc BINARY_PATH=$INSTALL_PATH/bin/ INCLUDE_PATH=$INSTALL_PATH/include/ LIBRARY_PATH=$INSTALL_PATH/lib/ echo "" echo "--------------------" From 779ed185a55a777d71811bd15ee442fe17c88029 Mon Sep 17 00:00:00 2001 From: Michaek Korneev Date: Wed, 6 Mar 2024 15:15:31 +0200 Subject: [PATCH 3/7] added the libzimg support, try 3 --- ffmpeg/cppbuild.sh | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh index b18a2fa4ef3..e58d9f708c2 100644 --- a/ffmpeg/cppbuild.sh +++ b/ffmpeg/cppbuild.sh @@ -140,10 +140,9 @@ case $PLATFORM in echo "" cd zimg-release-$ZIMGLIB autoreconf -iv - ./configure --prefix=$INSTALL_PATH ---host=arm-linux + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=arm-linux make -j $MAKEJ V=0 make install - cd .. echo "" echo "--------------------" echo "Building zlib" @@ -297,16 +296,15 @@ EOF echo "" cd zimg-release-$ZIMGLIB autoreconf -iv - ./configure --prefix=$INSTALL_PATH ---host=aarch64-linux + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=aarch64-linux make -j $MAKEJ V=0 make install - cd .. echo "" echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd ../$ZLIB + cd $ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=aarch64-linux make -j $MAKEJ V=0 make install @@ -453,7 +451,7 @@ EOF echo "" cd zimg-release-$ZIMGLIB autoreconf -iv - ./configure --prefix=$INSTALL_PATH --host=i686-linux + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=i686-linux make -j $MAKEJ V=0 make install echo "" @@ -605,7 +603,7 @@ EOF echo "" cd zimg-release-$ZIMGLIB autoreconf -iv - ./configure --prefix=$INSTALL_PATH --host=x86_64-linux + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=x86_64-linux make -j $MAKEJ V=0 make install echo "" @@ -896,11 +894,21 @@ EOF export AS="nasm" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --host=x86_64-linux + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB - CC="gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH --static + cd ../$ZLIB + CC="gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH --static make -j $MAKEJ V=0 make install echo "" From 70e72364d7649495b46f716d6f71ce9c97b67318 Mon Sep 17 00:00:00 2001 From: Michaek Korneev Date: Sun, 10 Mar 2024 12:31:07 +0200 Subject: [PATCH 4/7] added the libzimg support, try 4 --- ffmpeg/cppbuild.sh | 70 ++++++++++------------------------------------ 1 file changed, 15 insertions(+), 55 deletions(-) diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh index e58d9f708c2..f836c43a1b5 100644 --- a/ffmpeg/cppbuild.sh +++ b/ffmpeg/cppbuild.sh @@ -8,7 +8,7 @@ if [[ -z "$PLATFORM" ]]; then fi DISABLE="--disable-iconv --disable-opencl --disable-sdl2 --disable-bzlib --disable-lzma --disable-linux-perf --disable-xlib" -ENABLE="--enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-libxml2 --enable-libsrt --enable-libwebp --enable-libaom --enable-libsvtav1 --enable-libzimg" +ENABLE="--enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-libxml2 --enable-libsrt --enable-libwebp --enable-libaom --enable-libsvtav1" ENABLE_VULKAN="--enable-vulkan --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=av1_vulkan" if [[ "$EXTENSION" == *gpl ]]; then @@ -135,20 +135,10 @@ case $PLATFORM in export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" - echo "Building zimg" - echo "--------------------" - echo "" - cd zimg-release-$ZIMGLIB - autoreconf -iv - ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=arm-linux - make -j $MAKEJ V=0 - make install - echo "" - echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd ../$ZLIB + cd $ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=arm-linux make -j $MAKEJ V=0 make install @@ -291,16 +281,6 @@ EOF export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" - echo "Building zimg" - echo "--------------------" - echo "" - cd zimg-release-$ZIMGLIB - autoreconf -iv - ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=aarch64-linux - make -j $MAKEJ V=0 - make install - echo "" - echo "--------------------" echo "Building zlib" echo "--------------------" echo "" @@ -446,20 +426,10 @@ EOF export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" - echo "Building zimg" - echo "--------------------" - echo "" - cd zimg-release-$ZIMGLIB - autoreconf -iv - ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=i686-linux - make -j $MAKEJ V=0 - make install - echo "" - echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd ../$ZLIB + cd $ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=i686-linux make -j $MAKEJ V=0 make install @@ -598,20 +568,10 @@ EOF export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" - echo "Building zimg" - echo "--------------------" - echo "" - cd zimg-release-$ZIMGLIB - autoreconf -iv - ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=x86_64-linux - make -j $MAKEJ V=0 - make install - echo "" - echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd ../$ZLIB + cd $ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=x86_64-linux make -j $MAKEJ V=0 make install @@ -885,7 +845,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m32 -D__ILP32__" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m32 -D__ILP32__" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -1035,7 +995,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -1249,9 +1209,9 @@ EOF if [[ ! -d $USERLAND_PATH ]]; then USERLAND_PATH="$(which arm-linux-gnueabihf-gcc | grep -o '.*/tools/')../userland" fi - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-omx --enable-mmal --enable-omx-rpi --enable-pthreads --cc="arm-linux-gnueabihf-gcc" --extra-cflags="$CFLAGS -I$USERLAND_PATH/ -I$USERLAND_PATH/interface/vmcs_host/khronos/IL/ -I$USERLAND_PATH/host_applications/linux/libs/bcm_host/include/ -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L$USERLAND_PATH/build/lib/ -L../lib/" --extra-libs="-lstdc++ -lasound -lvchiq_arm -lvcsm -lvcos -lpthread -ldl -lz -lm" --enable-cross-compile --arch=armhf --target-os=linux --cross-prefix="arm-linux-gnueabihf-" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-omx --enable-mmal --enable-omx-rpi --enable-pthreads --cc="arm-linux-gnueabihf-gcc" --extra-cflags="$CFLAGS -I$USERLAND_PATH/ -I$USERLAND_PATH/interface/vmcs_host/khronos/IL/ -I$USERLAND_PATH/host_applications/linux/libs/bcm_host/include/ -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L$USERLAND_PATH/build/lib/ -L../lib/" --extra-libs="-lstdc++ -lasound -lvchiq_arm -lvcsm -lvcos -lpthread -ldl -lz -lm" --enable-cross-compile --arch=armhf --target-os=linux --cross-prefix="arm-linux-gnueabihf-" || cat ffbuild/config.log else - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-omx --enable-mmal --enable-omx-rpi --enable-pthreads --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/ -L/opt/vc/lib" --extra-libs="-lstdc++ -lasound -lvchiq_arm -lvcsm -lvcos -lpthread -ldl -lz -lm" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-omx --enable-mmal --enable-omx-rpi --enable-pthreads --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/ -L/opt/vc/lib" --extra-libs="-lstdc++ -lasound -lvchiq_arm -lvcsm -lvcos -lpthread -ldl -lz -lm" || cat ffbuild/config.log fi make -j $MAKEJ make install @@ -1404,7 +1364,7 @@ EOF if [[ ! -d $USERLAND_PATH ]]; then USERLAND_PATH="$(which aarch64-linux-gnu-gcc | grep -o '.*/tools/')../userland" fi - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-omx `#--enable-mmal` --enable-omx-rpi --enable-pthreads --cc="aarch64-linux-gnu-gcc" --extra-cflags="$CFLAGS -I$USERLAND_PATH/ -I$USERLAND_PATH/interface/vmcs_host/khronos/IL/ -I$USERLAND_PATH/host_applications/linux/libs/bcm_host/include/ -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1 -fno-aggressive-loop-optimizations" --extra-ldflags="-Wl,-z,relro -L$USERLAND_PATH/build/lib/ -L../lib/" --extra-libs="-lstdc++ -lasound -lvchiq_arm `#-lvcsm` -lvcos -lpthread -ldl -lz -lm" --enable-cross-compile --arch=arm64 --target-os=linux --cross-prefix="aarch64-linux-gnu-" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-omx `#--enable-mmal` --enable-omx-rpi --enable-pthreads --cc="aarch64-linux-gnu-gcc" --extra-cflags="$CFLAGS -I$USERLAND_PATH/ -I$USERLAND_PATH/interface/vmcs_host/khronos/IL/ -I$USERLAND_PATH/host_applications/linux/libs/bcm_host/include/ -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1 -fno-aggressive-loop-optimizations" --extra-ldflags="-Wl,-z,relro -L$USERLAND_PATH/build/lib/ -L../lib/" --extra-libs="-lstdc++ -lasound -lvchiq_arm `#-lvcsm` -lvcos -lpthread -ldl -lz -lm" --enable-cross-compile --arch=arm64 --target-os=linux --cross-prefix="aarch64-linux-gnu-" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -1627,10 +1587,10 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION if [[ "$MACHINE_TYPE" =~ ppc64 ]]; then - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" --disable-altivec || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" --disable-altivec || cat ffbuild/config.log else echo "configure ffmpeg cross compile" - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/:/usr/lib/powerpc64le-linux-gnu/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="powerpc64le-linux-gnu-gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --enable-cross-compile --target-os=linux --arch=ppc64le-linux --extra-libs="-lstdc++ -lpthread -ldl -lz -lm" --disable-altivec || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/:/usr/lib/powerpc64le-linux-gnu/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="powerpc64le-linux-gnu-gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --enable-cross-compile --target-os=linux --arch=ppc64le-linux --extra-libs="-lstdc++ -lpthread -ldl -lz -lm" --disable-altivec || cat ffbuild/config.log fi make -j $MAKEJ make install @@ -1768,7 +1728,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION patch -Np1 < ../../../ffmpeg-macosx.patch - LDEXEFLAGS='-Wl,-rpath,@loader_path/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-pthreads --enable-indev=avfoundation --disable-libxcb --cc="clang -arch arm64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" --enable-cross-compile --arch=arm64 --target-os=darwin || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,@loader_path/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-pthreads --enable-indev=avfoundation --disable-libxcb --cc="clang -arch arm64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" --enable-cross-compile --arch=arm64 --target-os=darwin || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -1902,7 +1862,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION patch -Np1 < ../../../ffmpeg-macosx.patch - LDEXEFLAGS='-Wl,-rpath,@loader_path/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-pthreads --enable-indev=avfoundation --disable-libxcb --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,@loader_path/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-pthreads --enable-indev=avfoundation --disable-libxcb --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -2043,7 +2003,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m32" --extra-cflags="-DLIBXML_STATIC -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -lz -lm -Wl,-Bdynamic -lole32 -luuid" || cat ffbuild/config.log + PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m32" --extra-cflags="-DLIBXML_STATIC -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -lz -lm -Wl,-Bdynamic -lole32 -luuid" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -2184,7 +2144,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m64" --extra-cflags="-DLIBXML_STATIC -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -lz -lm -Wl,-Bdynamic -lole32 -luuid" || cat ffbuild/config.log + PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m64" --extra-cflags="-DLIBXML_STATIC -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -lz -lm -Wl,-Bdynamic -lole32 -luuid" || cat ffbuild/config.log make -j $MAKEJ make install ;; From 9691c284018a0ecd9f7cdf6b00e7a46436220a4e Mon Sep 17 00:00:00 2001 From: Michaek Korneev Date: Sat, 30 Mar 2024 17:53:12 +0200 Subject: [PATCH 5/7] android fix for libzimg --- ffmpeg/cppbuild.sh | 88 ++++++++++++++++++++++++++++++++------------- ffmpeg/ffmpeg.patch | 21 ++++++----- 2 files changed, 76 insertions(+), 33 deletions(-) diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh index f836c43a1b5..3595cd84747 100644 --- a/ffmpeg/cppbuild.sh +++ b/ffmpeg/cppbuild.sh @@ -7,8 +7,8 @@ if [[ -z "$PLATFORM" ]]; then exit fi -DISABLE="--disable-iconv --disable-opencl --disable-sdl2 --disable-bzlib --disable-lzma --disable-linux-perf --disable-xlib" -ENABLE="--enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-libxml2 --enable-libsrt --enable-libwebp --enable-libaom --enable-libsvtav1" +DISABLE="--disable-iconv --disable-opencl --disable-sdl2 --disable-bzlib --disable-lzma --disable-linux-perf --disable-xlib " +ENABLE="--enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-libxml2 --enable-libsrt --enable-libwebp --enable-libaom --enable-libsvtav1 --enable-libzimg" ENABLE_VULKAN="--enable-vulkan --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=av1_vulkan" if [[ "$EXTENSION" == *gpl ]]; then @@ -135,10 +135,20 @@ case $PLATFORM in export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=arm-linux + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=arm-linux make -j $MAKEJ V=0 make install @@ -268,7 +278,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION sedinplace 's/unsigned long int/unsigned int/g' libavdevice/v4l2.c - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=arm --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic" --disable-symver || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=arm --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic -lstdc++" --disable-symver || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -281,10 +291,20 @@ EOF export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=aarch64-linux + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=aarch64-linux make -j $MAKEJ V=0 make install @@ -413,7 +433,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION sedinplace 's/unsigned long int/unsigned int/g' libavdevice/v4l2.c - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=aarch64 --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic" --disable-symver || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=aarch64 --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic -lstdc++" --disable-symver || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -426,10 +446,20 @@ EOF export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=i686-linux + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=i686-linux make -j $MAKEJ V=0 make install @@ -555,7 +585,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION sedinplace 's/unsigned long int/unsigned int/g' libavdevice/v4l2.c - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=atom --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic" --disable-symver || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=atom --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic -lstdc++" --disable-symver || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -568,10 +598,20 @@ EOF export STRIP="$ANDROID_PREFIX-strip" echo "" echo "--------------------" + echo "Building zimg" + echo "--------------------" + echo "" + cd zimg-release-$ZIMGLIB + autoreconf -iv + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=x86_64-linux + make -j $MAKEJ V=0 + make install + echo "" + echo "--------------------" echo "Building zlib" echo "--------------------" echo "" - cd $ZLIB + cd ../$ZLIB ./configure --prefix=$INSTALL_PATH --static --uname=x86_64-linux make -j $MAKEJ V=0 make install @@ -696,7 +736,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION sedinplace 's/unsigned long int/unsigned int/g' libavdevice/v4l2.c - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=atom --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic" --disable-symver || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=atom --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic -lstdc++" --disable-symver || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -845,7 +885,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m32 -D__ILP32__" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m32 -D__ILP32__" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -868,7 +908,7 @@ EOF echo "--------------------" echo "" cd ../$ZLIB - CC="gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH --static + CC="gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH --static make -j $MAKEJ V=0 make install echo "" @@ -995,7 +1035,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libdrm --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -lpthread -ldl -lz -lm $LIBS" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -1023,7 +1063,7 @@ EOF echo "" cd zimg-release-$ZIMGLIB autoreconf -iv - ./configure --prefix=$INSTALL_PATH --host=arm-linux-gnueabihf + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=arm-linux-gnueabihf make -j $MAKEJ V=0 make install echo "" @@ -1209,9 +1249,9 @@ EOF if [[ ! -d $USERLAND_PATH ]]; then USERLAND_PATH="$(which arm-linux-gnueabihf-gcc | grep -o '.*/tools/')../userland" fi - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-omx --enable-mmal --enable-omx-rpi --enable-pthreads --cc="arm-linux-gnueabihf-gcc" --extra-cflags="$CFLAGS -I$USERLAND_PATH/ -I$USERLAND_PATH/interface/vmcs_host/khronos/IL/ -I$USERLAND_PATH/host_applications/linux/libs/bcm_host/include/ -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L$USERLAND_PATH/build/lib/ -L../lib/" --extra-libs="-lstdc++ -lasound -lvchiq_arm -lvcsm -lvcos -lpthread -ldl -lz -lm" --enable-cross-compile --arch=armhf --target-os=linux --cross-prefix="arm-linux-gnueabihf-" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-omx --enable-mmal --enable-omx-rpi --enable-pthreads --cc="arm-linux-gnueabihf-gcc" --extra-cflags="$CFLAGS -I$USERLAND_PATH/ -I$USERLAND_PATH/interface/vmcs_host/khronos/IL/ -I$USERLAND_PATH/host_applications/linux/libs/bcm_host/include/ -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L$USERLAND_PATH/build/lib/ -L../lib/" --extra-libs="-lstdc++ -lasound -lvchiq_arm -lvcsm -lvcos -lpthread -ldl -lz -lm" --enable-cross-compile --arch=armhf --target-os=linux --cross-prefix="arm-linux-gnueabihf-" || cat ffbuild/config.log else - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-omx --enable-mmal --enable-omx-rpi --enable-pthreads --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/ -L/opt/vc/lib" --extra-libs="-lstdc++ -lasound -lvchiq_arm -lvcsm -lvcos -lpthread -ldl -lz -lm" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-omx --enable-mmal --enable-omx-rpi --enable-pthreads --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/ -L/opt/vc/lib" --extra-libs="-lstdc++ -lasound -lvchiq_arm -lvcsm -lvcos -lpthread -ldl -lz -lm" || cat ffbuild/config.log fi make -j $MAKEJ make install @@ -1231,7 +1271,7 @@ EOF echo "" cd zimg-release-$ZIMGLIB autoreconf -iv - ./configure --prefix=$INSTALL_PATH --host=aarch64-linux-gnu + ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=aarch64-linux-gnu make -j $MAKEJ V=0 make install echo "" @@ -1364,7 +1404,7 @@ EOF if [[ ! -d $USERLAND_PATH ]]; then USERLAND_PATH="$(which aarch64-linux-gnu-gcc | grep -o '.*/tools/')../userland" fi - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-omx `#--enable-mmal` --enable-omx-rpi --enable-pthreads --cc="aarch64-linux-gnu-gcc" --extra-cflags="$CFLAGS -I$USERLAND_PATH/ -I$USERLAND_PATH/interface/vmcs_host/khronos/IL/ -I$USERLAND_PATH/host_applications/linux/libs/bcm_host/include/ -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1 -fno-aggressive-loop-optimizations" --extra-ldflags="-Wl,-z,relro -L$USERLAND_PATH/build/lib/ -L../lib/" --extra-libs="-lstdc++ -lasound -lvchiq_arm `#-lvcsm` -lvcos -lpthread -ldl -lz -lm" --enable-cross-compile --arch=arm64 --target-os=linux --cross-prefix="aarch64-linux-gnu-" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-omx `#--enable-mmal` --enable-omx-rpi --enable-pthreads --cc="aarch64-linux-gnu-gcc" --extra-cflags="$CFLAGS -I$USERLAND_PATH/ -I$USERLAND_PATH/interface/vmcs_host/khronos/IL/ -I$USERLAND_PATH/host_applications/linux/libs/bcm_host/include/ -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1 -fno-aggressive-loop-optimizations" --extra-ldflags="-Wl,-z,relro -L$USERLAND_PATH/build/lib/ -L../lib/" --extra-libs="-lstdc++ -lasound -lvchiq_arm `#-lvcsm` -lvcos -lpthread -ldl -lz -lm" --enable-cross-compile --arch=arm64 --target-os=linux --cross-prefix="aarch64-linux-gnu-" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -1587,10 +1627,10 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION if [[ "$MACHINE_TYPE" =~ ppc64 ]]; then - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" --disable-altivec || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" --disable-altivec || cat ffbuild/config.log else echo "configure ffmpeg cross compile" - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/:/usr/lib/powerpc64le-linux-gnu/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="powerpc64le-linux-gnu-gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --enable-cross-compile --target-os=linux --arch=ppc64le-linux --extra-libs="-lstdc++ -lpthread -ldl -lz -lm" --disable-altivec || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' PKG_CONFIG_PATH=../lib/pkgconfig/:/usr/lib/powerpc64le-linux-gnu/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-pthreads --enable-libxcb --cc="powerpc64le-linux-gnu-gcc -m64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --enable-cross-compile --target-os=linux --arch=ppc64le-linux --extra-libs="-lstdc++ -lpthread -ldl -lz -lm" --disable-altivec || cat ffbuild/config.log fi make -j $MAKEJ make install @@ -1728,7 +1768,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION patch -Np1 < ../../../ffmpeg-macosx.patch - LDEXEFLAGS='-Wl,-rpath,@loader_path/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-pthreads --enable-indev=avfoundation --disable-libxcb --cc="clang -arch arm64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" --enable-cross-compile --arch=arm64 --target-os=darwin || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,@loader_path/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-pthreads --enable-indev=avfoundation --disable-libxcb --cc="clang -arch arm64" --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" --enable-cross-compile --arch=arm64 --target-os=darwin || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -1862,7 +1902,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION patch -Np1 < ../../../ffmpeg-macosx.patch - LDEXEFLAGS='-Wl,-rpath,@loader_path/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-pthreads --enable-indev=avfoundation --disable-libxcb --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,@loader_path/' PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-pthreads --enable-indev=avfoundation --disable-libxcb --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl -lz -lm" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -2003,7 +2043,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m32" --extra-cflags="-DLIBXML_STATIC -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -lz -lm -Wl,-Bdynamic -lole32 -luuid" || cat ffbuild/config.log + PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m32" --extra-cflags="-DLIBXML_STATIC -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -lz -lm -Wl,-Bdynamic -lole32 -luuid" || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -2144,7 +2184,7 @@ EOF make install cd .. cd ../ffmpeg-$FFMPEG_VERSION - PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-libzimg --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m64" --extra-cflags="-DLIBXML_STATIC -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -lz -lm -Wl,-Bdynamic -lole32 -luuid" || cat ffbuild/config.log + PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE $ENABLE_VULKAN --enable-cuda --enable-cuvid --enable-nvenc --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m64" --extra-cflags="-DLIBXML_STATIC -I../include/ -I../include/libxml2 -I../include/mfx/ -I../include/svt-av1" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -lz -lm -Wl,-Bdynamic -lole32 -luuid" || cat ffbuild/config.log make -j $MAKEJ make install ;; diff --git a/ffmpeg/ffmpeg.patch b/ffmpeg/ffmpeg.patch index 07b591c8295..6a2f5ae710b 100644 --- a/ffmpeg/ffmpeg.patch +++ b/ffmpeg/ffmpeg.patch @@ -1,7 +1,7 @@ diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure --- ffmpeg-6.1/configure 2023-11-11 09:25:17.000000000 +0900 +++ ffmpeg-6.1-patch/configure 2023-11-11 19:18:26.388930944 +0900 -@@ -6673,7 +6673,7 @@ +@@ -6675,7 +6675,7 @@ enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gn enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; } enabled ladspa && require_headers "ladspa.h dlfcn.h" enabled lcms2 && require_pkg_config lcms2 "lcms2 >= 2.13" lcms2.h cmsCreateContext @@ -10,7 +10,7 @@ diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new || { enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } || die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; } -@@ -6699,7 +6699,7 @@ +@@ -6701,7 +6701,7 @@ flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lfl enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs enabled fontconfig && enable libfontconfig enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit @@ -19,7 +19,7 @@ diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info enabled libharfbuzz && require_pkg_config libharfbuzz harfbuzz hb.h hb_buffer_create enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \ -@@ -6729,15 +6729,7 @@ +@@ -6731,15 +6731,7 @@ if enabled libmfx && enabled libvpl; then # pkg-config support. Instead, users should make sure that the build # can find the libraries and headers through other means. elif enabled libmfx; then @@ -36,7 +36,7 @@ diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure warn "libmfx is deprecated. Please run configure with --enable-libvpl to use libvpl instead." elif enabled libvpl; then # Consider pkg-config only. The name of libmfx is still passed to check_pkg_config function for --enable-libvpl option -@@ -6764,21 +6756,14 @@ +@@ -6766,21 +6758,14 @@ enabled libopencv && { check_headers opencv2/core/core_c.h && { check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader || require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } || require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; } @@ -60,7 +60,7 @@ diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure enabled libplacebo && require_pkg_config libplacebo "libplacebo >= 4.192.0" libplacebo/vulkan.h pl_vulkan_create enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection -@@ -6794,9 +6779,9 @@ +@@ -6796,9 +6781,9 @@ enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbcli enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/sftp.h sftp_init @@ -73,7 +73,7 @@ diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg -@@ -6815,19 +6800,15 @@ +@@ -6817,19 +6802,15 @@ enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h enabled libvpx && { enabled libvpx_vp8_decoder && { @@ -93,7 +93,7 @@ diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" } if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then -@@ -6836,14 +6817,14 @@ +@@ -6838,24 +6819,24 @@ enabled libvpx && { } enabled libwebp && { @@ -112,7 +112,10 @@ diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure require_cpp_condition libx265 x265.h "X265_BUILD >= 89" enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get -@@ -6853,7 +6834,7 @@ + enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore +-enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version ++enabled libzimg && require libzimg zimg.h zimg_get_api_version -lzimg -lstdc++ + enabled libzmq && require_pkg_config libzmq "libzmq >= 4.2.1" zmq.h zmq_ctx_new enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new && { test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" || enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; } @@ -121,7 +124,7 @@ diff -ruN ffmpeg-6.1/configure ffmpeg-6.1-patch/configure enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init || check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init || check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto || -@@ -6892,15 +6873,13 @@ +@@ -6894,15 +6875,13 @@ enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } && enable omx enabled omx && require_headers OMX_Core.h From 14d3a1abf98cac0381fc56bbfcb9843c191ed4ee Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Sat, 6 Apr 2024 16:54:51 +0900 Subject: [PATCH 6/7] Update CHANGELOG.md and fix nits --- CHANGELOG.md | 1 + ffmpeg/cppbuild.sh | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8607c9b42b9..85970242346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ + * Build FFmpeg with zimg to enable zscale filter ([pull #1481](https://github.com/bytedeco/javacpp-presets/pull/1481)) * Enable PulseAudio support for FFmpeg on Linux ([pull #1472](https://github.com/bytedeco/javacpp-presets/pull/1472)) * Virtualize `btCollisionWorld`, `btOverlapFilterCallback`, `btOverlapCallback` from Bullet Physics SDK ([pull #1475](https://github.com/bytedeco/javacpp-presets/pull/1475)) * Upgrade presets for PyTorch 2.2.1 ([pull #1466](https://github.com/bytedeco/javacpp-presets/pull/1466)) diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh index 4e17d4b4d96..0b22be442bb 100644 --- a/ffmpeg/cppbuild.sh +++ b/ffmpeg/cppbuild.sh @@ -7,7 +7,7 @@ if [[ -z "$PLATFORM" ]]; then exit fi -DISABLE="--disable-iconv --disable-opencl --disable-sdl2 --disable-bzlib --disable-lzma --disable-linux-perf --disable-xlib " +DISABLE="--disable-iconv --disable-opencl --disable-sdl2 --disable-bzlib --disable-lzma --disable-linux-perf --disable-xlib" ENABLE="--enable-shared --enable-version3 --enable-runtime-cpudetect --enable-zlib --enable-libmp3lame --enable-libspeex --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-openssl --enable-libopenh264 --enable-libvpx --enable-libfreetype --enable-libopus --enable-libxml2 --enable-libsrt --enable-libwebp --enable-libaom --enable-libsvtav1 --enable-libzimg" ENABLE_VULKAN="--enable-vulkan --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=av1_vulkan" @@ -47,7 +47,7 @@ LIBSRT_VERSION=1.5.3 WEBP_VERSION=1.3.2 AOMAV1_VERSION=3.8.0 SVTAV1_VERSION=1.8.0 -ZIMGLIB=3.0.5 +ZIMG_VERSION=3.0.5 FFMPEG_VERSION=6.1.1 download https://download.videolan.org/contrib/nasm/nasm-$NASM_VERSION.tar.gz nasm-$NASM_VERSION.tar.gz download http://zlib.net/$ZLIB.tar.gz $ZLIB.tar.gz @@ -70,7 +70,7 @@ download https://github.com/FFmpeg/nv-codec-headers/archive/n$NVCODEC_VERSION.ta download https://github.com/webmproject/libwebp/archive/refs/tags/v$WEBP_VERSION.tar.gz libwebp-$WEBP_VERSION.tar.gz download https://storage.googleapis.com/aom-releases/libaom-$AOMAV1_VERSION.tar.gz aom-$AOMAV1_VERSION.tar.gz download https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v$SVTAV1_VERSION/SVT-AV1-v$SVTAV1_VERSION.tar.gz SVT-AV1-$SVTAV1_VERSION.tar.gz -download https://github.com/sekrit-twc/zimg/archive/refs/tags/release-$ZIMGLIB.tar.gz zimg-$ZIMGLIB.tar.gz +download https://github.com/sekrit-twc/zimg/archive/refs/tags/release-$ZIMG_VERSION.tar.gz zimg-release-$ZIMG_VERSION.tar.gz download http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2 ffmpeg-$FFMPEG_VERSION.tar.bz2 mkdir -p $PLATFORM$EXTENSION @@ -97,7 +97,7 @@ tar --totals -xzf ../$XML2.tar.gz tar --totals -xzf ../libwebp-$WEBP_VERSION.tar.gz tar --totals -xzf ../aom-$AOMAV1_VERSION.tar.gz tar --totals -xzf ../SVT-AV1-$SVTAV1_VERSION.tar.gz -tar --totals -xzf ../zimg-$ZIMGLIB.tar.gz +tar --totals -xzf ../zimg-release-$ZIMG_VERSION.tar.gz tar --totals -xjf ../ffmpeg-$FFMPEG_VERSION.tar.bz2 if [[ "${ACLOCAL_PATH:-}" == C:\\msys64\\* ]]; then @@ -138,7 +138,7 @@ case $PLATFORM in echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=arm-linux make -j $MAKEJ V=0 @@ -278,7 +278,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION sedinplace 's/unsigned long int/unsigned int/g' libavdevice/v4l2.c - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=arm --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic -lstdc++" --disable-symver || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=arm --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic" --disable-symver || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -294,7 +294,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=aarch64-linux make -j $MAKEJ V=0 @@ -433,7 +433,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION sedinplace 's/unsigned long int/unsigned int/g' libavdevice/v4l2.c - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=aarch64 --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic -lstdc++" --disable-symver || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=aarch64 --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic" --disable-symver || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -449,7 +449,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=i686-linux make -j $MAKEJ V=0 @@ -585,7 +585,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION sedinplace 's/unsigned long int/unsigned int/g' libavdevice/v4l2.c - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=atom --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic -lstdc++" --disable-symver || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=atom --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic" --disable-symver || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -601,7 +601,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=x86_64-linux make -j $MAKEJ V=0 @@ -736,7 +736,7 @@ EOF cd .. cd ../ffmpeg-$FFMPEG_VERSION sedinplace 's/unsigned long int/unsigned int/g' libavdevice/v4l2.c - LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=atom --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic -lstdc++" --disable-symver || cat ffbuild/config.log + LDEXEFLAGS='-Wl,-rpath,\$$ORIGIN/' ./configure --prefix=.. $DISABLE $ENABLE --enable-jni --enable-mediacodec --enable-pthreads --enable-cross-compile --cross-prefix="$ANDROID_PREFIX-" --ar="$AR" --ranlib="$RANLIB" --cc="$CC" --strip="$STRIP" --sysroot="$ANDROID_ROOT" --target-os=android --arch=atom --extra-cflags="-I../include/ -I../include/libxml2 -I../include/mfx -I../include/svt-av1 $ANDROID_FLAGS" --extra-ldflags="-L../lib/ $ANDROID_FLAGS" --extra-libs="$ANDROID_LIBS -lz -latomic" --disable-symver || cat ffbuild/config.log make -j $MAKEJ make install ;; @@ -748,7 +748,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH --host=i686-linux make -j $MAKEJ V=0 @@ -897,7 +897,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH --host=x86_64-linux make -j $MAKEJ V=0 @@ -1061,7 +1061,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=arm-linux-gnueabihf make -j $MAKEJ V=0 @@ -1269,7 +1269,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH --disable-frontend --disable-shared --with-pic --host=aarch64-linux-gnu make -j $MAKEJ V=0 @@ -1416,7 +1416,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv if [[ "$MACHINE_TYPE" =~ ppc64 ]]; then CC="gcc -m64 -fPIC" ./configure --prefix=$INSTALL_PATH @@ -1645,7 +1645,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH --host=aarch64-apple-darwin make -j $MAKEJ V=0 @@ -1780,7 +1780,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH make -j $MAKEJ V=0 @@ -1913,7 +1913,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH make -j $MAKEJ V=0 @@ -2054,7 +2054,7 @@ EOF echo "Building zimg" echo "--------------------" echo "" - cd zimg-release-$ZIMGLIB + cd zimg-release-$ZIMG_VERSION autoreconf -iv ./configure --prefix=$INSTALL_PATH make -j $MAKEJ V=0 From f69c49969cc1be96eedfa6cbc670968debee0e74 Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Sun, 7 Apr 2024 10:03:50 +0900 Subject: [PATCH 7/7] Fix builds on Windows --- .github/actions/deploy-windows/action.yml | 67 ++++++++++++----------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/.github/actions/deploy-windows/action.yml b/.github/actions/deploy-windows/action.yml index bfa9dd5c36f..93f11d1ad6b 100644 --- a/.github/actions/deploy-windows/action.yml +++ b/.github/actions/deploy-windows/action.yml @@ -55,37 +55,42 @@ runs: if not "%CI_DEPLOY_NEED_GCC%"=="" ( echo Installing an older less buggy version of GCC - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gdb-11.2-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-ada-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-objc-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libs-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-fortran-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libgfortran-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-binutils-2.38-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-crt-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-headers-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-libmangle-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-tools-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-winpthreads-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-winstorecompat-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gdb-11.2-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-ada-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-objc-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-fortran-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libgfortran-11.3.0-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-binutils-2.38-2-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-crt-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-headers-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libmangle-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-tools-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-winpthreads-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-winstorecompat-git-10.0.0.r14.ga08c638f8-1-any.pkg.tar.zst - bash -c "pacman -Rc --noconfirm mingw-w64-i686-libgccjit mingw-w64-x86_64-libgccjit mingw-w64-i686-gdb-multiarch mingw-w64-x86_64-gdb-multiarch" + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gdb-12.1-6-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gdb-multiarch-12.1-6-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-ada-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-objc-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libs-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-fortran-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libgfortran-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-binutils-2.39-3-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-crt-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-headers-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-libmangle-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-tools-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-winpthreads-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-winstorecompat-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-vulkan-headers-1.3.275.0-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/i686/mingw-w64-i686-vulkan-loader-1.3.275.0-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gdb-12.1-6-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gdb-multiarch-12.1-6-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-ada-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-objc-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-fortran-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libgfortran-12.2.0-9-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-binutils-2.39-3-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-crt-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-headers-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libmangle-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-tools-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-winpthreads-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-winstorecompat-git-10.0.0.r202.g4359b3570-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-vulkan-headers-1.3.275.0-1-any.pkg.tar.zst + curl -LO http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-vulkan-loader-1.3.275.0-1-any.pkg.tar.zst bash -c "pacman -U --noconfirm *.pkg.tar.zst" ) else ( bash -c "pacman -Rc --noconfirm mingw-w64-i686-headers-git mingw-w64-x86_64-headers-git mingw-w64-i686-zlib mingw-w64-x86_64-zlib"