aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLong Nguyen <nguyen.long.908132@gmail.com>2021-01-25 14:21:41 +0700
committerGitHub <noreply@github.com>2021-01-24 23:21:41 -0800
commit124f5d912bd2c5429bc947e6f86de89df4f289a5 (patch)
tree88e821d0f5fce70d1bd7254addfbc69b1cc33e35
parentf60b947e1311f72c4dae984a1da0ae7eda4e4048 (diff)
downloadvcpkg-124f5d912bd2c5429bc947e6f86de89df4f289a5.tar.gz
vcpkg-124f5d912bd2c5429bc947e6f86de89df4f289a5.zip
[sdl2] Fix improper replacement of -lSDL2main + remove IGNORE_FLAGS and SYSTEM_LIBRARIES (#15540)
* [sdl2] Proper replacement of -lSDL2main -> -lSDL2maind * [sdl2] Add extra SYSTEM_LIBRARIES and IGNORE_FLAGS * [sdl2] Remove SYSTEM_LIBRARIES and IGNORE_FLAGS * update baseline Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
-rw-r--r--ports/sdl2/portfile.cmake12
-rw-r--r--ports/sdl2/vcpkg.json1
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/s-/sdl2.json5
4 files changed, 11 insertions, 9 deletions
diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake
index 755160e8b..2bd389c3f 100644
--- a/ports/sdl2/portfile.cmake
+++ b/ports/sdl2/portfile.cmake
@@ -71,9 +71,7 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME)
file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake)
foreach(SHARE_FILE ${SHARE_FILES})
- file(READ "${SHARE_FILE}" _contents)
- string(REPLACE "lib/SDL2main" "lib/manual-link/SDL2main" _contents "${_contents}")
- file(WRITE "${SHARE_FILE}" "${_contents}")
+ vcpkg_replace_string("${SHARE_FILE}" "lib/SDL2main" "lib/manual-link/SDL2main")
endforeach()
endif()
@@ -89,10 +87,8 @@ string(REGEX REPLACE ${DYLIB_COMPATIBILITY_VERSION_REGEX} "\\1" DYLIB_COMPATIBIL
string(REGEX REPLACE ${DYLIB_CURRENT_VERSION_REGEX} "\\1" DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2" "-lSDL2d")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2main" "-lSDL2maind")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2 " "-lSDL2d ")
endif()
-vcpkg_fixup_pkgconfig(
- IGNORE_FLAGS "-Wl,-rpath,${CURRENT_PACKAGES_DIR}/lib/pkgconfig/../../lib" "-Wl,-rpath,${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/../../lib" "-Wl,--enable-new-dtags" "-Wl,--no-undefined" "-Wl,-undefined,error" "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}" "-Wl,-current_version,${DYLIB_CURRENT_VERSION}" "-Wl,-weak_framework,Metal" "-Wl,-weak_framework,QuartzCore"
- SYSTEM_LIBRARIES dbus-1
-)
+vcpkg_fixup_pkgconfig()
diff --git a/ports/sdl2/vcpkg.json b/ports/sdl2/vcpkg.json
index 55562888b..e9b899dd3 100644
--- a/ports/sdl2/vcpkg.json
+++ b/ports/sdl2/vcpkg.json
@@ -1,6 +1,7 @@
{
"name": "sdl2",
"version-string": "2.0.14",
+ "port-version": 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.",
"homepage": "https://www.libsdl.org/download-2.0.php",
"features": {
diff --git a/versions/baseline.json b/versions/baseline.json
index 95bc7f6c6..8bd6cd9ed 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5202,7 +5202,7 @@
},
"sdl2": {
"baseline": "2.0.14",
- "port-version": 0
+ "port-version": 1
},
"sdl2-gfx": {
"baseline": "1.0.4",
diff --git a/versions/s-/sdl2.json b/versions/s-/sdl2.json
index 7559dc6ac..61ec9118b 100644
--- a/versions/s-/sdl2.json
+++ b/versions/s-/sdl2.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "8d5fa523a69780e41605b585788d212d688f3c71",
+ "version-string": "2.0.14",
+ "port-version": 1
+ },
+ {
"git-tree": "10ed256500fea4cd6cc5d3e6c6b5f2e9e364d78b",
"version-string": "2.0.14",
"port-version": 0