From 8a3af1c62ee5cd6c980d999f2ffc84c0f15a31fa Mon Sep 17 00:00:00 2001 From: Lily Wang <94091114+LilyWangLL@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:26:46 -0700 Subject: [PATCH] [sdl2pp] Fix usage error (#40404) Co-authored-by: Lily Wang --- ports/sdl2pp/fix-usage.patch | 23 +++++++++++++++++++++++ ports/sdl2pp/portfile.cmake | 15 +++++---------- ports/sdl2pp/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/s-/sdl2pp.json | 5 +++++ 5 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 ports/sdl2pp/fix-usage.patch diff --git a/ports/sdl2pp/fix-usage.patch b/ports/sdl2pp/fix-usage.patch new file mode 100644 index 0000000000..bea5fb0f45 --- /dev/null +++ b/ports/sdl2pp/fix-usage.patch @@ -0,0 +1,23 @@ +diff --git a/FindSDL2PP.cmake.in b/FindSDL2PP.cmake.in +index 344d2b2..06d6278 100644 +--- a/FindSDL2PP.cmake.in ++++ b/FindSDL2PP.cmake.in +@@ -6,6 +6,18 @@ + # SDL2PP_INCLUDE_DIRS + # SDL2PP_LIBRARIES + ++include(CMakeFindDependencyMacro) ++find_dependency(SDL2 CONFIG) ++IF(@SDL2PP_WITH_IMAGE@) ++ find_dependency(SDL2_image CONFIG) ++ENDIF() ++IF(@SDL2PP_WITH_TTF@) ++ find_dependency(SDL2_ttf CONFIG) ++ENDIF() ++IF(@SDL2PP_WITH_MIXER@) ++ find_dependency(SDL2_mixer CONFIG) ++ENDIF() ++ + IF(SDL2PP_INCLUDE_DIR AND SDL2PP_LIBRARY) + # in cache already + SET(SDL2PP_FIND_QUIETLY TRUE) diff --git a/ports/sdl2pp/portfile.cmake b/ports/sdl2pp/portfile.cmake index 00a21a188a..94c13361ec 100644 --- a/ports/sdl2pp/portfile.cmake +++ b/ports/sdl2pp/portfile.cmake @@ -1,10 +1,12 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libSDL2pp/libSDL2pp - REF a02d5a81c3d4122cb578fcd1e5cd4e836878f63b # 0.16.1 - SHA512 cf08abe69b3d313d1c3f63cb138f05105453ea0d04e26daa6d85da41cb742912a37766cce1f8af1277e92a227ea75f481f07bff76f0b501fadec392b8b62336a + REF ${VERSION} + SHA512 3682281432ce9dec0dbc7c786496564c906db9933138e1f2b881f93b5602a7170e06e67e87d35a9e5944ef80f6e13b9835e33209c52869f0ea2bc224f639a749 HEAD_REF master - PATCHES fix-dependencies.patch + PATCHES + fix-dependencies.patch + fix-usage.patch ) vcpkg_check_features( @@ -38,13 +40,6 @@ vcpkg_fixup_pkgconfig() vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/FindSDL2PP.cmake" "HINTS \"${CURRENT_PACKAGES_DIR}/include\"" "") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/FindSDL2PP.cmake" "HINTS \"${CURRENT_PACKAGES_DIR}/lib\"" "") -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/FindSDL2PP.cmake" "# SDL2PP_LIBRARIES" -[[# SDL2PP_LIBRARIES -include(CMakeFindDependencyMacro) -find_dependency(SDL2 CONFIG) -find_dependency(SDL2_image CONFIG) -find_dependency(SDL2_ttf CONFIG) -find_dependency(SDL2_mixer CONFIG)]]) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/sdl2pp/vcpkg.json b/ports/sdl2pp/vcpkg.json index 45ac9fe9bc..dd910dc113 100644 --- a/ports/sdl2pp/vcpkg.json +++ b/ports/sdl2pp/vcpkg.json @@ -1,7 +1,7 @@ { "name": "sdl2pp", "version": "0.16.1", - "port-version": 10, + "port-version": 11, "description": "C++11 bindings/wrapper for SDL2", "homepage": "https://sdl2pp.amdmi3.ru", "license": "Zlib", diff --git a/versions/baseline.json b/versions/baseline.json index aa0f892f48..f15cd6aea1 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8102,7 +8102,7 @@ }, "sdl2pp": { "baseline": "0.16.1", - "port-version": 10 + "port-version": 11 }, "seacas": { "baseline": "2022-11-22", diff --git a/versions/s-/sdl2pp.json b/versions/s-/sdl2pp.json index 0597bae618..5d05bf7234 100644 --- a/versions/s-/sdl2pp.json +++ b/versions/s-/sdl2pp.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "52a51ba0c6e4248bf4597ca6d6f839111be2fa18", + "version": "0.16.1", + "port-version": 11 + }, { "git-tree": "9c13583635bc0fc65f50cf02ff22c06ccb6ccaed", "version": "0.16.1",