guix-devel
[Top][All Lists]
Advanced

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

[PATCH 1/2] gnu: gtk+: enable introspection.


From: Cyril Roelandt
Subject: [PATCH 1/2] gnu: gtk+: enable introspection.
Date: Tue, 15 Oct 2013 02:13:32 +0200

gnu/packages/gtk.scm (atk, gdk-pixbuf, gtk+, pango): enable introspection
---
 gnu/packages/gtk.scm | 75 +++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 71 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index b120dc9..cb31de9 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -28,6 +28,7 @@
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages icu4c)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages libjpeg)
   #:use-module (gnu packages libpng)
   #:use-module (gnu packages libtiff)
@@ -53,7 +54,19 @@
               "1c2hbg66wfvibsz2ia0ri48yr62751fn950i97c53j3b0fjifsb3"))))
    (build-system gnu-build-system)
    (inputs `(("glib" ,glib)
+             ("gobject-introspection" ,gobject-introspection)
+             ("libffi" ,libffi)
              ("pkg-config" ,pkg-config)))
+   (arguments
+    `(#:phases
+      (alist-replace
+       'configure
+       (lambda* (#:key #:allow-other-keys #:rest args)
+        (let ((configure (assoc-ref %standard-phases 'configure)))
+         ;; The scanner will use the CC environment variable.
+         (setenv "CC" "gcc")
+         (apply configure args)))
+       %standard-phases)))
    (synopsis "GNOME accessibility toolkit")
    (description
     "ATK provides the set of accessibility interfaces that are implemented
@@ -152,8 +165,20 @@ affine transformation (scale, rotation, shear, etc.)")
     `(("cairo" ,cairo)
       ("harfbuzz" ,harfbuzz)))
    (inputs
-    `(("pkg-config" ,pkg-config)
+    `(("gobject-introspection" ,gobject-introspection)
+      ("libffi" ,libffi)
+      ("pkg-config" ,pkg-config)
       ("zlib" ,zlib)))
+   (arguments
+    `(#:phases
+      (alist-replace
+       'configure
+       (lambda* (#:key #:allow-other-keys #:rest args)
+        (let ((configure (assoc-ref %standard-phases 'configure)))
+         ;; The scanner will use the CC environment variable.
+         (setenv "CC" "gcc")
+         (apply configure args)))
+       %standard-phases)))
    (synopsis "GNOME text and font handling library")
    (description
     "Pango is the core text and font handling library used in GNOME
@@ -176,10 +201,22 @@ used throughout the world.")
    (build-system gnu-build-system)
    (inputs
     `(("glib" ,glib)
+      ("gobject-introspection", gobject-introspection)
+      ("libffi" ,libffi)
       ("libjpeg" ,libjpeg)
       ("libpng" ,libpng)
       ("libtiff" ,libtiff)
       ("pkg-config" ,pkg-config)))
+   (arguments
+    `(#:phases
+      (alist-replace
+       'configure
+       (lambda* (#:key #:allow-other-keys #:rest args)
+        (let ((configure (assoc-ref %standard-phases 'configure)))
+         ;; The scanner will use the CC environment variable.
+         (setenv "CC" "gcc")
+         (apply configure args)))
+       %standard-phases)))
    (synopsis "GNOME image loading and manipulation library")
    (description
     "GdkPixbuf is a library for image loading and manipulation developed
@@ -304,7 +341,9 @@ application suites.")
       ("libxinerama" ,libxinerama)
       ("pango" ,pango)))
    (inputs
-    `(("libxml2" ,libxml2)
+    `(("gobject-introspection" ,gobject-introspection)
+      ("libffi" ,libffi)
+      ("libxml2" ,libxml2)
       ("perl" ,perl)
       ("pkg-config" ,pkg-config)
       ("python-wrapper" ,python-wrapper)
@@ -313,8 +352,11 @@ application suites.")
     `(#:phases
       (alist-replace
        'configure
-       (lambda* (#:key #:allow-other-keys #:rest args)
-         (let ((configure (assoc-ref %standard-phases 'configure)))
+       (lambda* (#:key inputs #:allow-other-keys #:rest args)
+         (let ((configure (assoc-ref %standard-phases 'configure))
+               (gir-path (lambda (pkg-name)
+                           (string-append (assoc-ref inputs pkg-name)
+                                          "/share/gir-1.0"))))
            ;; Disable most tests, failing in the chroot with the message:
            ;; D-Bus library appears to be incorrectly set up; failed to read
            ;; machine uuid: Failed to open "/etc/machine-id": No such file or
@@ -322,6 +364,31 @@ application suites.")
            ;; See the manual page for dbus-uuidgen to correct this issue.
            (substitute* "testsuite/Makefile.in"
             (("SUBDIRS = gdk gtk a11y css reftests") "SUBDIRS = gdk"))
+           ;; The scanner will use the CC environment variable.
+           (setenv "CC" "gcc")
+
+           (substitute* "gdk/Makefile.in"
+            (("--add-include-path=../gdk")
+             (string-append
+              "--add-include-path=../gdk"
+              " --add-include-path=" (gir-path "gdk-pixbuf")
+              " --add-include-path=" (gir-path "pango")))
+            (("--includedir=\\.")
+             (string-append "--includedir=."
+              " --includedir=" (gir-path "gdk-pixbuf")
+              " --includedir=" (gir-path "pango"))))
+
+           (substitute* "gtk/Makefile.in"
+            (("--add-include-path=../gdk")
+             (string-append "--add-include-path=../gdk"
+              " --add-include-path=" (gir-path "atk")
+              " --add-include-path=" (gir-path "gdk-pixbuf")
+              " --add-include-path=" (gir-path "pango")))
+            (("--includedir=../gdk")
+             (string-append "--includedir=../gdk"
+              " --includedir=" (gir-path "atk")
+              " --includedir=" (gir-path "gdk-pixbuf")
+              " --includedir=" (gir-path "pango"))))
            (apply configure args)))
        %standard-phases)))))
 
-- 
1.8.4.rc3




reply via email to

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