aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/geo.scm
diff options
context:
space:
mode:
authorThiago Jung Bauermann via Guix-patches via <guix-patches@gnu.org>2021-09-16 02:18:16 -0300
committerGuillaume Le Vaillant <glv@posteo.net>2021-09-16 09:49:31 +0200
commitb3ee04cde70579f84061342d62d86fcc2093dd6c (patch)
tree19dd44245ea2b9a153c292bfc636515aa803f547 /gnu/packages/geo.scm
parent35848d2c2ed9263a4c15f5358fcb4ec26db8d18a (diff)
downloadguix-b3ee04cde70579f84061342d62d86fcc2093dd6c.tar
guix-b3ee04cde70579f84061342d62d86fcc2093dd6c.tar.gz
gnu: xygrib: Fix finding resources in the data directory.
Currently, if you start up XyGrib it will not show icons in the toolbar buttons, translated strings in the UI nor the map in the main view. These are all items stored in the data directory, which XyGrib can’t find. Backport upstream PR 235 (already merged upstream) which makes it use XDG directories correctly. As a bonus, the PR also contains a fix to find libjpeg, so we don’t need the substitution for that anymore. * gnu/packages/patches/xygrib-fix-finding-data.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/geo.scm (xygrib)[source]: Use it. [arguments]<#:configure-flags>: Pass ‘-DGNU_PACKAGE=ON’. [arguments]<#:phases>{patch-directories}: Remove fix to find libjpeg. Remove trailing ‘#t’. [native-search-paths]: Add ‘XDG_DATA_DIRS’. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
Diffstat (limited to 'gnu/packages/geo.scm')
-rw-r--r--gnu/packages/geo.scm17
1 files changed, 9 insertions, 8 deletions
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 5d06fe08e2..8d5111bea8 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1217,6 +1217,7 @@ map display. Downloads map data from a number of websites, including
(url "https://github.com/opengribs/XyGrib")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (patches (search-patches "xygrib-fix-finding-data.patch"))
(sha256
(base32
"0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
@@ -1231,18 +1232,15 @@ map display. Downloads map data from a number of websites, including
#t))))
(build-system cmake-build-system)
(arguments
- `(#:phases
+ `(#:configure-flags (list "-DGNU_PACKAGE=ON")
+
+ #: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.
@@ -1251,8 +1249,7 @@ map display. Downloads map data from a number of websites, including
(string-append "\"" font "/share/fonts/truetype/\"")))
(substitute* "src/util/Util.h"
(("pathData\\(\\)\\+\"data/fonts/\"")
- (string-append "\"" font "/share/fonts/\""))))
- #t)))
+ (string-append "\"" font "/share/fonts/\"")))))))
#:tests? #f)) ; no tests
(native-inputs
`(("qttools" ,qttools)))
@@ -1265,6 +1262,10 @@ map display. Downloads map data from a number of websites, including
("proj.4" ,proj.4)
("qtbase" ,qtbase-5)
("zlib" ,zlib)))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "XDG_DATA_DIRS")
+ (files '("share")))))
(synopsis "Weather Forecast Visualization")
(description
"XyGrib is a Grib file reader and visualizes meteorological data providing