Skip to content

Commit

Permalink
[libwebp] Update to version 1.3.1. (#32767)
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Jul 27, 2023
1 parent 24d7259 commit f4b6001
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
4 changes: 2 additions & 2 deletions ports/libwebp/0002-cmake-config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ diff --git a/cmake/WebPConfig.cmake.in b/cmake/WebPConfig.cmake.in
index f334739..43f10e0 100644
--- a/cmake/WebPConfig.cmake.in
+++ b/cmake/WebPConfig.cmake.in
@@ -12,5 +12,12 @@ include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
@@ -12,5 +12,12 @@ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")

set(WebP_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
set_and_check(WebP_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set(WEBP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS})
-set(WebP_LIBRARIES "@INSTALLED_LIBRARIES@")
+set(WebP_LIBRARIES "")
Expand Down
16 changes: 13 additions & 3 deletions ports/libwebp/0008-sdl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a5af42..636eef7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -635,16 +635,22 @@ if(WEBP_BUILD_EXTRAS)
@@ -647,26 +647,32 @@ if(WEBP_BUILD_EXTRAS)
${CMAKE_CURRENT_BINARY_DIR}/src ${SDL_INCLUDE_DIR})
set(WEBP_HAVE_SDL 1)
target_compile_definitions(vwebp_sdl PUBLIC WEBP_HAVE_SDL)
Expand All @@ -14,6 +14,16 @@ index 0a5af42..636eef7 100644
endif()

if(WEBP_BUILD_WEBP_JS)
# The default stack size changed from 5MB to 64KB in 3.1.27. See
# https://crbug.com/webp/614.
if(EMSCRIPTEN_VERSION VERSION_GREATER_EQUAL "3.1.27")
# TOTAL_STACK size was renamed to STACK_SIZE in 3.1.27. The old name was
# kept for compatibility, but prefer the new one in case it is removed in
# the future.
set(emscripten_stack_size "-sSTACK_SIZE=5MB")
else()
set(emscripten_stack_size "-sTOTAL_STACK=5MB")
endif()
# wasm2js does not support SIMD.
+ find_package(SDL REQUIRED)
if(NOT WEBP_ENABLE_SIMD)
Expand All @@ -26,7 +36,7 @@ index 0a5af42..636eef7 100644
set(WEBP_HAVE_SDL 1)
set_target_properties(
webp_js
@@ -653,12 +659,15 @@ if(WEBP_BUILD_WEBP_JS)
@@ -675,12 +681,15 @@ if(WEBP_BUILD_WEBP_JS)
-sEXPORTED_RUNTIME_METHODS=cwrap")
set_target_properties(webp_js PROPERTIES OUTPUT_NAME webp)
target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
Expand All @@ -42,4 +52,4 @@ index 0a5af42..636eef7 100644
+ target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_JUST_SDL_H)
set_target_properties(
webp_wasm
PROPERTIES LINK_FLAGS "-sWASM=1 \
PROPERTIES LINK_FLAGS "-sWASM=1 ${emscripten_stack_size} \
4 changes: 2 additions & 2 deletions ports/libwebp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO webmproject/libwebp
REF "v${VERSION}"
SHA512 96f73ba6caee4e65535721ca80faa976f51930eb6693e4499593e896f15269dfb756defabe7afbefb3bd2ef90afc0c95e3ba49d8020bc18589c34e9e680d955a
SHA512 9131c256f78fa09c3fc569b0b3657f62b06466cfa7b88b81cbae68f0a37f7a36ac6b0fe257b150406e15d623eda288c46ee97ee023aebe7dec25ca0a6d4ba85c
HEAD_REF master
PATCHES
0002-cmake-config.patch
Expand Down Expand Up @@ -72,4 +72,4 @@ if(NOT BIN_NAMES STREQUAL "")
endif()

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST ${SOURCE_PATH}/COPYING ${SOURCE_PATH}/PATENTS)
3 changes: 1 addition & 2 deletions ports/libwebp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "libwebp",
"version": "1.3.0",
"port-version": 1,
"version": "1.3.1",
"description": "WebP codec: library to encode and decode images in WebP format",
"homepage": "https://github.com/webmproject/libwebp",
"license": "BSD-3-Clause",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4785,8 +4785,8 @@
"port-version": 1
},
"libwebp": {
"baseline": "1.3.0",
"port-version": 1
"baseline": "1.3.1",
"port-version": 0
},
"libwebsockets": {
"baseline": "4.3.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libwebp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3a14f8bd920b63d510d85da200f0b6f1847e270a",
"version": "1.3.1",
"port-version": 0
},
{
"git-tree": "519daa6213a5995a860ed724c465adf9ff83b52a",
"version": "1.3.0",
Expand Down

0 comments on commit f4b6001

Please sign in to comment.