unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 31484@debbugs.gnu.org
Subject: [bug#31484] [PATCH] gnu: icu4c: Patch zoneinfo directory.
Date: Thu, 17 May 2018 13:58:34 +0100	[thread overview]
Message-ID: <20180517125834.7417-1-mail@cbaines.net> (raw)

Replace the hardcoded /usr/share/zoneinfo file with a reference to the tzdata
package.

* gnu/packages/icu4c.scm (icu4c)[inputs]: Add tzdata.
[arguments]: Add a patch-zoneinfo-directory phase.
---
 gnu/packages/icu4c.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index 57e8fffb3..d34b61745 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -22,6 +22,7 @@
 
 (define-module (gnu packages icu4c)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages perl)
   #:use-module (guix licenses)
   #:use-module (guix packages)
@@ -45,7 +46,8 @@
              (base32 "065l3n0q9wqaw8dz20x82srshhm6i987fr9ync5xf9mr6n7ylwzh"))))
    (build-system gnu-build-system)
    (inputs
-    `(("perl" ,perl)))
+    `(("perl" ,perl)
+      ("tzdata" ,tzdata)))
    (arguments
     `(#:configure-flags
       '("--enable-rpath"
@@ -58,7 +60,13 @@
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'chdir-to-source
-          (lambda _ (chdir "source") #t)))))
+          (lambda _ (chdir "source") #t))
+        (add-after 'chdir-to-source 'patch-zoneinfo-directory
+          (lambda* (#:key inputs #:allow-other-keys)
+            (substitute* "common/putil.cpp"
+              (("\\/usr\\/share\\/zoneinfo")
+               (string-append (assoc-ref inputs "tzdata")
+                              "/share/zoneinfo"))))))))
    (synopsis "International Components for Unicode")
    (description
     "ICU is a set of C/C++ and Java libraries providing Unicode and
-- 
2.16.3

             reply	other threads:[~2018-05-17 12:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 12:58 Christopher Baines [this message]
2018-05-19 20:21 ` [bug#31484] [PATCH] gnu: icu4c: Patch zoneinfo directory Ludovic Courtès
2018-05-21 17:15   ` Leo Famulari
2018-05-22 12:06     ` Ludovic Courtès
2018-05-24 16:30       ` Leo Famulari
2018-06-11 18:18   ` Christopher Baines

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=20180517125834.7417-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=31484@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).