diff --git a/ports/libwebp/0003-simd.patch b/ports/libwebp/0003-simd.patch new file mode 100644 index 0000000000..523e05d443 --- /dev/null +++ b/ports/libwebp/0003-simd.patch @@ -0,0 +1,23 @@ +diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake +index 7513ca8..38ec73b 100644 +--- a/cmake/cpu.cmake ++++ b/cmake/cpu.cmake +@@ -50,7 +50,7 @@ if(MSVC AND CMAKE_C_COMPILER_ID STREQUAL "MSVC") + if(MSVC_VERSION GREATER_EQUAL 1800 AND NOT CMAKE_C_FLAGS MATCHES "/arch:") + set(SIMD_ENABLE_FLAGS) + else() +- set(SIMD_ENABLE_FLAGS "/arch:AVX;/arch:SSE2;;;;") ++ set(SIMD_ENABLE_FLAGS ";/arch:SSE2;;;;") # /arch:AVX is too much for SSE4 + endif() + set(SIMD_DISABLE_FLAGS) + else() +@@ -110,6 +110,9 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE}) + "src/dsp/*${WEBP_SIMD_FILE_EXTENSION}") + if(WEBP_HAVE_${WEBP_SIMD_FLAG}) + # Memorize the file and flags. ++ if("${SIMD_COMPILE_FLAG}" STREQUAL "") ++ set(SIMD_COMPILE_FLAG " ") ++ endif() + foreach(FILE ${SIMD_FILES}) + list(APPEND WEBP_SIMD_FILES_TO_INCLUDE ${FILE}) + list(APPEND WEBP_SIMD_FLAGS_TO_INCLUDE ${SIMD_COMPILE_FLAG}) diff --git a/ports/libwebp/0007-fix-arm-build.patch b/ports/libwebp/0007-fix-arm-build.patch deleted file mode 100644 index 4f0111dcc7..0000000000 --- a/ports/libwebp/0007-fix-arm-build.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake -index bc0dbc9..f9b7327 100644 ---- a/cmake/cpu.cmake -+++ b/cmake/cpu.cmake -@@ -48,7 +48,7 @@ if(MSVC AND CMAKE_C_COMPILER_ID STREQUAL "MSVC") - if(MSVC_VERSION GREATER_EQUAL 1800 AND NOT CMAKE_C_FLAGS MATCHES "/arch:") - set(SIMD_ENABLE_FLAGS) - else() -- set(SIMD_ENABLE_FLAGS "/arch:AVX;/arch:SSE2;;;;") -+ set(SIMD_ENABLE_FLAGS "/arch:SSE2;;;;;") - endif() - set(SIMD_DISABLE_FLAGS) - else() -@@ -97,7 +97,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE}) - set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG}) - webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD}) - else() -- if(MSVC AND SIMD_ENABLE_FLAGS) -+ if(MSVC AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "^ARM")) - # The detection for SSE2/SSE4 support under MSVC is based on the compiler - # version so e.g., clang-cl will require flags to enable the assembly. - list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 85ac92d783..a18000225e 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -6,7 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES 0002-cmake-config.patch - 0007-fix-arm-build.patch + 0003-simd.patch 0008-sdl.patch 0010-fix_build.patch ) diff --git a/ports/libwebp/vcpkg.json b/ports/libwebp/vcpkg.json index 1fff3dcb02..d0a0ede6e7 100644 --- a/ports/libwebp/vcpkg.json +++ b/ports/libwebp/vcpkg.json @@ -1,6 +1,7 @@ { "name": "libwebp", "version": "1.3.1", + "port-version": 1, "description": "WebP codec: library to encode and decode images in WebP format", "homepage": "https://github.com/webmproject/libwebp", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index b2cdeb7472..194dc4f3b9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4798,7 +4798,7 @@ }, "libwebp": { "baseline": "1.3.1", - "port-version": 0 + "port-version": 1 }, "libwebsockets": { "baseline": "4.3.2", diff --git a/versions/l-/libwebp.json b/versions/l-/libwebp.json index 230a183559..3c0d258022 100644 --- a/versions/l-/libwebp.json +++ b/versions/l-/libwebp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "42095edcaa6f9fb7a29822896d45b772f694a9cf", + "version": "1.3.1", + "port-version": 1 + }, { "git-tree": "3a14f8bd920b63d510d85da200f0b6f1847e270a", "version": "1.3.1",