diff options
| author | JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> | 2021-09-28 08:51:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-27 17:51:56 -0700 |
| commit | 8e0a801c6253a2c8e81f59427a4a5d66f10c0ca4 (patch) | |
| tree | d4fbb613e5d8b01b8ff0b742192b37e955bdb3c6 | |
| parent | 5aec72b4f3f1ccda1176549f58abc24c7ee36ffe (diff) | |
| download | vcpkg-8e0a801c6253a2c8e81f59427a4a5d66f10c0ca4.tar.gz vcpkg-8e0a801c6253a2c8e81f59427a4a5d66f10c0ca4.zip | |
[libwebp] update to 1.2.1 (#20152)
* [libwebp] update to 1.2.1
* update version
* Convert patch CRLF to LF
* update version
* update patch and portfile,cmake
* update version
* update portifile.cmake
* update portfile.cmake
* update version
* update portfile.cmake
* update version
* revert portfile.cmake
* update version
* add trailing line break
* update version
| -rw-r--r-- | ports/libwebp/0001-build.patch | 29 | ||||
| -rw-r--r-- | ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch | 4 | ||||
| -rw-r--r-- | ports/libwebp/0003-always-mux.patch | 22 | ||||
| -rw-r--r-- | ports/libwebp/0004-add-missing-linked-library.patch | 4 | ||||
| -rw-r--r-- | ports/libwebp/0007-fix-arm-build.patch | 12 | ||||
| -rw-r--r-- | ports/libwebp/0008-sdl.patch | 69 | ||||
| -rw-r--r-- | ports/libwebp/0009-glut.patch | 24 | ||||
| -rw-r--r-- | ports/libwebp/portfile.cmake | 19 | ||||
| -rw-r--r-- | ports/libwebp/vcpkg.json | 14 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/l-/libwebp.json | 5 |
11 files changed, 110 insertions, 96 deletions
diff --git a/ports/libwebp/0001-build.patch b/ports/libwebp/0001-build.patch index e95468c32..3c6a63988 100644 --- a/ports/libwebp/0001-build.patch +++ b/ports/libwebp/0001-build.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9503daacb..2fb9ef137 100644 +index bd1bebb..4ce801d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -167,6 +167,9 @@ add_definitions(-DHAVE_CONFIG_H) +@@ -214,6 +214,9 @@ endfunction() if(MSVC) # avoid security warnings for e.g., fopen() used in the examples. add_definitions(-D_CRT_SECURE_NO_WARNINGS) @@ -12,7 +12,7 @@ index 9503daacb..2fb9ef137 100644 else() add_definitions(-Wall) endif() -@@ -420,9 +423,9 @@ if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) +@@ -482,7 +485,7 @@ if(WEBP_BUILD_LIBWEBPMUX) "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\ ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\ ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;") @@ -21,26 +21,25 @@ index 9503daacb..2fb9ef137 100644 list(APPEND INSTALLED_LIBRARIES libwebpmux) configure_pkg_config("src/mux/libwebpmux.pc") endif() - - if(WEBP_BUILD_GIF2WEBP) -@@ -524,7 +528,11 @@ if(WEBP_BUILD_EXTRAS) - +@@ -586,8 +589,12 @@ if(WEBP_BUILD_EXTRAS) # webp_quality add_executable(webp_quality ${WEBP_QUALITY_SRCS} ${WEBP_EXTRAS_SRCS}) target_link_libraries(webp_quality exampleutil imagedec) + if(BUILD_SHARED_LIBS) + target_link_libraries(webp_quality webpdspdecode) -+ endif() ++ endif() target_include_directories(webp_quality PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}) -@@ -573,7 +573,7 @@ if(WEBP_BUILD_WEBP_JS) - "-s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \ - -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'") - set_target_properties(webp_js PROPERTIES OUTPUT_NAME webp) -- target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL) -+ target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H) + + # vwebp_sdl +@@ -620,7 +627,7 @@ if(WEBP_BUILD_WEBP_JS) + -s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \ + -s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'") + set_target_properties(webp_js PROPERTIES OUTPUT_NAME webp) +- target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL) ++ target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H) + endif() # WASM version - add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) diff --git a/ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch b/ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch index 2ed199ec8..5e039a681 100644 --- a/ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch +++ b/ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch @@ -1,5 +1,5 @@ diff --git a/cmake/WebPConfig.cmake.in b/cmake/WebPConfig.cmake.in -index bb22164..3ad256f 100644 +index 822fc59..cef75fe 100644 --- a/cmake/WebPConfig.cmake.in +++ b/cmake/WebPConfig.cmake.in @@ -4,8 +4,60 @@ set(WEBP_VERSION ${WebP_VERSION}) @@ -8,7 +8,7 @@ index bb22164..3ad256f 100644 include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) --set(WebP_INCLUDE_DIRS "webp") +-set(WebP_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@") -set(WEBP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS}) -set(WebP_LIBRARIES "@INSTALLED_LIBRARIES@") -set(WEBP_LIBRARIES "${WebP_LIBRARIES}") diff --git a/ports/libwebp/0003-always-mux.patch b/ports/libwebp/0003-always-mux.patch index 1484bc891..c120c95d0 100644 --- a/ports/libwebp/0003-always-mux.patch +++ b/ports/libwebp/0003-always-mux.patch @@ -1,13 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6f6c8eca2..00366ae53 100644 ---- a/CMakeLists.txt +index b0ae7d5..5813c06 100644 +--- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -405,7 +405,7 @@ if(WEBP_BUILD_CWEBP) - install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
- endif()
-
--if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP)
-+if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP OR TRUE)
- parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "")
- add_library(libwebpmux ${WEBP_MUX_SRCS})
- target_link_libraries(libwebpmux webp)
+@@ -472,7 +472,7 @@ if(WEBP_BUILD_CWEBP) + install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +-if(WEBP_BUILD_LIBWEBPMUX) ++if(WEBP_BUILD_LIBWEBPMUX OR WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP OR TRUE) + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") + add_library(libwebpmux ${WEBP_MUX_SRCS}) + target_link_libraries(libwebpmux webp) diff --git a/ports/libwebp/0004-add-missing-linked-library.patch b/ports/libwebp/0004-add-missing-linked-library.patch index 6cbb394d5..6cfbe7ce8 100644 --- a/ports/libwebp/0004-add-missing-linked-library.patch +++ b/ports/libwebp/0004-add-missing-linked-library.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a98540c..a3697cb 100644 +index 8386687..5ab9ed2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -479,6 +479,10 @@ if(WEBP_BUILD_VWEBP) +@@ -540,6 +540,10 @@ if(WEBP_BUILD_VWEBP) PRIVATE ${GLUT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src ${OPENGL_INCLUDE_DIR}) diff --git a/ports/libwebp/0007-fix-arm-build.patch b/ports/libwebp/0007-fix-arm-build.patch index aae5e3957..909b7c293 100644 --- a/ports/libwebp/0007-fix-arm-build.patch +++ b/ports/libwebp/0007-fix-arm-build.patch @@ -1,13 +1,13 @@ diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake -index da9a42a4..ce7a69f3 100644 +index bc0dbc9..381f64a 100644 --- a/cmake/cpu.cmake +++ b/cmake/cpu.cmake -@@ -73,7 +73,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE}) +@@ -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) -+ if(MSVC AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "^ARM")) +- if(MSVC AND SIMD_ENABLE_FLAGS) ++ if(MSVC AND SIMD_ENABLE_FLAGS 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) - else() - set(SIMD_COMPILE_FLAG " ") diff --git a/ports/libwebp/0008-sdl.patch b/ports/libwebp/0008-sdl.patch index 7f3363f7b..b922ef172 100644 --- a/ports/libwebp/0008-sdl.patch +++ b/ports/libwebp/0008-sdl.patch @@ -1,36 +1,37 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7b0d2fa55..efd10887b 100644 ---- a/CMakeLists.txt +index 91a4ba8..10a3f4d 100644 +--- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -563,10 +563,11 @@ if(WEBP_BUILD_EXTRAS) - endif()
-
- if(WEBP_BUILD_WEBP_JS)
-+ find_package(SDL REQUIRED)
- # JavaScript version
- add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
-- target_link_libraries(webp_js webpdecoder SDL)
-- target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-+ target_link_libraries(webp_js webpdecoder ${SDL_LIBRARY})
-+ target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR})
- set(WEBP_HAVE_SDL 1)
- set_target_properties(
- webp_js
-@@ -578,14 +579,14 @@ if(WEBP_BUILD_WEBP_JS) -
- # WASM version
- add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
-- target_link_libraries(webp_wasm webpdecoder SDL)
-- target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
-+ target_link_libraries(webp_wasm webpdecoder ${SDL_LIBRARY})
-+ target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR})
- set_target_properties(
- webp_wasm
- PROPERTIES LINK_FLAGS "-s WASM=1 \
- -s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \
- -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
-- target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
-+ target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H)
-
- target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN)
- endif()
+@@ -624,11 +624,12 @@ endif() + + if(WEBP_BUILD_WEBP_JS) + # wasm2js does not support SIMD. ++ find_package(SDL REQUIRED) + if(NOT WEBP_ENABLE_SIMD) + # JavaScript version + add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) +- target_link_libraries(webp_js webpdecoder SDL) +- target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) ++ target_link_libraries(webp_js webpdecoder ${SDL_LIBRARY}) ++ target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR}) + set(WEBP_HAVE_SDL 1) + set_target_properties( + webp_js +@@ -641,14 +642,14 @@ if(WEBP_BUILD_WEBP_JS) + + # WASM version + add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) +- target_link_libraries(webp_wasm webpdecoder SDL) +- target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) ++ target_link_libraries(webp_wasm webpdecoder ${SDL_LIBRARY}) ++ target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR}) + set_target_properties( + webp_wasm + PROPERTIES LINK_FLAGS "-s WASM=1 \ + -s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \ + -s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'") +- target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL) ++ target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H) + + target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN) + endif() diff --git a/ports/libwebp/0009-glut.patch b/ports/libwebp/0009-glut.patch index e1bf267ed..01d011e5f 100644 --- a/ports/libwebp/0009-glut.patch +++ b/ports/libwebp/0009-glut.patch @@ -1,17 +1,17 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index efd10887b..8b41cc1ba 100644 ---- a/CMakeLists.txt +index 0799269..45b3306 100644 +--- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -470,7 +470,7 @@ if(WEBP_BUILD_VWEBP) - target_link_libraries(vwebp
- ${OPENGL_LIBRARIES}
- exampleutil
-- ${GLUT_glut_LIBRARY}
-+ GLUT::GLUT
- imageioutil
- webp
- webpdemux)
-@@ -481,6 +481,9 @@ if(WEBP_BUILD_VWEBP) +@@ -532,7 +532,7 @@ if(WEBP_BUILD_VWEBP) + target_link_libraries(vwebp + ${OPENGL_LIBRARIES} + exampleutil +- ${GLUT_glut_LIBRARY} ++ GLUT::GLUT + imageioutil + webp + webpdemux) +@@ -543,6 +543,9 @@ if(WEBP_BUILD_VWEBP) if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE)) find_package(X11 REQUIRED) target_link_libraries(vwebp ${X11_LIBRARIES} ${X11_Xxf86vm_LIB}) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 97673b7e4..985a6d518 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO webmproject/libwebp - REF d7844e9762b61c9638c263657bd49e1690184832 # v1.1.0 - SHA512 13692970e7dd909cd6aaa03c9a0c863243baac1885644794362dec0c0b0721d6807f281f746215bfd856c6e0cb742b01a731a33fe075a32ff24496e10c1a94b4 + REF 9ce5843dbabcfd3f7c39ec7ceba9cbeb213cbfdf # v1.2.1 + SHA512 43224caedb0d591ad1dd3872cd882c0fe255e24425f6da82fca212783ddb231326797a82ead0a1b8b15dc98db1cb05741e3a5e5131babbcc49a529a9f3253865 HEAD_REF master PATCHES 0001-build.patch @@ -31,6 +31,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS dwebp WEBP_BUILD_DWEBP swap16bitcsp WEBP_ENABLE_SWAP_16BIT_CSP unicode WEBP_UNICODE + libbwebpmux WEBP_BUILD_LIBWEBPMUX ) @@ -44,22 +45,21 @@ if(VCPKG_TARGET_IS_OSX) endif() endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} OPTIONS_DEBUG -DCMAKE_DEBUG_POSTFIX=d ) -vcpkg_install_cmake() +vcpkg_cmake_install() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake TARGET_PATH share/WebP) # find_package is called with WebP not libwebp -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_cmake_config_fixup(PACKAGE_NAME WebP CONFIG_PATH share/WebP/cmake) # find_package is called with WebP not libwebp +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libwebp.pc" "-lwebp" "-lwebpd") @@ -69,7 +69,6 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") endif() vcpkg_fixup_pkgconfig() - set(BIN_NAMES get_disto gif2webp img2webp vwebp vwebp_sdl webpinfo webpmux webp_quality cwebp dwebp) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/webp/") foreach(tool ${BIN_NAMES}) diff --git a/ports/libwebp/vcpkg.json b/ports/libwebp/vcpkg.json index 1f1925216..179f1cc1b 100644 --- a/ports/libwebp/vcpkg.json +++ b/ports/libwebp/vcpkg.json @@ -1,7 +1,6 @@ { "name": "libwebp", - "version-string": "1.1.0", - "port-version": 4, + "version": "1.2.1", "description": "WebP codec: library to encode and decode images in WebP format", "homepage": "https://github.com/webmproject/libwebp", "dependencies": [ @@ -11,6 +10,14 @@ "unicode" ], "platform": "windows" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ], "default-features": [ @@ -101,6 +108,9 @@ "info": { "description": "Build the webpinfo command line tool." }, + "libbwebpmux": { + "description": "Build the libwebpmux library" + }, "mux": { "description": "Build the webpmux command line tool." }, diff --git a/versions/baseline.json b/versions/baseline.json index 0e5051e40..0f7ca3c5d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3925,8 +3925,8 @@ "port-version": 7 }, "libwebp": { - "baseline": "1.1.0", - "port-version": 4 + "baseline": "1.2.1", + "port-version": 0 }, "libwebsockets": { "baseline": "4.2.2", diff --git a/versions/l-/libwebp.json b/versions/l-/libwebp.json index f032f533e..935958cc6 100644 --- a/versions/l-/libwebp.json +++ b/versions/l-/libwebp.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "ca5a8b2ed264617e8a35d22e1e6ac18ebe99900f", + "version": "1.2.1", + "port-version": 0 + }, + { "git-tree": "4fcb5d97e464c046b1f4c1a81b7d23a9cb63a615", "version-string": "1.1.0", "port-version": 4 |
