guix-commits
[Top][All Lists]
Advanced

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

branch wip-hurd-vm updated: gnu: guile-json: Cross-build fix.


From: guix-commits
Subject: branch wip-hurd-vm updated: gnu: guile-json: Cross-build fix.
Date: Tue, 07 Apr 2020 15:05:43 -0400

This is an automated email from the git hooks/post-receive script.

janneke pushed a commit to branch wip-hurd-vm
in repository guix.

The following commit(s) were added to refs/heads/wip-hurd-vm by this push:
     new ed84b25  gnu: guile-json: Cross-build fix.
ed84b25 is described below

commit ed84b255563c2d9efc2a0b8ecdb3787f1d76d591
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Tue Apr 7 20:49:13 2020 +0200

    gnu: guile-json: Cross-build fix.
    
    * gnu/packages/patches/guile-json-cross.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/guile.scm (guile-json-3)[source]: Use it.
    [arguments]: Remove configure to trigger bootstrap phase.
---
 gnu/local.mk                                |  1 +
 gnu/packages/guile.scm                      | 13 ++++++--
 gnu/packages/patches/guile-json-cross.patch | 52 +++++++++++++++++++++++++++++
 3 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index dcffd86..8c0df11 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1008,6 +1008,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/guile-2.2-skip-oom-test.patch            \
   %D%/packages/patches/guile-default-utf8.patch                        \
   %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch  \
+  %D%/packages/patches/guile-json-cross.patch                  \
   %D%/packages/patches/guile-linux-syscalls.patch              \
   %D%/packages/patches/guile-present-coding.patch              \
   %D%/packages/patches/guile-relocatable.patch                 \
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 6bbc9c1..80b9826 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -516,12 +516,21 @@ specification.  These are the main features:
               (method url-fetch)
               (uri (string-append "mirror://savannah/guile-json/guile-json-"
                                   version ".tar.gz"))
+              (patches (search-patches "guile-json-cross.patch"))
               (sha256
                (base32
                 "14m6b6g2maw0mkvfm4x63rqb54vgbpn1gcqs715ijw4bikfzlqfz"))))
-    (native-inputs `(("pkg-config" ,pkg-config)
+    (native-inputs `(("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("pkg-config" ,pkg-config)
                      ("guile" ,guile-3.0)))
-    (inputs `(("guile" ,guile-3.0)))))
+    (inputs `(("guile" ,guile-3.0)))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'remove-configure
+                    (lambda _
+                      (delete-file "configure")
+                      #t)))))))
 
 (define-public guile2.2-json
   (package-for-guile-2.2 guile-json-3))
diff --git a/gnu/packages/patches/guile-json-cross.patch 
b/gnu/packages/patches/guile-json-cross.patch
new file mode 100644
index 0000000..f003f13
--- /dev/null
+++ b/gnu/packages/patches/guile-json-cross.patch
@@ -0,0 +1,52 @@
+From 0ebc6b8f89680f5353693f591c24c82c8cea9ba1 Mon Sep 17 00:00:00 2001
+From: Jan Nieuwenhuizen <address@hidden>
+Date: Wed, 4 Mar 2020 11:17:02 +0100
+Subject: [PATCH] build: Support cross building.
+
+* configure.ac: Add AC_CANONICAL_HOST to get host.
+* Makefile.am (.scm.go): Set it as target.
+* json/Makefile.am (.scm.go): Likewise.
+---
+ Makefile.am      | 2 +-
+ configure.ac     | 1 +
+ json/Makefile.am | 2 +-
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 996f18b..e9434be 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -42,7 +42,7 @@ nobase_nodist_obj_DATA = $(GOBJECTS)
+ GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
+ SUFFIXES = .scm .go
+ .scm.go:
+-      $(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<"
++      $(top_builddir)/env $(GUILE_TOOLS) compile --target="$(host)" 
$(GUILE_WARNINGS) -o "$@" "$<"
+ 
+ SOURCES = json.scm
+ 
+diff --git a/configure.ac b/configure.ac
+index fbc1aff..937dcf7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -25,6 +25,7 @@ AC_CONFIG_SRCDIR(json.scm)
+ AC_CONFIG_AUX_DIR([build-aux])
+ AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability])
+ AM_SILENT_RULES([yes])
++AC_CANONICAL_HOST
+ 
+ dnl We require pkg.m4 (from pkg-config) and guile.m4.
+ dnl Make sure they are available.
+diff --git a/json/Makefile.am b/json/Makefile.am
+index adf5972..0085a81 100644
+--- a/json/Makefile.am
++++ b/json/Makefile.am
+@@ -36,4 +36,4 @@ CLEANFILES = $(GOBJECTS)
+ GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
+ SUFFIXES = .scm .go
+ .scm.go:
+-      $(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<"
++      $(top_builddir)/env $(GUILE_TOOLS) compile --target="$(host)" 
$(GUILE_WARNINGS) -o "$@" "$<"
+-- 
+2.24.0
+



reply via email to

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