projects/guix·blob java-team · refs

75 lines · 3.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013, 2015, 2019 Ludovic Courtès <[email protected]>
3;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
4;;; Copyright © 2019, 2020, 2021 Efraim Flashner <[email protected]>
5;;; Copyright © 2020 B. Wilson <[email protected]>
6;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
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 bison)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix utils)
28 #:use-module (guix build-system gnu)
29 #:use-module (gnu packages m4)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages compiler-tools)
32 #:use-module (srfi srfi-1))
33
34(define-public bison
35 (package
36 (name "bison")
37 (version "3.8.2")
38 (source
39 (origin
40 (method url-fetch)
41 (uri (string-append "mirror://gnu/bison/bison-"
42 version ".tar.xz"))
43 (sha256
44 (base32
45 "1wjvbbzrr16k1jlby3l436an3kvv492h08arbnf0gwgprha05flv"))))
46 (build-system gnu-build-system)
47 (arguments
48 `(;; Building in parallel on many-core systems may cause an error such as
49 ;; "mv: cannot stat 'examples/c/reccalc/scan.stamp.tmp': No such file or
50 ;; directory". See <https://bugs.gnu.org/36238>.
51 #:parallel-build? #f
52 ;; Similarly, when building tests in parallel, Make may produce this error:
53 ;; "./examples/c/reccalc/scan.l:13:10: fatal error: parse.h: No such file
54 ;; or directory". Full log in <https://bugs.gnu.org/36238>.
55 #:parallel-tests? #f
56 ;; On the Hurd with glibc 2.41 bison uses weak symbols from pthread
57 ;; but does not link to it.
58 ,@(if (target-hurd?)
59 (list #:configure-flags ''("LIBS=-lpthread"))
60 '())))
61 (native-inputs (list perl
62 ;; m4 is not present in PATH when cross-building.
63 m4))
64 (inputs (list flex))
65 (propagated-inputs (list m4))
66 (home-page "https://www.gnu.org/software/bison/")
67 (synopsis "Yacc-compatible parser generator")
68 (description
69 "GNU Bison is a general-purpose parser generator. It can build a
70deterministic or generalized LR parser from an annotated, context-free
71grammar. It is versatile enough to have many applications, from parsers for
72simple tools through complex programming languages.
73
74Bison also provides an implementation of @command{yacc}, as specified by POSIX.")
75 (license gpl3+)))