[PATCH] Add new plplot

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 28 Jan 2021 21:44
(address . guix-patches@gnu.org)
CAO+9K5rr86Mc-WVbbLZkNwiK-YNG_TyWb-C9HW3d6DDWgGC8vA@mail.gmail.com
Hi Guix team!
Here is a draft of PLplot package which I made by checking how
Debian's one is distributed. I need some competent review of someone
who has more experience in CMake.
On the way on packing astronomy software :)
Regards
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
S
S
Sharlatan Hellseher wrote on 4 Feb 2021 21:40
[PATCH] Round 2
(address . 46160@debbugs.gnu.org)
CAO+9K5rEqfRAUKNu8RGo9P0H8hpFwreaKP-f0DcWg+GyJb8OAg@mail.gmail.com
Hi Guix team!
I've cleaned up the patch a little bit and removed most of the CMake
flags as they are picked up when I add most of the dependencies in
`inputs'
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From d4edcdcd71cc2c47caf2511abeb1bf153434d25c Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Thu, 4 Feb 2021 20:36:32 +0000
Subject: [PATCH] gnu: Add plplot

* gnu/packages/maths.scm (plplot): New variable
---
gnu/packages/maths.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)

Toggle diff (87 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index eff1480e62..cfc57734da 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -107,6 +107,7 @@
#:use-module (gnu packages llvm)
#:use-module (gnu packages logging)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages geo)
#:use-module (gnu packages gnome)
#:use-module (gnu packages guile)
#:use-module (gnu packages xorg)
@@ -131,6 +132,7 @@
#:use-module (gnu packages tbb)
#:use-module (gnu packages scheme)
#:use-module (gnu packages shells)
+ #:use-module (gnu packages swig)
#:use-module (gnu packages tcl)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tex)
@@ -954,6 +956,64 @@ plotting engine by third-party applications like Octave.")
(license (license:fsf-free
"http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright"))))
+(define-public plplot
+ ;; TODO: (Sharlatan-20210204T203350+0000): It needs to be split int some other
+ ;; logical package like plplot-gtk plplot-qt plplot-minimal etc. For now I try
+ ;; to include as much bindings as I could achieve.
+ (package
+ (name "plplot")
+ (version "5.15.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ ;; Official mirror in case Sourseforge blocks access
+ ;; (url "https://github.com/PLplot/PLplot")
+ (url "https://git.code.sf.net/p/plplot/plplot")
+ (commit (string-append name "-" version))))
+ (sha256
+ (base32 "0fn9j251zv9pwlqy30yv4flwcd0cbyxd1nn388n1k158jycw2i91"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ ;; NOTE: (Sharlatan-20210204T120351+0000): Tests failing on examples_cxx
+ `(#:tests? #f
+ #:configure-flags
+ (let ((out (assoc-ref %outputs "out")))
+ (list
+ ;; "-DBUILD_TEST=ON"
+ "-DENABLE_wxwidgets=ON"
+ "-DCMAKE_BUILD_TYPE=Release"
+ "-DCMAKE_SKIP_BUILD_RPATH=OFF"
+ (string-append "-DCMAKE_INSTALL_LIBDIR=" out "/lib")
+ (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("swig" ,swig)))
+ (inputs
+ `(("freetype", freetype)
+ ("gfortran" ,gfortran)
+ ("libltdl" ,libltdl)
+ ("lua", lua)
+ ("numpy", python-numpy)
+ ("octave", octave)
+ ("pango" ,pango)
+ ("perl", perl)
+ ("python", python)
+ ("qhull" ,qhull)
+ ("shapelib" ,shapelib)
+ ("tcl", tcl)
+ ("tk", tk)
+ ("wxwidgets" ,wxwidgets)
+ ("xml-dom" ,perl-xml-dom)
+ ("xml-dom" ,perl-xml-parser)))
+ (home-page "http://plplot.org/")
+ (synopsis "Scientific graphics plotting library")
+ (description
+ "PLplot is a cross-platform software package for creating scientific plots
+whose (UTF-8) plot symbols and text.")
+ (license license:lgpl2.0))) ; Other terms are in Copyright file
+
(define-public gctp
(package
(name "gctp")
--
2.30.0
S
S
Sharlatan Hellseher wrote on 13 May 2022 17:30
[PATCH v3] gnu: Add plplot
(address . 46160@debbugs.gnu.org)
CAO+9K5raNO0uSga+YfSnSpsn2ZSGeq3jH81J26szaOp3pHAOQQ@mail.gmail.com
Hi Guix team!
This is fixed version of the patch adding plplot with all test enabled
and folowing new packge style fromat.
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From f190a7f646d8f1d7d212663a629adeb33414eb6a Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Fri, 13 May 2022 16:13:57 +0100
Subject: [PATCH] gnu: Add plplot

* gnu/packages/maths.scm (plplot): New variable.
---
gnu/packages/maths.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)

Toggle diff (89 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 98e239d5bd..641b80f572 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -50,6 +50,7 @@
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Pierre-Antoine Bouttier <pierre-antoine.bouttier@univ-grenoble-alpes.fr>
+;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -123,6 +124,7 @@ (define-module (gnu packages maths)
#:use-module (gnu packages llvm)
#:use-module (gnu packages logging)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages geo)
#:use-module (gnu packages gnome)
#:use-module (gnu packages guile)
#:use-module (gnu packages xorg)
@@ -152,6 +154,7 @@ (define-module (gnu packages maths)
#:use-module (gnu packages serialization)
#:use-module (gnu packages shells)
#:use-module (gnu packages sphinx)
+ #:use-module (gnu packages swig)
#:use-module (gnu packages tcl)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tex)
@@ -1123,6 +1126,58 @@ (define-public gnuplot
(license (license:fsf-free
"http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright"))))
+(define-public plplot
+ (package
+ (name "plplot")
+ (version "5.15.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ ;; Mirror: https://github.com/PLplot/PLplot
+ (url "https://git.code.sf.net/p/plplot/plplot")
+ (commit (string-append name "-" version))))
+ (sha256
+ (base32
+ "0fn9j251zv9pwlqy30yv4flwcd0cbyxd1nn388n1k158jycw2i91"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list
+ "-DBUILD_TEST=ON"
+ (string-append "-DCMAKE_INSTALL_LIBDIR=" #$output "/lib")
+ (string-append "-DCMAKE_INSTALL_PREFIX=" #$output))))
+ (native-inputs
+ (list perl
+ python-wrapper
+ pkg-config
+ swig))
+ (inputs
+ (list freetype
+ camlidl
+ gfortran
+ libltdl
+ lua
+ ocaml
+ octave
+ pango
+ perl-xml-dom
+ perl-xml-parser
+ python-numpy
+ qhull
+ shapelib
+ tcl
+ tk
+ wxwidgets))
+ (home-page "http://plplot.org/")
+ (synopsis "Scientific graphics plotting library")
+ (description
+ "PLplot is a cross-platform software package for creating scientific plots
+whose (UTF-8) plot symbols and text.")
+ (license license:lgpl2.0))) ; Other terms are in Copyright file
+
(define-public gctp
(package
(name "gctp")
--
2.35.1
M
M
Maxim Cournoyer wrote on 22 May 2022 05:24
Re: bug#46160: [PATCH] Add new plplot
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 46160@debbugs.gnu.org)
87r14m8d2n.fsf_-_@gmail.com
Hi,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

Toggle quote (94 lines)
> Hi Guix team!
>
> This is fixed version of the patch adding plplot with all test enabled
> and folowing new packge style fromat.
>
>
>
> --
> … ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
> ????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
> ?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
>
> From f190a7f646d8f1d7d212663a629adeb33414eb6a Mon Sep 17 00:00:00 2001
> From: Sharlatan Hellseher <sharlatanus@gmail.com>
> Date: Fri, 13 May 2022 16:13:57 +0100
> Subject: [PATCH] gnu: Add plplot
>
> * gnu/packages/maths.scm (plplot): New variable.
> ---
> gnu/packages/maths.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
> index 98e239d5bd..641b80f572 100644
> --- a/gnu/packages/maths.scm
> +++ b/gnu/packages/maths.scm
> @@ -50,6 +50,7 @@
> ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
> ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
> ;;; Copyright © 2021 Pierre-Antoine Bouttier <pierre-antoine.bouttier@univ-grenoble-alpes.fr>
> +;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -123,6 +124,7 @@ (define-module (gnu packages maths)
> #:use-module (gnu packages llvm)
> #:use-module (gnu packages logging)
> #:use-module (gnu packages lua)
> + #:use-module (gnu packages geo)
> #:use-module (gnu packages gnome)
> #:use-module (gnu packages guile)
> #:use-module (gnu packages xorg)
> @@ -152,6 +154,7 @@ (define-module (gnu packages maths)
> #:use-module (gnu packages serialization)
> #:use-module (gnu packages shells)
> #:use-module (gnu packages sphinx)
> + #:use-module (gnu packages swig)
> #:use-module (gnu packages tcl)
> #:use-module (gnu packages texinfo)
> #:use-module (gnu packages tex)
> @@ -1123,6 +1126,58 @@ (define-public gnuplot
> (license (license:fsf-free
> "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright"))))
>
> +(define-public plplot
> + (package
> + (name "plplot")
> + (version "5.15.0")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + ;; Mirror: https://github.com/PLplot/PLplot
> + (url "https://git.code.sf.net/p/plplot/plplot")
> + (commit (string-append name "-" version))))
> + (sha256
> + (base32
> + "0fn9j251zv9pwlqy30yv4flwcd0cbyxd1nn388n1k158jycw2i91"))
> + (file-name (git-file-name name version))))
> + (build-system cmake-build-system)
> + (arguments
> + (list
> + #:configure-flags
> + #~(list
> + "-DBUILD_TEST=ON"
> + (string-append "-DCMAKE_INSTALL_LIBDIR=" #$output "/lib")
> + (string-append "-DCMAKE_INSTALL_PREFIX=" #$output))))
> + (native-inputs
> + (list perl
> + python-wrapper
> + pkg-config
> + swig))
> + (inputs
> + (list freetype
> + camlidl
> + gfortran
> + libltdl
> + lua
> + ocaml
> + octave
> + pango
> + perl-xml-dom
> + perl-xml-parser

Are you sure the Perl XML modules are needed at runtime and not at build
time (to build doc, for example?).

Toggle quote (2 lines)
> + python-numpy

If python-numpy is refered at runtime, you'd need to also add
python-wrapper as an 'input' I believe, since numpy is a Python
library. One good way to verify if the dependencies are correct is to
run the package in a container with:

$ ./pre-inst-env guix shell -C plplot

and see if something fail.

Another telling data point to shake extraneous dependencies is looking
at the output of 'guix gc -R $(./pre-inst-env guix build plplot)'; if
python-numpy is not there (probably it isn't), but really needed at
runtime, then it'd need to be wrapper in the plplot command script.

Could you verify that the package works in a container, adding a wrap
phase if needed or removing the unneeded inputs?

Thanks!

Maxim
M
M
Maxim Cournoyer wrote on 22 May 2022 05:24
control message for bug #46160
(address . control@debbugs.gnu.org)
87pmk68d1t.fsf@gmail.com
tags 46160 + moreinfo
quit
M
M
Maxim Cournoyer wrote on 22 May 2022 05:42
Re: bug#46160: [PATCH] Add new plplot
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 46160@debbugs.gnu.org)
871qwm8c7a.fsf_-_@gmail.com
Hi,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

[...]

Toggle quote (4 lines)
> + (description
> + "PLplot is a cross-platform software package for creating scientific plots
> +whose (UTF-8) plot symbols and text.")

I forgot to mention, the description appears to be truncated. It'd also
be nice if it contained a bit more information to help users
differentiate it from other plotting libraries.

Thanks again,

Maxim
S
S
Sharlatan Hellseher wrote on 22 May 2022 21:27
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 46160@debbugs.gnu.org)
CAO+9K5qqfTOy63RQEUkDXdWKgbB30i-=r56qV90m7nP7sjhd9w@mail.gmail.com
Hi Maxim,
Thanks for feedback, it's my one of the long pending package to Guix
due to it's complexity.
I initially followed packaging approach which Debian had but some of
the large projects are not packed yet (ADA for example) so it's
simplified version with less bindings.
It's required for some other astronomical software depending on it.
Regards
On Sun, 22 May 2022 at 04:42, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
Toggle quote (18 lines)
>
> Hi,
>
> Sharlatan Hellseher <sharlatanus@gmail.com> writes:
>
> [...]
>
> > + (description
> > + "PLplot is a cross-platform software package for creating scientific plots
> > +whose (UTF-8) plot symbols and text.")
>
> I forgot to mention, the description appears to be truncated. It'd also
> be nice if it contained a bit more information to help users
> differentiate it from other plotting libraries.
>
> Thanks again,
>
> Maxim
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
S
S
Sharlatan Hellseher wrote 5 days ago
[PATCH] Add new plplot
(address . 46160-done@debbugs.gnu.org)
87h6g4sy9a.fsf@gmail.com

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

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmYbBJEACgkQdtcnv/Ys
0rWjXw//Ta3v/3bKeCOC5KgpzVrM/KwaagFrYavdQz1Tf9ID2NDAlHeqRfnXeHPq
0LrxUYFUyBYF9FoYHPwC0RBCTm58XSqQ5nt939DctoHCHiTLYhNn6bqjfXG2wOPd
2/GV+qquQOYpVZpneiPHSYU9ZhmB5hM7vY5dl9mcbMRCu6XBf+z/UWduxrn9YUPg
cqiPSt/lKkq4VEKvfH0ch4uyg0C4IozwHo4EuuCDGHVrHgskqPSpD0biQ3lxpAVt
Vzk6wKRSXVoHgH1Dkuui5BH8uagzJTpUWe7e+57zSghhb4QiFxuAfkH4hMkwhW8p
pCcAWY4esYd1xGWgOjxFsisG09WrPMHkva9QgBXl98M4jFNwzc4dXq6ZcQK1wirH
xG7sCpf4jVBd0dWMbl5DNzW884JOdnI+m95BbtqN7Ez16Z8Cxi1JP/tQqhGrgPf0
CKN4vSHzGjbtlGmr42uHV9OKSNXkqb83wIaoVEplKJxiuvA03k7OFQBjx4SJSqi6
/pkbp++e+cYBxSq14XgIKTOBaERkokFTjYSJnmuJBaFmeHCrpWshcbKXkyYEGIQ1
5XMkQl0g22xfmFKw9M41KSaVBHr3VrTTOOOa7RpySbLIvDMu+xaekZqQLEkE3AcY
i34Fc/98kO5ox7OJyOFJR8YfuESE7gxESo742XQuDB/JdZ24kqE=
=zPke
-----END PGP SIGNATURE-----

Closed
?