gnu: ghc-7: Fix build with ncurses 6.1.

* gnu/packages/haskell.scm (ghc-7)[arguments]: Make ncurses major+minor
version detection more robust.
This commit is contained in:
Ricardo Wurmus 2018-03-14 19:58:32 +01:00
parent 7c4a0f975b
commit 7473319524
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 4 additions and 2 deletions

View File

@ -282,9 +282,11 @@ top of CLISP.")
(mkdir-p libtinfo-dir) (mkdir-p libtinfo-dir)
(symlink (symlink
(string-append ncurses-lib "/libncursesw.so." (string-append ncurses-lib "/libncursesw.so."
;; Extract "6.0" from "6.0-20170930". ;; Extract "6.0" from "6.0-20170930" if a
;; dash-separated version tag exists.
,(let* ((v (package-version ncurses)) ,(let* ((v (package-version ncurses))
(d (string-index v #\-))) (d (or (string-index v #\-)
(string-length v))))
(version-major+minor (string-take v d)))) (version-major+minor (string-take v d))))
(string-append libtinfo-dir "/libtinfo.so.5")) (string-append libtinfo-dir "/libtinfo.so.5"))