Skip to content

Commit 9b6b46d

Browse files
committed
1 parent 0c21ee5 commit 9b6b46d

23 files changed

+1209
-958
lines changed

couchbase.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Gem::Specification.new do |spec|
4646
"ext/*.cxx",
4747
"ext/*.hxx",
4848
"ext/*.hxx.in",
49+
"ext/*.patch",
4950
"ext/*.rb",
5051
"ext/CMakeLists.txt",
5152
"ext/cache/**/*",
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 6bdc93aac66f2282823dceee802b60e2447c4ba9 Mon Sep 17 00:00:00 2001
2+
From: Sergey Avseyev <[email protected]>
3+
Date: Fri, 20 Oct 2023 20:48:33 -0700
4+
Subject: [PATCH] fix build for mingw-w64-ucrt-x86_64-toolchain
5+
6+
---
7+
src/crypto/CMakeLists.txt | 4 ++++
8+
src/crypto/curve25519/internal.h | 2 +-
9+
2 files changed, 5 insertions(+), 1 deletion(-)
10+
11+
diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt
12+
index 68fb65b30..f53a9eee9 100644
13+
--- a/src/crypto/CMakeLists.txt
14+
+++ b/src/crypto/CMakeLists.txt
15+
@@ -335,6 +335,10 @@ if(WIN32)
16+
target_link_libraries(crypto ws2_32)
17+
endif()
18+
19+
+if(MINGW)
20+
+ target_link_libraries(crypto --static-libgcc --static-libstdc++)
21+
+endif()
22+
+
23+
if(NOT ANDROID)
24+
find_package(Threads REQUIRED)
25+
target_link_libraries(crypto Threads::Threads)
26+
diff --git a/src/crypto/curve25519/internal.h b/src/crypto/curve25519/internal.h
27+
index 0cd1a12aa..ab33badc0 100644
28+
--- a/src/crypto/curve25519/internal.h
29+
+++ b/src/crypto/curve25519/internal.h
30+
@@ -32,7 +32,7 @@ void x25519_NEON(uint8_t out[32], const uint8_t scalar[32],
31+
#endif
32+
33+
#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_SMALL) && \
34+
- defined(__GNUC__) && defined(__x86_64__)
35+
+ defined(__GNUC__) && defined(__x86_64__) && !defined(__MINGW32__)
36+
#define BORINGSSL_FE25519_ADX
37+
38+
// fiat_curve25519_adx_mul is defined in
39+
--
40+
2.42.0.windows.2

ext/couchbase

ext/extconf.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ def sys(*cmd)
141141
cmake_flags << "-DCMAKE_AR=#{ar}" if ar
142142

143143
project_path = File.expand_path(File.join(__dir__))
144+
145+
Dir.glob(File.join(project_path, "*.patch")).each do |path|
146+
FileUtils.cp(path, File.join(project_path, "couchbase", "cmake"), verbose: true)
147+
end
148+
144149
build_dir = ENV['CB_EXT_BUILD_DIR'] ||
145150
File.join(Dir.tmpdir, "cb-#{build_type}-#{RUBY_VERSION}-#{RUBY_PATCHLEVEL}-#{RUBY_PLATFORM}-#{SDK_VERSION}")
146151
FileUtils.rm_rf(build_dir, verbose: true) unless ENV['CB_PRESERVE_BUILD_DIR']

ext/rcb_analytics.cxx

Lines changed: 96 additions & 115 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)