[PATCH 1/2] gnu: Add libqalculate

  • Done
  • quality assurance status badge
Details
3 participants
  • Danny Milosavljevic
  • Ludovic Courtès
  • R Veera Kumar
Owner
unassigned
Submitted by
R Veera Kumar
Severity
normal
R
R
R Veera Kumar wrote on 30 Mar 2020 07:22
(address . guix-patches@gnu.org)
c7ae76e80872ed303cbc0c8e8216f56ea7061d8e.1585545646.git.vkor@vkten.in
Libqalculate is a multi-purpose cli desktop calculator and library.
It provides basic and advanced functionality.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
---
gnu/packages/maths.scm | 57 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)

Toggle diff (83 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 028f0e6ef9..1fa1d493fb 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -79,6 +79,7 @@
#:use-module (gnu packages dbm)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
+ #:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages fltk)
#:use-module (gnu packages fontutils)
@@ -86,8 +87,10 @@
#:use-module (gnu packages gcc)
#:use-module (gnu packages gd)
#:use-module (gnu packages ghostscript)
+ #:use-module (gnu packages glib)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages java)
#:use-module (gnu packages less)
@@ -5319,3 +5322,57 @@ researchers and developers alike to get started on SAT.")
(home-page
"http://minisat.se/MiniSat.html")
(license license:expat))))
+
+(define-public libqalculate
+ (let ((commit "90b52e685c1b0575558c5dd449dde71c313d084a")
+ (revision "1"))
+ (package
+ (name "libqalculate")
+ (version (git-version "3.8.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Qalculate/libqalculate/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1vbaza9c7159xf2ym90l0xkyj2mp6c3hbghhsqn29yvz08fda9df"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("intltool" ,intltool)
+ ("automake" ,automake)
+ ("autoconf" ,autoconf)
+ ("libtool" ,libtool)
+ ("m4" ,m4)
+ ("doxygen" ,doxygen)
+ ("file" ,file)))
+ (inputs
+ `(("gmp" ,gmp)
+ ("mpfr" ,mpfr)
+ ("libxml2" ,libxml2)
+ ("curl" ,curl)
+ ("icu4c" ,icu4c)
+ ("gettext" ,gettext-minimal)
+ ("gnuplot" ,gnuplot)
+ ("readline" ,readline)
+ ("libiconv" ,libiconv)))
+ (arguments
+ `( #:phases
+ (modify-phases %standard-phases
+ (delete 'bootstrap) ;; fails in autogen.sh
+ (add-before 'configure 'autogen
+ (lambda _
+ (setenv "NOCONFIGURE" "TRUE")
+ (invoke "./autogen.sh"))))))
+ (home-page "https://qalculate.github.io/")
+ (synopsis "Multi-purpose cli desktop calculator and library")
+ (description
+ "Libqalculate is a multi-purpose cli desktop calculator and library.
+It provides basic and advanced functionality. Features include customizable
+functions, unit calculations, and conversions, physical constants, symbolic
+calculations (including integrals and equations), arbitrary precision,
+uncertainity propagation, interval arithmetic, plotting and a user-friendly
+cli.")
+ (license license:gpl2+))))
--
2.26.0
R
R
R Veera Kumar wrote on 30 Mar 2020 07:27
[PATCH 2/2] gnu: Add qalculate-gtk
(address . 40320@debbugs.gnu.org)
e8055db728ed9ac1655d91d17e5dfae6407c7e4b.1585545646.git.vkor@vkten.in
Qalculate-gtk is the GTK frontend for libqalculate.
It is a multi-purpose GUI desktop calculator.
It provides basic and advanced functionality.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
---
gnu/packages/maths.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)

Toggle diff (72 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 1fa1d493fb..4716129f98 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -62,6 +62,7 @@
#:use-module (guix utils)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix build-system ruby)
@@ -5376,3 +5377,57 @@ calculations (including integrals and equations), arbitrary precision,
uncertainity propagation, interval arithmetic, plotting and a user-friendly
cli.")
(license license:gpl2+))))
+
+(define-public qalculate-gtk
+ (let ((commit "87f78ab3d7ed0dedf56edc38242d559ac07b1330")
+ (revision "1"))
+ (package
+ (name "qalculate-gtk")
+ (version (git-version "3.8.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Qalculate/qalculate-gtk/")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0nsg6dzg5r7rzqr671nvrf1c50rjwpz7bxv5f20i4s7agizgv840"))))
+ (build-system glib-or-gtk-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("intltool" ,intltool)
+ ("automake" ,automake)
+ ("autoconf" ,autoconf)
+ ("libtool" ,libtool)
+ ("file" ,file)
+ ("m4" ,m4)))
+ (inputs
+ `(("gmp" ,gmp)
+ ("mpfr" ,mpfr)
+ ("libqalculate" ,libqalculate)
+ ("libxml2" ,libxml2)
+ ("glib" ,glib)
+ ("gtk+" ,gtk+)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'bootstrap) ;; fails in autogen.sh
+ (add-before 'configure 'autogen
+ (lambda _
+ (setenv "NOCONFIGURE" "TRUE")
+ (invoke "./autogen.sh")))
+ (add-before 'check 'update-po-files ;; to pass po check
+ (lambda _
+ (with-output-to-file "po/POTFILES.skip"
+ (lambda _ (format #t "data/shortcuts.ui~%"))))))))
+ (home-page "https://qalculate.github.io/")
+ (synopsis "Multi-purpose graphical desktop calculator")
+ (description
+ "Qalculate-gtk is the GTK frontend for libqalculate. It is a
+multi-purpose GUI desktop calculator. It provides basic and advanced
+functionality. Features include customizable functions, unit calculations,
+and conversions, physical constants, symbolic calculations (including
+integrals and equations), arbitrary precision, uncertainity propagation,
+interval arithmetic, plotting and a user-friendly cli.")
+ (license license:gpl2+))))
--
2.26.0
D
D
Danny Milosavljevic wrote on 30 Mar 2020 12:45
Re: [bug#40320] [PATCH 1/2] gnu: Add libqalculate
(name . R Veera Kumar)(address . vkor@vkten.in)(address . 40320@debbugs.gnu.org)
20200330124539.79f6568a@scratchpost.org
Hi Veera,

thanks for the patch!

I have a few suggestions:

On Mon, 30 Mar 2020 10:52:23 +0530
R Veera Kumar <vkor@vkten.in> wrote:

Toggle quote (4 lines)
> +(define-public libqalculate
> + (let ((commit "90b52e685c1b0575558c5dd449dde71c313d084a")
> + (revision "1"))

According to github[1], this seems to be the tag "v3.8.0".

Toggle quote (2 lines)
> + (version (git-version "3.8.0" revision commit))

... so please just use (version "3.8.0")

Toggle quote (2 lines)
> + (commit commit)

... and (commit (string-append "v" version))

Toggle quote (3 lines)
> + ("automake" ,automake)
> + ("autoconf" ,autoconf)

It's unusual to need those in a release. Why are they necessary?

Toggle quote (6 lines)
> + (arguments
> + `( #:phases
> + (modify-phases %standard-phases
> + (delete 'bootstrap) ;; fails in autogen.sh
> + (add-before 'configure 'autogen

Why not just (replace 'bootstrap
...
) ?

Toggle quote (9 lines)
>+ (synopsis "Multi-purpose cli desktop calculator and library")
> + (description
> + "Libqalculate is a multi-purpose cli desktop calculator and library.
> +It provides basic and advanced functionality. Features include customizable
> +functions, unit calculations, and conversions, physical constants, symbolic
> +calculations (including integrals and equations), arbitrary precision,
> +uncertainity propagation, interval arithmetic, plotting and a user-friendly
> +cli.")

Maybe mention that this is the library, not the program.

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6BzdMACgkQ5xo1VCww
uqUfMQf/bhwNy+i8VnzV87LgCDAhI1ZUHVUYurPI98ls462W1CcV54tb7SGuF26q
oEyqnWi7ZLudzj0i0SDj1lB+2m/p2JSoFeMkoGKQgH6Uqhy42Um4W15jiM8Nlm3B
tBYIwIAgBZAHCPUOcSw4O/uEs+Ff0InYIW9jALcXK8quowJe19Yy+cLythunLTXK
xA/gTY15mGRrKEmK3SwBB+wRZMvj/m2mz5/xRFrDnfG+D4NfhhvRE9DHJq+cS9+R
IwTdvWIix2vWlTcFZZs8Vq6QtCWQEAl84JBDVas/nsVTOgPhHx8H7RCASryX0Liv
A4Ton2JYOF0yJ/xG8fOV+Oo7gWEecA==
=jW1M
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 30 Mar 2020 12:50
Re: [bug#40320] [PATCH 2/2] gnu: Add qalculate-gtk
(name . R Veera Kumar)(address . vkor@vkten.in)(address . 40320@debbugs.gnu.org)
20200330125013.54640bbc@scratchpost.org
Toggle quote (6 lines)
> + (let ((commit "87f78ab3d7ed0dedf56edc38242d559ac07b1330")
> + (revision "1"))
> + (package
> + (name "qalculate-gtk")
> + (version (git-version "3.8.0" revision commit))

Same as in libqalculate, please use the git tag "v3.8.0" instead.

Toggle quote (3 lines)
> + ("automake" ,automake)
> + ("autoconf" ,autoconf)

Why?

Toggle quote (2 lines)
> + (add-before 'check 'update-po-files ;; to pass po check

Please use just one semicolon for this kind of comment.
Maybe also include the error message one would get otherwise, as a comment.

Toggle quote (4 lines)
> + (lambda _
> + (with-output-to-file "po/POTFILES.skip"
> + (lambda _ (format #t "data/shortcuts.ui~%"))))))))

Please end the phase in #t.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6BzuUACgkQ5xo1VCww
uqVduwgAkYehLthJLAr7GuN8NyRAfOQU7A2ENKwaOFeEH0GHpPT7C+8orgZXIFbe
CJqcY58QNzUsYctykCZYaOQ0tl4bzWvOnZkEu2Yoe0+qPhZ9V6EqSA59tQmlxaIC
RUi7/EKaiUIJWXICm3IGnoqV0SPZIAHIoycPeL863TEtoluzsxXr393NgIoXTVpI
PaPaMr4Rx4+NiZhwQUoyBfPWvA7lJyDntAVq9Y+6wzUMECrT6J3fe0B7ywmT/PPn
r5W2iosl0zbcoTvheQAj4fUgfSSt+uo6/vuQHYw5m7uGJztozjMDKm1xHvpKg0oC
TF53VwVal4dXKJbQZRfIiJI91fFvOQ==
=MN26
-----END PGP SIGNATURE-----


R
R
R Veera Kumar wrote on 31 Mar 2020 11:12
Re: [bug#40320] [PATCH 1/2] gnu: Add libqalculate
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 40320@debbugs.gnu.org)
20200331091224.GA7226@tulip
On Mon, Mar 30, 2020 at 12:45:39PM +0200, Danny Milosavljevic wrote:
Toggle quote (15 lines)
> Hi Veera,
>
> thanks for the patch!
>
> I have a few suggestions:
>
> On Mon, 30 Mar 2020 10:52:23 +0530
> R Veera Kumar <vkor@vkten.in> wrote:
>
> > + ("automake" ,automake)
> > + ("autoconf" ,autoconf)
>
> It's unusual to need those in a release. Why are they necessary?
>

The github release tarball includes the configure script but the not the
git clone checkout of tag version. It has only autogen.sh script. The
website explicitly says that and I have also checked it.

Thanks,
R Veera Kumar
India
[OUTREACHY CONTRIB]
R
R
R Veera Kumar wrote on 1 Apr 2020 07:23
[PATCH v2 1/2] gnu: Add libqalculate.
(address . 40320@debbugs.gnu.org)(name . R Veera Kumar)(address . vkor@vkten.in)
20200401052320.21576-1-vkor@vkten.in
* gnu/packages/maths.scm (libqalculate): New variable.
* gnu/packages/maths.scm: Add missing modules.
* gnu: maths: Add copyright line.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
---
Changes in v2:
- Change commit msg as per changelog format
- Use git release tag instead of commit id
- Use 'bootstrap with setenv appropriately
- Correct inputs and native-inputs
---
gnu/packages/maths.scm | 56 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)

Toggle diff (89 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5e56289682..0594e0dd66 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -35,6 +35,7 @@
;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net>
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
;;; Copyright © 2020 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -79,6 +80,7 @@
#:use-module (gnu packages dbm)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
+ #:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages fltk)
#:use-module (gnu packages fontutils)
@@ -86,8 +88,10 @@
#:use-module (gnu packages gcc)
#:use-module (gnu packages gd)
#:use-module (gnu packages ghostscript)
+ #:use-module (gnu packages glib)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages java)
#:use-module (gnu packages less)
@@ -5320,3 +5324,55 @@ researchers and developers alike to get started on SAT.")
(home-page
"http://minisat.se/MiniSat.html")
(license license:expat))))
+
+(define-public libqalculate
+ (package
+ (name "libqalculate")
+ (version "3.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Qalculate/libqalculate/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1vbaza9c7159xf2ym90l0xkyj2mp6c3hbghhsqn29yvz08fda9df"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("gettext" ,gettext-minimal)
+ ("intltool" ,intltool)
+ ("automake" ,automake)
+ ("autoconf" ,autoconf)
+ ("libtool" ,libtool)
+ ("doxygen" ,doxygen)
+ ("file" ,file)))
+ (inputs
+ `(("gmp" ,gmp)
+ ("mpfr" ,mpfr)
+ ("libxml2" ,libxml2)
+ ("curl" ,curl)
+ ("icu4c" ,icu4c)
+ ("gnuplot" ,gnuplot)
+ ("readline" ,readline)
+ ("libiconv" ,libiconv)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'bootstrap 'setenv
+ ;; Prevent the autogen.sh script to carry out the configure
+ ;; script, which has not yet been patched to replace /bin/sh.
+ (lambda _
+ (setenv "NOCONFIGURE" "TRUE")
+ #t)))))
+ (home-page "https://qalculate.github.io/")
+ (synopsis "Multi-purpose cli desktop calculator and library")
+ (description
+ "Libqalculate is a multi-purpose cli desktop calculator and library.
+It provides basic and advanced functionality. Features include customizable
+functions, unit calculations, and conversions, physical constants, symbolic
+calculations (including integrals and equations), arbitrary precision,
+uncertainity propagation, interval arithmetic, plotting and a user-friendly
+cli.")
+ (license license:gpl2+)))
--
2.26.0
R
R
R Veera Kumar wrote on 1 Apr 2020 07:23
[PATCH v2 2/2] gnu: Add qalculate-gtk.
(address . 40320@debbugs.gnu.org)(name . R Veera Kumar)(address . vkor@vkten.in)
20200401052320.21576-2-vkor@vkten.in
* gnu/packages/maths.scm (qalculate-gtk): New variable.
* gnu/packages/maths.scm: Add missing modules.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
---
Changes in v2:
- Change commit msg as per changelog format
- Use git release tag instead of commit id
- Use 'bootstrap with setenv appropriately
- Remove m4 from native-inputs
---
gnu/packages/maths.scm | 58 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)

Toggle diff (75 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0594e0dd66..b66c330711 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -63,6 +63,7 @@
#:use-module (guix utils)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix build-system ruby)
@@ -5376,3 +5377,60 @@ calculations (including integrals and equations), arbitrary precision,
uncertainity propagation, interval arithmetic, plotting and a user-friendly
cli.")
(license license:gpl2+)))
+
+(define-public qalculate-gtk
+ (package
+ (name "qalculate-gtk")
+ (version "3.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Qalculate/qalculate-gtk/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0nsg6dzg5r7rzqr671nvrf1c50rjwpz7bxv5f20i4s7agizgv840"))))
+ (build-system glib-or-gtk-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("intltool" ,intltool)
+ ("automake" ,automake)
+ ("autoconf" ,autoconf)
+ ("libtool" ,libtool)
+ ("file" ,file)))
+ (inputs
+ `(("gmp" ,gmp)
+ ("mpfr" ,mpfr)
+ ("libqalculate" ,libqalculate)
+ ("libxml2" ,libxml2)
+ ("glib" ,glib)
+ ("gtk+" ,gtk+)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'bootstrap 'setenv
+ ;; Prevent the autogen.sh script to carry out the configure
+ ;; script, which has not yet been patched to replace /bin/sh.
+ (lambda _
+ (setenv "NOCONFIGURE" "TRUE")
+ #t))
+ (add-before 'check 'add-pot-file
+ ;; the file contains translations and are currently not in use
+ ;; left out on purpose so add it to POTFILES.skip
+ (lambda _
+ (with-output-to-file "po/POTFILES.skip"
+ (lambda _
+ (format #t "data/shortcuts.ui~%")
+ #t))
+ #t)))))
+ (home-page "https://qalculate.github.io/")
+ (synopsis "Multi-purpose graphical desktop calculator")
+ (description
+ "Qalculate-gtk is the GTK frontend for libqalculate. It is a
+multi-purpose GUI desktop calculator. It provides basic and advanced
+functionality. Features include customizable functions, unit calculations,
+and conversions, physical constants, symbolic calculations (including
+integrals and equations), arbitrary precision, uncertainity propagation,
+interval arithmetic, plotting.")
+ (license license:gpl2+)))
--
2.26.0
L
L
Ludovic Courtès wrote on 3 Apr 2020 15:37
Re: [bug#40320] [PATCH v2 1/2] gnu: Add libqalculate.
(name . R Veera Kumar)(address . vkor@vkten.in)
871rp4lmg8.fsf@gnu.org
Hi Veera,

R Veera Kumar <vkor@vkten.in> skribis:

Toggle quote (12 lines)
> * gnu/packages/maths.scm (libqalculate): New variable.
> * gnu/packages/maths.scm: Add missing modules.
> * gnu: maths: Add copyright line.
>
> Signed-off-by: R Veera Kumar <vkor@vkten.in>
> ---
> Changes in v2:
> - Change commit msg as per changelog format
> - Use git release tag instead of commit id
> - Use 'bootstrap with setenv appropriately
> - Correct inputs and native-inputs

Perfect, I’ve applied it and will push shortly, thank you!

I’ve kept only the first line of the commit message above, because we
don’t usually mention changes in the list of modules used and copyright
lines, and ‘Signed-off-by’ is for the person who applies the patch on
your behalf.

Apart from this tiny issue it’s all good!

Ludo’.
L
L
Ludovic Courtès wrote on 3 Apr 2020 15:39
Re: [bug#40320] [PATCH v2 2/2] gnu: Add qalculate-gtk.
(name . R Veera Kumar)(address . vkor@vkten.in)
87wo6wk7t5.fsf@gnu.org
R Veera Kumar <vkor@vkten.in> skribis:

Toggle quote (11 lines)
> * gnu/packages/maths.scm (qalculate-gtk): New variable.
> * gnu/packages/maths.scm: Add missing modules.
>
> Signed-off-by: R Veera Kumar <vkor@vkten.in>
> ---
> Changes in v2:
> - Change commit msg as per changelog format
> - Use git release tag instead of commit id
> - Use 'bootstrap with setenv appropriately
> - Remove m4 from native-inputs

Applied as well with similar changes to the commit log.

I’m closing this issue now.

Thank you!

Ludo’.
Closed
?