gnu: emacs-ox-pandoc: Use pandoc instead of ghc-pandoc.
[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 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-4.8
37 (package
38 (name "bdb")
39 (version "4.8.30")
40 (license (license:non-copyleft "file://LICENSE"
41 "See LICENSE in the distribution."))
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
45 version ".tar.gz"))
46 (sha256
47 (base32
48 "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"))))
49 (build-system gnu-build-system)
50 (outputs '("out" ; programs, libraries, headers
51 "doc")) ; 94 MiB of HTML docs
52 (arguments
53 `(#:tests? #f ; no check target available
54 #:disallowed-references ("doc")
55 #:phases
56 (modify-phases %standard-phases
57 (replace 'configure
58 (lambda* (#:key target outputs #:allow-other-keys)
59 (let ((out (assoc-ref outputs "out"))
60 (doc (assoc-ref outputs "doc")))
61 ;; '--docdir' is not honored, so we need to patch.
62 (substitute* "dist/Makefile.in"
63 (("docdir[[:blank:]]*=.*")
64 (string-append "docdir = " doc "/share/doc/bdb")))
65
66 (chdir "build_unix")
67 (invoke "../dist/configure"
68 (string-append "--prefix=" out)
69 (string-append "CONFIG_SHELL=" (which "bash"))
70 (string-append "SHELL=" (which "bash"))
71
72 ;; Bdb doesn't recognize aarch64 as an architecture.
73 ,@(if (string=? "aarch64-linux" (%current-system))
74 '("--build=aarch64-unknown-linux-gnu")
75 '())
76
77 ,@(if (%current-target-system) ; cross building
78 '((string-append "--host=" target))
79 '())
80
81 ;; Remove 7 MiB of .a files.
82 "--disable-static"
83
84 ;; The compatibility mode is needed by some packages,
85 ;; notably iproute2.
86 "--enable-compat185"
87
88 ;; The following flag is needed so that the inclusion
89 ;; of db_cxx.h into C++ files works; it leads to
90 ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
91 "--enable-cxx")))))))
92 (synopsis "Berkeley database")
93 (description
94 "Berkeley DB is an embeddable database allowing developers the choice of
95 SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
96 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
97 ;; files are covered by the 3-clause BSD license.
98 (home-page
99 "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")))
100
101 (define-public bdb-5.3
102 (package (inherit bdb-4.8)
103 (name "bdb")
104 (version "5.3.28")
105 (source (origin
106 (method url-fetch)
107 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
108 version ".tar.gz"))
109 (sha256
110 (base32
111 "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))
112
113 (define-public bdb-6
114 (package (inherit bdb-4.8)
115 (name "bdb")
116 (version "6.2.32")
117 (source (origin
118 (method url-fetch)
119 (uri (string-append "http://download.oracle.com/berkeley-db/db-"
120 version ".tar.gz"))
121 (sha256
122 (base32
123 "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9"))))
124 ;; Starting with version 6, BDB is distributed under AGPL3. Many individual
125 ;; files are covered by the 3-clause BSD license.
126 (license (list license:agpl3+ license:bsd-3))))
127
128 (define-public bdb bdb-6)
129
130 (define-public gdbm
131 (package
132 (name "gdbm")
133 (version "1.18.1")
134 (source (origin
135 (method url-fetch)
136 (uri (string-append "mirror://gnu/gdbm/gdbm-"
137 version ".tar.gz"))
138 (sha256
139 (base32
140 "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6"))))
141 (arguments `(#:configure-flags '("--enable-libgdbm-compat"
142 "--disable-static")))
143 (build-system gnu-build-system)
144 (home-page "http://www.gnu.org.ua/software/gdbm")
145 (synopsis
146 "Hash library of database functions compatible with traditional dbm")
147 (description
148 "GDBM is a library for manipulating hashed databases. It is used to
149 store key/value pairs in a file in a manner similar to the Unix dbm library
150 and provides interfaces to the traditional file format.")
151 (license license:gpl3+)))