unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: fix some issues cross-compiling glib
@ 2014-11-18 10:34 John Darrington
  2014-11-18 20:36 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: John Darrington @ 2014-11-18 10:34 UTC (permalink / raw)
  To: guix-devel

From: John Darrington <john@darrington.wattle.id.au>

* gnu/packages/glib.scm (glib) : Moved inputs to native-inputs,
  and change "inputs" to "%build-inputs"
---
 gnu/packages/glib.scm |   47 ++++++++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index ac1b095..9fe016d 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -133,35 +133,44 @@ shared NFS home directories.")
               "bin"           ; glib-mkenums, gtester, etc.; depends on Python
               "doc"))         ; 20 MiB of GTK-Doc reference
    (inputs
-    `(("coreutils" ,coreutils)
-      ("libffi" ,libffi)
+    `(("libffi" ,libffi)
       ("zlib" ,zlib)
       ("tzdata" ,tzdata)))     ; for tests/gdatetime.c
+
    (native-inputs
     `(("gettext" ,gnu-gettext)
       ("dbus" ,dbus)                              ; for GDBus tests
+      ("coreutils" ,coreutils)
       ("pkg-config" ,pkg-config)
+      ;; The following ought to be achieved by (native-self-input #t).
+      ;; Unfortunately it seems to only set glib:out.  We want glib:bin
+      ,@(if (%current-target-system) 
+            `(("native-glib" ,glib "bin"))
+            '())
       ("python" ,python-wrapper)
       ("perl" ,perl)                              ; needed by GIO tests
       ("bash" ,bash)))
-   (arguments
-    '(#:phases (alist-cons-before
-                'build 'pre-build
-                (lambda* (#:key inputs outputs #:allow-other-keys)
-                  ;; For tests/gdatetime.c.
-                  (setenv "TZDIR"
-                          (string-append (assoc-ref inputs "tzdata")
-                                         "/share/zoneinfo"))
 
-                  ;; Some tests want write access there.
-                  (setenv "XDG_CACHE_HOME" (getcwd))
-
-                  (substitute* '("glib/gspawn.c"
-                                 "glib/tests/utils.c"
-                                 "tests/spawn-test.c")
-                    (("/bin/sh")
-                     (string-append (assoc-ref inputs "bash") "/bin/sh"))))
-                %standard-phases)
+   (arguments
+    `(#:phases 
+       (alist-cons-before
+        'build 'pre-build
+        (lambda* (#:key inputs outputs #:allow-other-keys)
+          ;; For tests/gdatetime.c.
+          (setenv "TZDIR"
+                  (string-append (assoc-ref inputs "tzdata")
+                                 "/share/zoneinfo"))
+          
+          ;; Some tests want write access there.
+          (setenv "XDG_CACHE_HOME" (getcwd))
+          
+          (substitute* '("glib/gspawn.c"
+                         "glib/tests/utils.c"
+                         "tests/spawn-test.c")
+            (("/bin/sh")
+             (string-append 
+              (assoc-ref %build-inputs "bash") "/bin/sh"))))
+        %standard-phases)
 
       ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
       #:configure-flags (list (string-append "--with-html-dir="
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-19 12:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 10:34 [PATCH] gnu: fix some issues cross-compiling glib John Darrington
2014-11-18 20:36 ` Ludovic Courtès
2014-11-18 20:54   ` John Darrington
2014-11-19  8:53     ` Ludovic Courtès
2014-11-19 10:07       ` John Darrington
2014-11-19 12:47         ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).