[PATCH] gnu: Add eccodes.

  • Open
  • quality assurance status badge
Details
3 participants
  • Antero Mejr
  • Maxime Devos
  • Vagrant Cascadian
Owner
unassigned
Submitted by
Antero Mejr
Severity
normal
A
A
Antero Mejr wrote on 25 Aug 2022 19:22
(address . guix-patches@gnu.org)(name . Antero Mejr)(address . antero@mailbox.org)
20220825172227.1110221-1-antero@mailbox.org
* gnu/packages/geo.scm (eccodes): New variable.
---
gnu/packages/geo.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 0c869fdebb..f1151fa95c 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -64,6 +64,7 @@ (define-module (gnu packages geo)
#:use-module (gnu packages boost)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages cups)
@@ -76,6 +77,7 @@ (define-module (gnu packages geo)
#:use-module (gnu packages flex)
#:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
@@ -112,6 +114,7 @@ (define-module (gnu packages geo)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages shells)
#:use-module (gnu packages swig)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages textutils)
@@ -2797,3 +2800,35 @@ (define-public libaec
point representations are not directly supported, they can also be efficiently
coded by grouping exponents and mantissa.")
(license license:bsd-2)))
+
+(define-public eccodes
+ (package
+ (name "eccodes")
+ (version "2.27.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ecmwf/eccodes")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1hd4lli6g4m77rdfqwq8kxqpgn9na7lhv0j47w0sw9ihy8qllq41"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-DECBUILD_DISABLE_NEW_DTAGS=OFF"
+ "-DENABLE_PNG=ON")))
+ (native-inputs (list ecbuild gfortran perl))
+ (inputs (list oksh libaec libpng netcdf openjpeg))
+ (home-page "https://confluence.ecmwf.int/display/ECC")
+ (synopsis "Encoder/decoder for GRIB and BUFR meteorological data files")
+ (description "ecCodes is a package developed by ECMWF which provides an
+application programming interface and a set of tools for decoding and encoding
+messages in the following formats:
+
+@itemize
+@item WMO FM-92 GRIB edition 1 and edition 2
+@item WMO FM-94 BUFR edition 3 and edition 4
+@item WMO GTS abbreviated header (only decoding)
+@end itemize")
+ (license license:asl2.0)))
--
2.37.2
A
A
Antero Mejr wrote on 25 Aug 2022 19:27
[PATCH] gnu: Add ecbuild.
(address . 57410@debbugs.gnu.org)(name . Antero Mejr)(address . antero@mailbox.org)
20220825172702.1111386-1-antero@mailbox.org
* gnu/packages/cmake.scm (ecbuild): New variable.
---
gnu/packages/cmake.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index cf930c57fc..aa89d4815c 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -32,6 +32,7 @@ (define-module (gnu packages cmake)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix deprecation)
@@ -49,6 +50,7 @@ (define-module (gnu packages cmake)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages texinfo)
@@ -406,3 +408,33 @@ (define-public emacs-cmake-mode
(description "@code{cmakeos-mode} provides an Emacs major mode for editing
Cmake files. It supports syntax highlighting, indenting and refilling of
comments.")))
+
+(define-public ecbuild
+ ;; when using set the configure flag "-DECBUILD_DISABLE_NEW_DTAGS=OFF"
+ ;; otherwise validate-runpath build step will fail when building Guix packages
+ (package
+ (name "ecbuild")
+ (version "3.7.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ecmwf/ecbuild")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1mcjdqwvkzli7xj2wlnr4hshfh3wi5rs585f9nvqjfpgwvn0ym14"))
+ (modules '((guix build utils)))
+ (snippet #~(substitute* "bin/ecbuild"
+ (("cmake=\\$\\{cmakebin:=cmake\\}")
+ (string-append "cmake=${cmakebin:="
+ #$cmake-minimal "/bin/cmake}"))))))
+ (build-system cmake-build-system)
+ (native-inputs (list perl))
+ (inputs (list cmake-minimal))
+ (home-page "https://ecbuild.readthedocs.io/en/latest/")
+ (synopsis "CMake wrapper and collection of macros")
+ (description "ecBuild is built on top of CMake and consists of a set of
+macros as well as a wrapper around CMake. Calling @code{ecbuild $SRC_DIR} is
+equivalent to @code{cmake -DCMAKE_MODULE_PATH=$ECBUILD_DIR/cmake $SRC_DIR}.")
+ (license license:asl2.0)))
--
2.37.2
A
A
Antero Mejr wrote on 25 Aug 2022 19:30
[PATCH] gnu: Add libaec.
(address . 57410@debbugs.gnu.org)(name . Antero Mejr)(address . antero@mailbox.org)
20220825173009.1111816-1-antero@mailbox.org
* gnu/packages/geo.scm (libaec): New variable.
---
gnu/packages/geo.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 66c97d3d6a..f23a8c1f4e 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -2773,3 +2773,27 @@ (define-public gplates
reconstructions of geological and paleogeographic features through geological
time. Interactively visualize vector, raster and volume data.")
(license license:gpl2+)))
+
+(define-public libaec
+ (package
+ (name "libaec")
+ (version "1.0.6")
+ (home-page "https://gitlab.dkrz.de/k202009/libaec")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "14myrmmiz9z6wgxqywf3a63cq514vrzsd6z4zvpwigvawlk30iip"))))
+ (build-system cmake-build-system)
+ (synopsis "Adaptive Entropy Coding library")
+ (description "Libaec provides fast lossless compression of 1 up to 32 bit
+wide signed or unsigned integers (samples). The library achieves best results
+for low entropy data as often encountered in space imaging instrument data or
+numerical model output from weather or climate simulations. While floating
+point representations are not directly supported, they can also be efficiently
+coded by grouping exponents and mantissa.")
+ (license license:bsd-2)))
--
2.37.2
M
M
Maxime Devos wrote on 28 Aug 2022 17:22
Re: [bug#57410] [PATCH] gnu: Add ecbuild.
44f0252d-21ef-ce14-03b3-b1f86071e047@telenet.be
On 25-08-2022 19:27, Antero Mejr via Guix-patches via wrote:
Toggle quote (13 lines)
> + (method git-fetch)
> + (uri (git-reference
> + (url"https://github.com/ecmwf/ecbuild")
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1mcjdqwvkzli7xj2wlnr4hshfh3wi5rs585f9nvqjfpgwvn0ym14"))
> + (modules '((guix build utils)))
> + (snippet #~(substitute* "bin/ecbuild"
> + (("cmake=\\$\\{cmakebin:=cmake\\}")
> + (string-append "cmake=${cmakebin:="
> + #$cmake-minimal "/bin/cmake}"))))))
This 'source' is only usable inside Guix as it embeds store items, which
makes "guix build --source" less useful for sharing source code (see:
(guix)Snippets versus Phases).
Try doing this in a snippet instead.
Greetings,
Maxime.
Attachment: OpenPGP_signature
A
A
Antero Mejr wrote on 29 Aug 2022 19:32
[PATCH] gnu: Add ecbuild.
(address . 57410@debbugs.gnu.org)
20220829173212.1494745-1-antero@mailbox.org
* gnu/packages/cmake.scm (ecbuild): New variable.
---
Patch Guix-specific paths in a build step rather than a snippet (from review).

gnu/packages/cmake.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index cf930c57fc..be4271f84c 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -32,6 +32,7 @@ (define-module (gnu packages cmake)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix deprecation)
@@ -49,6 +50,7 @@ (define-module (gnu packages cmake)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages texinfo)
@@ -406,3 +408,36 @@ (define-public emacs-cmake-mode
(description "@code{cmakeos-mode} provides an Emacs major mode for editing
Cmake files. It supports syntax highlighting, indenting and refilling of
comments.")))
+
+(define-public ecbuild
+ ;; when using set the configure flag "-DECBUILD_DISABLE_NEW_DTAGS=OFF"
+ ;; otherwise validate-runpath build step will fail when building Guix packages
+ (package
+ (name "ecbuild")
+ (version "3.7.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ecmwf/ecbuild")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1mcjdqwvkzli7xj2wlnr4hshfh3wi5rs585f9nvqjfpgwvn0ym14"))))
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-cmake-binary-path
+ (lambda _
+ (substitute* "bin/ecbuild"
+ (("cmake=\\$\\{cmakebin:=cmake\\}")
+ (string-append "cmake=${cmakebin:="
+ #$cmake-minimal "/bin/cmake}"))))))))
+ (build-system cmake-build-system)
+ (native-inputs (list perl))
+ (inputs (list cmake-minimal))
+ (home-page "https://ecbuild.readthedocs.io/en/latest/")
+ (synopsis "CMake wrapper and collection of macros")
+ (description "ecBuild is built on top of CMake and consists of a set of
+macros as well as a wrapper around CMake. Calling @code{ecbuild $SRC_DIR} is
+equivalent to @code{cmake -DCMAKE_MODULE_PATH=$ECBUILD_DIR/cmake $SRC_DIR}.")
+ (license license:asl2.0)))
--
2.37.2
V
V
Vagrant Cascadian wrote on 2 Sep 2023 06:13
87cyz1p5zy.fsf@wireframe
retitle 57410 gnu: Add ecbuild.
thanks

On 2022-08-29, Antero Mejr wrote:
Toggle quote (2 lines)
> * gnu/packages/cmake.scm (ecbuild): New variable.

The other two new packages proposed in this bug, eccodes and libaec,
have already been merged into guix:

1504edd84f1a0b4afda11cab99edc602d82085c1 gnu: Add eccodes.
d03b6fb0e3f0b81b35a9b35b89c213c144c59fe6 gnu: Add libaec.

Retitling bug to reflect outstanding issue.

live well,
vagrant
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZPK2YQAKCRDcUY/If5cW
qgOCAQCtN9B+jUbMslJKX1L8nBvbjmnO8OZwRSd8BjcnZkogQgEAlWz9ZCb4zdye
4BXKIwy5jjqeI49RUtg3wrtQT0x4Zg4=
=bcjy
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 57410@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57410
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch