unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 36652@debbugs.gnu.org
Subject: [bug#36652] [PATCH 2/2] gnu: Add xygrib.
Date: Sun, 14 Jul 2019 21:05:54 +0300	[thread overview]
Message-ID: <20190714180554.31307-2-efraim@flashner.co.il> (raw)
In-Reply-To: <20190714180554.31307-1-efraim@flashner.co.il>

* gnu/packages/geo.scm (xygrib): New variable.
---
 gnu/packages/geo.scm | 68 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 4cccd97643..e4b6a262c7 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,6 +38,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (gnu packages astronomy)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
@@ -44,6 +46,7 @@
   #:use-module (gnu packages databases)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages fonts)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
@@ -57,6 +60,7 @@
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages web)
   #:use-module (gnu packages webkit)
@@ -902,3 +906,67 @@ given GPS coordinates,draws a GPS track, and points of interest on a moving
 map display.  Downloads map data from a number of websites, including
 @url{https://www.openstreetmap.org}.")
     (license license:gpl2+)))
+
+(define-public xygrib
+  (package
+    (name "xygrib")
+    (version "1.2.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/opengribs/XyGrib.git")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0qzaaavil2c7mkkai5mg54cv8r452i7psy7cg75qjja96d2d7rbd"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin (delete-file-recursively "data/fonts") #t))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-directories
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((jpeg (assoc-ref inputs "openjpeg"))
+                   (font (assoc-ref inputs "font-liberation")))
+               (substitute* "CMakeLists.txt"
+                 ;; Find libjpeg.
+                 (("/usr") jpeg)
+                 ;; Fix install locations.
+                 (("set\\(PREFIX_BIN.*") "set(PREFIX_BIN \"bin\")\n")
+                 (("set\\(PREFIX_PKGDATA.*") "set(PREFIX_PKGDATA \"share/${PROJECT_NAME}\")\n")
+                 ;; Skip looking for the static library.
+                 (("\"libnova.a\"") ""))
+               ;; Don't use the bundled font-liberation.
+               (substitute* "src/util/Font.cpp"
+                 (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"")
+                  (string-append "\"" font "/share/fonts/truetype/\"")))
+               (substitute* "src/util/Util.h"
+                 (("pathData\\(\\)\\+\"data/fonts/\"")
+                  (string-append "\"" font "/share/fonts/\""))))
+             #t)))
+       #:tests? #f)) ; no tests
+    (native-inputs
+     `(("qttools" ,qttools)))
+    (inputs
+     `(("bzip2" ,bzip2)
+       ("font-liberation" ,font-liberation)
+       ("libnova" ,libnova)
+       ("libpng" ,libpng)
+       ("openjpeg" ,openjpeg)
+       ("proj.4" ,proj.4)
+       ("qtbase" ,qtbase)
+       ("zlib" ,zlib)))
+    (synopsis "Weather Forecast Visualization")
+    (description
+     "XyGrib is a Grib file reader and visualizes meteorological data providing
+an off-line capability to analyse weather forecasts or hindcasts.  It is
+intended to be used as a capable weather work station for anyone with a serious
+interest in examining weather. This would include members of the sailing
+community, private and sport aviators, farmers, weather buffs and many more.
+XyGrib is the continuation of the zyGrib software package with a new team of
+volunteers.")
+    (home-page "https://opengribs.org")
+    (license license:gpl3+)))
-- 
2.22.0

  reply	other threads:[~2019-07-14 18:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-14 18:03 [bug#36652] [PATCH 0/2] Add Xygrib Efraim Flashner
2019-07-14 18:05 ` [bug#36652] [PATCH 1/2] gnu: Add libnova Efraim Flashner
2019-07-14 18:05   ` Efraim Flashner [this message]
2019-07-17 13:13     ` [bug#36652] [PATCH 2/2] gnu: Add xygrib Ludovic Courtès
2019-07-18 11:04       ` bug#36652: " Efraim Flashner
2019-07-17 13:12   ` [bug#36652] [PATCH 1/2] gnu: Add libnova Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190714180554.31307-2-efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=36652@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).