Re: [PATCH] gnu: Add libunique.
On Mon, Aug 22, 2016 at 02:16:49PM +, ng0 wrote: > So we need libunique definitely: > > libunique is used so that if you start gnunet-gtk applications twice, > you still only get one window. This makes sense in combination with > 'gnunet-uri', which may launch a possibly already running GUI to process > a particular URI. In this case, libunique is used to detect that the GUI > is already up, and pass the URI to the running process. > > There _may_ be a more modern alternative in Gtk3 these days, but for now > we need libunique for this functionality. > > see: https://gnunet.org/bugs/view.php?id=4618#c11050 > > Is this patch good for merging? Okay, pushed as 85327d0d4. Thank you for your work on this!
Re: [PATCH] gnu: Add libunique.
So we need libunique definitely: libunique is used so that if you start gnunet-gtk applications twice, you still only get one window. This makes sense in combination with 'gnunet-uri', which may launch a possibly already running GUI to process a particular URI. In this case, libunique is used to detect that the GUI is already up, and pass the URI to the running process. There _may_ be a more modern alternative in Gtk3 these days, but for now we need libunique for this functionality. see: https://gnunet.org/bugs/view.php?id=4618#c11050 Is this patch good for merging? -- ng0 For non-prism friendly talk find me on http://www.psyced.org
Re: [PATCH] gnu: Add libunique.
Leo Famulari writes: > On Wed, Aug 17, 2016 at 09:52:40AM +, ng0 wrote: >> Leo Famulari writes: >> > Okay, then I think we should add the package with a comment that says >> > it's unmaintained. What do you think of the attached patch? >> >> Looks good to me. This way if some old application should require >> libunique, we have it. I'll also ask about libunique at gnunet-devel >> list with some other applications I need to question. As far as I >> understand Christian, they want to avoid external dependencies where >> possible. A ifcase for gnunet-gtk is in the HEAD of gnunet-gtk. > > What does your last sentence mean? I should be more precise and provide context to statements. I am sorry. I meant this: https://gnunet.org/svn/gnunet-gtk/src/fs/gnunet-fs-gtk.c /** * @file src/fs/gnunet-fs-gtk.c * @brief Main function of gnunet-fs-gtk * @author Christian Grothoff */ #include "gnunet-fs-gtk.h" #include "gnunet-fs-gtk_common.h" #include "gnunet-fs-gtk_event-handler.h" #include "gnunet-fs-gtk_open-uri.h" #if HAVE_LIBUNIQUE #include #endif and similar inclusions. By the way, I've asked about specific dependencies here (https://gnunet.org/bugs/view.php?id=4618 ), including libunique. -- ng0 For non-prism friendly talk find me on http://www.psyced.org
Re: [PATCH] gnu: Add libunique.
On Wed, Aug 17, 2016 at 09:52:40AM +, ng0 wrote: > Leo Famulari writes: > > Okay, then I think we should add the package with a comment that says > > it's unmaintained. What do you think of the attached patch? > > Looks good to me. This way if some old application should require > libunique, we have it. I'll also ask about libunique at gnunet-devel > list with some other applications I need to question. As far as I > understand Christian, they want to avoid external dependencies where > possible. A ifcase for gnunet-gtk is in the HEAD of gnunet-gtk. What does your last sentence mean?
Re: [PATCH] gnu: Add libunique.
Leo Famulari writes: > On Mon, Aug 15, 2016 at 11:33:26PM +, ng0 wrote: >> Leo Famulari writes: >> > Is this package required by something else that we are working on? What >> > is the use case? >> >> (gnunet-gtk): >> >> (arguments >> `(#:configure-flags >> (list "--without-libunique" > > Okay, then I think we should add the package with a comment that says > it's unmaintained. What do you think of the attached patch? Looks good to me. This way if some old application should require libunique, we have it. I'll also ask about libunique at gnunet-devel list with some other applications I need to question. As far as I understand Christian, they want to avoid external dependencies where possible. A ifcase for gnunet-gtk is in the HEAD of gnunet-gtk. Thanks > From fa8fbd899756cf948da23e9a29d92a5f48d4eb1c Mon Sep 17 00:00:00 2001 > From: ng0 > Date: Wed, 3 Aug 2016 08:18:14 + > Subject: [PATCH] gnu: Add libunique. > > * gnu/packages/gnome.scm (libunique): New variable. > > Signed-off-by: Leo Famulari > --- > gnu/packages/gnome.scm | 40 > 1 file changed, 40 insertions(+) > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > index 4a0be01..b094c30 100644 > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -5420,3 +5420,43 @@ GLib/GObject code.") > "Libgnomekbd is a keyboard configuration library for the GNOME desktop > environment, which can notably display keyboard layouts.") > (license license:lgpl2.0+))) > + > +;;; This package is no longer maintained: > +;;; https://wiki.gnome.org/Attic/LibUnique > +;;; "Unique is now in maintenance mode, and its usage is strongly > discouraged. > +;;; Applications should use the GtkApplication class provided by GTK+ 3.0." > +(define-public libunique > + (package > +(name "libunique") > +(version "3.0.2") > +(source (origin > + (method url-fetch) > + (uri (string-append "mirror://gnome/sources/" name "/" > + (version-major+minor version) "/" > + name "-" version ".tar.xz")) > + (sha256 > + (base32 > +"0f70lkw66v9cj72q0iw1s2546r6bwwcd8idcm3621fg2fgh2rw58" > +(build-system glib-or-gtk-build-system) > +(arguments > + `(#:configure-flags '("--disable-static" > + "--disable-dbus" ; use gdbus > + "--enable-introspection"))) > +(native-inputs > + `(("pkg-config" ,pkg-config) > + ("gobject-introspection" ,gobject-introspection) > + ("glib:bin" ,glib "bin") > + ("gtk-doc" ,gtk-doc))) > +(propagated-inputs > + ;; Referred to in .h files and .pc. > + `(("gtk+" ,gtk+))) > +(home-page "https://wiki.gnome.org/Attic/LibUnique";) > +(synopsis "Library for writing single instance applications") > +(description > + "Libunique is a library for writing single instance applications. If > you > +launch a single instance application twice, the second instance will either > just > +quit or will send a message to the running instance. Libunique makes it > easy to > +write this kind of application, by providing a base class, taking care of all > +the IPC machinery needed to send messages to a running instance, and also > +handling the startup notification side.") > +(license license:lgpl2.1+))) > -- > 2.9.3 > -- ng0 For non-prism friendly talk find me on http://www.psyced.org
Re: [PATCH] gnu: Add libunique.
On Mon, Aug 15, 2016 at 11:33:26PM +, ng0 wrote: > Leo Famulari writes: > > Is this package required by something else that we are working on? What > > is the use case? > > (gnunet-gtk): > > (arguments > `(#:configure-flags > (list "--without-libunique" Okay, then I think we should add the package with a comment that says it's unmaintained. What do you think of the attached patch? >From fa8fbd899756cf948da23e9a29d92a5f48d4eb1c Mon Sep 17 00:00:00 2001 From: ng0 Date: Wed, 3 Aug 2016 08:18:14 + Subject: [PATCH] gnu: Add libunique. * gnu/packages/gnome.scm (libunique): New variable. Signed-off-by: Leo Famulari --- gnu/packages/gnome.scm | 40 1 file changed, 40 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4a0be01..b094c30 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5420,3 +5420,43 @@ GLib/GObject code.") "Libgnomekbd is a keyboard configuration library for the GNOME desktop environment, which can notably display keyboard layouts.") (license license:lgpl2.0+))) + +;;; This package is no longer maintained: +;;; https://wiki.gnome.org/Attic/LibUnique +;;; "Unique is now in maintenance mode, and its usage is strongly discouraged. +;;; Applications should use the GtkApplication class provided by GTK+ 3.0." +(define-public libunique + (package +(name "libunique") +(version "3.0.2") +(source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 +"0f70lkw66v9cj72q0iw1s2546r6bwwcd8idcm3621fg2fgh2rw58" +(build-system glib-or-gtk-build-system) +(arguments + `(#:configure-flags '("--disable-static" + "--disable-dbus" ; use gdbus + "--enable-introspection"))) +(native-inputs + `(("pkg-config" ,pkg-config) + ("gobject-introspection" ,gobject-introspection) + ("glib:bin" ,glib "bin") + ("gtk-doc" ,gtk-doc))) +(propagated-inputs + ;; Referred to in .h files and .pc. + `(("gtk+" ,gtk+))) +(home-page "https://wiki.gnome.org/Attic/LibUnique";) +(synopsis "Library for writing single instance applications") +(description + "Libunique is a library for writing single instance applications. If you +launch a single instance application twice, the second instance will either just +quit or will send a message to the running instance. Libunique makes it easy to +write this kind of application, by providing a base class, taking care of all +the IPC machinery needed to send messages to a running instance, and also +handling the startup notification side.") +(license license:lgpl2.1+))) -- 2.9.3
Re: [PATCH] gnu: Add libunique.
Leo Famulari writes: > [ Unknown signature status ] > On Fri, Aug 05, 2016 at 06:44:47PM +, ng0 wrote: >> Subject: [PATCH] gnu: Add libunique. >> >> * gnu/packages/gnome.scm (libunique): New variable. > > This package appears abandoned by its developers: I am aware of that, as I pointed out earlier in the thread. > WARNING > Unique is now in maintenance mode, and its usage is strongly discouraged. > Applications should use the GtkApplication class provided by GTK+ 3.0. > If you are using Unique, read the GtkApplication porting guide provided by > GTK+. > > source: https://wiki.gnome.org/Attic/LibUnique > > Is this package required by something else that we are working on? What > is the use case? (gnunet-gtk): (arguments `(#:configure-flags (list "--without-libunique" "--with-qrencode" (string-append "--with-gnunet=" (assoc-ref %build-inputs "gnunet") Maybe also racket, at least libunique-1.0 appears in its definition, I have no desire to understand its meaning in there now. I'd like to have libunique available for gnunet-gtk, but I also have planned to address some further questions to other gnunet developers about dependencies I found in the last year packaging it, so it might or might not be necessary. -- ♥Ⓐ ng0 For non-prism friendly talk find me on http://www.psyced.org
Re: [PATCH] gnu: Add libunique.
On Fri, Aug 05, 2016 at 06:44:47PM +, ng0 wrote: > Subject: [PATCH] gnu: Add libunique. > > * gnu/packages/gnome.scm (libunique): New variable. This package appears abandoned by its developers: WARNING Unique is now in maintenance mode, and its usage is strongly discouraged. Applications should use the GtkApplication class provided by GTK+ 3.0. If you are using Unique, read the GtkApplication porting guide provided by GTK+. source: https://wiki.gnome.org/Attic/LibUnique Is this package required by something else that we are working on? What is the use case? signature.asc Description: PGP signature
Re: [PATCH] gnu: Add libunique.
Fixed. Can someone review and apply it? From 7079fabc8eee8913df79346cd5747837a3262825 Mon Sep 17 00:00:00 2001 From: ng0 Date: Wed, 3 Aug 2016 08:18:14 + Subject: [PATCH] gnu: Add libunique. * gnu/packages/gnome.scm (libunique): New variable. --- gnu/packages/gnome.scm | 37 + 1 file changed, 37 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 2038f8f..9df26ee 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5420,3 +5420,40 @@ GLib/GObject code.") "Libgnomekbd is a keyboard configuration library for the GNOME desktop environment, which can notably display keyboard layouts.") (license license:lgpl2.0+))) + +(define-public libunique + (package +(name "libunique") +(version "3.0.2") +(source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 +"0f70lkw66v9cj72q0iw1s2546r6bwwcd8idcm3621fg2fgh2rw58" +;;(build-system gnu-build-system) +(build-system glib-or-gtk-build-system) +(arguments + `(#:configure-flags '("--disable-static" + "--disable-dbus" ; use gdbus + "--enable-introspection"))) +(native-inputs + `(("pkg-config" ,pkg-config) + ("gobject-introspection" ,gobject-introspection) + ("glib:bin" ,glib "bin") + ("gtk-doc" ,gtk-doc))) +(propagated-inputs + ;; Referred to in .h files and .pc. + `(("gtk+" ,gtk+))) +(home-page "https://wiki.gnome.org/Attic/LibUnique";) +(synopsis "Library for writing single instance application") +(description + "Libunique is a library for writing single instance application. If you +launch a single instance application twice, the second instance will +either just quit or will send a message to the running instance. +Libunique makes it easy to write this kind of applications, by providing a +base class, taking care of all the IPC machinery needed to send messages +to a running instance, and also handling the startup notification side.") +(license license:lgpl2.1+))) -- 2.9.2 -- ♥Ⓐ ng0 Current Keys: https://we.make.ritual.n0.is/ng0.txt For non-prism friendly talk find me on http://www.psyced.org signature.asc Description: PGP signature
Re: [PATCH] gnu: Add libunique.
ng0 writes: > I gave this a try, loosely based on the patch for the older version I > created a patch for the the more current version of libunique. > Maybe someone has input on the errors or what to add/change, I am > working on other things in parallel. Where "the errors" obviously are building gtk-doc fails at the moment. > Thanks. > > From 162c92ef3ddbd635462157c8900dc4edbe43e817 Mon Sep 17 00:00:00 2001 > From: ng0 > Date: Wed, 3 Aug 2016 08:18:14 + > Subject: [PATCH] gnu: Add libunique. > > * gnu/packages/gnome.scm (libunique): New variable. > --- > gnu/packages/gnome.scm | 37 + > 1 file changed, 37 insertions(+) > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > index 2038f8f..9df26ee 100644 > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -5420,3 +5420,40 @@ GLib/GObject code.") > "Libgnomekbd is a keyboard configuration library for the GNOME desktop > environment, which can notably display keyboard layouts.") > (license license:lgpl2.0+))) > + > +(define-public libunique > + (package > +(name "libunique") > +(version "3.0.2") > +(source (origin > + (method url-fetch) > + (uri (string-append "mirror://gnome/sources/" name "/" > + (version-major+minor version) "/" > + name "-" version ".tar.xz")) > + (sha256 > + (base32 > +"0f70lkw66v9cj72q0iw1s2546r6bwwcd8idcm3621fg2fgh2rw58" > +;;(build-system gnu-build-system) > +(build-system glib-or-gtk-build-system) > +(arguments > + `(#:configure-flags '("--disable-static" > + "--disable-dbus" ; use gdbus > + "--enable-introspection"))) > +(native-inputs > + `(("pkg-config" ,pkg-config) > + ("gobject-introspection" ,gobject-introspection) > + ("glib:bin" ,glib "bin") > + ("gtk-doc" ,gtk-doc))) > +(propagated-inputs > + ;; Referred to in .h files and .pc. > + `(("gtk+" ,gtk+))) > +(home-page "https://wiki.gnome.org/Attic/LibUnique";) > +(synopsis "Library for writing single instance application") > +(description > + "Libunique is a library for writing single instance application. If you > +launch a single instance application twice, the second instance will > +either just quit or will send a message to the running instance. > +Libunique makes it easy to write this kind of applications, by providing a > +base class, taking care of all the IPC machinery needed to send messages > +to a running instance, and also handling the startup notification side.") > +(license license:lgpl2.1+))) > -- > 2.9.2 > > > Error output follows in next message. ^ Actually, no. -- ♥Ⓐ ng0 Current Keys: https://we.make.ritual.n0.is/ng0.txt For non-prism friendly talk find me on http://www.psyced.org
Re: [PATCH] gnu: Add libunique.
I gave this a try, loosely based on the patch for the older version I created a patch for the the more current version of libunique. Maybe someone has input on the errors or what to add/change, I am working on other things in parallel. Thanks. >From 162c92ef3ddbd635462157c8900dc4edbe43e817 Mon Sep 17 00:00:00 2001 From: ng0 Date: Wed, 3 Aug 2016 08:18:14 + Subject: [PATCH] gnu: Add libunique. * gnu/packages/gnome.scm (libunique): New variable. --- gnu/packages/gnome.scm | 37 + 1 file changed, 37 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 2038f8f..9df26ee 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5420,3 +5420,40 @@ GLib/GObject code.") "Libgnomekbd is a keyboard configuration library for the GNOME desktop environment, which can notably display keyboard layouts.") (license license:lgpl2.0+))) + +(define-public libunique + (package +(name "libunique") +(version "3.0.2") +(source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 +"0f70lkw66v9cj72q0iw1s2546r6bwwcd8idcm3621fg2fgh2rw58" +;;(build-system gnu-build-system) +(build-system glib-or-gtk-build-system) +(arguments + `(#:configure-flags '("--disable-static" + "--disable-dbus" ; use gdbus + "--enable-introspection"))) +(native-inputs + `(("pkg-config" ,pkg-config) + ("gobject-introspection" ,gobject-introspection) + ("glib:bin" ,glib "bin") + ("gtk-doc" ,gtk-doc))) +(propagated-inputs + ;; Referred to in .h files and .pc. + `(("gtk+" ,gtk+))) +(home-page "https://wiki.gnome.org/Attic/LibUnique";) +(synopsis "Library for writing single instance application") +(description + "Libunique is a library for writing single instance application. If you +launch a single instance application twice, the second instance will +either just quit or will send a message to the running instance. +Libunique makes it easy to write this kind of applications, by providing a +base class, taking care of all the IPC machinery needed to send messages +to a running instance, and also handling the startup notification side.") +(license license:lgpl2.1+))) -- 2.9.2 Error output follows in next message. -- ♥Ⓐ ng0 Current Keys: https://we.make.ritual.n0.is/ng0.txt For non-prism friendly talk find me on http://www.psyced.org
Re: [PATCH] gnu: Add libunique.
Hello Fabian Harfert, I see your contribution did not receive any further reaction. Did it just disappear in the work-in-progress branches/folders you have, or do you have no further intentions to work on it for whatever reasons it may be (time, resources, …)? I'd like to move this contribution of yours over the "finishing line", tell me if you like to pick up work on it or prefer someone else to finish it. Thanks, ng0 Leo Famulari writes: > On Fri, Feb 19, 2016 at 09:10:44PM +0100, Fabian Harfert wrote: > > Thanks for the patch! > >> * gnu/packages/patches/libunique-gdbus.patch: New file. >> * gnu/packages/patches/libunique-remove-G_CONST_RETURN.patch: New file. > > Can you give the context of these patches? > > I see there are newer versions available: > https://git.gnome.org/browse/unique/log/ > > Perhaps a more recent release would not require the patches? > > In any case, remember you have to register the patches in gnu_system.am > (dist_patch_DATA). There's a recent example in 4e58a402. > >> * gnu/packages/glib.scm (libunique): New variable. > > [...] > >> +(synopsis "Library for writing single instance application") > > How about "Library for writing single instance applications"? > >> +(description >> + "Libunique is library providing a mechanism to allow only one running >> +instance of an application.") > > I think we should steal Debian's description: > > "Libunique is a library for writing single instance application. If you > launch a single instance application twice, the second instance will > either just quit or will send a message to the running instance. > > Libunique makes it easy to write this kind of applications, by providing a > base class, taking care of all the IPC machinery needed to send messages > to a running instance, and also handling the startup notification side." > https://packages.debian.org/stretch/libunique-3.0-0 > > [...] > -- ♥Ⓐ ng0 Current Keys: https://we.make.ritual.n0.is/ng0.txt For non-prism friendly talk find me on http://www.psyced.org
Re: [PATCH] gnu: Add libunique.
On Fri, Feb 19, 2016 at 09:10:44PM +0100, Fabian Harfert wrote: Thanks for the patch! > * gnu/packages/patches/libunique-gdbus.patch: New file. > * gnu/packages/patches/libunique-remove-G_CONST_RETURN.patch: New file. Can you give the context of these patches? I see there are newer versions available: https://git.gnome.org/browse/unique/log/ Perhaps a more recent release would not require the patches? In any case, remember you have to register the patches in gnu_system.am (dist_patch_DATA). There's a recent example in 4e58a402. > * gnu/packages/glib.scm (libunique): New variable. [...] > +(synopsis "Library for writing single instance application") How about "Library for writing single instance applications"? > +(description > + "Libunique is library providing a mechanism to allow only one running > +instance of an application.") I think we should steal Debian's description: "Libunique is a library for writing single instance application. If you launch a single instance application twice, the second instance will either just quit or will send a message to the running instance. Libunique makes it easy to write this kind of applications, by providing a base class, taking care of all the IPC machinery needed to send messages to a running instance, and also handling the startup notification side." https://packages.debian.org/stretch/libunique-3.0-0 [...]
[PATCH] gnu: Add libunique.
* gnu/packages/patches/libunique-gdbus.patch: New file. * gnu/packages/patches/libunique-remove-G_CONST_RETURN.patch: New file. * gnu/packages/glib.scm (libunique): New variable. --- gnu/packages/glib.scm | 32 ++ gnu/packages/patches/libunique-gdbus.patch | 529 + .../patches/libunique-remove-G_CONST_RETURN.patch | 117 + 3 files changed, 678 insertions(+) create mode 100644 gnu/packages/patches/libunique-gdbus.patch create mode 100644 gnu/packages/patches/libunique-remove-G_CONST_RETURN.patch diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index f8e1541..259a744 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016 Fabian Harfert ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (guix build-system glib-or-gtk) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bison) @@ -611,3 +613,33 @@ many applications simultaneously. This package provides the library for GLib applications.") (license license:lgpl2.1+))) + +(define-public libunique + (package +(name "libunique") +(version "1.1.6") +(source + (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/libunique/" + (version-major+minor version) "/" + name "-" version ".tar.bz2")) + (sha256 +(base32 + "1fsgvmncd9caw552lyfg8swmsd6bh4ijjsph69bwacwfxwf09j75")) + (patches +(list (search-patch "libunique-gdbus.patch") + (search-patch "libunique-remove-G_CONST_RETURN.patch") +(build-system glib-or-gtk-build-system) +(native-inputs + `(("pkg-config" ,pkg-config) + ("gobject-introspection" ,gobject-introspection) + ("glib:bin" ,glib "bin"))) +(propagated-inputs + `(("gtk+" ,gtk+-2))) +(home-page "https://wiki.gnome.org/Attic/LibUnique";) +(synopsis "Library for writing single instance application") +(description + "Libunique is library providing a mechanism to allow only one running +instance of an application.") +(license license:lgpl2.1+))) diff --git a/gnu/packages/patches/libunique-gdbus.patch b/gnu/packages/patches/libunique-gdbus.patch new file mode 100644 index 000..880c0c0 --- /dev/null +++ b/gnu/packages/patches/libunique-gdbus.patch @@ -0,0 +1,529 @@ +From 01066039529c0181f231325476bb4823c16a2aea Mon Sep 17 00:00:00 2001 +From: Christian Persch +Date: Sat, 15 May 2010 17:47:45 + +Subject: Add GDBus backend + +Add backend using GDBus, the new D-BUS binding in GIO 2.25. + +Bug #618723. +--- +diff --git a/configure.ac b/configure.ac +index bc3163a..b6a4221 100644 +--- a/configure.ac b/configure.ac +@@ -116,6 +116,19 @@ AS_IF([test "x$have_dbus" = "xyes"], + + AM_CONDITIONAL([HAVE_DBUS], [test "x$have_dbus" = "xyes"]) + ++dnl GDBus backend ++dnl This is the default backend if GIO is recent enough ++m4_define([gdbus_gio_required],[2.25.7]) ++PKG_CHECK_MODULES([GDBUS],[gio-2.0 >= gdbus_gio_required],[have_gdbus=yes],[have_gdbus=no]) ++ ++AS_IF([test "x$have_gdbus" = "xyes"], ++ [ ++AC_DEFINE([HAVE_GDBUS],[1],[Define if GDBus backend is enabled]) ++ ] ++ ) ++ ++AM_CONDITIONAL([HAVE_GDBUS],[test "$have_gdbus" = "yes"]) ++ + dnl Bacon backend + dnl This is the fallback backend, so we *need* these headers and functions + dnl even if we end up using D-Bus +@@ -146,7 +159,13 @@ AM_CONDITIONAL([HAVE_BACON], [test "x$have_bacon" = "xyes"]) + + dnl Choose the default backend + AC_MSG_CHECKING([for default IPC mechanism]) +-AS_IF([test "x$have_dbus" = "xyes"], ++AS_IF([test "x$have_gdbus" = "xyes"], ++ [ ++UNIQUE_DEFAULT_BACKEND=gdbus ++AC_MSG_RESULT([GDBus]) ++ ], ++ ++ [test "x$have_dbus" = "xyes"], + [ + UNIQUE_DEFAULT_BACKEND=dbus + AC_MSG_RESULT([D-Bus]) +@@ -243,6 +262,7 @@ AC_CONFIG_FILES([ + unique/uniqueversion.h + unique/bacon/Makefile + unique/dbus/Makefile ++unique/gdbus/Makefile + tests/Makefile + po/Makefile.in + ]) +@@ -261,6 +281,7 @@ Configuration: + Backends: + Unix Domain Socket: $have_bacon +D-BUS: $have_dbus ++ GDBus: $have_gdbus + + Default backend: $UNIQUE_DEFAULT_BACKEND + " +diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am +index 3172588..2c1dbf4 100644 +--- a/doc/reference/Makefile.am b/doc/reference/Makefile.am +@@ -50,7 +50,8 @@ IGNORE_HFILES = \ + uniquemarshal.h \ + stamp-uniquemarshal.h \ + bacon \ +- dbus ++ dbus \ ++ gdbus + + EXTRA_HFILES = +
[PATCH] gnu: Add libunique.
* gnu/packages/glib.scm (libunique): New variable. * gnu/packages/patches/libunique-gdbus.patch: New file. * gnu/packages/patches/libunique-remove-G_CONST_RETURN.patch: New file. --- gnu/packages/glib.scm | 32 ++ gnu/packages/patches/libunique-gdbus.patch | 529 + .../patches/libunique-remove-G_CONST_RETURN.patch | 117 + 3 files changed, 678 insertions(+) create mode 100644 gnu/packages/patches/libunique-gdbus.patch create mode 100644 gnu/packages/patches/libunique-remove-G_CONST_RETURN.patch diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index f8e1541..259a744 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014, 2015, 2016 Mark H Weaver ;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016 Fabian Harfert ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (guix build-system glib-or-gtk) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bison) @@ -611,3 +613,33 @@ many applications simultaneously. This package provides the library for GLib applications.") (license license:lgpl2.1+))) + +(define-public libunique + (package +(name "libunique") +(version "1.1.6") +(source + (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/libunique/" + (version-major+minor version) "/" + name "-" version ".tar.bz2")) + (sha256 +(base32 + "1fsgvmncd9caw552lyfg8swmsd6bh4ijjsph69bwacwfxwf09j75")) + (patches +(list (search-patch "libunique-gdbus.patch") + (search-patch "libunique-remove-G_CONST_RETURN.patch") +(build-system glib-or-gtk-build-system) +(native-inputs + `(("pkg-config" ,pkg-config) + ("gobject-introspection" ,gobject-introspection) + ("glib:bin" ,glib "bin"))) +(propagated-inputs + `(("gtk+" ,gtk+-2))) +(home-page "https://wiki.gnome.org/Attic/LibUnique";) +(synopsis "Library for writing single instance application") +(description + "Libunique is library providing a mechanism to allow only one running +instance of an application.") +(license license:lgpl2.1+))) diff --git a/gnu/packages/patches/libunique-gdbus.patch b/gnu/packages/patches/libunique-gdbus.patch new file mode 100644 index 000..880c0c0 --- /dev/null +++ b/gnu/packages/patches/libunique-gdbus.patch @@ -0,0 +1,529 @@ +From 01066039529c0181f231325476bb4823c16a2aea Mon Sep 17 00:00:00 2001 +From: Christian Persch +Date: Sat, 15 May 2010 17:47:45 + +Subject: Add GDBus backend + +Add backend using GDBus, the new D-BUS binding in GIO 2.25. + +Bug #618723. +--- +diff --git a/configure.ac b/configure.ac +index bc3163a..b6a4221 100644 +--- a/configure.ac b/configure.ac +@@ -116,6 +116,19 @@ AS_IF([test "x$have_dbus" = "xyes"], + + AM_CONDITIONAL([HAVE_DBUS], [test "x$have_dbus" = "xyes"]) + ++dnl GDBus backend ++dnl This is the default backend if GIO is recent enough ++m4_define([gdbus_gio_required],[2.25.7]) ++PKG_CHECK_MODULES([GDBUS],[gio-2.0 >= gdbus_gio_required],[have_gdbus=yes],[have_gdbus=no]) ++ ++AS_IF([test "x$have_gdbus" = "xyes"], ++ [ ++AC_DEFINE([HAVE_GDBUS],[1],[Define if GDBus backend is enabled]) ++ ] ++ ) ++ ++AM_CONDITIONAL([HAVE_GDBUS],[test "$have_gdbus" = "yes"]) ++ + dnl Bacon backend + dnl This is the fallback backend, so we *need* these headers and functions + dnl even if we end up using D-Bus +@@ -146,7 +159,13 @@ AM_CONDITIONAL([HAVE_BACON], [test "x$have_bacon" = "xyes"]) + + dnl Choose the default backend + AC_MSG_CHECKING([for default IPC mechanism]) +-AS_IF([test "x$have_dbus" = "xyes"], ++AS_IF([test "x$have_gdbus" = "xyes"], ++ [ ++UNIQUE_DEFAULT_BACKEND=gdbus ++AC_MSG_RESULT([GDBus]) ++ ], ++ ++ [test "x$have_dbus" = "xyes"], + [ + UNIQUE_DEFAULT_BACKEND=dbus + AC_MSG_RESULT([D-Bus]) +@@ -243,6 +262,7 @@ AC_CONFIG_FILES([ + unique/uniqueversion.h + unique/bacon/Makefile + unique/dbus/Makefile ++unique/gdbus/Makefile + tests/Makefile + po/Makefile.in + ]) +@@ -261,6 +281,7 @@ Configuration: + Backends: + Unix Domain Socket: $have_bacon +D-BUS: $have_dbus ++ GDBus: $have_gdbus + + Default backend: $UNIQUE_DEFAULT_BACKEND + " +diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am +index 3172588..2c1dbf4 100644 +--- a/doc/reference/Makefile.am b/doc/reference/Makefile.am +@@ -50,7 +50,8 @@ IGNORE_HFILES = \ + uniquemarshal.h \ + stamp-uniquemarshal.h \ + bacon \ +- dbus ++ dbus \ ++ gdbus + + EXTRA_HFILES = +