guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.
commit cae3f669de71d2b060da7dec79147edb2419b00d
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Thu Oct 1 13:47:22 2026 +0900
gnu: lmdbxx: Update to 1.0.2.
* gnu/packages/databases.scm (lmdbxx): Update to 1.0.2.
[source]: Apply patch.
[arguments]: Use gexps.
[inputs]: Replace lmdb-0 with lmdb.
* gnu/packages/patches/lmdbxx-lmdb-1.0.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Signed-off-by: Liliana Marie Prikler <[email protected]>
---
gnu/local.mk | 1 +
gnu/packages/databases.scm | 19 ++++----
gnu/packages/patches/lmdbxx-lmdb-1.0.patch | 77 ++++++++++++++++++++++++++++++
3 files changed, 87 insertions(+), 10 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 023d02b7ef8..7ed880a1b60 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1900,6 +1900,7 @@ dist_patch_DATA =
\
%D%/packages/patches/llvm-13-gcc-14.patch \
%D%/packages/patches/llvm-22-cfloat128-detection.patch \
%D%/packages/patches/lm-sensors-hwmon-attrs.patch \
+ %D%/packages/patches/lmdbxx-lmdb-1.0.patch \
%D%/packages/patches/lsof-fatal-test-failures.patch \
%D%/packages/patches/lua-CVE-2014-5461.patch \
%D%/packages/patches/lua-pkgconfig.patch \
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index db4c41989cd..528757dd0f4 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3912,24 +3912,23 @@ virtual address space — not physical RAM.")
(define-public lmdbxx
(package
(name "lmdbxx")
- (version "1.0.0")
+ (version "1.0.2")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/hoytech/lmdbxx")
- (commit version)))
+ (url "https://github.com/hoytech/lmdbxx")
+ (commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "12k5rz74d1l0skcks9apry1svkl96g9lf5dcgylgjmh7v1jm0b7c"))))
+ (base32 "10avwrz8jm1ci3y4qy1nzi3pv8x3ns20ym8g67gadcsqzxx1gkyi"))
+ (patches (search-patches "lmdbxx-lmdb-1.0.patch"))))
(arguments
- `(#:make-flags
- (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (delete 'configure))))
+ (list #:make-flags #~(list (string-append "PREFIX=" #$output))
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure))))
(build-system gnu-build-system)
- (inputs (list lmdb-0)) ;see <https://github.com/hoytech/lmdbxx/issues/18>
+ (inputs (list lmdb))
(home-page "https://github.com/hoytech/lmdbxx")
(synopsis "C++11 wrapper for the LMDB embedded B+ tree database library")
(description "@code{lmdbxx} is a comprehensive @code{C++} wrapper for the
diff --git a/gnu/packages/patches/lmdbxx-lmdb-1.0.patch
b/gnu/packages/patches/lmdbxx-lmdb-1.0.patch
new file mode 100644
index 00000000000..47c9c3c64bf
--- /dev/null
+++ b/gnu/packages/patches/lmdbxx-lmdb-1.0.patch
@@ -0,0 +1,77 @@
+From 040fca238fd381971fbad088db408943d32f8de3 Mon Sep 17 00:00:00 2001
+From: Doug Hoyte <[email protected]>
+Date: Thu, 1 Oct 2026 09:42:33 -0400
+Subject: [PATCH] update test suite for LMDB 1.0
+
+---
+ check.cc | 30 +++++++++++++++++++++++++++---
+ 1 file changed, 27 insertions(+), 3 deletions(-)
+
+diff --git a/check.cc b/check.cc
+index 133fd25..e625dbb 100644
+--- a/check.cc
++++ b/check.cc
+@@ -8,6 +8,12 @@
+
+
+ int main() {
++ std::cerr << "\n-----------------------------------------------------" <<
std::endl;
++ std::cerr << "lmdbxx test suite: https://github.com/hoytech/lmdbxx"<<
std::endl;
++ std::cerr << "LMDB version: " << MDB_VERSION_STRING << std::endl;
++ std::cerr << "-----------------------------------------------------\n" <<
std::endl;
++
++
+ unsigned int envFlags = 0;
+
+ #ifdef __OpenBSD__
+@@ -75,7 +81,16 @@ int main() {
+ std::string_view key, val;
+
+ if (!cursor.get(key, val, MDB_FIRST)) throw
std::runtime_error("emptyDb cursor err 1");
+- if (key != "mydb") throw std::runtime_error("emptyDb cursor err 2");
++
++ std::string dbName;
++ #if MDB_VERSION_MAJOR >= 1
++ // As of LMDB 1.0, db names are NUL terminated
++ dbName = std::string("mydb", 5);
++ #else
++ dbName = "mydb";
++ #endif
++
++ if (key != dbName) throw std::runtime_error("emptyDb cursor err 2");
+
+ if (cursor.get(key, val, MDB_NEXT)) throw std::runtime_error("emptyDb
cursor err 3");
+
+@@ -316,7 +331,15 @@ int main() {
+ caught = true;
+ }
+
+- if (!caught) throw std::runtime_error("bad nested tx 2.1");
++ bool expectedException;
++ #if MDB_VERSION_MAJOR >= 1
++ // This is possible in LMDB 1.0, but not prior
++ expectedException = false;
++ #else
++ expectedException = true;
++ #endif
++
++ if (caught != expectedException) throw std::runtime_error("bad
nested tx 2.1");
+ }
+
+ txn.commit();
+@@ -371,7 +394,7 @@ int main() {
+ txn.commit();
+ }
+ }
+- catch (const lmdb::error& error) {
++ catch (const std::exception &error) {
+ std::cerr << "Failed with error: " << error.what() << std::endl;
+ return 1;
+ }
+@@ -423,5 +446,6 @@ int main() {
+ }
+ }
+
++ std::cout << "Success." << std::endl;
+ return 0;
+ }