| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 |
|
| 29 | (define-module (gnu packages dbm)
|
| 30 | #:use-module (gnu packages)
|
| 31 | #:use-module (gnu packages autotools)
|
| 32 | #:use-module ((guix licenses) #:prefix license:)
|
| 33 | #:use-module (guix packages)
|
| 34 | #:use-module (guix download)
|
| 35 | #:use-module (guix gexp)
|
| 36 | #:use-module (guix build-system gnu)
|
| 37 | #:use-module (guix utils)
|
| 38 | #:use-module (ice-9 match))
|
| 39 |
|
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 |
|
| 45 | (define bdb-snippet
|
| 46 | |
| 47 | |
| 48 | |
| 49 | #~(begin
|
| 50 | (for-each delete-file-recursively
|
| 51 | '("dist/configure"
|
| 52 | "dist/config.sub"
|
| 53 | "dist/config.guess"
|
| 54 | "dist/install-sh"
|
| 55 | "dist/ltmain.sh"
|
| 56 | "dist/aclocal/libtool.m4"
|
| 57 | "dist/aclocal/ltoptions.m4"
|
| 58 | "dist/aclocal/ltsugar.m4"
|
| 59 | "dist/aclocal/ltversion.m4"
|
| 60 | "dist/aclocal/lt~obsolete.m4"))
|
| 61 | (substitute* "dist/configure.ac"
|
| 62 | |
| 63 | (("AC_DEFINE\\(DB_WIN32\\)")
|
| 64 | "AC_DEFINE(DB_WIN32, [], [Description])")
|
| 65 | (("AC_DEFINE\\(HAVE_SYSTEM_INCLUDE_FILES\\)")
|
| 66 | "AC_DEFINE(HAVE_SYSTEM_INCLUDE_FILES, [], [Description])"))))
|
| 67 |
|
| 68 | (define-public bdb-5.3
|
| 69 | (package
|
| 70 | (name "bdb")
|
| 71 | (version "5.3.28")
|
| 72 | (source (origin
|
| 73 | (method url-fetch)
|
| 74 | (uri (string-append "https://download.oracle.com/berkeley-db/db-"
|
| 75 | version ".tar.gz"))
|
| 76 | (sha256
|
| 77 | (base32
|
| 78 | "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))
|
| 79 | (patch-flags '("-p0"))
|
| 80 | (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch"))
|
| 81 | (modules '((guix build utils)
|
| 82 | (srfi srfi-1)))
|
| 83 | (snippet bdb-snippet)))
|
| 84 | (build-system gnu-build-system)
|
| 85 | (outputs '("out" |
| 86 | "doc")) |
| 87 | (arguments
|
| 88 | (list #:tests? #f |
| 89 | #:disallowed-references '("doc")
|
| 90 | #:out-of-source? #true
|
| 91 | #:configure-flags
|
| 92 | #~(list
|
| 93 | #$@(if (target-ppc64le?)
|
| 94 | #~("CFLAGS=-g -O2 -Wno-error=implicit-function-declaration -fpermissive")
|
| 95 | #~("CFLAGS=-g -O2 -Wno-error=implicit-function-declaration"))
|
| 96 | |
| 97 | "--disable-static"
|
| 98 |
|
| 99 | |
| 100 | |
| 101 | "--enable-compat185"
|
| 102 |
|
| 103 | |
| 104 | |
| 105 | |
| 106 | "--enable-cxx")
|
| 107 | #:phases
|
| 108 | #~(modify-phases %standard-phases
|
| 109 | (replace 'bootstrap
|
| 110 | (lambda* (#:key inputs native-inputs outputs
|
| 111 | #:allow-other-keys #:rest arguments)
|
| 112 | (with-directory-excursion "dist"
|
| 113 | (for-each (lambda (x)
|
| 114 | (install-file x "aclocal"))
|
| 115 | (find-files "aclocal_java"))
|
| 116 | (apply (assq-ref %standard-phases 'bootstrap) arguments)
|
| 117 | (let ((automake-files (search-input-directory
|
| 118 | (or native-inputs inputs)
|
| 119 | "share/automake-1.16")))
|
| 120 | (define (replace file)
|
| 121 | (symlink (string-append automake-files "/" file) file))
|
| 122 | (for-each replace '("config.sub" "config.guess"
|
| 123 | "install-sh"))))))
|
| 124 | #$@(if (or (target-arm?)
|
| 125 | (target-riscv64?))
|
| 126 | #~((add-after 'unpack 'bdb-configure-patch
|
| 127 | (lambda _
|
| 128 | (invoke
|
| 129 | "patch" "-p1" "-i"
|
| 130 | #$(local-file
|
| 131 | (search-patch "bdb-4-5-configure.patch"))))))
|
| 132 | #~())
|
| 133 | (add-before 'configure 'pre-configure
|
| 134 | (lambda _
|
| 135 | (chdir "dist")
|
| 136 | |
| 137 | (substitute* "Makefile.in"
|
| 138 | (("docdir[[:blank:]]*=.*")
|
| 139 | (string-append "docdir = " #$output:doc
|
| 140 | "/share/doc/bdb")))
|
| 141 | |
| 142 | |
| 143 | |
| 144 | (substitute* "s_config"
|
| 145 | (("^.*(aclocal|autoconf|autoheader|config\\.hin).*$") "")
|
| 146 | (("^.*auto4mte.*$") "")
|
| 147 | (("rm (.*) configure") "")
|
| 148 | (("chmod (.*) config.guess(.*)$") ""))
|
| 149 | (invoke "sh" "s_config"))))))
|
| 150 | (native-inputs (list autoconf automake-1.16.5 libtool))
|
| 151 | (synopsis "Berkeley database")
|
| 152 | (description
|
| 153 | "Berkeley DB is an embeddable database allowing developers the choice of
|
| 154 | SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
|
| 155 | (home-page
|
| 156 | "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")
|
| 157 | (license (license:non-copyleft "file://LICENSE"
|
| 158 | "See LICENSE in the distribution."))))
|
| 159 |
|
| 160 | (define-public bdb-6
|
| 161 | (package
|
| 162 | (name "bdb")
|
| 163 | (version "6.2.32")
|
| 164 | (source (origin
|
| 165 | (method url-fetch)
|
| 166 | (uri (string-append "https://download.oracle.com/berkeley-db/db-"
|
| 167 | version ".tar.gz"))
|
| 168 | (sha256
|
| 169 | (base32
|
| 170 | "1yx8wzhch5wwh016nh0kfxvknjkafv6ybkqh6nh7lxx50jqf5id9"))
|
| 171 | (modules '((guix build utils)
|
| 172 | (srfi srfi-1)))
|
| 173 | (snippet bdb-snippet)))
|
| 174 | |
| 175 | |
| 176 | (build-system gnu-build-system)
|
| 177 | (outputs '("out" "doc"))
|
| 178 | (arguments
|
| 179 | (list #:tests? #f |
| 180 | #:disallowed-references '("doc")
|
| 181 | #:out-of-source? #true
|
| 182 | #:configure-flags
|
| 183 | #~(list
|
| 184 | "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration"
|
| 185 | |
| 186 | "--disable-static"
|
| 187 |
|
| 188 | |
| 189 | |
| 190 | "--enable-compat185"
|
| 191 |
|
| 192 | |
| 193 | |
| 194 | |
| 195 | "--enable-cxx")
|
| 196 | #:phases
|
| 197 | #~(modify-phases %standard-phases
|
| 198 | (replace 'bootstrap
|
| 199 | (lambda* (#:key inputs native-inputs outputs
|
| 200 | #:allow-other-keys #:rest arguments)
|
| 201 | (with-directory-excursion "dist"
|
| 202 | (for-each (lambda (x)
|
| 203 | (install-file x "aclocal"))
|
| 204 | (find-files "aclocal_java"))
|
| 205 | (apply (assq-ref %standard-phases 'bootstrap) arguments)
|
| 206 | (let ((automake-files (search-input-directory
|
| 207 | (or native-inputs inputs)
|
| 208 | "share/automake-1.16")))
|
| 209 | (define (replace file)
|
| 210 | (symlink (string-append automake-files "/" file) file))
|
| 211 | (for-each replace '("config.sub" "config.guess"
|
| 212 | "install-sh"))))))
|
| 213 | (add-before 'configure 'pre-configure
|
| 214 | (lambda _
|
| 215 | (chdir "dist")
|
| 216 | |
| 217 | (substitute* "Makefile.in"
|
| 218 | (("docdir[[:blank:]]*=.*")
|
| 219 | (string-append "docdir = " #$output:doc
|
| 220 | "/share/doc/bdb")))
|
| 221 | |
| 222 | |
| 223 | |
| 224 | (substitute* "s_config"
|
| 225 | (("^.*(aclocal|autoconf|autoheader|config\\.hin).*$") "")
|
| 226 | (("^.*auto4mte.*$") "")
|
| 227 | (("rm (.*) configure") "")
|
| 228 | (("chmod (.*) config.guess(.*)$") ""))
|
| 229 | (invoke "sh" "s_config"))))))
|
| 230 | (native-inputs (list autoconf automake-1.16.5 libtool))
|
| 231 | (synopsis "Berkeley database")
|
| 232 | (description
|
| 233 | "Berkeley DB is an embeddable database allowing developers the choice of
|
| 234 | SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
|
| 235 | (home-page
|
| 236 | "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html")
|
| 237 | |
| 238 | |
| 239 | (license (list license:agpl3+ license:bsd-3))))
|
| 240 |
|
| 241 | (define-public bdb bdb-6)
|
| 242 |
|
| 243 | (define-public gdbm
|
| 244 | (package
|
| 245 | (name "gdbm")
|
| 246 | (version "1.25")
|
| 247 | (source (origin
|
| 248 | (method url-fetch)
|
| 249 | (uri (string-append "mirror://gnu/gdbm/gdbm-"
|
| 250 | version ".tar.gz"))
|
| 251 | (sha256
|
| 252 | (base32
|
| 253 | "1v4kycs1n9x0pczm9ny6m16gfgpmj8gwv0bvh7w7gn3fjb2v6bfh"))
|
| 254 | (patches
|
| 255 | (search-patches "gdbm-lockwait-test.patch"))))
|
| 256 | (arguments `(#:configure-flags '("--enable-libgdbm-compat"
|
| 257 | "--disable-static")
|
| 258 | ,@(if (target-loongarch64?)
|
| 259 | `(#:phases
|
| 260 | (modify-phases %standard-phases
|
| 261 | (add-after 'unpack 'update-config
|
| 262 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 263 | (for-each (lambda (file)
|
| 264 | (install-file
|
| 265 | (search-input-file
|
| 266 | (or native-inputs inputs)
|
| 267 | (string-append "/bin/" file)) "build-aux"))
|
| 268 | '("config.guess" "config.sub"))))))
|
| 269 | '())))
|
| 270 | (native-inputs (if (target-loongarch64?)
|
| 271 | (list config)
|
| 272 | '()))
|
| 273 | (build-system gnu-build-system)
|
| 274 | (home-page "https://www.gnu.org.ua/software/gdbm")
|
| 275 | (synopsis
|
| 276 | "Hash library of database functions compatible with traditional dbm")
|
| 277 | (description
|
| 278 | "GDBM is a library for manipulating hashed databases. It is used to
|
| 279 | store key/value pairs in a file in a manner similar to the Unix dbm library
|
| 280 | and provides interfaces to the traditional file format.")
|
| 281 | (license license:gpl3+)))
|