gnu: weechat: update to 2.5
[jackhill/guix/guix.git] / gnu / packages / dbm.scm
CommitLineData
255d1bbe
RW
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 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;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages dbm)
24 #:use-module (gnu packages)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix utils))
30
31;;; Commentary:
32;;;
33;;; This module has been separated from (gnu packages databases) to reduce the
34;;; number of module references for core packages.
35
36(define-public bdb
37 (package
38 (name "bdb")
39 (version "6.2.32")
40 (source (origin
41 (method url-fetch)
42 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
43 version ".tar.gz"))
44 (sha256
45 (base32
46 "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9"))))
47 (build-system gnu-build-system)
48 (outputs '("out" ; programs, libraries, headers
49 "doc")) ; 94 MiB of HTML docs
50 (arguments
51 '(#:tests? #f ; no check target available
52 #:disallowed-references ("doc")
53 #:phases
54 (modify-phases %standard-phases
55 (replace 'configure
56 (lambda* (#:key outputs #:allow-other-keys)
57 (let ((out (assoc-ref outputs "out"))
58 (doc (assoc-ref outputs "doc")))
59 ;; '--docdir' is not honored, so we need to patch.
60 (substitute* "dist/Makefile.in"
61 (("docdir[[:blank:]]*=.*")
62 (string-append "docdir = " doc "/share/doc/bdb")))
63
64 (invoke "./dist/configure"
65 (string-append "--prefix=" out)
66 (string-append "CONFIG_SHELL=" (which "bash"))
67 (string-append "SHELL=" (which "bash"))
68
69 ;; Remove 7 MiB of .a files.
70 "--disable-static"
71
72 ;; The compatibility mode is needed by some packages,
73 ;; notably iproute2.
74 "--enable-compat185"
75
76 ;; The following flag is needed so that the inclusion
77 ;; of db_cxx.h into C++ files works; it leads to
78 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
79 "--enable-cxx")))))))
80 (synopsis "Berkeley database")
81 (description
82 "Berkeley DB is an embeddable database allowing developers the choice of
83SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
84 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
85 ;; files are covered by the 3-clause BSD license.
86 (license (list license:agpl3+ license:bsd-3))
87 (home-page
88 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
89
90(define-public bdb-5.3
91 (package (inherit bdb)
92 (name "bdb")
93 (version "5.3.28")
94 (license (license:non-copyleft "file://LICENSE"
95 "See LICENSE in the distribution."))
96 (source (origin
97 (method url-fetch)
98 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
99 version ".tar.gz"))
100 (sha256
101 (base32
102 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))
103 (arguments
104 `(#:tests? #f ; no check target available
105 #:disallowed-references ("doc")
106 #:phases
107 (modify-phases %standard-phases
108 (replace 'configure
109 (lambda* (#:key outputs #:allow-other-keys)
110 (let ((out (assoc-ref outputs "out"))
111 (doc (assoc-ref outputs "doc")))
112 ;; '--docdir' is not honored, so we need to patch.
113 (substitute* "dist/Makefile.in"
114 (("docdir[[:blank:]]*=.*")
115 (string-append "docdir = " doc "/share/doc/bdb")))
116
117 (invoke "./dist/configure"
118 (string-append "--prefix=" out)
119 (string-append "CONFIG_SHELL=" (which "bash"))
120 (string-append "SHELL=" (which "bash"))
121
122 ;; Bdb doesn't recognize aarch64 as an architecture.
123 ,@(if (string=? "aarch64-linux" (%current-system))
124 '("--build=aarch64-unknown-linux-gnu")
125 '())
126
127 ;; Remove 7 MiB of .a files.
128 "--disable-static"
129
130 ;; The compatibility mode is needed by some packages,
131 ;; notably iproute2.
132 "--enable-compat185"
133
134 ;; The following flag is needed so that the inclusion
135 ;; of db_cxx.h into C++ files works; it leads to
136 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
137 "--enable-cxx")))))))))
138
139(define-public gdbm
140 (package
141 (name "gdbm")
142 (version "1.18")
143 (source (origin
144 (method url-fetch)
145 (uri (string-append "mirror://gnu/gdbm/gdbm-"
146 version ".tar.gz"))
147 (sha256
148 (base32
149 "1kimnv12bzjjhaqk4c8w2j6chdj9c6bg21lchaf7abcyfss2r0mq"))))
150 (arguments `(#:configure-flags '("--enable-libgdbm-compat")))
151 (build-system gnu-build-system)
152 (home-page "http://www.gnu.org.ua/software/gdbm")
153 (synopsis
154 "Hash library of database functions compatible with traditional dbm")
155 (description
156 "GDBM is a library for manipulating hashed databases. It is used to
157store key/value pairs in a file in a manner similar to the Unix dbm library
158and provides interfaces to the traditional file format.")
159 (license license:gpl3+)))