mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-12-03 16:24:24 +03:00
Updated brotli to 1.2.0
This commit is contained in:
parent
e36e67081a
commit
1a27f958d7
9
.github/workflows/wheels-dependencies.sh
vendored
9
.github/workflows/wheels-dependencies.sh
vendored
|
|
@ -32,7 +32,6 @@ if [[ "$CIBW_PLATFORM" == "ios" ]]; then
|
|||
# or `build/deps/iphonesimulator`
|
||||
WORKDIR=$(pwd)/build/$IOS_SDK
|
||||
BUILD_PREFIX=$(pwd)/build/deps/$IOS_SDK
|
||||
PATCH_DIR=$(pwd)/patches/iOS
|
||||
|
||||
# GNU tooling insists on using aarch64 rather than arm64
|
||||
if [[ $PLAT == "arm64" ]]; then
|
||||
|
|
@ -90,9 +89,7 @@ fi
|
|||
|
||||
ARCHIVE_SDIR=pillow-depends-main
|
||||
|
||||
# Package versions for fresh source builds. Version numbers with "Patched"
|
||||
# annotations have a source code patch that is required for some platforms. If
|
||||
# you change those versions, ensure the patch is also updated.
|
||||
# Package versions for fresh source builds.
|
||||
if [[ -n "$IOS_SDK" ]]; then
|
||||
FREETYPE_VERSION=2.13.3
|
||||
else
|
||||
|
|
@ -110,7 +107,7 @@ ZLIB_NG_VERSION=2.2.5
|
|||
LIBWEBP_VERSION=1.6.0
|
||||
BZIP2_VERSION=1.0.8
|
||||
LIBXCB_VERSION=1.17.0
|
||||
BROTLI_VERSION=1.1.0 # Patched; next release won't need patching. See patch file.
|
||||
BROTLI_VERSION=1.2.0
|
||||
LIBAVIF_VERSION=1.3.0
|
||||
|
||||
function build_pkg_config {
|
||||
|
|
@ -168,7 +165,7 @@ function build_brotli {
|
|||
if [ -e brotli-stamp ]; then return; fi
|
||||
local out_dir=$(fetch_unpack https://github.com/google/brotli/archive/v$BROTLI_VERSION.tar.gz brotli-$BROTLI_VERSION.tar.gz)
|
||||
(cd $out_dir \
|
||||
&& cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib $HOST_CMAKE_FLAGS . \
|
||||
&& cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib -DCMAKE_MACOSX_BUNDLE=OFF $HOST_CMAKE_FLAGS . \
|
||||
&& make -j4 install)
|
||||
touch brotli-stamp
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ repos:
|
|||
rev: v1.5.5
|
||||
hooks:
|
||||
- id: remove-tabs
|
||||
exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$|\.patch$)
|
||||
exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$)
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v21.1.2
|
||||
|
|
@ -46,9 +46,9 @@ repos:
|
|||
- id: check-yaml
|
||||
args: [--allow-multiple-documents]
|
||||
- id: end-of-file-fixer
|
||||
exclude: ^Tests/images/|\.patch$
|
||||
exclude: ^Tests/images/
|
||||
- id: trailing-whitespace
|
||||
exclude: ^.github/.*TEMPLATE|^Tests/(fonts|images)/|\.patch$
|
||||
exclude: ^.github/.*TEMPLATE|^Tests/(fonts|images)/
|
||||
|
||||
- repo: https://github.com/python-jsonschema/check-jsonschema
|
||||
rev: 0.34.0
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ include tox.ini
|
|||
graft Tests
|
||||
graft Tests/images
|
||||
graft checks
|
||||
graft patches
|
||||
graft src
|
||||
graft depends
|
||||
graft winbuild
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
Although we try to use official sources for dependencies, sometimes the official
|
||||
sources don't support a platform (especially mobile platforms), or there's a bug
|
||||
fix/feature that is required to support Pillow's usage.
|
||||
|
||||
This folder contains patches that must be applied to official sources, organized
|
||||
by the platforms that need those patches.
|
||||
|
||||
Each patch is against the root of the unpacked official tarball, and is named by
|
||||
appending `.patch` to the end of the tarball that is to be patched. This
|
||||
includes the full version number; so if the version is bumped, the patch will
|
||||
at a minimum require a filename change.
|
||||
|
||||
Wherever possible, these patches should be contributed upstream, in the hope that
|
||||
future Pillow versions won't need to maintain these patches.
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
# Brotli 1.1.0 doesn't have explicit support for iOS as a CMAKE_SYSTEM_NAME.
|
||||
# That release was from 2023; there have been subsequent changes that allow
|
||||
# Brotli to build on iOS without any patches, as long as -DBROTLI_BUILD_TOOLS=NO
|
||||
# is specified on the command line.
|
||||
#
|
||||
diff -ru brotli-1.1.0-orig/CMakeLists.txt brotli-1.1.0/CMakeLists.txt
|
||||
--- brotli-1.1.0-orig/CMakeLists.txt 2023-08-29 19:00:29
|
||||
+++ brotli-1.1.0/CMakeLists.txt 2024-11-07 10:46:26
|
||||
@@ -114,6 +114,8 @@
|
||||
add_definitions(-DOS_MACOSX)
|
||||
set(CMAKE_MACOS_RPATH TRUE)
|
||||
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
+elseif(${CMAKE_SYSTEM_NAME} MATCHES "iOS")
|
||||
+ add_definitions(-DOS_IOS)
|
||||
endif()
|
||||
|
||||
if(BROTLI_EMSCRIPTEN)
|
||||
@@ -174,10 +176,12 @@
|
||||
|
||||
# Installation
|
||||
if(NOT BROTLI_BUNDLED_MODE)
|
||||
- install(
|
||||
- TARGETS brotli
|
||||
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
- )
|
||||
+ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "iOS")
|
||||
+ install(
|
||||
+ TARGETS brotli
|
||||
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
+ )
|
||||
+ endif()
|
||||
|
||||
install(
|
||||
TARGETS ${BROTLI_LIBRARIES_CORE}
|
||||
diff -ru brotli-1.1.0-orig/c/common/platform.h brotli-1.1.0/c/common/platform.h
|
||||
--- brotli-1.1.0-orig/c/common/platform.h 2023-08-29 19:00:29
|
||||
+++ brotli-1.1.0/c/common/platform.h 2024-11-07 10:47:28
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <endian.h>
|
||||
#elif defined(OS_FREEBSD)
|
||||
#include <machine/endian.h>
|
||||
-#elif defined(OS_MACOSX)
|
||||
+#elif defined(OS_MACOSX) || defined(OS_IOS)
|
||||
#include <machine/endian.h>
|
||||
/* Let's try and follow the Linux convention */
|
||||
#define BROTLI_X_BYTE_ORDER BYTE_ORDER
|
||||
|
|
@ -113,7 +113,7 @@ ARCHITECTURES = {
|
|||
}
|
||||
|
||||
V = {
|
||||
"BROTLI": "1.1.0",
|
||||
"BROTLI": "1.2.0",
|
||||
"FREETYPE": "2.14.1",
|
||||
"FRIBIDI": "1.0.16",
|
||||
"HARFBUZZ": "12.1.0",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user