guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/12: gnu: ruby-tzinfo-data: Update to 1.2021.1.


From: guix-commits
Subject: 08/12: gnu: ruby-tzinfo-data: Update to 1.2021.1.
Date: Tue, 23 Feb 2021 09:06:55 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit ebd8e447e99c4847bc5cdb5738ac5413a7278ba2
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Feb 23 15:15:02 2021 +0200

    gnu: ruby-tzinfo-data: Update to 1.2021.1.
    
    * gnu/packages/ruby.scm (ruby-tzinfo-data): Update to 1.2021.1.
    [source]: Remove patch.
    [arguments]: Add custom 'patch-source, 'pre-check phases.
    [native-inputs]: Add IANA timezone data files.
    * gnu/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch: Remove
    file.
    * gnu/local.mk (dist_patch_DATA): Remove it.
---
 gnu/local.mk                                       |  1 -
 .../ruby-tzinfo-data-ignore-broken-test.patch      | 13 -----
 gnu/packages/ruby.scm                              | 61 +++++++++++++++++++---
 3 files changed, 54 insertions(+), 21 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index b8bccc1..3591295 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1598,7 +1598,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/rnp-unbundle-googletest.patch           \
   %D%/packages/patches/ruby-rack-ignore-failing-test.patch     \
   %D%/packages/patches/ruby-sanitize-system-libxml.patch       \
-  %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
   %D%/packages/patches/runc-CVE-2019-5736.patch                        \
   %D%/packages/patches/rust-1.19-mrustc.patch                  \
   %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \
diff --git a/gnu/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch 
b/gnu/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch
deleted file mode 100644
index 5d1f04b..0000000
--- a/gnu/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/test/tc_definitions.rb b/test/tc_definitions.rb
-index 7b20a3d..75b9798 100644
---- a/test/tc_definitions.rb
-+++ b/test/tc_definitions.rb
-@@ -58,7 +58,7 @@ class TCDefinitions < Minitest::Test
-         identifier = $3.to_sym
-         is_dst = $4 == '1'
-  
--        if utc && local
-+        if utc && local && !line.match(/Sun Oct 25 01:59:59 2037 UT = Sun Oct 
25 02:59:59 2037 WEST isdst=1 gmtoff=3600/)
-           tzi_local = zone.utc_to_local(utc)
-           tzi_period = zone.period_for_utc(utc)
-           tzi_identifier = tzi_period.zone_identifier
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index dc38171..bd25bd5 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -78,6 +78,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages xml)
@@ -5817,7 +5818,7 @@ aware transformations between times in different time 
zones.")
 (define-public ruby-tzinfo-data
   (package
     (name "ruby-tzinfo-data")
-    (version "1.2017.3")
+    (version "1.2021.1")
     (source
      (origin
        (method git-fetch)
@@ -5829,15 +5830,61 @@ aware transformations between times in different time 
zones.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0v3phl5l3jrm6waxcszqmj2dkjhqawxfsxb6mss7vkp1hlckqcdp"))
-       ;; Remove the known test failure.
-       ;; https://github.com/tzinfo/tzinfo-data/issues/10
-       ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
-       (patches (search-patches
-                 "ruby-tzinfo-data-ignore-broken-test.patch"))))
+         "0yzyr3rf8qaw6kxfc0gwpxsb7gl3rhfpx9g1c2z15vapyminhi60"))))
     (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "Rakefile"
+               (("https://data.iana.org/time-zones/releases";)
+                (assoc-ref inputs "tzdata")))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             (setenv "HOME" (getcwd))
+             (substitute* "Rakefile"
+               ;; Don't need gpg, and it may break after a time.
+               (("gpg ") "echo ")
+               (("    sh\\(\\\"make -C" text)
+                (string-append "    sh(\"sed -i 's@/bin/sh@sh@' 
#{tzdb_combined_path}/Makefile \")\n"
+                               "    sh(\"sed -i 's@cc=@cc?=@' 
#{tzdb_combined_path}/Makefile \")\n" text)))
+               (setenv "cc" ,(cc-for-target))
+             #t)))))
     (propagated-inputs
      `(("ruby-tzinfo" ,ruby-tzinfo)))
+    (native-inputs
+     `(("tzdata"
+        ,(file-union "tzdata-for-ruby-tzdata-info"
+           `(("tzdata2021a.tar.gz"
+              ,(origin
+                 (method url-fetch)
+                 (uri 
"https://data.iana.org/time-zones/releases/tzdata2021a.tar.gz";)
+                 (sha256
+                  (base32
+                   "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr"))))
+             ("tzdata2021a.tar.gz.asc"
+              ,(origin
+                 (method url-fetch)
+                 (uri 
"https://data.iana.org/time-zones/releases/tzdata2021a.tar.gz.asc";)
+                 (sha256
+                  (base32
+                   "0n7h2w8ji1lrxpk0d44wyfshlhr7c9jmwj6lqbxlyvqnfi3gbicx"))))
+             ("tzcode2021a.tar.gz"
+              ,(origin
+                 (method url-fetch)
+                 (uri 
"https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz";)
+                 (sha256
+                  (base32
+                   "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))
+             ("tzcode2021a.tar.gz.asc"
+              ,(origin
+                 (method url-fetch)
+                 (uri 
"https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz.asc";)
+                 (sha256
+                  (base32
+                   
"1qhlj4lr810s47s1lwcvv1sgvg2sflf98w4sbg1lc8wzv5qxxv7g")))))))))
     (synopsis "Data from the IANA Time Zone database")
     (description
      "This library provides @code{TZInfo::Data}, which contains data from the



reply via email to

[Prev in Thread] Current Thread [Next in Thread]