pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/realm-core: import realm-core-6.0.8



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Jul 14 18:35:07 2020 +0200
Changeset:	be53606cb4f13993970c7563af514cf3bd12a683

Added Files:
	realm-core/DESCR
	realm-core/Makefile
	realm-core/PLIST
	realm-core/distinfo
	realm-core/patches/patch-CMakeLists.txt
	realm-core/patches/patch-src_realm_CMakeLists.txt
	realm-core/patches/patch-src_realm_impl_simulated__failure.cpp
	realm-core/patches/patch-src_realm_parser_CMakeLists.txt
	realm-core/patches/patch-src_realm_util_features.h
	realm-core/patches/patch-src_realm_util_file.cpp

Log Message:
wip/realm-core: import realm-core-6.0.8

Realm is a mobile database that runs directly inside phones, tablets or
wearables.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=be53606cb4f13993970c7563af514cf3bd12a683

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 realm-core/DESCR                                   |   2 +
 realm-core/Makefile                                |  26 ++++
 realm-core/PLIST                                   | 143 +++++++++++++++++++++
 realm-core/distinfo                                |  12 ++
 realm-core/patches/patch-CMakeLists.txt            |  23 ++++
 realm-core/patches/patch-src_realm_CMakeLists.txt  |  27 ++++
 .../patch-src_realm_impl_simulated__failure.cpp    |  13 ++
 .../patches/patch-src_realm_parser_CMakeLists.txt  |   9 ++
 realm-core/patches/patch-src_realm_util_features.h |  17 +++
 realm-core/patches/patch-src_realm_util_file.cpp   |  30 +++++
 10 files changed, 302 insertions(+)

diffs:
diff --git a/realm-core/DESCR b/realm-core/DESCR
new file mode 100644
index 0000000000..809114d071
--- /dev/null
+++ b/realm-core/DESCR
@@ -0,0 +1,2 @@
+Realm is a mobile database that runs directly inside phones, tablets or
+wearables.
diff --git a/realm-core/Makefile b/realm-core/Makefile
new file mode 100644
index 0000000000..7cd648f94f
--- /dev/null
+++ b/realm-core/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD$
+
+DISTNAME=	realm-core-6.0.8
+CATEGORIES=	database
+MASTER_SITES=	${MASTER_SITE_GITHUB:=realm/}
+GITHUB_TAG=	v${PKGVERSION_NOREV}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://realm.io/
+COMMENT=	Core database component for the Realm Mobile Database SDKs 
+LICENSE=	apache-2.0
+
+USE_CMAKE=	yes
+USE_LANGUAGES=	c c++
+CMAKE_ARGS+=	-DPEGTL_SYSTEM=1
+CMAKE_ARGS+=	-DSSL_SYSTEM=1
+
+CONFIGURE_DIRS=	${WRKDIR}/build                                                                
+CMAKE_ARG_PATH=	${WRKSRC}
+
+post-extract:
+	${MKDIR} ${WRKDIR}/build
+
+.include "../../security/openssl/buildlink3.mk"
+.include "../../wip/pegtl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/realm-core/PLIST b/realm-core/PLIST
new file mode 100644
index 0000000000..28271a6629
--- /dev/null
+++ b/realm-core/PLIST
@@ -0,0 +1,143 @@
+@comment $NetBSD$
+bin/realm-config-dbg
+doc/realm/CHANGELOG.md
+doc/realm/LICENSE
+include/realm.hpp
+include/realm/alloc.hpp
+include/realm/alloc_slab.hpp
+include/realm/array.hpp
+include/realm/array_backlink.hpp
+include/realm/array_basic.hpp
+include/realm/array_basic_tpl.hpp
+include/realm/array_binary.hpp
+include/realm/array_blob.hpp
+include/realm/array_blobs_big.hpp
+include/realm/array_blobs_small.hpp
+include/realm/array_bool.hpp
+include/realm/array_direct.hpp
+include/realm/array_integer.hpp
+include/realm/array_key.hpp
+include/realm/array_list.hpp
+include/realm/array_mixed.hpp
+include/realm/array_string.hpp
+include/realm/array_string_short.hpp
+include/realm/array_timestamp.hpp
+include/realm/array_unsigned.hpp
+include/realm/binary_data.hpp
+include/realm/bplustree.hpp
+include/realm/cluster.hpp
+include/realm/cluster_tree.hpp
+include/realm/column_binary.hpp
+include/realm/column_fwd.hpp
+include/realm/column_integer.hpp
+include/realm/column_type.hpp
+include/realm/column_type_traits.hpp
+include/realm/data_type.hpp
+include/realm/db.hpp
+include/realm/db_options.hpp
+include/realm/disable_sync_to_disk.hpp
+include/realm/exceptions.hpp
+include/realm/global_key.hpp
+include/realm/group.hpp
+include/realm/group_writer.hpp
+include/realm/handover_defs.hpp
+include/realm/history.hpp
+include/realm/impl/array_writer.hpp
+include/realm/impl/cont_transact_hist.hpp
+include/realm/impl/destroy_guard.hpp
+include/realm/impl/input_stream.hpp
+include/realm/impl/output_stream.hpp
+include/realm/impl/simulated_failure.hpp
+include/realm/impl/transact_log.hpp
+include/realm/index_string.hpp
+include/realm/keys.hpp
+include/realm/list.hpp
+include/realm/metrics/metric_timer.hpp
+include/realm/metrics/metrics.hpp
+include/realm/metrics/query_info.hpp
+include/realm/metrics/transaction_info.hpp
+include/realm/mixed.hpp
+include/realm/node.hpp
+include/realm/node_header.hpp
+include/realm/null.hpp
+include/realm/obj.hpp
+include/realm/obj_list.hpp
+include/realm/owned_data.hpp
+include/realm/parser/collection_operator_expression.hpp
+include/realm/parser/expression_container.hpp
+include/realm/parser/keypath_mapping.hpp
+include/realm/parser/parser.hpp
+include/realm/parser/parser_utils.hpp
+include/realm/parser/property_expression.hpp
+include/realm/parser/query_builder.hpp
+include/realm/parser/subquery_expression.hpp
+include/realm/parser/value_expression.hpp
+include/realm/query.hpp
+include/realm/query_conditions.hpp
+include/realm/query_engine.hpp
+include/realm/query_expression.hpp
+include/realm/realm_nmmintrin.h
+include/realm/replication.hpp
+include/realm/sort_descriptor.hpp
+include/realm/spec.hpp
+include/realm/string_data.hpp
+include/realm/table.hpp
+include/realm/table_ref.hpp
+include/realm/table_view.hpp
+include/realm/timestamp.hpp
+include/realm/unicode.hpp
+include/realm/util/aes_cryptor.hpp
+include/realm/util/allocator.hpp
+include/realm/util/any.hpp
+include/realm/util/assert.hpp
+include/realm/util/backtrace.hpp
+include/realm/util/base64.hpp
+include/realm/util/basic_system_errors.hpp
+include/realm/util/bind_ptr.hpp
+include/realm/util/buffer.hpp
+include/realm/util/call_with_tuple.hpp
+include/realm/util/cf_ptr.hpp
+include/realm/util/config.h
+include/realm/util/encrypted_file_mapping.hpp
+include/realm/util/errno.hpp
+include/realm/util/features.h
+include/realm/util/fifo_helper.hpp
+include/realm/util/file.hpp
+include/realm/util/file_mapper.hpp
+include/realm/util/fixed_size_buffer.hpp
+include/realm/util/function_ref.hpp
+include/realm/util/hex_dump.hpp
+include/realm/util/inspect.hpp
+include/realm/util/interprocess_condvar.hpp
+include/realm/util/interprocess_mutex.hpp
+include/realm/util/logger.hpp
+include/realm/util/memory_stream.hpp
+include/realm/util/misc_errors.hpp
+include/realm/util/miscellaneous.hpp
+include/realm/util/optional.hpp
+include/realm/util/overload.hpp
+include/realm/util/priority_queue.hpp
+include/realm/util/safe_int_ops.hpp
+include/realm/util/scope_exit.hpp
+include/realm/util/serializer.hpp
+include/realm/util/sha_crypto.hpp
+include/realm/util/shared_ptr.hpp
+include/realm/util/string_buffer.hpp
+include/realm/util/terminate.hpp
+include/realm/util/thread.hpp
+include/realm/util/to_string.hpp
+include/realm/util/type_list.hpp
+include/realm/util/type_traits.hpp
+include/realm/util/utf8.hpp
+include/realm/utilities.hpp
+include/realm/version.hpp
+include/realm/version_id.hpp
+include/realm/version_numbers.hpp
+lib/cmake/RealmCore/RealmCoreConfig.cmake
+lib/cmake/RealmCore/RealmCoreTargets-debug.cmake
+lib/cmake/RealmCore/RealmCoreTargets.cmake
+lib/librealm-dbg.a
+lib/librealm-dbg.so
+lib/librealm-parser-dbg.a
+lib/librealm-parser-dbg.so
+libexec/realmd-dbg
diff --git a/realm-core/distinfo b/realm-core/distinfo
new file mode 100644
index 0000000000..e9e9b930c2
--- /dev/null
+++ b/realm-core/distinfo
@@ -0,0 +1,12 @@
+$NetBSD$
+
+SHA1 (realm-core-6.0.8.tar.gz) = 698e737b5a753238365f88a6b1394e675508a2cf
+RMD160 (realm-core-6.0.8.tar.gz) = 5bbb3ae2bc9ca745d03300664691c4b1e2eb8897
+SHA512 (realm-core-6.0.8.tar.gz) = 090a4fdcdcb3cabad3dc9e984e2d7376fb31728214b25841b9b866e50d7557ba343d1aba205d0c36716ec88a42c9a85023252c0cc4b79a265daf416c70133140
+Size (realm-core-6.0.8.tar.gz) = 3619275 bytes
+SHA1 (patch-CMakeLists.txt) = 1c6c6da3c1f9cbdba65300d0af609156819c083a
+SHA1 (patch-src_realm_CMakeLists.txt) = 120937bb8101e0c617178770e79a28d0c6837748
+SHA1 (patch-src_realm_impl_simulated__failure.cpp) = ca8433f4b7f46e0e7984362a9ea3e77e884d79ea
+SHA1 (patch-src_realm_parser_CMakeLists.txt) = ae799e1277a238d7cedce3a9864a6196d3fbffeb
+SHA1 (patch-src_realm_util_features.h) = 7273bfefbe1f8a934197dedbc1c64c6d8353e32d
+SHA1 (patch-src_realm_util_file.cpp) = aa56d5d72cd4ac58f31f886552599cd92579c7b1
diff --git a/realm-core/patches/patch-CMakeLists.txt b/realm-core/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..b4a66f6d42
--- /dev/null
+++ b/realm-core/patches/patch-CMakeLists.txt
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- CMakeLists.txt.orig	2020-06-30 08:11:11.000000000 +0000
++++ CMakeLists.txt
+@@ -206,7 +206,12 @@ if(EXISTS "${DEPRECATED_CONFIG_FILE}")
+     message(FATAL_ERROR "${DEPRECATED_CONFIG_FILE} exists in the source directory, and will take precedence over the generated configuration in the build directory. Please remove this file before continuing. Alternatively, you can also clean your realm-core to remove this and other stale files: git clean -xfd")
+ endif()
+ 
+-set(PEGTL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/external/pegtl/include/tao/)
++if(NOT PEGTL_SYSTEM)
++    set(PEGTL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/external/pegtl/include/tao/)
++else()
++    find_path(PEGTL_INCLUDE_ROOTDIR tao/pegtl.hpp)
++    set(PEGTL_INCLUDE_DIR ${PEGTL_INCLUDE_ROOTDIR}/tao)
++endif()
+ 
+ # Tell the build system where to find the sources (and generated sources)
+ include_directories(src)
+@@ -249,4 +254,3 @@ set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
+ include(CPack)
+ cpack_add_component(runtime DEPENDS runtime)
+ cpack_add_component(devel DEPENDS devel)
+-
diff --git a/realm-core/patches/patch-src_realm_CMakeLists.txt b/realm-core/patches/patch-src_realm_CMakeLists.txt
new file mode 100644
index 0000000000..cd464cb33c
--- /dev/null
+++ b/realm-core/patches/patch-src_realm_CMakeLists.txt
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- src/realm/CMakeLists.txt.orig	2020-06-30 08:11:11.000000000 +0000
++++ src/realm/CMakeLists.txt
+@@ -326,6 +326,7 @@ if(NOT REALM_SKIP_SHARED_LIB)
+     )
+ endif()
+ 
++if (NOT SSL_SYSTEM)
+ if(UNIX AND NOT APPLE)
+     if(NOT OpenSSL_DIR)
+         if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/openssl/lib/cmake/OpenSSL/OpenSSLConfig.cmake)
+@@ -361,6 +362,14 @@ if(UNIX AND NOT APPLE)
+         target_link_libraries(StorageShared PUBLIC OpenSSL::Crypto)
+     endif()
+ endif()
++else()
++find_package(OpenSSL REQUIRED)
++target_include_directories(CoreObjects SYSTEM PUBLIC ${OPENSSL_INCLUDE_DIR})
++target_link_libraries(Storage PUBLIC OpenSSL::Crypto)
++if(NOT REALM_SKIP_SHARED_LIB)
++    target_link_libraries(StorageShared PUBLIC OpenSSL::Crypto)
++endif()
++endif()
+ 
+ if(APPLE)
+     target_link_libraries(Storage INTERFACE "-framework Foundation")
diff --git a/realm-core/patches/patch-src_realm_impl_simulated__failure.cpp b/realm-core/patches/patch-src_realm_impl_simulated__failure.cpp
new file mode 100644
index 0000000000..c2ec7a22be
--- /dev/null
+++ b/realm-core/patches/patch-src_realm_impl_simulated__failure.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/realm/impl/simulated_failure.cpp.orig	2020-06-30 08:11:11.000000000 +0000
++++ src/realm/impl/simulated_failure.cpp
+@@ -27,7 +27,7 @@
+ #include <realm/util/basic_system_errors.hpp>
+ #include <realm/impl/simulated_failure.hpp>
+ 
+-#if REALM_PLATFORM_APPLE || REALM_ANDROID
++#if REALM_PLATFORM_APPLE || REALM_ANDROID || REALM_NETBSD
+ #define USE_PTHREADS_IMPL 1
+ #else
+ #define USE_PTHREADS_IMPL 0
diff --git a/realm-core/patches/patch-src_realm_parser_CMakeLists.txt b/realm-core/patches/patch-src_realm_parser_CMakeLists.txt
new file mode 100644
index 0000000000..3ede236fae
--- /dev/null
+++ b/realm-core/patches/patch-src_realm_parser_CMakeLists.txt
@@ -0,0 +1,9 @@
+$NetBSD$
+
+--- src/realm/parser/CMakeLists.txt.orig	2020-06-30 08:11:11.000000000 +0000
++++ src/realm/parser/CMakeLists.txt
+@@ -49,4 +49,3 @@ if(NOT REALM_SKIP_SHARED_LIB)
+             LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime
+             RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime)
+ endif()
+-
diff --git a/realm-core/patches/patch-src_realm_util_features.h b/realm-core/patches/patch-src_realm_util_features.h
new file mode 100644
index 0000000000..8051d0a7a1
--- /dev/null
+++ b/realm-core/patches/patch-src_realm_util_features.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- src/realm/util/features.h.orig	2020-06-30 08:11:11.000000000 +0000
++++ src/realm/util/features.h
+@@ -262,6 +262,12 @@
+ #define REALM_TVOS 0
+ #endif
+ 
++#if defined(__NetBSD__)
++#define REALM_NETBSD 1
++#else
++#define REALM_NETBSD 0
++#endif
++
+ #if REALM_ANDROID || REALM_IOS || REALM_WATCHOS || REALM_TVOS || REALM_UWP
+ #define REALM_MOBILE 1
+ #else
diff --git a/realm-core/patches/patch-src_realm_util_file.cpp b/realm-core/patches/patch-src_realm_util_file.cpp
new file mode 100644
index 0000000000..a96e15d237
--- /dev/null
+++ b/realm-core/patches/patch-src_realm_util_file.cpp
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- src/realm/util/file.cpp.orig	2020-06-30 08:11:11.000000000 +0000
++++ src/realm/util/file.cpp
+@@ -820,6 +820,16 @@ void File::prealloc(size_t size)
+ 
+     consume_space_interlocked();
+ 
++#elif REALM_NETBSD
++    int ret = 0;
++
++    do {
++        ret = ftruncate(m_fd, new_size);
++    } while (ret == -1 && errno == EINTR);
++
++    if (ret != 0) {
++        throw std::system_error(errno, std::system_category(), "ftruncate() inside prealloc() failed");
++    }
+ #else
+ #error Please check if/how your OS supports file preallocation
+ #endif
+@@ -1536,7 +1546,7 @@ DirScanner::~DirScanner() noexcept
+ 
+ bool DirScanner::next(std::string& name)
+ {
+-#if !defined(__linux__) && !REALM_PLATFORM_APPLE && !REALM_WINDOWS && !REALM_UWP && !REALM_ANDROID
++#if !defined(__linux__) && !REALM_PLATFORM_APPLE && !REALM_WINDOWS && !REALM_UWP && !REALM_ANDROID && !REALM_NETBSD
+ #error "readdir() is not known to be thread-safe on this platform"
+ #endif
+ 


Home | Main Index | Thread Index | Old Index