diff mbox series

[bug#44019] add dbus-cxx

Message ID CAHBH9LCizAbb+dyCZP3a6WYssqBKgQJiu=KxPHo6NMti0od-3w@mail.gmail.com
State New
Headers show
Series [bug#44019] add dbus-cxx | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

tiregram arthur Oct. 15, 2020, 5:19 p.m. UTC
From c3804aca21c496e66e44ba48fd150501154dfb6d Mon Sep 17 00:00:00 2001
From: ruhtra <ruhtra.mar@gmail.com>
Date: Thu, 15 Oct 2020 18:58:46 +0200
Subject: [PATCH] to add dbus-cxx package add gnu/packages/dbus-cxx.scm

---
 gnu/packages/dbus-cxx.scm | 52 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 gnu/packages/dbus-cxx.scm

--
2.28.0

Comments

Miguel Ángel Arruga Vivas Oct. 19, 2020, 2:32 p.m. UTC | #1
Hi Arthur,

Thank you very much for your patch.  Nonetheless, there is already a
package named dbus-c++ and that can be found in gnu/packages/glib.scm
and the description fits almost exactly this one, but it's being used
currently only by libring (Jami).  Even if they are different projects
(dbus-c++ and dbus-cxx), they should belong together in the source code
(gnu/packages/glib.scm).

Could you confirm that they are different code bases, and also move that
definition there for the patch if that's the case?

Happy hacking!
Miguel

tiregram arthur <ruhtra.mar@gmail.com> writes:

>>From c3804aca21c496e66e44ba48fd150501154dfb6d Mon Sep 17 00:00:00 2001
> From: ruhtra <ruhtra.mar@gmail.com>
> Date: Thu, 15 Oct 2020 18:58:46 +0200
> Subject: [PATCH] to add dbus-cxx package add gnu/packages/dbus-cxx.scm
>
> ---
>  gnu/packages/dbus-cxx.scm | 52 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
>  create mode 100644 gnu/packages/dbus-cxx.scm
>
> diff --git a/gnu/packages/dbus-cxx.scm b/gnu/packages/dbus-cxx.scm
> new file mode 100644
> index 0000000000..4ec08fb4ac
> --- /dev/null
> +++ b/gnu/packages/dbus-cxx.scm
> @@ -0,0 +1,52 @@
> +;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
> +;;;
> +;;; This file is part of GNU Guix.
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify it
> +;;; under the terms of the GNU General Public License as published by
> +;;; the Free Software Foundation; either version 3 of the License, or (at
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public License
> +;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
> +
> +(define-module (gnu packages dbus-cxx)
> +  #:use-module (guix packages)
> +  #:use-module (guix git-download)
> +  #:use-module (guix build-system cmake)
> +  #:use-module (guix licenses)
> +  #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages m4)
> +  #:use-module ((gnu packages glib) #:select (dbus libsigc++)))
> +
> +(define-public dbus-cxx
> +  (package
> +    (name "dbus-cxx")
> +    (version "0.12.0")
> +    (source (origin
> +              (file-name (git-file-name name version))
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/dbus-cxx/dbus-cxx")
> +                    (commit "ea7f8e361d11dc7d41d9ae2c4128aed2cdadd84e")))
> +              (sha256
> +               (base32
> +                "1sa448icfvl08rnik0lnk4scmkwhfyd3mrxh36jh8x7xndp90khp"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:tests? #f))
> +    (inputs `(("dbus-glib", dbus) ("libsigc++", libsigc++)))
> +    (native-inputs `(("pkg-config", pkg-config) ("m4", m4)))
> +    (synopsis "C++ wrapper for dbus")
> +    (description "Dbus-cxx is a C++ wrapper for dbus.
> +It exposes the C API to allow direct manipulation and
> +relies on sigc++ to provide an OO interface.
> +Also included is dbus-cxx-xml2cpp to generate proxy and adapter
> + interfaces from DBus XML introspection-like documents.")
> +    (home-page "https://dbus-cxx.github.io/")
> +    (license gpl3)))
> --
> 2.28.0
tiregram arthur Oct. 19, 2020, 4:04 p.m. UTC | #2
Hi, thanks for the answer

https://www.freedesktop.org/wiki/Software/DBusBindings/
 As you can, read in the cpp binding section they are many dbus binding.
And they are différents code base.

I will move the définition to glib.scm.




Le lun. 19 oct. 2020 à 16:33, Miguel Ángel Arruga Vivas <
rosen644835@gmail.com> a écrit :

> Hi Arthur,
>
> Thank you very much for your patch.  Nonetheless, there is already a
> package named dbus-c++ and that can be found in gnu/packages/glib.scm
> and the description fits almost exactly this one, but it's being used
> currently only by libring (Jami).  Even if they are different projects
> (dbus-c++ and dbus-cxx), they should belong together in the source code
> (gnu/packages/glib.scm).
>
> Could you confirm that they are different code bases, and also move that
> definition there for the patch if that's the case?
>
> Happy hacking!
> Miguel
>
> tiregram arthur <ruhtra.mar@gmail.com> writes:
>
> >>From c3804aca21c496e66e44ba48fd150501154dfb6d Mon Sep 17 00:00:00 2001
> > From: ruhtra <ruhtra.mar@gmail.com>
> > Date: Thu, 15 Oct 2020 18:58:46 +0200
> > Subject: [PATCH] to add dbus-cxx package add gnu/packages/dbus-cxx.scm
> >
> > ---
> >  gnu/packages/dbus-cxx.scm | 52 +++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 52 insertions(+)
> >  create mode 100644 gnu/packages/dbus-cxx.scm
> >
> > diff --git a/gnu/packages/dbus-cxx.scm b/gnu/packages/dbus-cxx.scm
> > new file mode 100644
> > index 0000000000..4ec08fb4ac
> > --- /dev/null
> > +++ b/gnu/packages/dbus-cxx.scm
> > @@ -0,0 +1,52 @@
> > +;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
> > +;;;
> > +;;; This file is part of GNU Guix.
> > +;;;
> > +;;; GNU Guix is free software; you can redistribute it and/or modify it
> > +;;; under the terms of the GNU General Public License as published by
> > +;;; the Free Software Foundation; either version 3 of the License, or
> (at
> > +;;; your option) any later version.
> > +;;;
> > +;;; GNU Guix is distributed in the hope that it will be useful, but
> > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +;;; GNU General Public License for more details.
> > +;;;
> > +;;; You should have received a copy of the GNU General Public License
> > +;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
> > +
> > +(define-module (gnu packages dbus-cxx)
> > +  #:use-module (guix packages)
> > +  #:use-module (guix git-download)
> > +  #:use-module (guix build-system cmake)
> > +  #:use-module (guix licenses)
> > +  #:use-module (gnu packages pkg-config)
> > +  #:use-module (gnu packages m4)
> > +  #:use-module ((gnu packages glib) #:select (dbus libsigc++)))
> > +
> > +(define-public dbus-cxx
> > +  (package
> > +    (name "dbus-cxx")
> > +    (version "0.12.0")
> > +    (source (origin
> > +              (file-name (git-file-name name version))
> > +              (method git-fetch)
> > +              (uri (git-reference
> > +                    (url "https://github.com/dbus-cxx/dbus-cxx")
> > +                    (commit
> "ea7f8e361d11dc7d41d9ae2c4128aed2cdadd84e")))
> > +              (sha256
> > +               (base32
> > +
> "1sa448icfvl08rnik0lnk4scmkwhfyd3mrxh36jh8x7xndp90khp"))))
> > +    (build-system cmake-build-system)
> > +    (arguments
> > +     `(#:tests? #f))
> > +    (inputs `(("dbus-glib", dbus) ("libsigc++", libsigc++)))
> > +    (native-inputs `(("pkg-config", pkg-config) ("m4", m4)))
> > +    (synopsis "C++ wrapper for dbus")
> > +    (description "Dbus-cxx is a C++ wrapper for dbus.
> > +It exposes the C API to allow direct manipulation and
> > +relies on sigc++ to provide an OO interface.
> > +Also included is dbus-cxx-xml2cpp to generate proxy and adapter
> > + interfaces from DBus XML introspection-like documents.")
> > +    (home-page "https://dbus-cxx.github.io/")
> > +    (license gpl3)))
> > --
> > 2.28.0
>
Miguel Ángel Arruga Vivas Oct. 19, 2020, 5:24 p.m. UTC | #3
Hi,

tiregram arthur <ruhtra.mar@gmail.com> writes:
> https://www.freedesktop.org/wiki/Software/DBusBindings/
>  As you can, read in the cpp binding section they are many dbus binding.
> And they are différents code base.

Thank you very much for the info, I didn't look there.

> I will move the définition to glib.scm.

And thank you very much for your effort. :-)

Happy hacking!
Miguel
Miguel Ángel Arruga Vivas Oct. 22, 2020, 4:26 p.m. UTC | #4
Hi,

The list was lost at some point in this email, I add it again.

I've checked the code of the library and I'm almost sure it's a fork of
the (unmantained) dbus-c++ project, but I'm not sure about changing the
dependency for jami and its compatibility, so I think it's worth keeping
it as a separate package, at least for now.

Reading and testing your patch I've found several issues about it, all
of them have an easy solution. :-)

tiregram arthur <ruhtra.mar@gmail.com> writes:
> From 8664346cc76e728806c1a797fc59b47d66b603ef Mon Sep 17 00:00:00 2001
> From: ruhtra <ruhtra.mar@gmail.com>
> Date: Tue, 20 Oct 2020 18:52:37 +0200
> Subject: [PATCH] add dbus-cxx package

The commit message title should be with "gnu: Add dbus-cxx."

Also, changelog information is required in the body of the commit, e.g.:

* gnu/packages/glib.scm (dbux-cxx): New package.

> ---
>  gnu/packages/glib.scm | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>
> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> index cde95b13eb..c79060cf8b 100644
> --- a/gnu/packages/glib.scm
> +++ b/gnu/packages/glib.scm
> @@ -13,6 +13,7 @@
>  ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
>  ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
>  ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
> +;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -61,10 +62,12 @@
>    #:use-module (gnu packages xml)
>    #:use-module (gnu packages xorg)
>    #:use-module (guix build-system gnu)
> +  #:use-module (guix build-system cmake)
>    #:use-module (guix build-system meson)
>    #:use-module (guix build-system perl)
>    #:use-module (guix build-system python)
>    #:use-module (guix download)
> +  #:use-module (guix git-download)

This shouldn't be needed, there is a tarball for the release on the
sourceforge page.

>    #:use-module ((guix licenses) #:prefix license:)
>    #:use-module (guix packages)
>    #:use-module (guix utils)
> @@ -932,6 +935,35 @@ programming language.  It also contains the utility
>      (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
>      (license license:lgpl2.1+)))
>  
> +

That extra line break should be removed.

> +(define-public dbus-cxx
> +  (package
> +    (name "dbus-cxx")
> +    (version "0.12.0")
> +    (source (origin
> +              (file-name (git-file-name name version))
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/dbus-cxx/dbus-cxx")
> +                    (commit "ea7f8e361d11dc7d41d9ae2c4128aed2cdadd84e")))

Here it should point to the tarball from sourceforge (like the one for
dbus-c++):
"mirror://sourceforge/dbus-cxx/dbus-cxx/0.12.0/dbus-cxx-0.12.0.tar.gz"

> +              (sha256
> +               (base32
> +                "1sa448icfvl08rnik0lnk4scmkwhfyd3mrxh36jh8x7xndp90khp"))))

The sha256 for the tarball would be
"1acsgpkd9v7b9jdc79ijmh9dbdfrzgkwkaff518i3zpk7y6g5mzw".


> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:tests? #f))

We should run tests as much as possible as the software is going to be
distributed.  For that, -DENABLE_TESTS=ON must be provided through
#:build-arguments, and #:tests? #f removed.

Also, the description doesn't match the options default options,
-DENABLE_TOOLS=ON has to be provided to generate dbus-cxx-xml2cpp and
dbus-cxx-introspection.

There is a third option that could be interesting, -DENABLE_GLIBMM=ON,
but I'm not sure what it really does, apart from generating extra
headers and libs.

> +    (inputs `(("dbus-glib", dbus) ("libsigc++", libsigc++)))

The comma (,) there is reader syntax, so it applies to the right side,
not the left one: ,libsigc++ expands to the contents of the variable
libsigc++ inside the quasiquote (`).  Also, they should be one on each
line, and I would change dbus-glib for dbus too.  To build the tools you
need expat, already available, and popt from (gnu packages popt), like
this code:

    (inputs `(("dbus" ,dbus)
              ("expat" ,expat)
              ("libsigc++" ,libsigc++)
              ("popt" ,popt)))

If the glibmm option worths it, it has to be added to that list too.

> +    (native-inputs `(("pkg-config", pkg-config) ("m4", m4)))

Same indentation problems, one line per dependency, comma with the
variable, not on the left.

> +    (synopsis "C++ wrapper for dbus")
> +    (description "Dbus-cxx is a C++ wrapper for dbus.
> +It exposes the C API to allow direct manipulation and
> +relies on sigc++ to provide an OO interface.
> +Also included is dbus-cxx-xml2cpp to generate proxy and adapter
> + interfaces from DBus XML introspection-like documents.")

This has been directly copied from the web page.  If you don't have any
idea on what to write, the dbus-c++ package description has better
formatting at least. :-)

> +    (home-page "https://dbus-cxx.github.io/")
> +    (license license:gpl3)))
> +
> +

There's an extra line here too.

The main two issues are the compilation options and the description.
Would you mind to send a new version of the patch with these fixes?

Happy hacking!
Miguel
diff mbox series

Patch

diff --git a/gnu/packages/dbus-cxx.scm b/gnu/packages/dbus-cxx.scm
new file mode 100644
index 0000000000..4ec08fb4ac
--- /dev/null
+++ b/gnu/packages/dbus-cxx.scm
@@ -0,0 +1,52 @@ 
+;;; Copyright © 2020 Arthur Margerit <ruhtra.mar@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages dbus-cxx)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system cmake)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages m4)
+  #:use-module ((gnu packages glib) #:select (dbus libsigc++)))
+
+(define-public dbus-cxx
+  (package
+    (name "dbus-cxx")
+    (version "0.12.0")
+    (source (origin
+              (file-name (git-file-name name version))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/dbus-cxx/dbus-cxx")
+                    (commit "ea7f8e361d11dc7d41d9ae2c4128aed2cdadd84e")))
+              (sha256
+               (base32
+                "1sa448icfvl08rnik0lnk4scmkwhfyd3mrxh36jh8x7xndp90khp"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f))
+    (inputs `(("dbus-glib", dbus) ("libsigc++", libsigc++)))
+    (native-inputs `(("pkg-config", pkg-config) ("m4", m4)))
+    (synopsis "C++ wrapper for dbus")
+    (description "Dbus-cxx is a C++ wrapper for dbus.
+It exposes the C API to allow direct manipulation and
+relies on sigc++ to provide an OO interface.
+Also included is dbus-cxx-xml2cpp to generate proxy and adapter
+ interfaces from DBus XML introspection-like documents.")
+    (home-page "https://dbus-cxx.github.io/")
+    (license gpl3)))