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.
This commit is contained in:
Maxim Cournoyer 2022-08-22 20:47:16 -04:00
parent 78696a6d31
commit d0ab003987
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -11,6 +11,7 @@
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org> ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net> ;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com> ;;; Copyright © 2021 Wamm K. D. <jaft.r@outlook.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -29,6 +30,7 @@
(define-module (gnu packages calendar) (define-module (gnu packages calendar)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix packages) #:use-module (guix packages)
@ -130,32 +132,32 @@ (define-public libical
"13ycghsi4iv8mnm0xv97bs0x6qvfhdxkw20n3yhcc7bg6n0bg122")))) "13ycghsi4iv8mnm0xv97bs0x6qvfhdxkw20n3yhcc7bg6n0bg122"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
'(#:tests? #f ; test suite appears broken (list
#:parallel-build? #f ;may cause GIR generation failure #:configure-flags #~(list "-DSHARED_ONLY=true"
#:configure-flags '("-DSHARED_ONLY=true" ;; required by evolution-data-server
;; required by evolution-data-server "-DGOBJECT_INTROSPECTION=true"
"-DGOBJECT_INTROSPECTION=true" "-DICAL_GLIB_VAPI=true")
"-DICAL_GLIB_VAPI=true") #:phases
#:phases #~(modify-phases %standard-phases
(modify-phases %standard-phases (add-after 'unpack 'patch-docbook-reference
(add-after 'unpack 'patch-docbook-reference (lambda _
(lambda* (#:key inputs #:allow-other-keys) (substitute* "doc/reference/libical-glib/libical-glib-docs.sgml.in"
(substitute* "doc/reference/libical-glib/libical-glib-docs.sgml.in" (("http://www.oasis-open.org/docbook/xml/4.3/")
(("http://www.oasis-open.org/docbook/xml/4.3/") (string-append #$(this-package-native-input "docbook-xml")
(string-append (assoc-ref inputs "docbook-xml") "/xml/dtd/docbook/")))))
"/xml/dtd/docbook/"))))) (add-before 'configure 'patch-paths
(add-before 'configure 'patch-paths (lambda* (#:key inputs #:allow-other-keys)
(lambda* (#:key inputs #:allow-other-keys) (define zoneinfo (search-input-directory inputs "share/zoneinfo"))
;; TODO: libical 3.1.0 supports using TZDIR instead of a hard-coded ;; The timezones test fails if TZDIR is not set, for some
;; zoneinfo database. When that is released we can drop ;; reason. If only TZDIR is set, tests checking the timezone
;; the tzdata dependency. ;; fallback fail, so also patch the source.
(let ((tzdata (assoc-ref inputs "tzdata"))) (setenv "TZDIR" zoneinfo) ;for tests
(substitute* "src/libical/icaltz-util.c" (substitute* "src/libical/icaltz-util.c"
(("\\\"/usr/share/zoneinfo\\\",") (("\\\"/usr/share/zoneinfo\\\",")
(string-append "\"" tzdata "/share/zoneinfo\"")) (format #f "~s" zoneinfo))
(("\\\"/usr/lib/zoneinfo\\\",") "") (("\\\"/usr/lib/zoneinfo\\\",") "")
(("\\\"/etc/zoneinfo\\\",") "") (("\\\"/etc/zoneinfo\\\",") "")
(("\\\"/usr/share/lib/zoneinfo\\\"") "")))))))) (("\\\"/usr/share/lib/zoneinfo\\\"") "")))))))
(native-inputs (native-inputs
(list docbook-xml-4.3 (list docbook-xml-4.3
gobject-introspection gobject-introspection