From 9cb0f3c8aee0431981e1d0d59c1ecfbe698ddf5d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 22 Oct 2018 03:43:11 -0700 Subject: [rapidjson] Fix #error on arm64 --- ports/rapidjson/CONTROL | 2 +- ports/rapidjson/arm64-endian.patch | 13 +++++++++++++ ports/rapidjson/portfile.cmake | 1 + ports/rapidjson/usage | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 ports/rapidjson/arm64-endian.patch diff --git a/ports/rapidjson/CONTROL b/ports/rapidjson/CONTROL index 7646755a5..5e7d4e5cf 100644 --- a/ports/rapidjson/CONTROL +++ b/ports/rapidjson/CONTROL @@ -1,3 +1,3 @@ Source: rapidjson -Version: 1.1.0-1 +Version: 1.1.0-2 Description: A fast JSON parser/generator for C++ with both SAX/DOM style API diff --git a/ports/rapidjson/arm64-endian.patch b/ports/rapidjson/arm64-endian.patch new file mode 100644 index 000000000..81fd92132 --- /dev/null +++ b/ports/rapidjson/arm64-endian.patch @@ -0,0 +1,13 @@ +diff --git a/include/rapidjson/rapidjson.h b/include/rapidjson/rapidjson.h +index 053b2ce..1e0b8f3 100644 +--- a/include/rapidjson/rapidjson.h ++++ b/include/rapidjson/rapidjson.h +@@ -236,7 +236,7 @@ + # define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN + # elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) || defined(_M_IX86) || defined(_M_IA64) || defined(_M_ALPHA) || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || defined(__bfin__) + # define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN +-# elif defined(_MSC_VER) && defined(_M_ARM) ++# elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64)) + # define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN + # elif defined(RAPIDJSON_DOXYGEN_RUNNING) + # define RAPIDJSON_ENDIAN diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 4f87ed6f4..45686aab0 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( REF v1.1.0 SHA512 2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff HEAD_REF master + PATCHES arm64-endian.patch ) # Use RapidJSON's own build process, skipping examples and tests diff --git a/ports/rapidjson/usage b/ports/rapidjson/usage index 81e541e17..b72b8e3d6 100644 --- a/ports/rapidjson/usage +++ b/ports/rapidjson/usage @@ -1,4 +1,4 @@ The package rapidjson provides CMake integration: - find_package(RapidJSON REQUIRED) + find_package(RapidJSON CONFIG REQUIRED) target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS}) -- cgit v1.2.3