diff options
author | Ben Woodcroft <donttrustben@gmail.com> | 2016-06-03 15:49:23 +1000 |
---|---|---|
committer | Ben Woodcroft <donttrustben@gmail.com> | 2016-06-08 21:28:20 +1000 |
commit | 1e12924ae5e54eea544eed7b1f632a483e425e46 (patch) | |
tree | ee278924d2f135708be567008a860b13f37cab04 /gnu | |
parent | b402cb774113c9dfa2e22a03d5ca2a39f8cbe3ca (diff) | |
download | patches-1e12924ae5e54eea544eed7b1f632a483e425e46.tar patches-1e12924ae5e54eea544eed7b1f632a483e425e46.tar.gz |
gnu: Add ruby-tzinfo-data.
* gnu/packages/ruby.scm (ruby-tzinfo-data): New variable.
* gnu/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch | 13 | ||||
-rw-r--r-- | gnu/packages/ruby.scm | 32 |
3 files changed, 46 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index d3e72629bc..1a61782439 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -733,6 +733,7 @@ dist_patch_DATA = \ %D%/packages/patches/rpm-CVE-2014-8118.patch \ %D%/packages/patches/rsem-makefile.patch \ %D%/packages/patches/ruby-symlinkfix.patch \ + %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\ %D%/packages/patches/rush-CVE-2013-6889.patch \ %D%/packages/patches/sed-hurd-path-max.patch \ %D%/packages/patches/scheme48-tests.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 new file mode 100644 index 0000000000..5d1f04b994 --- /dev/null +++ b/gnu/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch @@ -0,0 +1,13 @@ +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 c6b6eedb9d..077157cf0f 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -2101,6 +2101,38 @@ aware transformations between times in different time zones.") (home-page "http://tzinfo.github.io") (license license:expat))) +(define-public ruby-tzinfo-data + (package + (name "ruby-tzinfo-data") + (version "1.2016.4") + (source + (origin + (method url-fetch) + ;; Download from GitHub because the rubygems version does not contain + ;; Rakefile or tests. + (uri (string-append + "https://github.com/tzinfo/tzinfo-data/archive/v" + version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0jnm8i379hn48cq5n39j7wzm08i0mw73kqzx3cqbxpiwlb1hnz80")) + ;; 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")))) + (build-system ruby-build-system) + (propagated-inputs + `(("ruby-tzinfo" ,ruby-tzinfo))) + (synopsis "Data from the IANA Time Zone database") + (description + "This library provides @code{TZInfo::Data}, which contains data from the +IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.") + (home-page "http://tzinfo.github.io") + (license license:expat))) + (define-public ruby-rb-inotify (package (name "ruby-rb-inotify") |