On Wed, Dec 17, 2014 at 9:57 AM, Ludovic Courtès <l...@gnu.org> wrote:
>> I've created a branch named wip-gobject-introspection with the patch
>> and version 1.42.0.  I've also pushed version updates for pango and
>> gdk-pixbuf compatible with the former.

[...]

> Mark H Weaver <m...@netris.org> skribis:
>
>> I went down this road, and found that a great many things fail.  I don't
>> remember finding a single package that uses gobject-introspection that
>> worked without updating.
>>
>> I got stuck on eudev.  The newest version doesn't work, and I didn't see
>> anything in their git repo to fix it either.
>>
>> Before moving forward on this, can you find a way to build eudev with
>> gobject-introspection-1.42.0?

The attached patch fixes the build of eudev with the newer
gobject-introspection. It turns out that g-ir-scanner looks for the C
compiler as either 'cc' or as the environment variable 'CC'.  So, the
fix was easy in retrospective :-).

The question is: do we want to make a 'cc' symlink to 'gcc' in the
'gcc' package? This is something that many distributions do.  If we
don't, we may have to make a patch similar to the attached one for
several packages (or patch 'gobject-introspection' to look for 'gcc'
by default). Personally I would prefer the symlink approach.

>>
>> Also, I'm currently working on upgrading almost every package in
>> xorg.scm, as well as glib and dbus.  I'll push it as a branch in the
>> next day or two.  It probably makes the most sense to build your branch
>> on top of mine.

Now that your updates are in master, I've merged them into the branch
wip-gobject-introspection.
To help see what works and what not, it would be helpful to set up
hydra to build the wip-gobject-introspection branch.

WDYT?

Regards,
Fede
From 355bae94512391434bb6c7e14e8632451654380b Mon Sep 17 00:00:00 2001
From: Federico Beffa <be...@fbengineering.ch>
Date: Tue, 13 Jan 2015 16:25:29 +0100
Subject: [PATCH] gnu: eudev: Add pre-build phase.

* gnu/packages/linux.scm (eudev): Add 'pre-build phase to fix compilation with
  'gobject-introspection' 1.42.0.
---
 gnu/packages/linux.scm | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 4599323..ad4e52c 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1407,9 +1407,21 @@ time.")
                   (("linux/btrfs\\.h")
                    "")))))
     (arguments
-     (substitute-keyword-arguments (package-arguments udev)
-       ((#:configure-flags flags)
-        `(cons "--enable-libkmod" ,flags))))
+     `(,@(substitute-keyword-arguments (package-arguments udev)
+           ((#:configure-flags flags)
+            `(cons "--enable-libkmod" ,flags)))
+       #:phases 
+       (alist-cons-before
+        'build 'pre-build
+        ;; The program 'g-ir-scanner' (part of the package
+        ;; 'gobject-introspection'), to generate .gir files, makes some
+        ;; library pre-processing.  During that phase it looks for the C
+        ;; compiler as either 'cc' or as defined by the environment variable
+        ;; 'CC' (with code in 'giscanner/dumper.py').
+        (lambda* (#:key inputs #:allow-other-keys)
+          (let ((gcc (string-append (assoc-ref inputs "gcc") "/bin/gcc")))
+            (setenv "CC" gcc)))
+        %standard-phases)))
     (home-page "http://www.gentoo.org/proj/en/eudev/";)))
 
 (define-public lvm2
-- 
1.8.4

Reply via email to