summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rodriguez Reboredo2023-05-27 17:29:17 -0300
committerMartin Rodriguez Reboredo2023-05-27 17:29:17 -0300
commitaea238c4c305453ca36ed251f4668eda17fb47f7 (patch)
tree1e7ace907878b1ac72afe95f9ad9c3842b0dc151
parent9d40c7a5ce8274f6700aa9a6601cba470666f8a5 (diff)
downloadaur-aea238c4c305453ca36ed251f4668eda17fb47f7.tar.gz
Update to 1.8.1
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD25
-rw-r--r--shared-libbson.patch79
3 files changed, 87 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e464806a2ad7..08cbd79d48c4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
pkgbase = libmongocrypt
pkgdesc = C library for client side and queryable encryption in MongoDB
- pkgver = 1.7.2
+ pkgver = 1.8.1
pkgrel = 1
- url = https://docs.mongodb.com/mongodb-shell/
+ url = https://github.com/mongodb/libmongocrypt
arch = x86_64
license = Apache
license = BSD
makedepends = cmake
depends = libbson
- source = https://github.com/mongodb/libmongocrypt/archive/refs/tags/1.7.2.tar.gz
+ provides = libkms_message.so
+ provides = libmongocrypt.so
+ source = https://github.com/mongodb/libmongocrypt/archive/refs/tags/1.8.1.tar.gz
source = shared-libbson.patch
- sha256sums = 451d991747a34a06eb0534cb6ec5d486a05c1bd607e66ca5597da170e569cde9
- sha256sums = 7d07b7f86d7c868e17d1c954d11aadd67e4c1f18455d029ee4afd0e0d132f841
+ sha256sums = 068a677d3716ac89d730223c1758f041d840eb3363f0521b9969a02bb3a0f977
+ sha256sums = 11dc755ae4560c51f8fad642bb04c8693835e2f2170ab74b18816a04c42c4d55
pkgname = libmongocrypt
diff --git a/PKGBUILD b/PKGBUILD
index 60f4e677005b..744d543a75d8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,34 @@
# Maintainer: Martin Reboredo <yakoyoku@gmail.com>
pkgname=libmongocrypt
-pkgver=1.7.2
+pkgver=1.8.1
pkgrel=1
pkgdesc='C library for client side and queryable encryption in MongoDB'
arch=('x86_64')
-url='https://docs.mongodb.com/mongodb-shell/'
+url='https://github.com/mongodb/libmongocrypt'
license=('Apache' 'BSD')
+provides=(
+ libkms_message.so
+ libmongocrypt.so
+)
depends=(libbson)
makedepends=(cmake)
source=(
https://github.com/mongodb/$pkgname/archive/refs/tags/$pkgver.tar.gz
shared-libbson.patch
)
-sha256sums=('451d991747a34a06eb0534cb6ec5d486a05c1bd607e66ca5597da170e569cde9'
- '7d07b7f86d7c868e17d1c954d11aadd67e4c1f18455d029ee4afd0e0d132f841')
+sha256sums=('068a677d3716ac89d730223c1758f041d840eb3363f0521b9969a02bb3a0f977'
+ '11dc755ae4560c51f8fad642bb04c8693835e2f2170ab74b18816a04c42c4d55')
prepare() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$srcdir"/$pkgbase-$pkgver
- # patch -Np1 -i ../shared-libbson.patch
- sed -i 's/\(libbson_for_\)static/\1shared/' CMakeLists.txt
+ patch -Np1 -i ../shared-libbson.patch
+ # sed -i 's/\(libbson_for_\)static/\1shared/' CMakeLists.txt
}
build() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$srcdir"/$pkgbase-$pkgver
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
@@ -40,10 +44,9 @@ build() {
}
package() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$srcdir"/$pkgbase-$pkgver
DESTDIR="$pkgdir" cmake --install build
- ln -s libmongocrypt.so "$pkgdir"/usr/lib/mongosh_crypt_v1.so
- install -Dm0644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
diff --git a/shared-libbson.patch b/shared-libbson.patch
index f202d2a895cf..534a666eae04 100644
--- a/shared-libbson.patch
+++ b/shared-libbson.patch
@@ -1,20 +1,73 @@
---- a/cmake/ImportBSON.cmake
-+++ b/cmake/ImportBSON.cmake
-@@ -110,16 +110,13 @@ function (_import_bson)
- if (MONGOCRYPT_MONGOC_DIR STREQUAL "USE-SYSTEM" AND USE_SHARED_LIBBSON AND NOT ENABLE_ONLINE_TESTS)
- 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}")
- find_path (_MONGOCRYPT_SYSTEM_LIBBSON_INCLUDE_DIR bson/bson.h PATH_SUFFIXES libbson-1.0)
- add_library (bson_shared SHARED IMPORTED)
-- add_library (bson_static STATIC IMPORTED)
-- set_target_properties (bson_shared bson_static PROPERTIES
-+ set_target_properties (bson_shared PROPERTIES
- IMPORTED_CONFIGURATIONS "Release"
+diff -up libmongocrypt-1.5.1/cmake/ImportBSON.cmake.old libmongocrypt-1.5.1/cmake/ImportBSON.cmake
+--- libmongocrypt-1.5.1/cmake/ImportBSON.cmake.old 2022-07-18 10:20:53.120630885 +0200
++++ libmongocrypt-1.5.1/cmake/ImportBSON.cmake 2022-07-18 10:38:05.240337632 +0200
+@@ -160,21 +160,25 @@ add_library (_mongocrypt-libbson_for_sta
+ add_library (_mongocrypt-libbson_for_shared INTERFACE)
+ add_library (_mongocrypt::libbson_for_static ALIAS _mongocrypt-libbson_for_static)
+ add_library (_mongocrypt::libbson_for_shared ALIAS _mongocrypt-libbson_for_shared)
+-install (
+- TARGETS _mongocrypt-libbson_for_static _mongocrypt-libbson_for_shared
+- EXPORT mongocrypt_targets
+-)
+
+ # Link to the requested libbson, only exporting that usage for the local build tree.
+ # The mongocrypt-config file will later add the appropriate link library for downstream
+ # 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>)
++ install (
++ TARGETS _mongocrypt-libbson_for_shared
++ EXPORT mongocrypt_targets
++ )
+ 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>)
++ install (
++ TARGETS _mongocrypt-libbson_for_static _mongocrypt-libbson_for_shared
++ EXPORT mongocrypt_targets
++ )
+ 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
+diff -up libmongocrypt-1.5.1/cmake/mongocrypt-config.cmake.old libmongocrypt-1.5.1/cmake/mongocrypt-config.cmake
+--- libmongocrypt-1.5.1/cmake/mongocrypt-config.cmake.old 2022-07-18 10:29:21.516993829 +0200
++++ libmongocrypt-1.5.1/cmake/mongocrypt-config.cmake 2022-07-18 10:31:39.591821061 +0200
+@@ -2,14 +2,6 @@ include(CMakeFindDependencyMacro)
+ find_dependency(kms_message 0.0.1)
+ include("${CMAKE_CURRENT_LIST_DIR}/mongocrypt_targets.cmake")
+
+-if (DEFINED MONGOCRYPT_LIBBSON_STATIC_USE)
+- # The user has named a library that should be linked as the static libbson library
+- set_property (
+- TARGET mongo::_mongocrypt-libbson_for_static
+- APPEND PROPERTY INTERFACE_LINK_LIBRARIES "$<LINK_ONLY:${MONGOCRYPT_LIBBSON_STATIC_USE}>"
+- )
+-endif ()
+-
+
+ # BOOL: Whether the libmongocrypt dynamic library in this package needs to link to an external libbson.
+ # In the default configuration, the shared lib will include the TUs for a pinned version of libbson
+@@ -19,7 +11,7 @@ endif ()
+ # libmongocrypt dynamic library will contain pending references to libbson symbols that will
+ # need to be resolved before the library can be used.
+ #
+-# (Note: static libmongocrypt *always* needs to link against an external libbson, as it does not
++# (Note: libmongocrypt *always* needs to link against an external libbson, as it does not
+ # embed the libbson symbols.)
+ set (_using_shared_libbson "@USE_SHARED_LIBBSON@")
+
+--- libmongocrypt-1.7.0/cmake/ImportBSON.cmake.old 2023-01-27 09:44:33.602270081 +0100
++++ libmongocrypt-1.7.0/cmake/ImportBSON.cmake 2023-01-27 09:44:40.931242458 +0100
+@@ -119,7 +119,7 @@
INTERFACE_INCLUDE_DIRECTORIES "${_MONGOCRYPT_SYSTEM_LIBBSON_INCLUDE_DIR}"
)
set_property (TARGET bson_shared PROPERTY IMPORTED_LOCATION "${_MONGOCRYPT_SYSTEM_LIBBSON_SHARED}")
- set_property (TARGET bson_static PROPERTY IMPORTED_LOCATION "${_MONGOCRYPT_SYSTEM_LIBBSON_STATIC}")
++ set_property (TARGET bson_static PROPERTY IMPORTED_LOCATION "${_MONGOCRYPT_SYSTEM_LIBBSON_SHARED}")
set_property (
CACHE _MONGOCRYPT_SYSTEM_LIBBSON_SHARED
_MONGOCRYPT_SYSTEM_LIBBSON_INCLUDE_DIR