Skip to content
Snippets Groups Projects
Commit 2aa76ee1 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

gnu: flex: Use Bison 2.7 for tests.

* gnu/packages/bison.scm (bison): Move FLEX to 'inputs', and remove the
  hack that turned off its test suite.
* gnu/packages/flex.scm (flex): Add 'bison-for-tests' in 'inputs', and
  use that to run the tests.
parent 9546640e
No related branches found
No related tags found
No related merge requests found
...@@ -40,17 +40,8 @@ (define bison ...@@ -40,17 +40,8 @@ (define bison
(base32 (base32
"1j14fqgi9wzqgsy4fhkcdrv4hv6rrvhvn84axs520w9b022mbb79")))) "1j14fqgi9wzqgsy4fhkcdrv4hv6rrvhvn84axs520w9b022mbb79"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs `(("perl" ,perl) (native-inputs `(("perl" ,perl)))
(inputs `(("flex" ,flex)))
;; We need Flex for the test suite, and Flex needs Bison.
;; To break the cycle, we remove Bison from the inputs of
;; Flex, and disable Flex's test suite, since it requires
;; Bison.
("flex" ,(package (inherit flex)
(arguments '(#:tests? #f))
(inputs
(alist-delete "bison"
(package-inputs flex)))))))
(propagated-inputs `(("m4" ,m4))) (propagated-inputs `(("m4" ,m4)))
(home-page "http://www.gnu.org/software/bison/") (home-page "http://www.gnu.org/software/bison/")
(synopsis "Parser generator") (synopsis "Parser generator")
......
...@@ -25,6 +25,7 @@ (define-module (gnu packages flex) ...@@ -25,6 +25,7 @@ (define-module (gnu packages flex)
#:use-module (gnu packages m4) #:use-module (gnu packages m4)
#:use-module (gnu packages bison) #:use-module (gnu packages bison)
#:use-module (gnu packages indent) #:use-module (gnu packages indent)
#:use-module (srfi srfi-1)
#:export (flex)) #:export (flex))
(define flex (define flex
...@@ -41,9 +42,26 @@ (define flex ...@@ -41,9 +42,26 @@ (define flex
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:patches (list (assoc-ref %build-inputs "patch/bison-tests")))) '(#:patches (list (assoc-ref %build-inputs "patch/bison-tests"))))
(inputs `(("patch/bison-tests" ,(search-patch "flex-bison-tests.patch")) (inputs
("bison" ,bison) (let ((bison-for-tests
("indent" ,indent))) ;; Work around an incompatibility with Bison 3.0:
;; <http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00014.html>.
(package (inherit bison)
(version "2.7.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/bison/bison-"
version ".tar.xz"))
(sha256
(base32
"1yx7isx67sdmyijvihgyra1f59fwdz7sqriginvavfj5yb5ss2dl"))))
;; Unlike Bison 3.0, this version did not need Flex for its
;; tests, so it allows us to break the cycle.
(inputs (alist-delete "flex" (package-inputs bison))))))
`(("patch/bison-tests" ,(search-patch "flex-bison-tests.patch"))
("bison" ,bison-for-tests)
("indent" ,indent))))
(propagated-inputs `(("m4" ,m4))) (propagated-inputs `(("m4" ,m4)))
(home-page "http://flex.sourceforge.net/") (home-page "http://flex.sourceforge.net/")
(synopsis "A fast lexical analyser generator") (synopsis "A fast lexical analyser generator")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment