From 0d5fc4c6ef86b942401658222ba1aab5c1ccbda4 Mon Sep 17 00:00:00 2001 From: Lily <47812810+LilyWangL@users.noreply.github.com> Date: Sat, 21 Dec 2019 04:15:14 +0800 Subject: [PATCH] [rttr] Add dependency rapidjson (#9252) * [rttr] Add dependency rapidjson * [rttr] Modify ci.baseline.txt * [rttr] Handle copyright --- ports/rttr/CONTROL | 3 ++- ports/rttr/Fix-depends.patch | 14 ++++++++++++++ ports/rttr/portfile.cmake | 8 +++----- scripts/ci.baseline.txt | 1 - 4 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 ports/rttr/Fix-depends.patch diff --git a/ports/rttr/CONTROL b/ports/rttr/CONTROL index 7394927840..60a2a1a8d2 100644 --- a/ports/rttr/CONTROL +++ b/ports/rttr/CONTROL @@ -1,4 +1,5 @@ Source: rttr -Version: 0.9.6-1 +Version: 0.9.6-2 Homepage: https://github.com/rttrorg/rttr Description: an easy and intuitive way to use reflection in C++ +Build-Depends: rapidjson diff --git a/ports/rttr/Fix-depends.patch b/ports/rttr/Fix-depends.patch new file mode 100644 index 0000000000..8357a47c26 --- /dev/null +++ b/ports/rttr/Fix-depends.patch @@ -0,0 +1,14 @@ +diff --git a/CMake/3rd_party_libs.cmake b/CMake/3rd_party_libs.cmake +index dca5071..4dd4471 100644 +--- a/CMake/3rd_party_libs.cmake ++++ b/CMake/3rd_party_libs.cmake +@@ -51,7 +51,8 @@ if (BUILD_BENCHMARKS) + find_package(Threads REQUIRED) + endif() + +-set(RAPID_JSON_DIR ${RTTR_3RD_PARTY_DIR}/rapidjson-1.1.0) ++find_package(RapidJSON CONFIG REQUIRED) ++set(RAPID_JSON_DIR ${RAPIDJSON_INCLUDE_DIRS}) + set(NONIUS_DIR ${RTTR_3RD_PARTY_DIR}/nonius-1.1.2) + + # Prepare "Catch" library for other executables diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index cb3bfe68cf..56700768b9 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rttrorg/rttr @@ -8,7 +6,8 @@ vcpkg_from_github( HEAD_REF master PATCHES fix-directory-output.patch - remove-owner-read-perms.patch + Fix-depends.patch + remove-owner-read-perms.patch ) #Handle static lib @@ -43,8 +42,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() #Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/rttr/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/rttr/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 21b0e2de2d..96b4e48ef7 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1471,7 +1471,6 @@ rpclib:x64-uwp=fail rpclib:x64-windows=ignore rpclib:x86-windows=ignore rpclib:x64-windows-static=ignore -rttr:arm64-windows=fail rttr:arm-uwp=fail rttr:x64-uwp=fail scintilla:arm64-windows=fail