From a7b6788e737e6d35c5f369810caa648455270f1e Mon Sep 17 00:00:00 2001 From: Piraty Date: Thu, 20 Feb 2025 21:03:32 +0100 Subject: [PATCH] openjdk7-bootstrap: fix build --- .../openjdk7-bootstrap/files/openjdk.future.patch | 15 +++++++++++++++ srcpkgs/openjdk7-bootstrap/template | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/openjdk7-bootstrap/files/openjdk.future.patch diff --git a/srcpkgs/openjdk7-bootstrap/files/openjdk.future.patch b/srcpkgs/openjdk7-bootstrap/files/openjdk.future.patch new file mode 100644 index 00000000000..d10df20cde0 --- /dev/null +++ b/srcpkgs/openjdk7-bootstrap/files/openjdk.future.patch @@ -0,0 +1,15 @@ +fixes build failure + +--- jdk.orig/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java ++++ jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java +@@ -283,8 +283,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) 50) * 365 * 24 * 60 * 60 * 1000) { ++ throw new RuntimeException("time is more than 50 years from present: " + time); + } + specialCaseCutOverTimes[specialCaseCount] = time; + specialCaseOldCurrencies[specialCaseCount] = oldCurrency; diff --git a/srcpkgs/openjdk7-bootstrap/template b/srcpkgs/openjdk7-bootstrap/template index 745974dc720..03d91bebf49 100644 --- a/srcpkgs/openjdk7-bootstrap/template +++ b/srcpkgs/openjdk7-bootstrap/template @@ -97,9 +97,10 @@ post_extract() { # distrib patches are relative to wrksrc for patch in $(cat ${FILESDIR}/dist_patches_${XBPS_TARGET_LIBC}.txt); do case "$patch" in - icedtea-*.patch) cp ${FILESDIR}/$patch ${wrksrc} + icedtea-*.patch) cp ${FILESDIR}/$patch ${wrksrc};; esac done + cp ${FILESDIR}/openjdk.future.patch ${wrksrc} } # we need to set up these vars for both configure and build @@ -137,6 +138,7 @@ _setup_build_env() { done export DISTRIBUTION_PATCHES="$_patches" + export OPENJDK_PATCHES="openjdk.future.patch" } pre_configure() {