[dev-libs/libmongocrypt] bump, untested
This commit is contained in:
@@ -1 +1 @@
|
||||
DIST libmongocrypt-1.15.0.tar.gz 4012071 BLAKE2B 73797bc43f7200508d45f8fb2ccc20dc43fb2952cd42b8f174ff083ba8e2da9831f9b82f9c560dfd30b93731ee7de95eb7023e75af945ab57bfc72ec2bc01744 SHA512 9f83497c5593641369c3741290db99fe3812ca1d8ea40809ac56063a8206ac391def528b08bdc416ff5116341172e9aba4a0315b2f583229dae1aee12a810020
|
||||
DIST libmongocrypt-1.15.2.tar.gz 4012840 BLAKE2B 33accfd5ad5b7e565ca58f88c5dcfeabcab9da828c49235d568ce791b6e28dfc9a8728a1f9186648e2f4143b72ce942582e8b2123a1cfb4ddea779a48ecd097c SHA512 26f3feaee715a00d80fea680858b5c2a31cd4e5ea4ce1a3596400fb6ceca5f641cef558324325803e0ca3076b035ddecc7b71d68486a7a7025448172ab4aa30c
|
||||
|
||||
120
dev-libs/libmongocrypt/files/libmongocrypt-1.15.2-cmake4.patch
Normal file
120
dev-libs/libmongocrypt/files/libmongocrypt-1.15.2-cmake4.patch
Normal file
@@ -0,0 +1,120 @@
|
||||
.evergreen/linker_tests_deps/app/CMakeLists.txt | 4 +--
|
||||
CMakeLists.txt | 34 ++++---------------------
|
||||
cmake/MongoC-Warnings.cmake | 9 +------
|
||||
kms-message/CMakeLists.txt | 5 ++--
|
||||
4 files changed, 10 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/.evergreen/linker_tests_deps/app/CMakeLists.txt b/.evergreen/linker_tests_deps/app/CMakeLists.txt
|
||||
index 1a5abb1d..9b9f907e 100644
|
||||
--- a/.evergreen/linker_tests_deps/app/CMakeLists.txt
|
||||
+++ b/.evergreen/linker_tests_deps/app/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required (VERSION 3.5)
|
||||
+cmake_minimum_required (VERSION 3.15...4.0)
|
||||
project (app C)
|
||||
add_executable (app app.c)
|
||||
find_package (bson-1.0 1.11 REQUIRED)
|
||||
@@ -6,4 +6,4 @@ message ("-- libbson found version \"${bson-1.0_VERSION}\"")
|
||||
target_link_libraries (app PRIVATE mongo::bson_static)
|
||||
|
||||
find_package (mongocrypt REQUIRED)
|
||||
-target_link_libraries (app PRIVATE mongo::mongocrypt)
|
||||
\ No newline at end of file
|
||||
+target_link_libraries (app PRIVATE mongo::mongocrypt)
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c768faca..69e99f9d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,15 +1,4 @@
|
||||
-cmake_minimum_required (VERSION 3.12)
|
||||
-
|
||||
-# Preempt the MSVC_RUNTIME_LIBRARY properties
|
||||
-if (POLICY CMP0091)
|
||||
- cmake_policy (SET CMP0091 NEW)
|
||||
-elseif (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||
- message (WARNING "The CMAKE_MSVC_RUNTIME_LIBRARY variable is set, but CMake is too old to understand it")
|
||||
-endif ()
|
||||
-
|
||||
-if (POLICY CMP0135)
|
||||
- cmake_policy (SET CMP0135 NEW)
|
||||
-endif ()
|
||||
+cmake_minimum_required (VERSION 3.15...4.0)
|
||||
|
||||
project (mongocrypt C)
|
||||
|
||||
@@ -27,20 +16,7 @@ option (ENABLE_BUILD_FOR_PPA "Maintainer-only option for preparing PPA build" OF
|
||||
option (ENABLE_ONLINE_TESTS "Enable online tests and the csfle utility. Requires libmongoc." ON)
|
||||
|
||||
if (ENABLE_WINDOWS_STATIC_RUNTIME)
|
||||
- if (POLICY CMP0091)
|
||||
- # CMake 3.15 makes this trivial:
|
||||
- set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
- else ()
|
||||
- # Fix it up the old-fashioned way
|
||||
- string (REPLACE "/MDd" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
- string (REPLACE "/MD" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
|
||||
- string (REPLACE "/MDd" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
- string (REPLACE "/MD" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
- string (APPEND CMAKE_C_FLAGS_DEBUG " /MTd")
|
||||
- string (APPEND CMAKE_CXX_FLAGS_DEBUG " /MTd")
|
||||
- string (APPEND CMAKE_C_FLAGS_RELEASE " /MT")
|
||||
- string (APPEND CMAKE_CXX_FLAGS_RELEASE " /MT")
|
||||
- endif ()
|
||||
+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif ()
|
||||
|
||||
list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||
@@ -216,10 +192,10 @@ if (BUILD_VERSION STREQUAL "0.0.0")
|
||||
file (STRINGS ${PROJECT_SOURCE_DIR}/VERSION_CURRENT BUILD_VERSION)
|
||||
message (STATUS "File VERSION_CURRENT contained BUILD_VERSION ${BUILD_VERSION}")
|
||||
else ()
|
||||
- find_package (PythonInterp)
|
||||
- if (PYTHONINTERP_FOUND)
|
||||
+ find_package (Python COMPONENTS Interpreter)
|
||||
+ if (TARGET Python::Interpreter)
|
||||
execute_process (
|
||||
- COMMAND ${PYTHON_EXECUTABLE} etc/calc_release_version.py
|
||||
+ COMMAND "${Python_EXECUTABLE}" etc/calc_release_version.py
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE CALC_RELEASE_VERSION
|
||||
RESULT_VARIABLE CALC_RELEASE_VERSION_RESULT
|
||||
diff --git a/cmake/MongoC-Warnings.cmake b/cmake/MongoC-Warnings.cmake
|
||||
index 4784c933..eb104f48 100644
|
||||
--- a/cmake/MongoC-Warnings.cmake
|
||||
+++ b/cmake/MongoC-Warnings.cmake
|
||||
@@ -42,14 +42,7 @@ function (mongoc_add_platform_compile_options)
|
||||
endforeach ()
|
||||
endfunction ()
|
||||
|
||||
-if (CMAKE_VERSION VERSION_LESS 3.3)
|
||||
- # On older CMake versions, we'll just always pass the warning options, even
|
||||
- # if the generate warnings for the C++ check file
|
||||
- set (is_c_lang "1")
|
||||
-else ()
|
||||
- # $<COMPILE_LANGUAGE> is only valid in CMake 3.3+
|
||||
- set (is_c_lang "$<COMPILE_LANGUAGE:C>")
|
||||
-endif ()
|
||||
+set (is_c_lang "$<COMPILE_LANGUAGE:C>")
|
||||
|
||||
# These below warnings should always be unconditional hard errors, as the code is
|
||||
# almost definitely broken
|
||||
diff --git a/kms-message/CMakeLists.txt b/kms-message/CMakeLists.txt
|
||||
index 6848e61f..ff210d4f 100644
|
||||
--- a/kms-message/CMakeLists.txt
|
||||
+++ b/kms-message/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required (VERSION 3.5)
|
||||
+cmake_minimum_required (VERSION 3.15...4.0)
|
||||
project (kms_message
|
||||
VERSION 0.0.1
|
||||
LANGUAGES C
|
||||
@@ -7,8 +7,7 @@ project (kms_message
|
||||
set (CMAKE_C_STANDARD 99)
|
||||
|
||||
include (CheckCCompilerFlag)
|
||||
-# All targets obey visibility, not just library targets.
|
||||
-cmake_policy (SET CMP0063 NEW)
|
||||
+
|
||||
set (CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
set (KMS_MESSAGE_SOURCES
|
||||
src/kms_b64.c
|
||||
@@ -1,49 +1,19 @@
|
||||
https://github.com/mongodb/libmongocrypt/pull/681
|
||||
From d6225c9b68cc6d0bc3ab5e3d3c3ac6e746d564a1 Mon Sep 17 00:00:00 2001
|
||||
From: tharvik <tharvik@users.noreply.github.com>
|
||||
Date: Sat, 29 Jul 2023 18:38:29 +0200
|
||||
Subject: [PATCH 1/4] cmake/bson: enforce local build for test
|
||||
|
||||
---
|
||||
cmake/ImportBSON.cmake | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
cmake/ImportBSON.cmake | 95 +++++++++++++++++++++++++++++---------------------
|
||||
1 file changed, 55 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/cmake/ImportBSON.cmake b/cmake/ImportBSON.cmake
|
||||
index b33750142..f168681ff 100644
|
||||
index c2ca766f..db31c713 100644
|
||||
--- a/cmake/ImportBSON.cmake
|
||||
+++ b/cmake/ImportBSON.cmake
|
||||
@@ -105,9 +105,12 @@ if (NOT DEFINED MONGOCRYPT_MONGOC_DIR)
|
||||
@@ -105,27 +105,42 @@ if (NOT DEFINED MONGOCRYPT_MONGOC_DIR)
|
||||
include (FetchMongoC)
|
||||
# The FetchMongoC module defines a MONGOCRYPT_MONGOC_DIR for us to use
|
||||
endif ()
|
||||
+if (ENABLE_ONLINE_TESTS AND (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM" OR USE_SHARED_LIBBSON))
|
||||
+ message (FATAL_ERROR "Online tests requires static local build of libbson")
|
||||
+endif ()
|
||||
|
||||
function (_import_bson)
|
||||
- if (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM" AND USE_SHARED_LIBBSON AND NOT ENABLE_ONLINE_TESTS)
|
||||
+ if (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM" AND USE_SHARED_LIBBSON)
|
||||
message (STATUS "NOTE: Using system-wide libbson library. This is intended only for package maintainers.")
|
||||
find_library (_MONGOCRYPT_SYSTEM_LIBBSON_SHARED "${CMAKE_SHARED_LIBRARY_PREFIX}bson-1.0${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
find_library (_MONGOCRYPT_SYSTEM_LIBBSON_STATIC "${CMAKE_STATIC_LIBRARY_PREFIX}bson-static-1.0${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
|
||||
From 41b1fd383f61182c42bbaa76705f730a33e7ede2 Mon Sep 17 00:00:00 2001
|
||||
From: tharvik <tharvik@users.noreply.github.com>
|
||||
Date: Sat, 29 Jul 2023 19:16:53 +0200
|
||||
Subject: [PATCH 2/4] cmake/bson: refact system import
|
||||
|
||||
---
|
||||
cmake/ImportBSON.cmake | 43 +++++++++++++++++++++++++-----------------
|
||||
1 file changed, 26 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/cmake/ImportBSON.cmake b/cmake/ImportBSON.cmake
|
||||
index f168681ff..18e5d58fc 100644
|
||||
--- a/cmake/ImportBSON.cmake
|
||||
+++ b/cmake/ImportBSON.cmake
|
||||
@@ -109,26 +109,35 @@ if (ENABLE_ONLINE_TESTS AND (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM" OR USE_
|
||||
message (FATAL_ERROR "Online tests requires static local build of libbson")
|
||||
endif ()
|
||||
|
||||
+
|
||||
+function (_import_system_libbson target library_type library_name)
|
||||
+ # import a system libbson
|
||||
+ # target: target to add library under
|
||||
@@ -67,9 +37,10 @@ index f168681ff..18e5d58fc 100644
|
||||
+ )
|
||||
+ set_property (CACHE ${lib} _MONGOCRYPT_SYSTEM_LIBBSON_INCLUDE_DIR PROPERTY ADVANCED TRUE)
|
||||
+endfunction ()
|
||||
+
|
||||
|
||||
function (_import_bson)
|
||||
if (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM" AND USE_SHARED_LIBBSON)
|
||||
- if (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM" AND USE_SHARED_LIBBSON AND NOT ENABLE_ONLINE_TESTS)
|
||||
+ if (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM")
|
||||
message (STATUS "NOTE: Using system-wide libbson library. This is intended only for package maintainers.")
|
||||
- find_library (_MONGOCRYPT_SYSTEM_LIBBSON_SHARED "${CMAKE_SHARED_LIBRARY_PREFIX}bson-1.0${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
- find_library (_MONGOCRYPT_SYSTEM_LIBBSON_STATIC "${CMAKE_STATIC_LIBRARY_PREFIX}bson-static-1.0${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
@@ -88,28 +59,17 @@ index f168681ff..18e5d58fc 100644
|
||||
- PROPERTY ADVANCED
|
||||
- TRUE
|
||||
- )
|
||||
+ if (USE_SHARED_LIBBSON)
|
||||
+ _import_system_libbson (bson_shared SHARED "${CMAKE_SHARED_LIBRARY_PREFIX}bson-1.0${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
+ else ()
|
||||
+ _import_system_libbson (bson_static STATIC "${CMAKE_STATIC_LIBRARY_PREFIX}bson-static-1.0${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
+ endif ()
|
||||
else ()
|
||||
message (STATUS "Using [${MONGOCRYPT_MONGOC_DIR}] as a sub-project for libbson")
|
||||
# Disable AWS_AUTH, to prevent it from building the kms-message symbols, which we build ourselves
|
||||
|
||||
From 1b7ba197aabb35384e3eb80476e0f4584cce2c71 Mon Sep 17 00:00:00 2001
|
||||
From: tharvik <tharvik@users.noreply.github.com>
|
||||
Date: Sat, 29 Jul 2023 20:09:10 +0200
|
||||
Subject: [PATCH 3/4] cmake/bson: install static iff not system
|
||||
|
||||
---
|
||||
cmake/ImportBSON.cmake | 40 ++++++++++++++++++++--------------------
|
||||
1 file changed, 20 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/cmake/ImportBSON.cmake b/cmake/ImportBSON.cmake
|
||||
index 18e5d58fc..afc784826 100644
|
||||
--- a/cmake/ImportBSON.cmake
|
||||
+++ b/cmake/ImportBSON.cmake
|
||||
@@ -161,6 +161,26 @@ function (_import_bson)
|
||||
else ()
|
||||
add_subdirectory ("${MONGOCRYPT_MONGOC_DIR}" _mongo-c-driver EXCLUDE_FROM_ALL)
|
||||
@@ -172,6 +187,26 @@ function (_import_bson)
|
||||
if (DEFINED saved_build_version)
|
||||
set (BUILD_VERSION "${saved_build_version}")
|
||||
endif ()
|
||||
+
|
||||
+ # Put the libbson dynamic library into the current binary directory (plus possible config suffix).
|
||||
@@ -134,7 +94,19 @@ index 18e5d58fc..afc784826 100644
|
||||
if (TARGET mongoc_static)
|
||||
# Workaround: Embedded mongoc_static does not set its INCLUDE_DIRECTORIES for user targets
|
||||
target_include_directories (mongoc_static
|
||||
@@ -201,23 +221,3 @@ if (TARGET mongoc_static)
|
||||
@@ -202,33 +237,13 @@ install (
|
||||
# users during find_package()
|
||||
if (USE_SHARED_LIBBSON)
|
||||
target_link_libraries (_mongocrypt-libbson_for_shared INTERFACE $<BUILD_INTERFACE:bson_shared>)
|
||||
+ target_link_libraries (_mongocrypt-libbson_for_static INTERFACE $<BUILD_INTERFACE:bson_shared>)
|
||||
else ()
|
||||
target_link_libraries (_mongocrypt-libbson_for_shared INTERFACE $<BUILD_INTERFACE:bson_static>)
|
||||
+ target_link_libraries (_mongocrypt-libbson_for_static INTERFACE $<BUILD_INTERFACE:bson_static>)
|
||||
endif ()
|
||||
-# libbson_for_static always links to the static libbson:
|
||||
-target_link_libraries (_mongocrypt-libbson_for_static INTERFACE $<BUILD_INTERFACE:bson_static>)
|
||||
|
||||
if (TARGET mongoc_static)
|
||||
# And an alias to the mongoc target for use in some test cases
|
||||
add_library (_mongocrypt::mongoc ALIAS mongoc_static)
|
||||
endif ()
|
||||
@@ -158,48 +130,3 @@ index 18e5d58fc..afc784826 100644
|
||||
- RENAME ${CMAKE_STATIC_LIBRARY_PREFIX}bson-static-for-libmongocrypt${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
- )
|
||||
-endif ()
|
||||
|
||||
From 70c6d9cfbfa7608428391b6d796337d5e8abde14 Mon Sep 17 00:00:00 2001
|
||||
From: tharvik <tharvik@users.noreply.github.com>
|
||||
Date: Sat, 29 Jul 2023 23:05:26 +0200
|
||||
Subject: [PATCH 4/4] cmake/bson: only load needed system lib
|
||||
|
||||
---
|
||||
cmake/ImportBSON.cmake | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/cmake/ImportBSON.cmake b/cmake/ImportBSON.cmake
|
||||
index afc784826..672034082 100644
|
||||
--- a/cmake/ImportBSON.cmake
|
||||
+++ b/cmake/ImportBSON.cmake
|
||||
@@ -134,10 +134,13 @@ function (_import_system_libbson target library_type library_name)
|
||||
endfunction ()
|
||||
|
||||
function (_import_bson)
|
||||
- if (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM" AND USE_SHARED_LIBBSON)
|
||||
+ if (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM")
|
||||
message (STATUS "NOTE: Using system-wide libbson library. This is intended only for package maintainers.")
|
||||
- _import_system_libbson(bson_shared SHARED "${CMAKE_SHARED_LIBRARY_PREFIX}bson-1.0${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
- _import_system_libbson(bson_static STATIC "${CMAKE_STATIC_LIBRARY_PREFIX}bson-static-1.0${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
+ if (USE_SHARED_LIBBSON)
|
||||
+ _import_system_libbson (bson_shared SHARED "${CMAKE_SHARED_LIBRARY_PREFIX}bson-1.0${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
+ else ()
|
||||
+ _import_system_libbson (bson_static STATIC "${CMAKE_STATIC_LIBRARY_PREFIX}bson-static-1.0${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
+ endif ()
|
||||
else ()
|
||||
message (STATUS "Using [${MONGOCRYPT_MONGOC_DIR}] as a sub-project for libbson")
|
||||
# Disable AWS_AUTH, to prevent it from building the kms-message symbols, which we build ourselves
|
||||
@@ -211,11 +214,11 @@ install (
|
||||
# users during find_package()
|
||||
if (USE_SHARED_LIBBSON)
|
||||
target_link_libraries (_mongocrypt-libbson_for_shared INTERFACE $<BUILD_INTERFACE:bson_shared>)
|
||||
+ target_link_libraries (_mongocrypt-libbson_for_static INTERFACE $<BUILD_INTERFACE:bson_shared>)
|
||||
else ()
|
||||
target_link_libraries (_mongocrypt-libbson_for_shared INTERFACE $<BUILD_INTERFACE:bson_static>)
|
||||
+ target_link_libraries (_mongocrypt-libbson_for_static INTERFACE $<BUILD_INTERFACE:bson_static>)
|
||||
endif ()
|
||||
-# libbson_for_static always links to the static libbson:
|
||||
-target_link_libraries (_mongocrypt-libbson_for_static INTERFACE $<BUILD_INTERFACE:bson_static>)
|
||||
|
||||
if (TARGET mongoc_static)
|
||||
# And an alias to the mongoc target for use in some test cases
|
||||
@@ -25,7 +25,8 @@ DEPEND="${RDEPEND}
|
||||
)"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.11.0-static.patch"
|
||||
"${FILESDIR}/${PN}-1.15.2-static.patch"
|
||||
"${FILESDIR}/${PN}-1.15.2-cmake4.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
Reference in New Issue
Block a user