From f6d328d857f80417c43a7f1c55ba3900ed11b528 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 12 Jan 2020 00:28:39 +0100 Subject: update libwebp and improve portfile --- ports/libwebp/0001-build-fixes.patch | 2 +- ports/libwebp/CONTROL | 59 +++++++++++++++-- ports/libwebp/portfile.cmake | 120 ++++++++++++----------------------- 3 files changed, 95 insertions(+), 86 deletions(-) diff --git a/ports/libwebp/0001-build-fixes.patch b/ports/libwebp/0001-build-fixes.patch index 490978727..5e9c1121e 100644 --- a/ports/libwebp/0001-build-fixes.patch +++ b/ports/libwebp/0001-build-fixes.patch @@ -144,7 +144,7 @@ index 499ddce..895fda9 100644 + target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) set_target_properties( webp_wasm - PROPERTIES LINK_FLAGS "-s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm\"' \ + PROPERTIES LINK_FLAGS "-s WASM=1 \ @@ -579,7 +590,7 @@ if(WEBP_BUILD_ANIM_UTILS) libwebpmux webpdemux diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 8dbe1d0a2..bfd801db4 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,8 +1,57 @@ Source: libwebp -Version: 1.0.2-8 +Version: 1.0.3 Homepage: https://github.com/webmproject/libwebp -Description: Lossy compression of digital photographic images. +Description: WebP codec: library to encode and decode images in WebP format +Default-Features: simd, nearlossless +Build-Depends: libwebp[unicode] (windows) -Feature: all -Description: enable all webp features -Build-Depends: giflib, libjpeg-turbo, zlib, libpng, tiff, freeglut (!osx), sdl1 (windows), opengl +Feature: anim +Description: Build animation utilities. +Build-Depends: libwebp[mux, img2webp] + +Feature: gif2webp +Description: Build the gif2webp conversion tool. +Build-Depends: giflib + +Feature: img2webp +Description: Build the img2webp animation tool. +Build-Depends: libjpeg-turbo, libpng, tiff + +Feature: vwebp +Description: Build the vwebp viewer tool. +Build-Depends: opengl, freeglut (!osx) + +Feature: vwebp_sdl +Description: Build the vwebp viewer tool. +Build-Depends: libwebp[vwebp], sdl1 (windows) + +Feature: info +Description: Build the webpinfo command line tool. + +Feature: mux +Description: Build the webpmux command line tool. + +Feature: extras +Description: Build extras. + +Feature: nearlossless +Description: Enable near-lossless encoding + +Feature: unicode +Description: Build Unicode executables. (Adds definition UNICODE and _UNICODE) + +Feature: simd +Description: Enable any SIMD optimization. + +Feature: cwebp +Description: Build the cwebp command line tool. + +Feature: dwebp +Description: Build the dwebp command line tool. + +Feature: webp_js +Description: Emscripten only build of webp.js. Deactivates all other options. +Build-Depends: sdl1 (windows) + +Feature: swap16bitcsp +Description: Enable byte swap for 16 bit colorspaces. \ No newline at end of file diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 240aaad5c..58c197867 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -1,10 +1,8 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO webmproject/libwebp - REF v1.0.2 - SHA512 27ca4e7c87d3114a5d3dba6801b5608207a9adc44d0fa62f7523d39be789d389d342d9db5e28c9301eff8fcb1471809c76680a68abd4ff97217b17dd13c4e22b + REF 0fe1a89dbf1930fc2554dbe76adad5d962054ead # v1.0.3 + SHA512 824844a247d3d0d89f1721b08304624b3d3ba0060e218f5c172ffd19d19b96a71d41055fdcda7e6f01a846a95c2519f52e0f39e9f49878e74ca9bb8a1df5fb13 HEAD_REF master PATCHES 0001-build-fixes.patch @@ -16,24 +14,24 @@ vcpkg_from_github( 0007-fix-arm-build.patch ) -set(WEBP_BUILD_ANIM_UTILS OFF) -set(WEBP_BUILD_GIF2WEBP OFF) -set(WEBP_BUILD_IMG2WEBP OFF) -set(WEBP_BUILD_VWEBP OFF) -set(WEBP_BUILD_WEBPINFO OFF) -set(WEBP_BUILD_WEBPMUX OFF) -set(WEBP_BUILD_EXTRAS OFF) -set(WEBP_NEAR_LOSSLESS OFF) -if("all" IN_LIST FEATURES) - set(WEBP_BUILD_ANIM_UTILS ON) - set(WEBP_NEAR_LOSSLESS ON) - set(WEBP_BUILD_GIF2WEBP ON) - set(WEBP_BUILD_IMG2WEBP ON) - set(WEBP_BUILD_VWEBP ON) - set(WEBP_BUILD_WEBPINFO ON) - set(WEBP_BUILD_WEBPMUX ON) - set(WEBP_BUILD_EXTRAS ON) -endif() +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used + anim WEBP_BUILD_ANIM_UTILS + gif2webp WEBP_BUILD_GIF2WEBP + img2webp WEBP_BUILD_IMG2WEBP + vwebp WEBP_BUILD_VWEBP + info WEBP_BUILD_WEBPINFO + mux WEBP_BUILD_WEBPMUX + extras WEBP_BUILD_EXTRAS + nearlossless WEBP_NEAR_LOSSLESS + simd WEBP_ENABLE_SIMD + cwebp WEBP_BUILD_CWEBP + dwebp WEBP_BUILD_DWEBP + webp_js WEBP_BUILD_WEBP_JS + swap16bitcsp WEBP_ENABLE_SWAP_16BIT_CSP + unicode WEBP_UNICODE +) + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") message("WebP currently requires the following library from the system package manager:\n Xxf86vm\n\nThis can be installed on Ubuntu systems via apt-get install libxxf86vm-dev") @@ -49,19 +47,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DWEBP_ENABLE_SIMD:BOOL=ON - -DWEBP_BUILD_ANIM_UTILS:BOOL=${WEBP_BUILD_ANIM_UTILS} - -DWEBP_BUILD_CWEBP:BOOL=OFF - -DWEBP_BUILD_DWEBP:BOOL=OFF - -DWEBP_BUILD_GIF2WEBP:BOOL=${WEBP_BUILD_GIF2WEBP} - -DWEBP_BUILD_IMG2WEBP:BOOL=${WEBP_BUILD_IMG2WEBP} - -DWEBP_BUILD_VWEBP:BOOL=${WEBP_BUILD_VWEBP} - -DWEBP_BUILD_WEBPINFO:BOOL=${WEBP_BUILD_WEBPINFO} - -DWEBP_BUILD_WEBPMUX:BOOL=${WEBP_BUILD_WEBPMUX} - -DWEBP_BUILD_EXTRAS:BOOL=${WEBP_BUILD_EXTRAS} - -DWEBP_BUILD_WEBP_JS:BOOL=OFF - -DWEBP_NEAR_LOSSLESS:BOOL=${WEBP_NEAR_LOSSLESS} - -DWEBP_ENABLE_SWAP_16BIT_CSP:BOOL=OFF + ${FEATURE_OPTIONS} OPTIONS_DEBUG -DCMAKE_DEBUG_POSTFIX=d ) @@ -71,59 +57,33 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake TARGET_PATH share/webp) # find_package is called wit webp and not libwebp file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/WebP) -file(GLOB CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/${PORT}/*) -file(COPY ${CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/webp/) -#somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it -if(CMAKE_HOST_WIN32) -set(EXECUTABLE_SUFFIX ".exe") -else() -set(EXECUTABLE_SUFFIX "") -endif() - -if("all" IN_LIST FEATURES) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/get_disto${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/gif2webp${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/img2webp${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vwebp${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vwebp_sdl${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/webpinfo${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/webpmux${EXECUTABLE_SUFFIX}) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/webp_quality${EXECUTABLE_SUFFIX}) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libwebp/) - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/get_disto${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/get_disto${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/get_disto${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/gif2webp${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/gif2webp${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/gif2webp${EXECUTABLE_SUFFIX}) +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}) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/img2webp${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/img2webp${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/img2webp${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/vwebp${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vwebp${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/vwebp${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/vwebp_sdl${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vwebp_sdl${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/vwebp_sdl${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/webpinfo${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/webpinfo${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/webpinfo${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/webpmux${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/webpmux${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/webpmux${EXECUTABLE_SUFFIX}) - endif() - if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/webp_quality${EXECUTABLE_SUFFIX}") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/webp_quality${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/webp_quality${EXECUTABLE_SUFFIX}) + + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/webp/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") endif() - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libwebp) +endforeach() +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/webp") + +#No tools +file(GLOB_RECURSE RESULT "${CURRENT_PACKAGES_DIR}/tools/") +list(LENGTH RESULT RES_LEN) +if(RES_LEN EQUAL 0) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") endif() -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp RENAME copyright) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libwebp" RENAME copyright) -- cgit v1.2.3 From 8d3ac08ca1b496da2cb45fd5a280dbd42f73e763 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 13 Jan 2020 23:48:41 +0100 Subject: restore the all feature. --- ports/libwebp/CONTROL | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index bfd801db4..58be94505 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -54,4 +54,8 @@ Description: Emscripten only build of webp.js. Deactivates all other options. Build-Depends: sdl1 (windows) Feature: swap16bitcsp -Description: Enable byte swap for 16 bit colorspaces. \ No newline at end of file +Description: Enable byte swap for 16 bit colorspaces. + +Feature: all +Description: enable all features except for webp_js and swap16bitcsp +Build-Depends: libwebp[anim, gif2webp, img2webp, vwebp_sdl, info, mux, extras, nearlossless, simd, cwebp, dwebp] \ No newline at end of file -- cgit v1.2.3 From 2c9613321415ef38450513a8e876db8919690aac Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 14 Jan 2020 00:20:46 +0100 Subject: deactivate vwebp and extras on osx. (due to CI message) --- ports/libwebp/CONTROL | 2 +- ports/libwebp/portfile.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 58be94505..23fb15e70 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -58,4 +58,4 @@ Description: Enable byte swap for 16 bit colorspaces. Feature: all Description: enable all features except for webp_js and swap16bitcsp -Build-Depends: libwebp[anim, gif2webp, img2webp, vwebp_sdl, info, mux, extras, nearlossless, simd, cwebp, dwebp] \ No newline at end of file +Build-Depends: libwebp[anim, gif2webp, img2webp, vwebp_sdl (!osx), info, mux, extras (!osx), nearlossless, simd, cwebp, dwebp] \ No newline at end of file diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 58c197867..2cdbd9e03 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -33,14 +33,14 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS ) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(VCPKG_TARGET_IS_LINUX) message("WebP currently requires the following library from the system package manager:\n Xxf86vm\n\nThis can be installed on Ubuntu systems via apt-get install libxxf86vm-dev") endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(WEBP_BUILD_VWEBP OFF) - set(WEBP_BUILD_EXTRAS OFF) - message("Due to GLUT Framework problems with CMake, at the moment it's not possible to build VWebP on Mac. It has been disabled together with extras.") +if(VCPKG_TARGET_IS_OSX) + if("vwebp" IN_LIST FEATURES OR "extras" IN_LIST FEATURES) + message(FATAL_ERROR "Due to GLUT Framework problems with CMake, at the moment it's not possible to build VWebP or extras on Mac!") + endif() endif() vcpkg_configure_cmake( -- cgit v1.2.3 From 824fffdbf04fd046ea908aa9fb702cfb07d0f798 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 14 Jan 2020 00:28:51 +0100 Subject: fix control syntax --- ports/libwebp/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 23fb15e70..12503fee0 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -58,4 +58,4 @@ Description: Enable byte swap for 16 bit colorspaces. Feature: all Description: enable all features except for webp_js and swap16bitcsp -Build-Depends: libwebp[anim, gif2webp, img2webp, vwebp_sdl (!osx), info, mux, extras (!osx), nearlossless, simd, cwebp, dwebp] \ No newline at end of file +Build-Depends: libwebp[anim, gif2webp, img2webp, info, mux, nearlossless, simd, cwebp, dwebp], libwebp[vwebp_sdl, extras] (!osx) \ No newline at end of file -- cgit v1.2.3 From 7912f3f7f125b23931d3cb1041b075fa72927871 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 14 Jan 2020 00:34:10 +0100 Subject: retry with split feature dependencies. --- ports/libwebp/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 12503fee0..41debf19d 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,5 +1,5 @@ Source: libwebp -Version: 1.0.3 +Version: 1.0.3-1 Homepage: https://github.com/webmproject/libwebp Description: WebP codec: library to encode and decode images in WebP format Default-Features: simd, nearlossless @@ -58,4 +58,4 @@ Description: Enable byte swap for 16 bit colorspaces. Feature: all Description: enable all features except for webp_js and swap16bitcsp -Build-Depends: libwebp[anim, gif2webp, img2webp, info, mux, nearlossless, simd, cwebp, dwebp], libwebp[vwebp_sdl, extras] (!osx) \ No newline at end of file +Build-Depends: libwebp[anim, gif2webp, img2webp, info, mux, nearlossless, simd, cwebp, dwebp], libwebp[vwebp_sdl] (!osx), libwebp[extras] (!osx) \ No newline at end of file -- cgit v1.2.3 From 6f1e19f9c586476c0132b9f64e3db110a0e947d7 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 15 Jan 2020 00:07:13 +0100 Subject: add necessary preprocessor definition --- ports/libwebp/0001-build-fixes.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libwebp/0001-build-fixes.patch b/ports/libwebp/0001-build-fixes.patch index 5e9c1121e..df483ed34 100644 --- a/ports/libwebp/0001-build-fixes.patch +++ b/ports/libwebp/0001-build-fixes.patch @@ -8,7 +8,7 @@ index 499ddce..895fda9 100644 add_definitions(-D_CRT_SECURE_NO_WARNINGS) + add_definitions(-DWEBP_HAVE_JUST_SDL_H) + if(BUILD_SHARED_LIBS) -+ add_definitions(-DWEBP_EXTERN=__declspec\(dllexport\)) ++ add_definitions(-DWEBP_EXTERN=__declspec\(dllexport\) -DWEBP_DLL) + else() + add_definitions(-DFREEGLUT_STATIC) + endif() -- cgit v1.2.3 From b4ebb0ace157817fbf51da06c5146a0812af6b4a Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 15 Jan 2020 00:26:58 +0100 Subject: update to 1.1.0 --- ports/libwebp/0001-build-fixes.patch | 165 --------------------- ports/libwebp/0001-build.patch | 36 +++++ ports/libwebp/0003-remove-missing-symbol.patch | 13 -- .../libwebp/0004-add-missing-linked-library.patch | 2 +- ports/libwebp/0005-fix-static-build.patch | 13 -- ports/libwebp/0006-fix-dependecies-platform.patch | 2 +- ports/libwebp/CONTROL | 2 +- ports/libwebp/portfile.cmake | 8 +- 8 files changed, 42 insertions(+), 199 deletions(-) delete mode 100644 ports/libwebp/0001-build-fixes.patch create mode 100644 ports/libwebp/0001-build.patch delete mode 100644 ports/libwebp/0003-remove-missing-symbol.patch delete mode 100644 ports/libwebp/0005-fix-static-build.patch diff --git a/ports/libwebp/0001-build-fixes.patch b/ports/libwebp/0001-build-fixes.patch deleted file mode 100644 index df483ed34..000000000 --- a/ports/libwebp/0001-build-fixes.patch +++ /dev/null @@ -1,165 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 499ddce..895fda9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -159,6 +159,12 @@ add_definitions(-DHAVE_CONFIG_H) - if(MSVC) - # avoid security warnings for e.g., fopen() used in the examples. - add_definitions(-D_CRT_SECURE_NO_WARNINGS) -+ add_definitions(-DWEBP_HAVE_JUST_SDL_H) -+ if(BUILD_SHARED_LIBS) -+ add_definitions(-DWEBP_EXTERN=__declspec\(dllexport\) -DWEBP_DLL) -+ else() -+ add_definitions(-DFREEGLUT_STATIC) -+ endif() - else() - add_definitions(-Wall) - endif() -@@ -342,19 +346,23 @@ if(WEBP_BUILD_ANIM_UTILS - "example_util_[^ ]*") - list(APPEND EXAMPLEUTIL_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h) - add_library(exampleutil ${EXAMPLEUTIL_SRCS}) -+ set_target_properties(exampleutil PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - target_include_directories( - exampleutil - PUBLIC $) -+ target_link_libraries(exampleutil imageioutil) - - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEIOUTILS_SRCS" - "imageio_util_[^ ]*") - add_library(imageioutil ${IMAGEIOUTILS_SRCS}) -+ set_target_properties(imageioutil PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - target_link_libraries(imageioutil webp) - - # Image-decoding utility library. - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEDEC_SRCS" - "imagedec_[^ ]*") - add_library(imagedec ${IMAGEDEC_SRCS}) -+ set_target_properties(imagedec PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - target_link_libraries(imagedec - imageioutil - webpdemux -@@ -365,7 +373,8 @@ if(WEBP_BUILD_ANIM_UTILS - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEENC_SRCS" - "imageenc_[^ ]*") - add_library(imageenc ${IMAGEENC_SRCS}) -- target_link_libraries(imageenc webp) -+ set_target_properties(imageenc PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) -+ target_link_libraries(imageenc imageioutil webp) - - set_property(TARGET exampleutil - imageioutil -@@ -380,7 +389,7 @@ if(WEBP_BUILD_DWEBP) - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "DWEBP_SRCS" "dwebp") - add_executable(dwebp ${DWEBP_SRCS}) - target_link_libraries(dwebp exampleutil imagedec imageenc) -- target_include_directories(dwebp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(dwebp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS dwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -389,13 +398,14 @@ if(WEBP_BUILD_CWEBP) - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "CWEBP_SRCS" "cwebp") - add_executable(cwebp ${CWEBP_SRCS}) - target_link_libraries(cwebp exampleutil imagedec webp) -- target_include_directories(cwebp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(cwebp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - - if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) - parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") - add_library(libwebpmux ${WEBP_MUX_SRCS}) -+ set_target_properties(libwebpmux PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - target_link_libraries(libwebpmux webp) - target_include_directories(libwebpmux - PRIVATE ${CMAKE_CURRENT_BINARY_DIR} -@@ -411,7 +421,7 @@ if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) - "${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;") -- set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) -+ #set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) - list(APPEND INSTALLED_LIBRARIES libwebpmux) - configure_pkg_config("src/mux/libwebpmux.pc") - endif() -@@ -428,7 +438,7 @@ if(WEBP_BUILD_GIF2WEBP) - webp - libwebpmux - ${WEBP_DEP_GIF_LIBRARIES}) -- target_include_directories(gif2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(gif2webp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS gif2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -444,7 +454,7 @@ if(WEBP_BUILD_IMG2WEBP) - imageioutil - webp - libwebpmux) -- target_include_directories(img2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(img2webp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS img2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -464,6 +474,7 @@ if(WEBP_BUILD_VWEBP) - webpdemux) - target_include_directories(vwebp - PRIVATE GLUT::GLUT -+ ${CMAKE_CURRENT_SOURCE_DIR}/src - ${CMAKE_CURRENT_BINARY_DIR}/src - ${OPENGL_INCLUDE_DIR}) - install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -@@ -483,7 +494,7 @@ if(WEBP_BUILD_WEBPINFO) - "webpinfo") - add_executable(webpinfo ${WEBPINFO_SRCS}) - target_link_libraries(webpinfo exampleutil imageioutil) -- target_include_directories(webpinfo PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(webpinfo PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS webpinfo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -493,7 +504,7 @@ if(WEBP_BUILD_WEBPMUX) - "webpmux") - add_executable(webpmux ${WEBPMUX_SRCS}) - target_link_libraries(webpmux exampleutil imageioutil libwebpmux webp) -- target_include_directories(webpmux PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(webpmux PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - install(TARGETS webpmux RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() - -@@ -540,7 +551,7 @@ if(WEBP_BUILD_WEBP_JS) - # 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_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - set(WEBP_HAVE_SDL 1) - set_target_properties( - webp_js -@@ -553,7 +564,7 @@ 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_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) - set_target_properties( - webp_wasm - PROPERTIES LINK_FLAGS "-s WASM=1 \ -@@ -579,7 +590,7 @@ if(WEBP_BUILD_ANIM_UTILS) - libwebpmux - webpdemux - ${WEBP_DEP_GIF_LIBRARIES}) -- target_include_directories(anim_diff PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(anim_diff PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - - # anim_dump - include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS} ${WEBP_DEP_GIF_INCLUDE_DIRS}) -@@ -595,7 +606,7 @@ if(WEBP_BUILD_ANIM_UTILS) - libwebpmux - webpdemux - ${WEBP_DEP_GIF_LIBRARIES}) -- target_include_directories(anim_dump PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) -+ target_include_directories(anim_dump PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) - endif() - - # Install the different headers and libraries. diff --git a/ports/libwebp/0001-build.patch b/ports/libwebp/0001-build.patch new file mode 100644 index 000000000..19c28bcca --- /dev/null +++ b/ports/libwebp/0001-build.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9503daacb..2fb9ef137 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -167,6 +167,9 @@ add_definitions(-DHAVE_CONFIG_H) + if(MSVC) + # avoid security warnings for e.g., fopen() used in the examples. + add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ if(BUILD_SHARED_LIBS) ++ add_definitions("-DWEBP_EXTERN=__declspec(dllexport)" "-DWEBP_DLL") ++ endif() + else() + add_definitions(-Wall) + endif() +@@ -420,9 +423,9 @@ if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) + "${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;") +- set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) ++ #set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) + list(APPEND INSTALLED_LIBRARIES libwebpmux) + configure_pkg_config("src/mux/libwebpmux.pc") + endif() + + if(WEBP_BUILD_GIF2WEBP) +@@ -524,7 +528,10 @@ 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() + target_include_directories(webp_quality + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/ports/libwebp/0003-remove-missing-symbol.patch b/ports/libwebp/0003-remove-missing-symbol.patch deleted file mode 100644 index 218481bbc..000000000 --- a/ports/libwebp/0003-remove-missing-symbol.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/examples/gifdec.c b/examples/gifdec.c -index 4219352..ab0592a 100644 ---- a/examples/gifdec.c -+++ b/examples/gifdec.c -@@ -310,7 +310,7 @@ void GIFDisplayError(const GifFileType* const gif, int gif_error) { - #else - (void)gif; - fprintf(stderr, "GIFLib Error %d: ", gif_error); -- PrintGifError(); -+ //PrintGifError(); - fprintf(stderr, "\n"); - #endif - } diff --git a/ports/libwebp/0004-add-missing-linked-library.patch b/ports/libwebp/0004-add-missing-linked-library.patch index 49a34ef4d..6cbb394d5 100644 --- a/ports/libwebp/0004-add-missing-linked-library.patch +++ b/ports/libwebp/0004-add-missing-linked-library.patch @@ -3,7 +3,7 @@ index a98540c..a3697cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -479,6 +479,10 @@ if(WEBP_BUILD_VWEBP) - ${CMAKE_CURRENT_SOURCE_DIR}/src + PRIVATE ${GLUT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src ${OPENGL_INCLUDE_DIR}) + if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE)) diff --git a/ports/libwebp/0005-fix-static-build.patch b/ports/libwebp/0005-fix-static-build.patch deleted file mode 100644 index f17713efd..000000000 --- a/ports/libwebp/0005-fix-static-build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7585fac..83edb3a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -540,7 +540,7 @@ if(WEBP_BUILD_EXTRAS) - find_package(SDL) - if(SDL_FOUND) - add_executable(vwebp_sdl ${VWEBP_SDL_SRCS}) -- target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) -+ target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp dxguid winmm) - target_include_directories(vwebp_sdl - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/src diff --git a/ports/libwebp/0006-fix-dependecies-platform.patch b/ports/libwebp/0006-fix-dependecies-platform.patch index fdb5ec0b3..fc7a7c98a 100644 --- a/ports/libwebp/0006-fix-dependecies-platform.patch +++ b/ports/libwebp/0006-fix-dependecies-platform.patch @@ -6,7 +6,7 @@ index 83edb3a..f634094 100644 find_package(SDL) if(SDL_FOUND) add_executable(vwebp_sdl ${VWEBP_SDL_SRCS}) -- target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp dxguid winmm) +- target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) + target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) + if (MSVC) + target_link_libraries(vwebp_sdl dxguid winmm) diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 41debf19d..4c76291ee 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,5 +1,5 @@ Source: libwebp -Version: 1.0.3-1 +Version: 1.1.0 Homepage: https://github.com/webmproject/libwebp Description: WebP codec: library to encode and decode images in WebP format Default-Features: simd, nearlossless diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 2cdbd9e03..b6509ed79 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -1,15 +1,13 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO webmproject/libwebp - REF 0fe1a89dbf1930fc2554dbe76adad5d962054ead # v1.0.3 - SHA512 824844a247d3d0d89f1721b08304624b3d3ba0060e218f5c172ffd19d19b96a71d41055fdcda7e6f01a846a95c2519f52e0f39e9f49878e74ca9bb8a1df5fb13 + REF d7844e9762b61c9638c263657bd49e1690184832 # v1.1.0 + SHA512 13692970e7dd909cd6aaa03c9a0c863243baac1885644794362dec0c0b0721d6807f281f746215bfd856c6e0cb742b01a731a33fe075a32ff24496e10c1a94b4 HEAD_REF master PATCHES - 0001-build-fixes.patch + 0001-build.patch 0002-cmake-config-add-backwards-compatibility.patch - 0003-remove-missing-symbol.patch 0004-add-missing-linked-library.patch - 0005-fix-static-build.patch 0006-fix-dependecies-platform.patch 0007-fix-arm-build.patch ) -- cgit v1.2.3 From 76f6f26c68c448c4ece725c9e853fa044ba4c9b6 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 15 Jan 2020 00:51:50 +0100 Subject: reduce libwebp[all] to libwebp[img2webp] so that libwebp builds libwebpmux --- ports/freeimage/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL index 53e641a78..2335687c8 100644 --- a/ports/freeimage/CONTROL +++ b/ports/freeimage/CONTROL @@ -1,5 +1,5 @@ Source: freeimage -Version: 3.18.0-8 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp[all] (!uwp), libraw, jxrlib, openexr +Version: 3.18.0-9 +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp[img2webp] (!uwp), libraw, jxrlib, openexr Homepage: https://sourceforge.net/projects/freeimage/ Description: Support library for graphics image formats -- cgit v1.2.3 From 68d7204560dc0f72c22732a6d840a45edf91531b Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 15 Jan 2020 10:00:45 +0100 Subject: fix accidental removal of targets and configs --- ports/libwebp/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index b6509ed79..74937095b 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -58,7 +58,6 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake TARGET_PATH share/webp) # find_package is called wit webp and not libwebp file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/WebP) set(BIN_NAMES get_disto gif2webp img2webp vwebp vwebp_sdl webpinfo webpmux webp_quality cwebp dwebp) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/webp/") -- cgit v1.2.3 From af2bf73d302fcfc6650f041e51c6bb32c469d4cd Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 16 Jan 2020 19:39:47 +0100 Subject: always build mux library --- ports/freeimage/CONTROL | 2 +- ports/libwebp/0001-build.patch | 2 +- ports/libwebp/0003-always-mux.patch | 13 +++++++++++++ ports/libwebp/portfile.cmake | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 ports/libwebp/0003-always-mux.patch diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL index 2335687c8..438960011 100644 --- a/ports/freeimage/CONTROL +++ b/ports/freeimage/CONTROL @@ -1,5 +1,5 @@ Source: freeimage Version: 3.18.0-9 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp[img2webp] (!uwp), libraw, jxrlib, openexr +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp (!uwp), libraw, jxrlib, openexr Homepage: https://sourceforge.net/projects/freeimage/ Description: Support library for graphics image formats diff --git a/ports/libwebp/0001-build.patch b/ports/libwebp/0001-build.patch index 19c28bcca..25166e292 100644 --- a/ports/libwebp/0001-build.patch +++ b/ports/libwebp/0001-build.patch @@ -17,7 +17,7 @@ index 9503daacb..2fb9ef137 100644 ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\ ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;") - set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) -+ #set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) ++ set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME $<$:lib>webpmux) list(APPEND INSTALLED_LIBRARIES libwebpmux) configure_pkg_config("src/mux/libwebpmux.pc") endif() diff --git a/ports/libwebp/0003-always-mux.patch b/ports/libwebp/0003-always-mux.patch new file mode 100644 index 000000000..1484bc891 --- /dev/null +++ b/ports/libwebp/0003-always-mux.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6f6c8eca2..00366ae53 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) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 74937095b..12e980d42 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES 0001-build.patch 0002-cmake-config-add-backwards-compatibility.patch + 0003-always-mux.patch #always build libwebpmux 0004-add-missing-linked-library.patch 0006-fix-dependecies-platform.patch 0007-fix-arm-build.patch -- cgit v1.2.3 From 74e8f62194381bc236aaabfd50e7dc7446012485 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 19 Jan 2020 15:19:37 +0100 Subject: fix linux regression --- ports/libwebp/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 12e980d42..6c5fc381d 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -59,6 +59,9 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake TARGET_PATH share/webp) # find_package is called wit webp and not libwebp file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_TARGET_IS_LINUX) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/WebP) +endif() set(BIN_NAMES get_disto gif2webp img2webp vwebp vwebp_sdl webpinfo webpmux webp_quality cwebp dwebp) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/webp/") -- cgit v1.2.3 From b8a3341998d302f79e3c0fb45dd1bda5cb51d5f9 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Mon, 20 Jan 2020 00:15:16 +0100 Subject: change cmake target path to WebP --- ports/libwebp/portfile.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 6c5fc381d..2682baa3b 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -56,12 +56,9 @@ vcpkg_install_cmake() 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 wit webp and not libwebp - +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) -if(VCPKG_TARGET_IS_LINUX) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/WebP) -endif() + set(BIN_NAMES get_disto gif2webp img2webp vwebp vwebp_sdl webpinfo webpmux webp_quality cwebp dwebp) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/webp/") -- cgit v1.2.3 From c7ad054bd0f895b173497798c36c4857aa7c3e92 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 22 Jan 2020 22:06:43 +0100 Subject: fix libgd arm64 regression ...... --- ports/libgd/CONTROL | 2 +- ports/libgd/intrin.patch | 13 +++++++++++++ ports/libgd/portfile.cmake | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ports/libgd/intrin.patch diff --git a/ports/libgd/CONTROL b/ports/libgd/CONTROL index 1d16b2f27..81384cb06 100644 --- a/ports/libgd/CONTROL +++ b/ports/libgd/CONTROL @@ -1,5 +1,5 @@ Source: libgd -Version: 2.2.5-3 +Version: 2.2.5-4 Homepage: https://github.com/libgd/libgd Description: Open source code library for the dynamic creation of images by programmers. Default-Features: fontconfig, freetype, jpeg, png, tiff, webp diff --git a/ports/libgd/intrin.patch b/ports/libgd/intrin.patch new file mode 100644 index 000000000..1f1db8eb2 --- /dev/null +++ b/ports/libgd/intrin.patch @@ -0,0 +1,13 @@ +diff --git a/src/gd_interpolation.c b/src/gd_interpolation.c +index b9a206551..f75469329 100644 +--- a/src/gd_interpolation.c ++++ b/src/gd_interpolation.c +@@ -75,7 +75,7 @@ TODO: + + #ifdef _MSC_VER + # pragma optimize("t", on) +-# include ++# include + #endif + + static gdImagePtr gdImageScaleBilinear(gdImagePtr im, diff --git a/ports/libgd/portfile.cmake b/ports/libgd/portfile.cmake index 6ef2127d5..1a25969e3 100644 --- a/ports/libgd/portfile.cmake +++ b/ports/libgd/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( PATCHES 0001-fix-cmake.patch no-write-source-dir.patch + intrin.patch ) #delete CMake builtins modules -- cgit v1.2.3 From c6fe55ce7919d5e74f239470ae594f2006aef260 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 22 Jan 2020 22:31:56 +0100 Subject: update baseline --- scripts/ci.baseline.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index e7a209601..2d0611287 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -669,6 +669,7 @@ lcm:x64-linux=fail lcm:x64-osx=fail leptonica:x64-uwp=fail leptonica:arm-uwp=fail +leptonica:arm64-windows=fail leveldb:arm-uwp=fail leveldb:x64-uwp=fail libaiff:x64-linux=fail -- cgit v1.2.3 From 09dca6dbf444b64d0d691c388b64a05f8b81c291 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Mon, 3 Feb 2020 09:59:52 +0100 Subject: update missing sdl dependency in feature extras --- ports/libwebp/CONTROL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 4c76291ee..e18e5b7b6 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -33,6 +33,7 @@ Description: Build the webpmux command line tool. Feature: extras Description: Build extras. +Build-Depends: sdl1 (windows) Feature: nearlossless Description: Enable near-lossless encoding @@ -58,4 +59,4 @@ Description: Enable byte swap for 16 bit colorspaces. Feature: all Description: enable all features except for webp_js and swap16bitcsp -Build-Depends: libwebp[anim, gif2webp, img2webp, info, mux, nearlossless, simd, cwebp, dwebp], libwebp[vwebp_sdl] (!osx), libwebp[extras] (!osx) \ No newline at end of file +Build-Depends: libwebp[anim, gif2webp, img2webp, info, mux, nearlossless, simd, cwebp, dwebp], libwebp[vwebp_sdl] (!osx), libwebp[extras] (!osx) -- cgit v1.2.3 From d8167d3188d5d15c57fe608a968c65cd41bd5358 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 3 Feb 2020 11:21:47 +0100 Subject: fix extra dependencies and build errors --- ports/libwebp/0001-build.patch | 3 ++- ports/libwebp/0006-fix-dependecies-platform.patch | 3 ++- ports/libwebp/CONTROL | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/libwebp/0001-build.patch b/ports/libwebp/0001-build.patch index 25166e292..bc61b9b51 100644 --- a/ports/libwebp/0001-build.patch +++ b/ports/libwebp/0001-build.patch @@ -23,7 +23,7 @@ index 9503daacb..2fb9ef137 100644 endif() if(WEBP_BUILD_GIF2WEBP) -@@ -524,7 +528,10 @@ if(WEBP_BUILD_EXTRAS) +@@ -524,7 +528,11 @@ if(WEBP_BUILD_EXTRAS) # webp_quality add_executable(webp_quality ${WEBP_QUALITY_SRCS} ${WEBP_EXTRAS_SRCS}) @@ -33,4 +33,5 @@ index 9503daacb..2fb9ef137 100644 + endif() target_include_directories(webp_quality PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ++ ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/ports/libwebp/0006-fix-dependecies-platform.patch b/ports/libwebp/0006-fix-dependecies-platform.patch index fc7a7c98a..819c1f90b 100644 --- a/ports/libwebp/0006-fix-dependecies-platform.patch +++ b/ports/libwebp/0006-fix-dependecies-platform.patch @@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 83edb3a..f634094 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -540,7 +540,10 @@ if(WEBP_BUILD_EXTRAS) +@@ -540,7 +540,11 @@ if(WEBP_BUILD_EXTRAS) find_package(SDL) if(SDL_FOUND) add_executable(vwebp_sdl ${VWEBP_SDL_SRCS}) @@ -11,6 +11,7 @@ index 83edb3a..f634094 100644 + if (MSVC) + target_link_libraries(vwebp_sdl dxguid winmm) + endif() ++ target_compile_definitions(vwebp_sdl PRIVATE WEBP_HAVE_JUST_SDL_H) target_include_directories(vwebp_sdl PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index e18e5b7b6..a868771f6 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -33,7 +33,7 @@ Description: Build the webpmux command line tool. Feature: extras Description: Build extras. -Build-Depends: sdl1 (windows) +Build-Depends: sdl1 (windows), libwebp[vwebp] Feature: nearlossless Description: Enable near-lossless encoding -- cgit v1.2.3 From 8c64335e2127d32c51c02779a5b8bcbc239b9a0f Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 3 Feb 2020 13:08:37 +0100 Subject: Fatal error on invalid feature combination. --- ports/libwebp/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 2682baa3b..9dcf6e971 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -42,6 +42,10 @@ if(VCPKG_TARGET_IS_OSX) endif() endif() +if("webp_js" IN_LIST FEATURES AND "${FEATURES}" MATCHES "(anim|gif2webp|img2webp|extras|info|vwebp|mux|cwebp|dwebp)") + message(FATAL_ERROR "Feature webp_js conflicts with features anim|gif2webp|img2webp|extras|info|vwebp|mux|cwebp|dwebp!") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3 From f028e3ad5f3960cd7f274b866f05c36d421f23d5 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 3 Feb 2020 13:45:56 +0100 Subject: tried to fix build failure for web_js but am out of ideas. -> removed feature. --- ports/libwebp/0001-build.patch | 9 +++++++++ ports/libwebp/0008-sdl.patch | 36 ++++++++++++++++++++++++++++++++++++ ports/libwebp/CONTROL | 4 ---- ports/libwebp/portfile.cmake | 1 + 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 ports/libwebp/0008-sdl.patch diff --git a/ports/libwebp/0001-build.patch b/ports/libwebp/0001-build.patch index bc61b9b51..e95468c32 100644 --- a/ports/libwebp/0001-build.patch +++ b/ports/libwebp/0001-build.patch @@ -35,3 +35,12 @@ index 9503daacb..2fb9ef137 100644 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) + + # WASM version + add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) diff --git a/ports/libwebp/0008-sdl.patch b/ports/libwebp/0008-sdl.patch new file mode 100644 index 000000000..7f3363f7b --- /dev/null +++ b/ports/libwebp/0008-sdl.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7b0d2fa55..efd10887b 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() diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index a868771f6..04f738b5e 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -50,10 +50,6 @@ Description: Build the cwebp command line tool. Feature: dwebp Description: Build the dwebp command line tool. -Feature: webp_js -Description: Emscripten only build of webp.js. Deactivates all other options. -Build-Depends: sdl1 (windows) - Feature: swap16bitcsp Description: Enable byte swap for 16 bit colorspaces. diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 9dcf6e971..aa992e951 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( 0004-add-missing-linked-library.patch 0006-fix-dependecies-platform.patch 0007-fix-arm-build.patch + 0008-sdl.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS -- cgit v1.2.3 From 3f6be88a04c0b850d328d90239d5a33d0d467c62 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 3 Feb 2020 14:05:59 +0100 Subject: removed traces of web_js completly --- ports/libwebp/CONTROL | 2 +- ports/libwebp/portfile.cmake | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 04f738b5e..b96114f05 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -54,5 +54,5 @@ Feature: swap16bitcsp Description: Enable byte swap for 16 bit colorspaces. Feature: all -Description: enable all features except for webp_js and swap16bitcsp +Description: enable all features except for swap16bitcsp Build-Depends: libwebp[anim, gif2webp, img2webp, info, mux, nearlossless, simd, cwebp, dwebp], libwebp[vwebp_sdl] (!osx), libwebp[extras] (!osx) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index aa992e951..d24fd12d1 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -27,7 +27,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS simd WEBP_ENABLE_SIMD cwebp WEBP_BUILD_CWEBP dwebp WEBP_BUILD_DWEBP - webp_js WEBP_BUILD_WEBP_JS swap16bitcsp WEBP_ENABLE_SWAP_16BIT_CSP unicode WEBP_UNICODE ) @@ -43,10 +42,6 @@ if(VCPKG_TARGET_IS_OSX) endif() endif() -if("webp_js" IN_LIST FEATURES AND "${FEATURES}" MATCHES "(anim|gif2webp|img2webp|extras|info|vwebp|mux|cwebp|dwebp)") - message(FATAL_ERROR "Feature webp_js conflicts with features anim|gif2webp|img2webp|extras|info|vwebp|mux|cwebp|dwebp!") -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3 From 3310f8e728e95071943097fe07b4f0135394f4e0 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 3 Feb 2020 15:45:23 +0100 Subject: fix the xrandr link issue --- ports/libwebp/0009-glut.patch | 23 +++++++++++++++++++++++ ports/libwebp/portfile.cmake | 1 + 2 files changed, 24 insertions(+) create mode 100644 ports/libwebp/0009-glut.patch diff --git a/ports/libwebp/0009-glut.patch b/ports/libwebp/0009-glut.patch new file mode 100644 index 000000000..e1bf267ed --- /dev/null +++ b/ports/libwebp/0009-glut.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index efd10887b..8b41cc1ba 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) + if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE)) + find_package(X11 REQUIRED) + target_link_libraries(vwebp ${X11_LIBRARIES} ${X11_Xxf86vm_LIB}) ++ if(X11_Xrandr_FOUND) # due to glut linking xrandr if found ++ target_link_libraries(vwebp ${X11_Xrandr_LIB}) ++ endif() + endif() + install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index d24fd12d1..81040ad05 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_from_github( 0006-fix-dependecies-platform.patch 0007-fix-arm-build.patch 0008-sdl.patch + 0009-glut.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS -- cgit v1.2.3