Patchwork [v4,2/3] gnu: Make ldc work again

login
register
mail settings
Submitter Danny Milosavljevic
Date Sept. 13, 2016, 10:30 a.m.
Message ID <20160913103042.7302-3-dannym@scratchpost.org>
Download mbox | patch
Permalink /patch/15573/
State New
Headers show

Comments

Danny Milosavljevic - Sept. 13, 2016, 10:30 a.m.
* gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
---
 gnu/packages/ldc.scm | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
Leo Famulari - Sept. 13, 2016, 4:53 p.m.
On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
> * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.

LDC built with this patch. I'm currently in the test suite. If it passes
on my computer, I'd like to push this patch unless there are objections.
Leo Famulari - Sept. 13, 2016, 6:09 p.m.
On Tue, Sep 13, 2016 at 12:53:39PM -0400, Leo Famulari wrote:
> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
> > * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
> 
> LDC built with this patch. I'm currently in the test suite. If it passes
> on my computer, I'd like to push this patch unless there are objections.

The test suite passed. If there are no more comments in the next day or
two, I will push this patch with some edits to the commit message.
Roel Janssen - Sept. 13, 2016, 7:05 p.m.
Leo Famulari writes:

> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
>> * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
>
> LDC built with this patch. I'm currently in the test suite. If it passes
> on my computer, I'd like to push this patch unless there are objections.

+1.

I'm in the test phase as well.  Especially because the upgrade to 0.17.1
does not seem to work, I would like to push this patch.

Thanks Danny for your work.

Kind regards,
Roel Janssen
Ricardo Wurmus - Sept. 13, 2016, 7:20 p.m.
Leo Famulari <leo@famulari.name> writes:

> On Tue, Sep 13, 2016 at 12:53:39PM -0400, Leo Famulari wrote:
>> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
>> > * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
>> 
>> LDC built with this patch. I'm currently in the test suite. If it passes
>> on my computer, I'd like to push this patch unless there are objections.
>
> The test suite passed. If there are no more comments in the next day or
> two, I will push this patch with some edits to the commit message.

The patch looks good to me (aside from the commit message).

~~ Ricardo
Leo Famulari - Sept. 13, 2016, 7:25 p.m.
On Tue, Sep 13, 2016 at 09:20:05PM +0200, Ricardo Wurmus wrote:
> 
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Tue, Sep 13, 2016 at 12:53:39PM -0400, Leo Famulari wrote:
> >> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
> >> > * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
> >> 
> >> LDC built with this patch. I'm currently in the test suite. If it passes
> >> on my computer, I'd like to push this patch unless there are objections.
> >
> > The test suite passed. If there are no more comments in the next day or
> > two, I will push this patch with some edits to the commit message.
> 
> The patch looks good to me (aside from the commit message).

Okay, considering the comments from you and Roel, I pushed with an
altered commit message as 812b3c1f8a3717fd9fc540663912c5e9a144db5b.
Roel Janssen - Sept. 13, 2016, 8:01 p.m.
Leo Famulari writes:

> On Tue, Sep 13, 2016 at 09:20:05PM +0200, Ricardo Wurmus wrote:
>> 
>> Leo Famulari <leo@famulari.name> writes:
>> 
>> > On Tue, Sep 13, 2016 at 12:53:39PM -0400, Leo Famulari wrote:
>> >> On Tue, Sep 13, 2016 at 12:30:41PM +0200, Danny Milosavljevic wrote:
>> >> > * gnu/packages/ldc.scm (ldc): Added substitution. Added zlib input. Fix llvm and clang inputs to 3.7.
>> >> 
>> >> LDC built with this patch. I'm currently in the test suite. If it passes
>> >> on my computer, I'd like to push this patch unless there are objections.
>> >
>> > The test suite passed. If there are no more comments in the next day or
>> > two, I will push this patch with some edits to the commit message.
>> 
>> The patch looks good to me (aside from the commit message).
>
> Okay, considering the comments from you and Roel, I pushed with an
> altered commit message as 812b3c1f8a3717fd9fc540663912c5e9a144db5b.

It built fine here.  Thanks for pushing.

Kind regards,
Roel Janssen

Patch

diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm
index 1709f59..560fa49 100644
--- a/gnu/packages/ldc.scm
+++ b/gnu/packages/ldc.scm
@@ -26,6 +26,7 @@ 
   #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages libedit)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages textutils)
@@ -101,6 +102,14 @@  and freshness without requiring additional information from the user.")
                (and (unpack "phobos-src" "runtime/phobos")
                     (unpack "druntime-src" "runtime/druntime")
                     (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
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "runtime/phobos/std/process.d"
@@ -115,10 +124,11 @@  and freshness without requiring additional information from the user.")
     (inputs
      `(("libconfig" ,libconfig)
        ("libedit" ,libedit)
-       ("tzdata" ,tzdata)))
+       ("tzdata" ,tzdata)
+       ("zlib" ,zlib)))
     (native-inputs
-     `(("llvm" ,llvm)
-       ("clang" ,clang)
+     `(("llvm" ,llvm-3.7)
+       ("clang" ,clang-3.7)
        ("unzip" ,unzip)
        ("phobos-src"
         ,(origin