Skip to content

Commit

Permalink
chore: Update dependencies, including libavif to 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Sep 8, 2023
1 parent ff739ec commit 832d0fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 67 deletions.
43 changes: 0 additions & 43 deletions wheelbuild/aom-3.5.0-monochrome-realtime-encode.patch

This file was deleted.

40 changes: 16 additions & 24 deletions wheelbuild/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
set -eo pipefail

CONFIG_DIR=$(abspath $(dirname "${BASH_SOURCE[0]}"))

ARCHIVE_SDIR=pillow-avif-plugin-depends
LIBAVIF_VERSION=0.11.0
AOM_VERSION=3.5.0
DAV1D_VERSION=1.0.0
SVT_AV1_VERSION=1.3.0
RAV1E_VERSION=p20230417
LIBWEBP_SHA=15a91ab179b0b605727d16fb751c12674da9dfec
LIBYUV_SHA=f9fda6e7
LIBAVIF_VERSION=1.0.1
AOM_VERSION=3.7.0
DAV1D_VERSION=1.2.1
SVT_AV1_VERSION=1.7.0
RAV1E_VERSION=0.6.6
LIBWEBP_SHA=e2c85878f6a33f29948b43d3492d9cdaf801aa54
LIBYUV_SHA=464c51a0
CCACHE_VERSION=4.7.1
SCCACHE_VERSION=0.3.0
export PERLBREWURL=https://raw.githubusercontent.com/gugod/App-perlbrew/release-0.92/perlbrew
Expand Down Expand Up @@ -205,10 +204,6 @@ function build_aom {
extra_cmake_flags+=("-DCMAKE_EXE_LINKER_FLAGS=-Wl,-z,stack-size=2097152")
fi

# Fix for https://github.com/AOMediaCodec/libavif/issues/1190
(cd libaom-$AOM_VERSION \
&& patch -p1 -i $CONFIG_DIR/aom-3.5.0-monochrome-realtime-encode.patch)

mkdir libaom-$AOM_VERSION/build/work
(cd libaom-$AOM_VERSION/build/work \
&& cmake \
Expand Down Expand Up @@ -319,19 +314,19 @@ function build_rav1e {
group_start "Build rav1e"

if [ -n "$IS_MACOS" ] && [ "$PLAT" == "arm64" ]; then
librav1e_tgz=librav1e-macos-aarch64.tar.gz
librav1e_tgz=librav1e-$RAV1E_VERSION-macos-aarch64.tar.gz
elif [ -n "$IS_MACOS" ]; then
librav1e_tgz=librav1e-macos.tar.gz
librav1e_tgz=librav1e-$RAV1E_VERSION-macos.tar.gz
elif [ "$PLAT" == "aarch64" ]; then
librav1e_tgz=librav1e-linux-aarch64.tar.gz
librav1e_tgz=librav1e-$RAV1E_VERSION-linux-aarch64.tar.gz
elif [ "$PLAT" == "i686" ]; then
librav1e_tgz=librav1e-linux-i686.tar.gz
librav1e_tgz=librav1e-$RAV1E_VERSION-linux-i686.tar.gz
else
librav1e_tgz=librav1e-linux-generic.tar.gz
librav1e_tgz=librav1e-$RAV1E_VERSION-linux-generic.tar.gz
fi

curl -sLo - \
https://github.com/fdintino/rav1e/releases/download/$RAV1E_VERSION/$librav1e_tgz \
https://github.com/xiph/rav1e/releases/download/v$RAV1E_VERSION/$librav1e_tgz \
| tar -C $BUILD_PREFIX -zxf -

if [ ! -n "$IS_MACOS" ]; then
Expand Down Expand Up @@ -364,8 +359,9 @@ function build_libsharpyuv {
-DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_INSTALL_LIBDIR=lib \
"${cmake_flags[@]}" \
&& ninja sharpyuv)
&& ninja sharpyuv install)
group_end
touch libsharpyuv-stamp
}
Expand Down Expand Up @@ -393,7 +389,7 @@ function build_libyuv {
-DBUILD_SHARED_LIBS=0 \
-DCMAKE_BUILD_TYPE=Release \
"${cmake_flags[@]}" .. \
&& ninja yuv)
&& ninja yuv install)
group_end
touch libyuv-stamp
}
Expand Down Expand Up @@ -450,12 +446,8 @@ function build_libavif {
group_end

build_libsharpyuv
mv libwebp-$LIBWEBP_SHA libavif-$LIBAVIF_VERSION/ext/libwebp
LIBAVIF_CMAKE_FLAGS+=(-DAVIF_LOCAL_LIBSHARPYUV=ON)

build_libyuv
mv libyuv-$LIBYUV_SHA libavif-$LIBAVIF_VERSION/ext/libyuv
LIBAVIF_CMAKE_FLAGS+=(-DAVIF_LOCAL_LIBYUV=ON)

group_start "Build libavif"

Expand Down

0 comments on commit 832d0fe

Please sign in to comment.