1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
6 ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
7 ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages dbm)
25 #:use-module (gnu packages)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix utils))
34 ;;; This module has been separated from (gnu packages databases) to reduce the
35 ;;; number of module references for core packages.
37 (define-public bdb-4.8
41 (license (license:non-copyleft "file://LICENSE"
42 "See LICENSE in the distribution."))
45 (uri (string-append "https://download.oracle.com/berkeley-db/db-"
49 "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"))))
50 (build-system gnu-build-system)
51 (outputs '("out" ; programs, libraries, headers
52 "doc")) ; 94 MiB of HTML docs
54 `(#:tests? #f ; no check target available
55 #:disallowed-references ("doc")
57 (modify-phases %standard-phases
59 (lambda* (#:key target outputs #:allow-other-keys)
60 (let ((out (assoc-ref outputs "out"))
61 (doc (assoc-ref outputs "doc")))
62 ;; '--docdir' is not honored, so we need to patch.
63 (substitute* "dist/Makefile.in"
64 (("docdir[[:blank:]]*=.*")
65 (string-append "docdir = " doc "/share/doc/bdb")))
68 (invoke "../dist/configure"
69 (string-append "--prefix=" out)
70 (string-append "CONFIG_SHELL=" (which "bash"))
71 (string-append "SHELL=" (which "bash"))
73 ;; Bdb doesn't recognize aarch64 as an architecture.
74 ,@(if (string=? "aarch64-linux" (%current-system))
75 '("--build=aarch64-unknown-linux-gnu")
78 ;; Bdb doesn't recognize powerpc64le as an architecture.
79 ,@(if (string=? "powerpc64le-linux" (%current-system))
80 '("--build=powerpc64le-unknown-linux-gnu")
83 ,@(if (%current-target-system) ; cross building
84 '((string-append "--host=" target))
87 ;; Remove 7 MiB of .a files.
90 ;; The compatibility mode is needed by some packages,
94 ;; The following flag is needed so that the inclusion
95 ;; of db_cxx.h into C++ files works; it leads to
96 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
98 (synopsis "Berkeley database")
100 "Berkeley DB is an embeddable database allowing developers the choice of
101 SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
102 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
103 ;; files are covered by the 3-clause BSD license.
105 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
107 (define-public bdb-5.3
108 (package (inherit bdb-4.8)
113 (uri (string-append "https://download.oracle.com/berkeley-db/db-"
117 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))
120 (package (inherit bdb-4.8)
125 (uri (string-append "https://download.oracle.com/berkeley-db/db-"
129 "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9"))))
130 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
131 ;; files are covered by the 3-clause BSD license.
132 (license (list license:agpl3+ license:bsd-3))))
134 (define-public bdb bdb-6)
142 (uri (string-append "mirror://gnu/gdbm/gdbm-"
146 "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6"))))
147 (arguments `(#:configure-flags '("--enable-libgdbm-compat"
148 "--disable-static")))
149 (build-system gnu-build-system)
150 (home-page "http://www.gnu.org.ua/software/gdbm")
152 "Hash library of database functions compatible with traditional dbm")
154 "GDBM is a library for manipulating hashed databases. It is used to
155 store key/value pairs in a file in a manner similar to the Unix dbm library
156 and provides interfaces to the traditional file format.")
157 (license license:gpl3+)))