diff options
Diffstat (limited to 'vcpkg/ports/cpprealm')
| -rw-r--r-- | vcpkg/ports/cpprealm/disable-werror.diff | 13 | ||||
| -rw-r--r-- | vcpkg/ports/cpprealm/missing-cstdint.diff | 12 | ||||
| -rw-r--r-- | vcpkg/ports/cpprealm/portfile.cmake | 34 | ||||
| -rw-r--r-- | vcpkg/ports/cpprealm/remove-overzealous-template.diff | 22 | ||||
| -rw-r--r-- | vcpkg/ports/cpprealm/vcpkg.json | 28 |
5 files changed, 109 insertions, 0 deletions
diff --git a/vcpkg/ports/cpprealm/disable-werror.diff b/vcpkg/ports/cpprealm/disable-werror.diff new file mode 100644 index 0000000..f349219 --- /dev/null +++ b/vcpkg/ports/cpprealm/disable-werror.diff @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f8b0675..e7dd3f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -119,7 +119,7 @@ target_link_libraries(cpprealm PUBLIC Realm::ObjectStore) + set(CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT_PATH}) + + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- target_compile_options(cpprealm PRIVATE -Wall -Wextra -pedantic -Werror) ++ target_compile_options(cpprealm PRIVATE -Wall -Wextra -pedantic -Wno-changes-meaning) + endif() + + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) diff --git a/vcpkg/ports/cpprealm/missing-cstdint.diff b/vcpkg/ports/cpprealm/missing-cstdint.diff new file mode 100644 index 0000000..1532123 --- /dev/null +++ b/vcpkg/ports/cpprealm/missing-cstdint.diff @@ -0,0 +1,12 @@ +diff --git a/include/cpprealm/internal/bridge/realm.hpp b/include/cpprealm/internal/bridge/realm.hpp +index 38703d1..827c71d 100644 +--- a/include/cpprealm/internal/bridge/realm.hpp ++++ b/include/cpprealm/internal/bridge/realm.hpp +@@ -27,6 +27,7 @@ + #include <optional> + #include <string> + #include <vector> ++#include <cstdint> + + namespace realm { + class Realm; diff --git a/vcpkg/ports/cpprealm/portfile.cmake b/vcpkg/ports/cpprealm/portfile.cmake new file mode 100644 index 0000000..3a1c57a --- /dev/null +++ b/vcpkg/ports/cpprealm/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO realm/realm-cpp
+ REF "v${VERSION}"
+ SHA512 "cf975741b5a4a68a40845c53d8584d871acff03c7a212e71a67799801979e0514de2a449aa5d78137f2d7f42e113c5df7c97e9f8c5fb6371e95c46f29ab2b246"
+ HEAD_REF "main"
+ PATCHES
+ missing-cstdint.diff # https://github.com/realm/realm-cpp/pull/247
+ disable-werror.diff
+ remove-overzealous-template.diff # https://github.com/realm/realm-cpp/pull/248
+)
+
+if(NOT VCPKG_BUILD_TYPE)
+ set(DISABLE_ALIGNED_STORAGE 1)
+else()
+ set(DISABLE_ALIGNED_STORAGE 0)
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ DISABLE_PARALLEL_CONFIGURE
+ OPTIONS
+ -DREALM_DISABLE_ALIGNED_STORAGE=${DISABLE_ALIGNED_STORAGE}
+ -DREALM_CPP_NO_TESTS=ON
+ -DREALM_ENABLE_EXPERIMENTAL=ON
+ -DREALMCXX_VERSION=${VERSION}
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH "cmake")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/cpprealm/remove-overzealous-template.diff b/vcpkg/ports/cpprealm/remove-overzealous-template.diff new file mode 100644 index 0000000..fed9852 --- /dev/null +++ b/vcpkg/ports/cpprealm/remove-overzealous-template.diff @@ -0,0 +1,22 @@ +diff --git a/include/cpprealm/schema.hpp b/include/cpprealm/schema.hpp +index 7494d60..7479c3c 100644 +--- a/include/cpprealm/schema.hpp ++++ b/include/cpprealm/schema.hpp +@@ -253,7 +253,7 @@ namespace realm { + + if constexpr (N + 1 == sizeof...(Properties)) { + if (property_name == std::string_view(names[N])) { +- auto ptr = managed<Class, void>::template unmanaged_to_managed_pointer(property.ptr); ++ auto ptr = managed<Class, void>::unmanaged_to_managed_pointer(property.ptr); + if constexpr (std::is_pointer_v<typename P::Result>) { + return (cls.*ptr); + } else { +@@ -263,7 +263,7 @@ namespace realm { + return variant_t{}; + } else { + if (property_name == std::string_view(names[N])) { +- auto ptr = managed<Class, void>::template unmanaged_to_managed_pointer(property.ptr); ++ auto ptr = managed<Class, void>::unmanaged_to_managed_pointer(property.ptr); + if constexpr (std::is_pointer_v<typename P::Result>) { + return (cls.*ptr); + } else { diff --git a/vcpkg/ports/cpprealm/vcpkg.json b/vcpkg/ports/cpprealm/vcpkg.json new file mode 100644 index 0000000..b915664 --- /dev/null +++ b/vcpkg/ports/cpprealm/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "cpprealm", + "version": "2.2.0", + "port-version": 1, + "description": "Realm is a mobile database that runs directly inside phones, tablets or wearables.", + "homepage": "https://github.com/realm/realm-cpp", + "license": "Apache-2.0", + "supports": "!emscripten", + "dependencies": [ + { + "name": "curl", + "platform": "linux" + }, + { + "name": "libuv", + "platform": "!osx, !ios" + }, + "realm-core", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |