aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Tassoux <contact@rt2.fr>2020-03-22 13:37:31 +0100
committerGitHub <noreply@github.com>2020-03-22 13:37:31 +0100
commitb40c89f3c34ede0ada5aad1f18e63eee112bcd3e (patch)
treee6b8e82dff02689b8f656c196d8b87ac94df33b4
parenta5a244f5bdc390fc1c3d42e126e0bfd80541f060 (diff)
downloadvcpkg-b40c89f3c34ede0ada5aad1f18e63eee112bcd3e.tar.gz
vcpkg-b40c89f3c34ede0ada5aad1f18e63eee112bcd3e.zip
[SDL2] Update to 2.0.12 version
-rw-r--r--ports/sdl2/CONTROL2
-rw-r--r--ports/sdl2/disable-hidapi-for-uwp.patch12
-rw-r--r--ports/sdl2/disable-wcslcpy-and-wcslcat-for-windows.patch12
-rw-r--r--ports/sdl2/enable-winrt-cmake.patch38
-rw-r--r--ports/sdl2/fix-space-in-path.patch8
-rw-r--r--ports/sdl2/portfile.cmake17
6 files changed, 52 insertions, 37 deletions
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL
index 771584a8f..623e4d0db 100644
--- a/ports/sdl2/CONTROL
+++ b/ports/sdl2/CONTROL
@@ -1,5 +1,5 @@
Source: sdl2
-Version: 2.0.10-3
+Version: 2.0.12
Homepage: https://github.com/SDL-Mirror/SDL
Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
diff --git a/ports/sdl2/disable-hidapi-for-uwp.patch b/ports/sdl2/disable-hidapi-for-uwp.patch
index 13d1ca8d1..9a1b500b4 100644
--- a/ports/sdl2/disable-hidapi-for-uwp.patch
+++ b/ports/sdl2/disable-hidapi-for-uwp.patch
@@ -1,11 +1,11 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -172,7 +172,7 @@
- # requires root permissions to open devices, so that's not generally
- # useful, and we'll disable this by default on Unix. Windows and macOS
- # can use it without root access, though, so enable by default there.
--if(WINDOWS OR APPLE OR ANDROID)
-+if((WINDOWS AND NOT WINDOWS_STORE) OR APPLE OR ANDROID)
+@@ -173,7 +173,7 @@
+ # so we'll just use libusb when it's available. libusb does not support iOS,
+ # so we default to yes on iOS.
+ # TODO: Windows can support libusb, the hid.c file just depends on Unix APIs
+-if(WINDOWS OR IOS OR TVOS OR ANDROID)
++if((WINDOWS AND NOT WINDOWS_STORE) OR IOS OR TVOS OR ANDROID)
set(HIDAPI_SKIP_LIBUSB TRUE)
else()
set(HIDAPI_SKIP_LIBUSB FALSE)
diff --git a/ports/sdl2/disable-wcslcpy-and-wcslcat-for-windows.patch b/ports/sdl2/disable-wcslcpy-and-wcslcat-for-windows.patch
new file mode 100644
index 000000000..894b24d0d
--- /dev/null
+++ b/ports/sdl2/disable-wcslcpy-and-wcslcat-for-windows.patch
@@ -0,0 +1,12 @@
+diff -ur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -772,7 +772,7 @@
+ set(HAVE_SIGNAL_H 1)
+ foreach(_FN
+ malloc calloc realloc free qsort abs memset memcpy memmove memcmp
+- wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp
++ wcslen wcsdup wcsstr wcscmp wcsncmp
+ strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
+ _ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
+ _stricmp _strnicmp strtok_s sscanf
diff --git a/ports/sdl2/enable-winrt-cmake.patch b/ports/sdl2/enable-winrt-cmake.patch
index 03deb415c..0e570847b 100644
--- a/ports/sdl2/enable-winrt-cmake.patch
+++ b/ports/sdl2/enable-winrt-cmake.patch
@@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0128c7a..bd534e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -5,6 +5,18 @@ endif()
+@@ -5,6 +5,18 @@
cmake_minimum_required(VERSION 2.8.11)
project(SDL2 C CXX)
@@ -21,7 +21,7 @@ index 0128c7a..bd534e4 100644
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
# !!! FIXME: for the SDL2 shared library (so you get an
# !!! FIXME: install_name ("soname") of "@rpath/libSDL-whatever.dylib"
-@@ -1209,6 +1221,11 @@ elseif(WINDOWS)
+@@ -1297,6 +1309,11 @@
file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
@@ -33,7 +33,7 @@ index 0128c7a..bd534e4 100644
if(MSVC)
# Prevent codegen that would use the VC runtime libraries.
set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-")
-@@ -1254,6 +1271,9 @@ elseif(WINDOWS)
+@@ -1342,6 +1359,9 @@
check_include_file(ddraw.h HAVE_DDRAW_H)
check_include_file(dsound.h HAVE_DSOUND_H)
check_include_file(dinput.h HAVE_DINPUT_H)
@@ -43,8 +43,8 @@ index 0128c7a..bd534e4 100644
check_include_file(dxgi.h HAVE_DXGI_H)
if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H)
set(HAVE_DIRECTX TRUE)
-@@ -1272,18 +1292,20 @@ elseif(WINDOWS)
- check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
+@@ -1359,18 +1379,20 @@
+ check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
if(SDL_AUDIO)
+ if(NOT WINDOWS_STORE)
@@ -66,7 +66,7 @@ index 0128c7a..bd534e4 100644
set(SDL_AUDIO_DRIVER_WASAPI 1)
file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES})
-@@ -1295,11 +1317,20 @@ elseif(WINDOWS)
+@@ -1382,11 +1404,20 @@
if(NOT SDL_LOADSO)
message_error("SDL_VIDEO requires SDL_LOADSO, which is not enabled")
endif()
@@ -88,7 +88,7 @@ index 0128c7a..bd534e4 100644
set(SDL_VIDEO_RENDER_D3D 1)
set(HAVE_RENDER_D3D TRUE)
endif()
-@@ -1322,20 +1353,31 @@ elseif(WINDOWS)
+@@ -1409,20 +1440,31 @@
endif()
if(SDL_POWER)
@@ -120,7 +120,7 @@ index 0128c7a..bd534e4 100644
# TODO: in configure.ac the check for timers is set on
# cygwin | mingw32* - does this include mingw32CE?
-@@ -1357,7 +1399,7 @@ elseif(WINDOWS)
+@@ -1444,7 +1486,7 @@
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES})
if(SDL_VIDEO)
@@ -129,7 +129,7 @@ index 0128c7a..bd534e4 100644
set(SDL_VIDEO_OPENGL 1)
set(SDL_VIDEO_OPENGL_WGL 1)
set(SDL_VIDEO_RENDER_OGL 1)
-@@ -1788,12 +1830,14 @@ endif()
+@@ -2027,12 +2069,14 @@
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
# Always build SDLmain
@@ -138,36 +138,36 @@ index 0128c7a..bd534e4 100644
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
set(_INSTALL_LIBS "SDL2main")
if (NOT ANDROID)
- set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
+ set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
endif()
+endif()
- if(SDL_SHARED)
- add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
+ if (ANDROID AND HAVE_HIDAPI)
+ set(_INSTALL_LIBS ${_INSTALL_LIBS} "hidapi")
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index 48dd2d4..0c4fa28 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
-@@ -326,6 +326,7 @@
- #cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
+@@ -335,6 +326,7 @@
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
+ #cmakedefine SDL_VIDEO_DRIVER_OFFSCREEN @SDL_VIDEO_DRIVER_OFFSCREEN@
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
+#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
-@@ -391,6 +392,7 @@
+@@ -403,6 +404,7 @@
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
+#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
+ #cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
- #cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
-@@ -413,7 +415,7 @@
- #cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
+@@ -428,7 +430,7 @@
+ #cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
+ #cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
- /* Platform specific definitions */
-#if !defined(__WIN32__)
+#if !defined(__WIN32__) && !defined(__WINRT__)
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
diff --git a/ports/sdl2/fix-space-in-path.patch b/ports/sdl2/fix-space-in-path.patch
index ed7a1e712..499161d9a 100644
--- a/ports/sdl2/fix-space-in-path.patch
+++ b/ports/sdl2/fix-space-in-path.patch
@@ -1,7 +1,7 @@
diff -ur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2019-07-23 21:41:00.000000000 +0200
+++ b/CMakeLists.txt 2019-10-27 20:26:38.000000000 +0100
-@@ -257,7 +257,7 @@
+@@ -278,7 +278,7 @@
# General includes
include_directories(${SDL2_BINARY_DIR}/include ${SDL2_SOURCE_DIR}/include)
if(USE_GCC OR USE_CLANG)
@@ -13,12 +13,12 @@ diff -ur a/CMakeLists.txt b/CMakeLists.txt
diff -ur a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
--- a/cmake/sdlchecks.cmake 2019-07-23 21:41:00.000000000 +0200
+++ b/cmake/sdlchecks.cmake 2019-10-27 20:27:10.000000000 +0100
-@@ -1086,7 +1086,7 @@
+@@ -1088,7 +1088,7 @@
set(HAVE_SDL_JOYSTICK TRUE)
file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} -I${SDL2_SOURCE_DIR}/src/hidapi/hidapi")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} \"-I${SDL2_SOURCE_DIR}/src/hidapi/hidapi\"")
if(NOT HIDAPI_SKIP_LIBUSB)
- set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
- list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
+ if(HIDAPI_ONLY_LIBUSB)
+ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake
index 8c0a25c01..4bed5c0a6 100644
--- a/ports/sdl2/portfile.cmake
+++ b/ports/sdl2/portfile.cmake
@@ -1,16 +1,19 @@
-vcpkg_from_github(
+set(SDL2_VERSION 2.0.12)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.libsdl.org/release/SDL2-2.0.12.tar.gz"
+ FILENAME "SDL2-${SDL2_VERSION}.tar.gz"
+ SHA512 3f1f04af0f3d9dda9c84a2e9274ae8d83ea0da3fc367970a820036cc4dc1dbf990cfc37e4975ae05f0b45a4ffa739c6c19e470c00bf3f2bce9b8b63717b8b317
+)
+
+vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
- REPO SDL-Mirror/SDL
- REF release-2.0.10
- SHA512 c5fe59eed7ba9c6a82cceaf513623480793727fceec84b01d819e7cbefc8229a84be93067d7539f12d5811c49d3d54fd407272786aef3e419f439d0105c34b21
- HEAD_REF master
+ ARCHIVE ${ARCHIVE}
PATCHES
export-symbols-only-in-shared-build.patch
- fix-cmake-include-dir.patch
enable-winrt-cmake.patch
- fix-arm64-headers.patch
disable-hidapi-for-uwp.patch
fix-space-in-path.patch
+ disable-wcslcpy-and-wcslcat-for-windows.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)