gnu: Add cl-tga.
[jackhill/guix/guix.git] / gnu / packages / bison.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2015, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages bison)
23 #:use-module (guix licenses)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages m4)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages flex)
30 #:use-module (srfi srfi-1))
31
32 (define-public bison
33 (package
34 (name "bison")
35 (version "3.5.3")
36 (source
37 (origin
38 (method url-fetch)
39 (uri (string-append "mirror://gnu/bison/bison-"
40 version ".tar.xz"))
41 (sha256
42 (base32
43 "1i57hbczvr8674z73775jxdd3y59qggs5lmfd60gmwm5i1gmpy1b"))))
44 (build-system gnu-build-system)
45 (arguments
46 '(;; Building in parallel on many-core systems may cause an error such as
47 ;; "mv: cannot stat 'examples/c/reccalc/scan.stamp.tmp': No such file or
48 ;; directory". See <https://bugs.gnu.org/36238>.
49 #:parallel-build? #f
50 ;; Similarly, when building tests in parallel, Make may produce this error:
51 ;; "./examples/c/reccalc/scan.l:13:10: fatal error: parse.h: No such file
52 ;; or directory". Full log in <https://bugs.gnu.org/36238>.
53 #:parallel-tests? #f))
54 (native-inputs `(("perl" ,perl)
55 ;; m4 is not present in PATH when cross-building.
56 ("m4" ,m4)))
57 (inputs `(("flex" ,flex)))
58 (propagated-inputs `(("m4" ,m4)))
59 (home-page "https://www.gnu.org/software/bison/")
60 (synopsis "Parser generator")
61 (description
62 "GNU Bison is a general-purpose parser generator. It can build a
63 deterministic or generalized LR parser from an annotated, context-free
64 grammar. It is versatile enough to have many applications, from parsers for
65 simple tools through complex programming languages.")
66 (license gpl3+)))
67
68 (define-public bison-3.6
69 (package
70 (inherit bison)
71 (version "3.6.3")
72 (source
73 (origin
74 (method url-fetch)
75 (uri (string-append "mirror://gnu/bison/bison-" version ".tar.xz"))
76 (sha256
77 (base32 "0gdpnjh6ra9xa9vj6hzjdf0c04x4pjyy8vssm3qdb7fya4v7knq6"))))))
78
79 (define-public bison-3.0
80 (package
81 (inherit bison)
82 (version "3.0.5")
83 (source
84 (origin
85 (method url-fetch)
86 (uri (string-append "mirror://gnu/bison/bison-"
87 version ".tar.xz"))
88 (sha256
89 (base32
90 "0f7kjygrckkx8vas2nm673592jif0a9mw5g8207f6hj6h4pfyp07"))))))