From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from eggs.gnu.org ([2001:470:142:3::10]:57182)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1jSP9n-00060n-G7
 for guix-patches@gnu.org; Sat, 25 Apr 2020 14:04:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1jSP9m-0002Jt-Gl
 for guix-patches@gnu.org; Sat, 25 Apr 2020 14:04:03 -0400
Received: from debbugs.gnu.org ([209.51.188.43]:48769)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1jSP9m-0002J6-2R
 for guix-patches@gnu.org; Sat, 25 Apr 2020 14:04:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1jSP9l-0002tG-VG
 for guix-patches@gnu.org; Sat, 25 Apr 2020 14:04:01 -0400
Subject: [bug#40767] [PATCH] gnu: Add maradns.
Resent-Message-ID: <handler.40767.B40767.158783783411096@debbugs.gnu.org>
From: Arun Isaac <arunisaac@systemreboot.net>
In-Reply-To: <87v9lng2hx.fsf@gmail.com>
References: <20200422132922.9539-1-arunisaac@systemreboot.net>
 <87lfmnock3.fsf@gmail.com> <cu7y2qnwdia.fsf@systemreboot.net>
 <87blnioawj.fsf@gmail.com> <cu77dy4wmzh.fsf@systemreboot.net>
 <87y2qkx9sh.fsf@gmail.com> <cu7zhazvnko.fsf@systemreboot.net>
 <87v9lng2hx.fsf@gmail.com>
Date: Sat, 25 Apr 2020 23:33:25 +0530
Message-ID: <cu7tv17v3wy.fsf@systemreboot.net>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
List-Id: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org
Sender: "Guix-patches" <guix-patches-bounces+kyle=kyleam.com@gnu.org>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: 40767@debbugs.gnu.org

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain


>> 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.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=v2-0001-gnu-maradns-Fix-cross-compilation.patch
Content-Transfer-Encoding: quoted-printable

From=20c155043bd6f78add7bbf660b6ad4a592be89b694 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
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.
=2D--
 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
=2D-- 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
=2D           (lambda _
+           (lambda* (#:key native-inputs #:allow-other-keys)
+             ;; make_32bit_tables generates a header file that is used dur=
ing
+             ;; 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)
=2D-=20
2.26.1


--=-=-=--

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6ke20ACgkQLiXui2GA
K7O9oAf+MdsOH2WTpRzUbpEcplADLKYMAa7J5xhjGdAJ2SicvNPeay/rASwhWZyR
W6UFLkkrS2mrdBRUbYmSM6+kq6Z0q9UJuBvdxk6x3w5+jkB64a4nHjfd5vGxKHXY
Pr7DlGL0vDa0RkcPQaW/3yj001Vux8384thYyOCLU+QBhIBRoB2bpLOPD9F411uN
+UbH58m/HuD4iHf0r8OArMDi3HWvs71rBXi3UyzqHoTfthT49ASTkYWiVyaNjGYW
e+VUiZ7XEsKDBh6zqHVQQBBnqTc6AMtgjh1C163wWTuAXf9xSaK/aKKszfVPTFCC
ikBAYWRjYE1/WK3xYQ6iCT9UA06e9A==
=Ch6+
-----END PGP SIGNATURE-----
--==-=-=--