gnu: icecat: Update to 78.10.0-guix0-preview1 [security fixes].
[jackhill/guix/guix.git] / gnu / packages / dbm.scm
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>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
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.
15 ;;;
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.
20 ;;;
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/>.
23
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))
31
32 ;;; Commentary:
33 ;;;
34 ;;; This module has been separated from (gnu packages databases) to reduce the
35 ;;; number of module references for core packages.
36
37 (define-public bdb-4.8
38 (package
39 (name "bdb")
40 (version "4.8.30")
41 (license (license:non-copyleft "file://LICENSE"
42 "See LICENSE in the distribution."))
43 (source (origin
44 (method url-fetch)
45 (uri (string-append "https://download.oracle.com/berkeley-db/db-"
46 version ".tar.gz"))
47 (sha256
48 (base32
49 "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"))))
50 (build-system gnu-build-system)
51 (outputs '("out" ; programs, libraries, headers
52 "doc")) ; 94 MiB of HTML docs
53 (arguments
54 `(#:tests? #f ; no check target available
55 #:disallowed-references ("doc")
56 #:phases
57 (modify-phases %standard-phases
58 (replace 'configure
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")))
66
67 (chdir "build_unix")
68 (invoke "../dist/configure"
69 (string-append "--prefix=" out)
70 (string-append "CONFIG_SHELL=" (which "bash"))
71 (string-append "SHELL=" (which "bash"))
72
73 ;; Bdb doesn't recognize aarch64 as an architecture.
74 ,@(if (string=? "aarch64-linux" (%current-system))
75 '("--build=aarch64-unknown-linux-gnu")
76 '())
77
78 ;; Bdb doesn't recognize powerpc64le as an architecture.
79 ,@(if (string=? "powerpc64le-linux" (%current-system))
80 '("--build=powerpc64le-unknown-linux-gnu")
81 '())
82
83 ,@(if (%current-target-system) ; cross building
84 '((string-append "--host=" target))
85 '())
86
87 ;; Remove 7 MiB of .a files.
88 "--disable-static"
89
90 ;; The compatibility mode is needed by some packages,
91 ;; notably iproute2.
92 "--enable-compat185"
93
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.
97 "--enable-cxx")))))))
98 (synopsis "Berkeley database")
99 (description
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.
104 (home-page
105 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
106
107 (define-public bdb-5.3
108 (package (inherit bdb-4.8)
109 (name "bdb")
110 (version "5.3.28")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "https://download.oracle.com/berkeley-db/db-"
114 version ".tar.gz"))
115 (sha256
116 (base32
117 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))
118
119 (define-public bdb-6
120 (package (inherit bdb-4.8)
121 (name "bdb")
122 (version "6.2.32")
123 (source (origin
124 (method url-fetch)
125 (uri (string-append "https://download.oracle.com/berkeley-db/db-"
126 version ".tar.gz"))
127 (sha256
128 (base32
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))))
133
134 (define-public bdb bdb-6)
135
136 (define-public gdbm
137 (package
138 (name "gdbm")
139 (version "1.18.1")
140 (source (origin
141 (method url-fetch)
142 (uri (string-append "mirror://gnu/gdbm/gdbm-"
143 version ".tar.gz"))
144 (sha256
145 (base32
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")
151 (synopsis
152 "Hash library of database functions compatible with traditional dbm")
153 (description
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+)))