summaryrefslogtreecommitdiff
path: root/gnu/packages/dbm.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/dbm.scm')
-rw-r--r--gnu/packages/dbm.scm60
1 files changed, 44 insertions, 16 deletions
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index fcef907b27..8b6804aa92 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -1,10 +1,12 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2016, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,11 +25,13 @@
(define-module (gnu packages dbm)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
- #:use-module (guix utils))
+ #:use-module (guix utils)
+ #:use-module (ice-9 match))
;;; Commentary:
;;;
@@ -46,7 +50,8 @@
version ".tar.gz"))
(sha256
(base32
- "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"))))
+ "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"))
+ (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch"))))
(build-system gnu-build-system)
(outputs '("out" ; programs, libraries, headers
"doc")) ; 94 MiB of HTML docs
@@ -55,6 +60,19 @@
#:disallowed-references ("doc")
#:phases
(modify-phases %standard-phases
+ ;; The configure script is too old to recognise aarch64 and
+ ;; powerpc64le as valid architectures. The trick below works
+ ;; for "--build", but not for "--host", so update config.sub.
+ ,@(if (and (%current-target-system)
+ (or (target-ppc64le? (%current-target-system))
+ (target-aarch64? (%current-target-system))))
+ `((add-after 'unpack 'update-config.sub
+ (lambda* (#:key native-inputs #:allow-other-keys)
+ (delete-file "dist/config.sub")
+ (symlink
+ (search-input-file native-inputs "/bin/config.sub")
+ "dist/config.sub"))))
+ '())
(replace 'configure
(lambda* (#:key target outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
@@ -70,15 +88,17 @@
(string-append "CONFIG_SHELL=" (which "bash"))
(string-append "SHELL=" (which "bash"))
- ;; Bdb doesn't recognize aarch64 as an architecture.
- ,@(if (string=? "aarch64-linux" (%current-system))
- '("--build=aarch64-unknown-linux-gnu")
- '())
-
- ;; Bdb doesn't recognize powerpc64le as an architecture.
- ,@(if (string=? "powerpc64le-linux" (%current-system))
- '("--build=powerpc64le-unknown-linux-gnu")
- '())
+ ;; Bdb's config script doesn't recognize very many
+ ;; architectures, and is a dependant on the 'config'
+ ;; package, so we manually define the build target.
+ ,@(match (%current-system)
+ ("aarch64-linux"
+ '("--build=aarch64-unknown-linux-gnu"))
+ ("powerpc64le-linux"
+ '("--build=powerpc64le-unknown-linux-gnu"))
+ ("riscv64-linux"
+ '("--build=riscv64-unknown-linux-gnu"))
+ (_ '()))
,@(if (%current-target-system) ; cross building
'((string-append "--host=" target))
@@ -95,6 +115,12 @@
;; of db_cxx.h into C++ files works; it leads to
;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
"--enable-cxx")))))))
+ (native-inputs
+ (if (and (%current-target-system)
+ (or (target-ppc64le? (%current-target-system))
+ (target-aarch64? (%current-target-system))))
+ `(("config" ,config)) ; for config.sub
+ '()))
(synopsis "Berkeley database")
(description
"Berkeley DB is an embeddable database allowing developers the choice of
@@ -114,7 +140,9 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
version ".tar.gz"))
(sha256
(base32
- "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))
+ "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))
+ (patch-flags '("-p0"))
+ (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch"))))))
(define-public bdb-6
(package (inherit bdb-4.8)
@@ -136,14 +164,14 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
(define-public gdbm
(package
(name "gdbm")
- (version "1.18.1")
+ (version "1.20")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gdbm/gdbm-"
version ".tar.gz"))
(sha256
(base32
- "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6"))))
+ "14m22j0zndd42yc0ps0bcnnjj2iq7agnp66sl882lj5k91bc1sis"))))
(arguments `(#:configure-flags '("--enable-libgdbm-compat"
"--disable-static")))
(build-system gnu-build-system)