Upgrade libwebp to v1.2.3

This upgrades `libwebp` (a subdependency of `YYImage`) from v1.0.2 to its
latest version, v1.2.3.

As of this writing, the [libwebp pod does not have v1.2.3][0], so I
modified [the v1.2.1 podspec][1] and vendored it into the project. You
may wish to [compare the v1.2.1 podspec with my version][2]. In the long
term, I will try to get this change submitted upstream.

I tested this with a variety of stickers (usually sent as WebP), [WebP's
alpha test images][2], and [a test WebP image from the Desktop app][3].

[0]: 11f1b72927/Specs/1/9/2/libwebp
[1]: b04c376a0d/Specs/1/9/2/libwebp/1.2.1/libwebp.podspec.json
[2]: https://gist.github.com/EvanHahn-Signal/c87c301d2d7359df961bb85dd531a91c
[3]: https://developers.google.com/speed/webp/gallery2#webp_links
[4]: 412f07d2a2/fixtures/512x515-thumbs-up-lincoln.webp
This commit is contained in:
Evan Hahn 2022-07-31 08:34:29 -05:00 committed by Evan Hahn
parent 00466c7a18
commit e3fa7848e5
4 changed files with 99 additions and 27 deletions

View File

@ -51,6 +51,8 @@ pod 'libPhoneNumber-iOS', git: 'https://github.com/signalapp/libPhoneNumber-iOS'
pod 'YYImage', git: 'https://github.com/signalapp/YYImage', :inhibit_warnings => true
pod 'YYImage/libwebp', git: 'https://github.com/signalapp/YYImage', :inhibit_warnings => true
pod 'libwebp', podspec: './ThirdParty/libwebp.podspec.json'
# pod 'YYImage', path: '../YYImage'
# pod 'YYImage/libwebp', path:'../YYImage'

View File

@ -21,30 +21,15 @@ PODS:
- SignalCoreKit
- LibSignalClient/Tests (0.17.0):
- SignalCoreKit
- libwebp (1.0.2):
- libwebp/core (= 1.0.2)
- libwebp/dec (= 1.0.2)
- libwebp/demux (= 1.0.2)
- libwebp/dsp (= 1.0.2)
- libwebp/enc (= 1.0.2)
- libwebp/mux (= 1.0.2)
- libwebp/utils (= 1.0.2)
- libwebp/webp (= 1.0.2)
- libwebp/core (1.0.2):
- libwebp (1.2.3):
- libwebp/demux (= 1.2.3)
- libwebp/mux (= 1.2.3)
- libwebp/webp (= 1.2.3)
- libwebp/demux (1.2.3):
- libwebp/webp
- libwebp/dec (1.0.2):
- libwebp/core
- libwebp/demux (1.0.2):
- libwebp/core
- libwebp/dsp (1.0.2):
- libwebp/core
- libwebp/enc (1.0.2):
- libwebp/core
- libwebp/mux (1.0.2):
- libwebp/core
- libwebp/utils (1.0.2):
- libwebp/core
- libwebp/webp (1.0.2)
- libwebp/mux (1.2.3):
- libwebp/demux
- libwebp/webp (1.2.3)
- Logging (1.4.0)
- lottie-ios (3.1.3)
- Mantle (2.1.0):
@ -137,6 +122,7 @@ DEPENDENCIES:
- libPhoneNumber-iOS (from `https://github.com/signalapp/libPhoneNumber-iOS`, branch `signal-master`)
- LibSignalClient (from `https://github.com/signalapp/libsignal-client.git`)
- LibSignalClient/Tests (from `https://github.com/signalapp/libsignal-client.git`)
- libwebp (from `./ThirdParty/libwebp.podspec.json`)
- lottie-ios
- Mantle (from `https://github.com/signalapp/Mantle`, branch `signal-master`)
- MobileCoin/CoreHTTP (from `https://github.com/mobilecoinofficial/MobileCoin-Swift.git`, tag `v1.2.0-pre10`)
@ -164,7 +150,6 @@ SPEC REPOS:
- BonMot
- CocoaLumberjack
- GRDB.swift
- libwebp
- Logging
- lottie-ios
- PureLayout
@ -189,6 +174,8 @@ EXTERNAL SOURCES:
:git: https://github.com/signalapp/libPhoneNumber-iOS
LibSignalClient:
:git: https://github.com/signalapp/libsignal-client.git
libwebp:
:podspec: "./ThirdParty/libwebp.podspec.json"
Mantle:
:branch: signal-master
:git: https://github.com/signalapp/Mantle
@ -266,7 +253,7 @@ SPEC CHECKSUMS:
LibMobileCoin: 40d2d7d685321a6128871b6c6b4bb7cba25e848f
libPhoneNumber-iOS: 2d26d0a38933eee2702962a4dbdec2fc20e5ef9f
LibSignalClient: 0979e736d85a419b75ecedc36ffcea821a5cea14
libwebp: b068a3bd7c45f7460f6715be7bed1a18fd5d6b48
libwebp: 1cc63d45283a1349f4479e9618c5db59978d3d15
Logging: beeb016c9c80cf77042d62e83495816847ef108b
lottie-ios: 496ac5cea1bbf1a7bd1f1f472f3232eb1b8d744b
Mantle: 2fa750afa478cd625a94230fbf1c13462f29395b
@ -286,6 +273,6 @@ SPEC CHECKSUMS:
SwiftProtobuf: 3320217e9d8fb75f36b40282e78c482640fd75dd
YYImage: f1ddd15ac032a58b78bbed1e012b50302d318331
PODFILE CHECKSUM: 631ef4bde40fb886eb58266bbe7d0bf2562ec8e5
PODFILE CHECKSUM: b768a112fc656f1bafe9150b5bc4119ae8a0bdda
COCOAPODS: 1.11.3

2
Pods

@ -1 +1 @@
Subproject commit fab57c15d43d41765703adb6b42f351fdcd39a2b
Subproject commit 9168b24fbc13486172eeda0a35f7669d1c2dedf1

83
ThirdParty/libwebp.podspec.json vendored Normal file
View File

@ -0,0 +1,83 @@
{
"name": "libwebp",
"version": "1.2.3",
"summary": "Library to encode and decode images in WebP format.",
"homepage": "https://developers.google.com/speed/webp/",
"authors": "Google Inc.",
"license": {
"type": "BSD",
"file": "COPYING"
},
"source": {
"git": "https://github.com/webmproject/libwebp.git",
"tag": "v1.2.3"
},
"compiler_flags": "-D_THREAD_SAFE",
"requires_arc": false,
"platforms": {
"osx": "10.10",
"ios": "9.0",
"tvos": "9.0",
"watchos": "2.0"
},
"pod_target_xcconfig": {
"USER_HEADER_SEARCH_PATHS": "$(inherited) ${PODS_ROOT}/libwebp/ ${PODS_TARGET_SRCROOT}/"
},
"preserve_paths": "src",
"default_subspecs": [
"webp",
"demux",
"mux"
],
"prepare_command": "sed -i.bak 's/<inttypes.h>/<stdint.h>/g' './src/webp/types.h'",
"subspecs": [
{
"name": "webp",
"source_files": [
"src/webp/decode.h",
"src/webp/encode.h",
"src/webp/types.h",
"src/webp/mux_types.h",
"src/webp/format_constants.h",
"src/utils/*.{h,c}",
"src/dsp/*.{h,c}",
"src/dec/*.{h,c}",
"src/enc/*.{h,c}",
"sharpyuv/*.{h,c}"
],
"public_header_files": [
"src/webp/decode.h",
"src/webp/encode.h",
"src/webp/types.h",
"src/webp/mux_types.h",
"src/webp/format_constants.h"
]
},
{
"name": "demux",
"dependencies": {
"libwebp/webp": [
]
},
"source_files": [
"src/demux/*.{h,c}",
"src/webp/demux.h"
],
"public_header_files": "src/webp/demux.h"
},
{
"name": "mux",
"dependencies": {
"libwebp/demux": [
]
},
"source_files": [
"src/mux/*.{h,c}",
"src/webp/mux.h"
],
"public_header_files": "src/webp/mux.h"
}
]
}