summaryrefslogtreecommitdiff
path: root/gnu/packages/calendar.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-22 20:47:16 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-28 21:07:48 -0400
commitd0ab0039870c8acba1eb4cab580f6289013f85d1 (patch)
treea55219c22683b7f16a884f49fffc466619c2a7f0 /gnu/packages/calendar.scm
parent78696a6d317c1805f688b871cc17f79b8a6dc2af (diff)
gnu: libical: Update to 3.0.14, enable tests and use gexps.
* gnu/packages/calendar.scm (libical): Update to 3.0.14. [tests?]: Delete argument. [parallel-build?]: Likewise. [configure-flags]: Use gexps. [phases]: Use gexps. Delete trailing #t. {patch-docbook-reference}: Use this-package-native-input. {patch-paths}: Use search-input-directory. Set TZDIR for tests.
Diffstat (limited to 'gnu/packages/calendar.scm')
-rw-r--r--gnu/packages/calendar.scm54
1 files changed, 28 insertions, 26 deletions
diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm
index 715d158241..80740d8bc1 100644
--- a/gnu/packages/calendar.scm
+++ b/gnu/packages/calendar.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,6 +30,7 @@
(define-module (gnu packages calendar)
#:use-module (gnu packages)
+ #:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix git-download)
#:use-module (guix packages)
@@ -130,32 +132,32 @@ the <tz.h> library for handling time zones and leap seconds.")
"13ycghsi4iv8mnm0xv97bs0x6qvfhdxkw20n3yhcc7bg6n0bg122"))))
(build-system cmake-build-system)
(arguments
- '(#:tests? #f ; test suite appears broken
- #:parallel-build? #f ;may cause GIR generation failure
- #:configure-flags '("-DSHARED_ONLY=true"
- ;; required by evolution-data-server
- "-DGOBJECT_INTROSPECTION=true"
- "-DICAL_GLIB_VAPI=true")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-docbook-reference
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "doc/reference/libical-glib/libical-glib-docs.sgml.in"
- (("http://www.oasis-open.org/docbook/xml/4.3/")
- (string-append (assoc-ref inputs "docbook-xml")
- "/xml/dtd/docbook/")))))
- (add-before 'configure 'patch-paths
- (lambda* (#:key inputs #:allow-other-keys)
- ;; TODO: libical 3.1.0 supports using TZDIR instead of a hard-coded
- ;; zoneinfo database. When that is released we can drop
- ;; the tzdata dependency.
- (let ((tzdata (assoc-ref inputs "tzdata")))
- (substitute* "src/libical/icaltz-util.c"
- (("\\\"/usr/share/zoneinfo\\\",")
- (string-append "\"" tzdata "/share/zoneinfo\""))
- (("\\\"/usr/lib/zoneinfo\\\",") "")
- (("\\\"/etc/zoneinfo\\\",") "")
- (("\\\"/usr/share/lib/zoneinfo\\\"") ""))))))))
+ (list
+ #:configure-flags #~(list "-DSHARED_ONLY=true"
+ ;; required by evolution-data-server
+ "-DGOBJECT_INTROSPECTION=true"
+ "-DICAL_GLIB_VAPI=true")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-docbook-reference
+ (lambda _
+ (substitute* "doc/reference/libical-glib/libical-glib-docs.sgml.in"
+ (("http://www.oasis-open.org/docbook/xml/4.3/")
+ (string-append #$(this-package-native-input "docbook-xml")
+ "/xml/dtd/docbook/")))))
+ (add-before 'configure 'patch-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define zoneinfo (search-input-directory inputs "share/zoneinfo"))
+ ;; The timezones test fails if TZDIR is not set, for some
+ ;; reason. If only TZDIR is set, tests checking the timezone
+ ;; fallback fail, so also patch the source.
+ (setenv "TZDIR" zoneinfo) ;for tests
+ (substitute* "src/libical/icaltz-util.c"
+ (("\\\"/usr/share/zoneinfo\\\",")
+ (format #f "~s" zoneinfo))
+ (("\\\"/usr/lib/zoneinfo\\\",") "")
+ (("\\\"/etc/zoneinfo\\\",") "")
+ (("\\\"/usr/share/lib/zoneinfo\\\"") "")))))))
(native-inputs
(list docbook-xml-4.3
gobject-introspection