summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2015-01-01 16:41:03 +0300
committerMichael Raskin <7c6f434c@mail.ru>2015-01-01 16:41:03 +0300
commit1d835a2cbdd64e7b257c513904be9d17706c38e9 (patch)
treec34ac22b2e1d3c937432f9a6fc90620b90fe97c3
parentfdb785f4d14a37c399507aa2aec98e086a566b2a (diff)
Using the OpenJDK currency date patch for icedtea
-rw-r--r--pkgs/development/compilers/icedtea/currency-date-range.patch14
-rw-r--r--pkgs/development/compilers/icedtea/default.nix1
2 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/compilers/icedtea/currency-date-range.patch b/pkgs/development/compilers/icedtea/currency-date-range.patch
new file mode 100644
index 0000000000000..b7a2486b12c47
--- /dev/null
+++ b/pkgs/development/compilers/icedtea/currency-date-range.patch
@@ -0,0 +1,14 @@
+diff -Naur openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
+--- openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
++++ openjdk/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	2014-12-30 10:15:50.327905933 -0430
+@@ -281,8 +281,8 @@
+             checkCurrencyCode(newCurrency);
+             String timeString = currencyInfo.substring(4, length - 4);
+             long time = format.parse(timeString).getTime();
+-            if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) {
+-                throw new RuntimeException("time is more than 10 years from present: " + time);
++            if (Math.abs(time - System.currentTimeMillis()) > ((long) 20) * 365 * 24 * 60 * 60 * 1000) {
++                throw new RuntimeException("time is more than 20 years from present: " + time);
+             }
+             specialCaseCutOverTimes[specialCaseCount] = time;
+             specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
diff --git a/pkgs/development/compilers/icedtea/default.nix b/pkgs/development/compilers/icedtea/default.nix
index 81d30d503900c..8f556c89fb469 100644
--- a/pkgs/development/compilers/icedtea/default.nix
+++ b/pkgs/development/compilers/icedtea/default.nix
@@ -80,6 +80,7 @@ with srcInfo; stdenv.mkDerivation {
 
     patch -p0 < ${./cppflags-include-fix.patch}
     patch -p0 < ${./fix-java-home.patch}
+    patch -p0 < ${./currency-date-range.patch}
   '';
 
   NIX_NO_SELF_RPATH = true;