guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#40767] [PATCH] gnu: Add maradns.


From: Arun Isaac
Subject: [bug#40767] [PATCH] gnu: Add maradns.
Date: Sat, 25 Apr 2020 23:33:25 +0530

>> Yes, I checked before pushing. guix lint reported no warnings.
>
> Then we may have to fix guix lint because it seems to me that this
> snippet is above limit:

guix lint checks for lines longer than 90 characters. Perhaps that's the
new policy? See the function report-long-line in guix/lint.scm. It even
has a comment noting that we don't warn at 80 characters.

> You don't need this bit, the native gcc is also present when
> cross-compiling. Otherwise, LGTM!

Removed. Please find attached the updated patch.

From c155043bd6f78add7bbf660b6ad4a592be89b694 Mon Sep 17 00:00:00 2001
From: Arun Isaac <address@hidden>
Date: Sat, 25 Apr 2020 15:53:52 +0530
Subject: [PATCH v2] gnu: maradns: Fix cross compilation.

* gnu/packages/dns.scm (maradns)[arguments]: Build make_32bit_tables for the
host.
---
 gnu/packages/dns.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 80ed1f0b49..7364a1e885 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -43,6 +43,7 @@
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages groff)
@@ -979,7 +980,15 @@ known public suffixes.")
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
-           (lambda _
+           (lambda* (#:key native-inputs #:allow-other-keys)
+             ;; make_32bit_tables generates a header file that is used during
+             ;; compilation. Hence, during cross compilation, it should be
+             ;; built for the host system.
+             (when ,(%current-target-system)
+               (substitute* "rng/Makefile"
+                 (("\\$\\(CC\\) -o make_32bit_tables")
+                  (string-append (assoc-ref native-inputs "gcc")
+                                 "/bin/gcc -o make_32bit_tables"))))
              (invoke "./configure")))
          (add-before 'install 'create-install-directories
            (lambda* (#:key outputs #:allow-other-keys)
-- 
2.26.1

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]