aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@hamburg.de>2020-02-03 13:45:56 +0100
committerAlexander Neumann <alexander.neumann@hamburg.de>2020-02-03 13:45:56 +0100
commitf028e3ad5f3960cd7f274b866f05c36d421f23d5 (patch)
treede65ee69d065468268a48acc8ac03d4ce206c64b
parent8c64335e2127d32c51c02779a5b8bcbc239b9a0f (diff)
downloadvcpkg-f028e3ad5f3960cd7f274b866f05c36d421f23d5.tar.gz
vcpkg-f028e3ad5f3960cd7f274b866f05c36d421f23d5.zip
tried to fix build failure for web_js but am out of ideas.
-> removed feature.
-rw-r--r--ports/libwebp/0001-build.patch9
-rw-r--r--ports/libwebp/0008-sdl.patch36
-rw-r--r--ports/libwebp/CONTROL4
-rw-r--r--ports/libwebp/portfile.cmake1
4 files changed, 46 insertions, 4 deletions
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