gnu: Graphviz: Fix CVE-2020-18032.
[jackhill/guix/guix.git] / gnu / packages / cobol.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018, 2021 Efraim Flashner <efraim@flashner.co.il>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages cobol)
20 #:use-module (gnu packages)
21 #:use-module (guix build-system gnu)
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (gnu packages dbm)
26 #:use-module (gnu packages multiprecision)
27 #:use-module (gnu packages ncurses)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages web)
30 #:use-module (gnu packages xml))
31
32 (define-public gnucobol
33 (package
34 (name "gnucobol")
35 (version "3.1.2")
36 (source
37 (origin
38 (method url-fetch)
39 (uri (string-append
40 "mirror://gnu/gnucobol/gnucobol-"
41 version ".tar.xz"))
42 (sha256
43 (base32
44 "0x15ybfm63g7c9340fc6712h9v59spnbyaz4rf85pmnp3zbhaw2r"))))
45 (arguments
46 '(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
47 (assoc-ref %outputs "out")
48 "/lib")
49 (string-append "JSON_C_CFLAGS=-I"
50 (assoc-ref %build-inputs "json-c")
51 "/include/json-c"))
52 #:phases
53 (modify-phases %standard-phases
54 (add-after 'unpack 'place-cobol85-test-suite
55 (lambda* (#:key inputs #:allow-other-keys)
56 (let ((newcob (assoc-ref inputs "newcob")))
57 (copy-file newcob "tests/cobol85/newcob.val.Z"))))
58 (add-before 'check 'set-TERM
59 ;; Some tests expect a known terminal
60 (lambda _ (setenv "TERM" "xterm-256color"))))
61 #:test-target "checkall"))
62 (native-inputs
63 `(("perl" ,perl)
64 ("newcob" ,(origin
65 (method url-fetch)
66 (uri "https://www.itl.nist.gov/div897/ctg/suites/newcob.val.Z")
67 (sha256
68 (base32
69 "1yb1plmv4firfnbb119r2vh1hay221w1ya34nyz0qwsxppfr56hy"))))))
70 (inputs
71 `(("bdb" ,bdb)
72 ("gmp" ,gmp)
73 ("json-c" ,json-c)
74 ("libxml2" ,libxml2)
75 ("ncurses" ,ncurses)))
76 (build-system gnu-build-system)
77 (home-page "https://www.gnu.org/software/gnucobol/")
78 (synopsis "A modern COBOL compiler")
79 (description "GnuCOBOL is a free, modern COBOL compiler. GnuCOBOL
80 implements a substantial part of the COBOL 85, COBOL 2002 and COBOL 2014
81 standards and X/Open COBOL, as well as many extensions included in other
82 COBOL compilers (IBM COBOL, MicroFocus COBOL, ACUCOBOL-GT and others).
83 GnuCOBOL translates COBOL into C and compiles the translated code using
84 a native C compiler.")
85 (license gpl3+)))