all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Add libpeas.
@ 2013-10-15  0:13 Cyril Roelandt
  2013-10-15  0:13 ` [PATCH 1/2] gnu: gtk+: enable introspection Cyril Roelandt
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Cyril Roelandt @ 2013-10-15  0:13 UTC (permalink / raw)
  To: guix-devel

These two patches add libpeas. The first one enables the introspection feature
for a few GNOME packages; the second adds libpeas.

Cyril Roelandt.
---
Cyril Roelandt (2):
  gnu: gtk+: enable introspection.
  gnu: Add libpeas.

 gnu/packages/gnome.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++
 gnu/packages/gtk.scm   | 75 +++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 139 insertions(+), 4 deletions(-)

-- 
1.8.4.rc3

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

* [PATCH 1/2] gnu: gtk+: enable introspection.
  2013-10-15  0:13 [PATCH 0/2] Add libpeas Cyril Roelandt
@ 2013-10-15  0:13 ` Cyril Roelandt
  2013-10-15  0:13 ` [PATCH 2/2] gnu: Add libpeas Cyril Roelandt
  2013-10-15 20:12 ` [PATCH 0/2] " Ludovic Courtès
  2 siblings, 0 replies; 6+ messages in thread
From: Cyril Roelandt @ 2013-10-15  0:13 UTC (permalink / raw)
  To: guix-devel

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

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

* [PATCH 2/2] gnu: Add libpeas.
  2013-10-15  0:13 [PATCH 0/2] Add libpeas Cyril Roelandt
  2013-10-15  0:13 ` [PATCH 1/2] gnu: gtk+: enable introspection Cyril Roelandt
@ 2013-10-15  0:13 ` Cyril Roelandt
  2013-10-15 20:12 ` [PATCH 0/2] " Ludovic Courtès
  2 siblings, 0 replies; 6+ messages in thread
From: Cyril Roelandt @ 2013-10-15  0:13 UTC (permalink / raw)
  To: guix-devel

gnu/packages/gnome.scm (libpeas): New variable.
---
 gnu/packages/gnome.scm | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 16e491d..97dd4c4 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -28,6 +28,7 @@
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages libcanberra)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages libpng)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -315,3 +316,70 @@ notification daemon, as defined in the Desktop Notifications spec. These
 notifications can be used to inform the user about an event or display
 some form of information without getting in the user's way.")
     (license lgpl2.1+)))
+
+(define-public libpeas
+  (package
+    (name "libpeas")
+    (version "1.9.0")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://gnome/sources/" name "/"
+                          (string-copy version 0 (string-rindex version #\.)) "/"
+                          name "-" version ".tar.xz"))
+      (sha256
+       (base32
+        "13fzyzv6c0cfdj83z1s16lv8k997wpnzyzr0wfwcfkcmvz64g1q0"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+        (alist-replace
+         '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"))))
+           ;; The scanner will use the CC environment variable.
+           (setenv "CC" "gcc")
+           (substitute* "libpeas-gtk/Makefile.in"
+            (("--add-include-path")
+             (string-append
+               " --add-include-path=" (gir-path "atk")
+               " --add-include-path=" (gir-path "gdk-pixbuf")
+               " --add-include-path=" (gir-path "gtk+")
+               " --add-include-path=" (gir-path "pango")
+              " --add-include-path")))
+           (substitute* "libpeas-gtk/Makefile.in"
+            (("--includedir=\\$\\(top_builddir")
+             (string-append
+              "--includedir=" (gir-path "atk")
+              " --includedir=" (gir-path "gdk-pixbuf")
+              " --includedir=" (gir-path "gtk+")
+              " --includedir=" (gir-path "pango")
+              " --includedir=$(top_builddir")))
+           (apply configure args)))
+         %standard-phases)))
+    (inputs
+     `(("atk" ,atk)
+       ("gdk-pixbuf" ,gdk-pixbuf)
+       ("glib" ,glib)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gtk+" ,gtk+)
+       ("intltool" ,intltool)
+       ("libffi" ,libffi)
+       ("pango" ,pango)
+       ("pkg-config" ,pkg-config)))
+    (home-page "https://wiki.gnome.org/Libpeas")
+    (synopsis "GObject plugin system")
+    (description
+     "libpeas is a gobject-based plugins engine, and is targetted at giving
+every application the chance to assume its own extensibility. It also has a set
+of features including, but not limited to:
+
+-  multiple extension points
+-  on demand (lazy) programming language support for C, Python and JS
+- simplicity of the API")
+
+    (license lgpl2.0+)))
-- 
1.8.4.rc3

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

* Re: [PATCH 0/2] Add libpeas.
  2013-10-15  0:13 [PATCH 0/2] Add libpeas Cyril Roelandt
  2013-10-15  0:13 ` [PATCH 1/2] gnu: gtk+: enable introspection Cyril Roelandt
  2013-10-15  0:13 ` [PATCH 2/2] gnu: Add libpeas Cyril Roelandt
@ 2013-10-15 20:12 ` Ludovic Courtès
  2013-10-17  0:42   ` Cyril Roelandt
  2 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2013-10-15 20:12 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> These two patches add libpeas. The first one enables the introspection feature
> for a few GNOME packages; the second adds libpeas.

Nice!

> +           ;; The scanner will use the CC environment variable.
> +           (setenv "CC" "gcc")

Before we copy/paste these two lines in a dozen packages ;-), what about
patching the damn scanner directly in gobject-introspection?

IIUC it’d be just about patching ‘giscanner/sourcescanner.py’ to default
to /nix/store/.../bin/gcc instead of cc.

WDYT?

> +    (description
> +     "libpeas is a gobject-based plugins engine, and is targetted at giving
> +every application the chance to assume its own extensibility. It also has a set
> +of features including, but not limited to:
> +
> +-  multiple extension points
> +-  on demand (lazy) programming language support for C, Python and JS
> +- simplicity of the API")

I think we should avoid item lists in descriptions, because we don’t
parse them as such currently.  Also, two-spaces-after-period please.

Other than that, that looks all good to me, thanks!

Ludo’.

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

* Re: [PATCH 0/2] Add libpeas.
  2013-10-15 20:12 ` [PATCH 0/2] " Ludovic Courtès
@ 2013-10-17  0:42   ` Cyril Roelandt
  2013-10-17 11:36     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Cyril Roelandt @ 2013-10-17  0:42 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Tue, Oct 15, 2013 at 10:12:25PM +0200, Ludovic Courtès wrote:
> Cyril Roelandt <tipecaml@gmail.com> skribis:
> 
> > These two patches add libpeas. The first one enables the introspection feature
> > for a few GNOME packages; the second adds libpeas.
> 
> Nice!
> 
> > +           ;; The scanner will use the CC environment variable.
> > +           (setenv "CC" "gcc")
> 
> Before we copy/paste these two lines in a dozen packages ;-), what about
> patching the damn scanner directly in gobject-introspection?

Indeed, this makes sense :)

> 
> IIUC it’d be just about patching ‘giscanner/sourcescanner.py’ to default
> to /nix/store/.../bin/gcc instead of cc.
> 
> WDYT?

I patched it so that it first tries to use $CC, then 'cc', then
/nix/store/.../bin/gcc. This way, if the user set $CC or has a 'cc' symlink,
there will be no surprises.

> 
> > +    (description
> > +     "libpeas is a gobject-based plugins engine, and is targetted at giving
> > +every application the chance to assume its own extensibility. It also has a set
> > +of features including, but not limited to:
> > +
> > +-  multiple extension points
> > +-  on demand (lazy) programming language support for C, Python and JS
> > +- simplicity of the API")
> 
> I think we should avoid item lists in descriptions, because we don’t
> parse them as such currently.  Also, two-spaces-after-period please.

OK.

> 
> Other than that, that looks all good to me, thanks!
> 

I'll resubmit these two patches as part of a larger patch series that adds eog
(Eye of GNOME) and its dependencies.

Cyril.

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

* Re: [PATCH 0/2] Add libpeas.
  2013-10-17  0:42   ` Cyril Roelandt
@ 2013-10-17 11:36     ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2013-10-17 11:36 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

Cyril Roelandt <tipecaml@gmail.com> skribis:

> On Tue, Oct 15, 2013 at 10:12:25PM +0200, Ludovic Courtès wrote:
>> Cyril Roelandt <tipecaml@gmail.com> skribis:
>> 
>> > These two patches add libpeas. The first one enables the introspection feature
>> > for a few GNOME packages; the second adds libpeas.
>> 
>> Nice!
>> 
>> > +           ;; The scanner will use the CC environment variable.
>> > +           (setenv "CC" "gcc")
>> 
>> Before we copy/paste these two lines in a dozen packages ;-), what about
>> patching the damn scanner directly in gobject-introspection?
>
> Indeed, this makes sense :)
>
>> 
>> IIUC it’d be just about patching ‘giscanner/sourcescanner.py’ to default
>> to /nix/store/.../bin/gcc instead of cc.
>> 
>> WDYT?
>
> I patched it so that it first tries to use $CC, then 'cc', then
> /nix/store/.../bin/gcc. This way, if the user set $CC or has a 'cc' symlink,
> there will be no surprises.

Even better.

Thanks,
Ludo’.

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

end of thread, other threads:[~2013-10-17 11:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15  0:13 [PATCH 0/2] Add libpeas Cyril Roelandt
2013-10-15  0:13 ` [PATCH 1/2] gnu: gtk+: enable introspection Cyril Roelandt
2013-10-15  0:13 ` [PATCH 2/2] gnu: Add libpeas Cyril Roelandt
2013-10-15 20:12 ` [PATCH 0/2] " Ludovic Courtès
2013-10-17  0:42   ` Cyril Roelandt
2013-10-17 11:36     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.