aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Paulyshka <me@mixaill.tk>2017-09-24 15:31:30 +0300
committerMikhail Paulyshka <me@mixaill.tk>2017-09-24 15:31:30 +0300
commit98861e3ee636b60a58ad0945fe051407bf356bfb (patch)
treeea3fa66342e177659f23fe70d439502320b25ed8
parent392a9adfca20a55a0952aa9a7720a70edc738e80 (diff)
downloadvcpkg-98861e3ee636b60a58ad0945fe051407bf356bfb.tar.gz
vcpkg-98861e3ee636b60a58ad0945fe051407bf356bfb.zip
[sdl2] update to 2.0.6
- update to 2.0.6 - enable cmake-targets - fix export symbols patch - remove default library linkage patch (fixed in upstream)
-rw-r--r--ports/sdl2/CONTROL2
-rw-r--r--ports/sdl2/dont-ignore-default-libs.patch22
-rw-r--r--ports/sdl2/export-symbols-only-in-shared-build.patch28
-rw-r--r--ports/sdl2/portfile.cmake22
4 files changed, 30 insertions, 44 deletions
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL
index ba795b93f..e4d99f4ae 100644
--- a/ports/sdl2/CONTROL
+++ b/ports/sdl2/CONTROL
@@ -1,3 +1,3 @@
Source: sdl2
-Version: 2.0.5-4
+Version: 2.0.6-1
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/dont-ignore-default-libs.patch b/ports/sdl2/dont-ignore-default-libs.patch
deleted file mode 100644
index c9f4c6079..000000000
--- a/ports/sdl2/dont-ignore-default-libs.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 54a23f0..91c5736 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1549,7 +1549,7 @@ if(SDL_SHARED)
- SOVERSION ${LT_REVISION}
- OUTPUT_NAME "SDL2")
- endif()
-- if(MSVC)
-+ if(MSVC AND NOT LIBC)
- # Don't try to link with the default set of libraries.
- set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
- set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
-@@ -1564,7 +1564,7 @@ if(SDL_STATIC)
- add_library(SDL2-static STATIC ${SOURCE_FILES})
- set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
- set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE ${SDL_STATIC_PIC})
-- if(MSVC)
-+ if(MSVC AND NOT LIBC)
- set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
- set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
- set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
diff --git a/ports/sdl2/export-symbols-only-in-shared-build.patch b/ports/sdl2/export-symbols-only-in-shared-build.patch
index b442954d5..7e6d503e2 100644
--- a/ports/sdl2/export-symbols-only-in-shared-build.patch
+++ b/ports/sdl2/export-symbols-only-in-shared-build.patch
@@ -1,16 +1,24 @@
-diff --git a/include/begin_code.h b/include/begin_code.h
-index 04e78c6..16464f5 100644
---- a/include/begin_code.h
-+++ b/include/begin_code.h
+# HG changeset patch
+# User Mikhail Paulyshka <me@mixaill.tk>
+# Date 1506252750 -10800
+# Sun Sep 24 14:32:30 2017 +0300
+# Branch SDL2-WIN-SYMBOLS_LEACKAGE
+# Node ID 46ec9baae30cd4e0c584de125cae4a3cce2864ad
+# Parent 8df7a59b55283aa09889522369a2b32674c048de
+win32: fix symbols leakage for static libraries
+
+diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h
+--- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700
++++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300
@@ -58,8 +58,10 @@
# else
# define DECLSPEC __declspec(dllimport)
# endif
--# else
-+# elif defined(SDL2_EXPORTS)
- # define DECLSPEC __declspec(dllexport)
-+# else
++# elif defined(_DLL)
++# define DECLSPEC __declspec(dllexport)
+ # else
+-# define DECLSPEC __declspec(dllexport)
+# define DECLSPEC
# endif
- # else
- # if defined(__GNUC__) && __GNUC__ >= 4
+ # elif defined(__OS2__)
+ # ifdef BUILD_SDL
diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake
index 33123c1ba..a430b29f6 100644
--- a/ports/sdl2/portfile.cmake
+++ b/ports/sdl2/portfile.cmake
@@ -1,16 +1,19 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.5)
+
+set(SDL2_VERSION 2.0.6)
+set(SDL2_HASH ad4dad5663834ee0ffbdca1b531d753449b260c9256df2c48da7261aacd9795d91eef1286525cf914f6b92ba5985de7798f041557574b5d978b8224f10041830)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-${SDL2_VERSION})
vcpkg_download_distfile(ARCHIVE_FILE
- URLS "http://libsdl.org/release/SDL2-2.0.5.tar.gz"
- FILENAME "SDL2-2.0.5.tar.gz"
- SHA512 6401f5df08c08316c09bc6ac5b28345c5184bb25770baa5c94c0a582ae130ddf73bb736e44bb31f4e427c1ddbbeec4755a6a5f530b6b4c3d0f13ebc78ddc1750
+ URLS "http://libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz"
+ FILENAME "SDL2-${SDL2_VERSION}.tar.gz"
+ SHA512 ${SDL2_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/dont-ignore-default-libs.patch
${CMAKE_CURRENT_LIST_DIR}/export-symbols-only-in-shared-build.patch
)
@@ -58,14 +61,11 @@ else()
)
vcpkg_install_cmake()
-
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-endif()
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
-file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib)
-file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
-file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib)
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
+endif()
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright)
vcpkg_copy_pdbs()