gnu: ldc: Fix build failure.

* gnu/packages/ldc.scm (ldc)[arguments]: Add 'patch-dmd2' phase.
[inputs]: Add zlib.
[native-inputs]: Specify version 3.7 of LLVM and Clang.

Signed-off-by: Leo Famulari <leo@famulari.name>
This commit is contained in:
Danny Milosavljevic 2016-09-13 12:30:41 +02:00 committed by Leo Famulari
parent f26dd9b2cc
commit 812b3c1f8a
No known key found for this signature in database
GPG key ID: 2646FA30BACA7F08

View file

@ -26,6 +26,7 @@ (define-module (gnu packages ldc)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages libedit) #:use-module (gnu packages libedit)
#:use-module (gnu packages llvm) #:use-module (gnu packages llvm)
#:use-module (gnu packages textutils) #:use-module (gnu packages textutils)
@ -101,6 +102,14 @@ (define-public ldc
(and (unpack "phobos-src" "runtime/phobos") (and (unpack "phobos-src" "runtime/phobos")
(unpack "druntime-src" "runtime/druntime") (unpack "druntime-src" "runtime/druntime")
(unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")))))
(add-after 'unpack-submodule-sources 'patch-dmd2
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "dmd2/root/port.c"
((" ::isnan") " isnan")
((" ::isinf") " isinf")
(("#undef isnan") "")
(("#undef isinf") ""))
#t))
(add-after 'unpack-submodule-sources 'patch-phobos (add-after 'unpack-submodule-sources 'patch-phobos
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "runtime/phobos/std/process.d" (substitute* "runtime/phobos/std/process.d"
@ -115,10 +124,11 @@ (define-public ldc
(inputs (inputs
`(("libconfig" ,libconfig) `(("libconfig" ,libconfig)
("libedit" ,libedit) ("libedit" ,libedit)
("tzdata" ,tzdata))) ("tzdata" ,tzdata)
("zlib" ,zlib)))
(native-inputs (native-inputs
`(("llvm" ,llvm) `(("llvm" ,llvm-3.7)
("clang" ,clang) ("clang" ,clang-3.7)
("unzip" ,unzip) ("unzip" ,unzip)
("phobos-src" ("phobos-src"
,(origin ,(origin