forked from pool/java-1_8_0-openj9
Accepting request 768300 from Java:packages
OBS-URL: https://build.opensuse.org/request/show/768300 OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openj9?expand=0&rev=15
This commit is contained in:
parent
ec97540436
commit
3c90febd1f
63
alternative-path-to-tzdb_dat.patch
Normal file
63
alternative-path-to-tzdb_dat.patch
Normal file
@ -0,0 +1,63 @@
|
||||
--- a/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java 2020-01-22 11:12:33.000000000 +0100
|
||||
+++ b/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java 2020-01-29 09:40:23.558260593 +0100
|
||||
@@ -31,6 +31,7 @@
|
||||
import java.io.DataInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
+import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.StreamCorruptedException;
|
||||
import java.security.AccessController;
|
||||
@@ -47,6 +48,7 @@
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
+import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.SimpleTimeZone;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -251,7 +253,15 @@
|
||||
AccessController.doPrivileged(new PrivilegedAction<Object>() {
|
||||
public Object run() {
|
||||
try {
|
||||
- String libDir = System.getProperty("java.home") + File.separator + "lib";
|
||||
+ final String homeDir = System.getProperty("java.home");
|
||||
+ if (homeDir == null) {
|
||||
+ throw new Error("java.home is not set");
|
||||
+ }
|
||||
+ String libDir = homeDir + File.separator + "lib";
|
||||
+ String otherDir = getZoneInfoDir(libDir);
|
||||
+ if (otherDir != null)
|
||||
+ libDir = otherDir;
|
||||
+
|
||||
try (DataInputStream dis = new DataInputStream(
|
||||
new BufferedInputStream(new FileInputStream(
|
||||
new File(libDir, "tzdb.dat"))))) {
|
||||
@@ -264,6 +274,27 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
+
|
||||
+ private static String getZoneInfoDir(final String libDir) {
|
||||
+ return AccessController.doPrivileged (new PrivilegedAction<String>() {
|
||||
+ public String run() {
|
||||
+ File f = new File(libDir + File.separator + "tz.properties");
|
||||
+ try (BufferedInputStream bin = new BufferedInputStream(new FileInputStream(f))) {
|
||||
+ Properties props = new Properties();
|
||||
+ props.load(bin);
|
||||
+ String dir = props.getProperty("sun.zoneinfo.dir");
|
||||
+ if (dir == null)
|
||||
+ return null;
|
||||
+ File tzdbdat = new File(dir, "tzdb.dat");
|
||||
+ if (tzdbdat.exists())
|
||||
+ return dir;
|
||||
+ return null;
|
||||
+ } catch (Exception x) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
|
||||
private static void addOldMapping() {
|
||||
for (String[] alias : oldMappings) {
|
3
freemarker-2.3.29-sources.jar
Normal file
3
freemarker-2.3.29-sources.jar
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9be4c63f2d68d915daffbef9c8a9b63394a41a846871978be0421c962b51b603
|
||||
size 1254826
|
@ -86,7 +86,6 @@
|
||||
%global imagestarget images
|
||||
%endif
|
||||
%global bits 64
|
||||
%bcond_without bootstrap
|
||||
Name: java-1_8_0-openj9
|
||||
Version: %{javaver}.%{updatever}
|
||||
Release: 0
|
||||
@ -99,7 +98,11 @@ Source0: %{root_repository}/%{root_revision}.zip
|
||||
Source1: %{omr_repository}/%{omr_revision}.zip
|
||||
Source2: %{openj9_repository}/%{openj9_revision}.zip
|
||||
# Pulseaudio plugin
|
||||
Source9: http://icedtea.classpath.org/download/source/icedtea-sound-%{icedtea_sound_version}.tar.xz
|
||||
Source3: http://icedtea.classpath.org/download/source/icedtea-sound-%{icedtea_sound_version}.tar.xz
|
||||
# Use the freemarker jar from maven central
|
||||
Source9: https://repo1.maven.org/maven2/org/freemarker/freemarker/%{freemarker_version}/freemarker-%{freemarker_version}.jar
|
||||
# Package also the sources
|
||||
Source10: https://repo1.maven.org/maven2/org/freemarker/freemarker/%{freemarker_version}/freemarker-%{freemarker_version}-sources.jar
|
||||
# Desktop files. Adapated from IcedTea.
|
||||
Source11: jconsole.desktop.in
|
||||
Source12: policytool.desktop.in
|
||||
@ -122,9 +125,11 @@ Patch201: system-libjpeg.patch
|
||||
Patch202: system-libpng.patch
|
||||
Patch203: system-lcms.patch
|
||||
Patch205: link-with-as-needed.patch
|
||||
|
||||
Patch300: alternative-path-to-tzdb_dat.patch
|
||||
BuildRequires: alsa-lib-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: automake openssl-devel
|
||||
BuildRequires: binutils
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
@ -195,12 +200,6 @@ Provides: jre1.6.x
|
||||
Provides: jre1.7.x
|
||||
Provides: jre1.8.x
|
||||
ExclusiveArch: x86_64 ppc64le s390x
|
||||
%if %{with bootstrap}
|
||||
# When bootstrapping, use the freemarker jar from maven central
|
||||
Source10: https://repo1.maven.org/maven2/org/freemarker/freemarker/%{freemarker_version}/freemarker-%{freemarker_version}.jar
|
||||
%else
|
||||
BuildRequires: freemarker
|
||||
%endif
|
||||
%if %{bootcycle}
|
||||
BuildRequires: java-devel >= 1.7
|
||||
BuildConflicts: java >= 9
|
||||
@ -337,7 +336,7 @@ this package unless you really need to.
|
||||
%prep
|
||||
%setup -q -n openj9-openjdk-jdk8-%{root_revision} -a 1 -a 2
|
||||
%if %{with_pulseaudio}
|
||||
%setup -q -D -n openj9-openjdk-jdk8-%{root_revision} -T -a 9
|
||||
%setup -q -D -n openj9-openjdk-jdk8-%{root_revision} -T -a 3
|
||||
%endif
|
||||
|
||||
# Set up the build tree using the subrepository tarballs
|
||||
@ -369,6 +368,8 @@ rm -rvf jdk/src/share/native/sun/java2d/cmm/lcms/lcms2*
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%patch300 -p1
|
||||
|
||||
cat %{SOURCE100} \
|
||||
| sed "s/@OPENJ9_SHA@/%{openj9_revision}/g" \
|
||||
| sed "s/@OPENJ9_BRANCH@/%{openj9_branch}/g" \
|
||||
@ -404,14 +405,11 @@ bash configure \
|
||||
--with-giflib=system \
|
||||
--with-libpng=system \
|
||||
--with-lcms=system \
|
||||
--with-openssl=system \
|
||||
--with-stdc++lib=dynamic \
|
||||
--with-native-debug-symbols=internal \
|
||||
--with-boot-jdk=%{_sysconfdir}/alternatives/java_sdk \
|
||||
%if %{with bootstrap}
|
||||
--with-freemarker-jar=%{SOURCE10}
|
||||
%else
|
||||
--with-freemarker-jar=%{_javadir}/freemarker.jar
|
||||
%endif
|
||||
--with-freemarker-jar=%{SOURCE9}
|
||||
|
||||
# The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist
|
||||
# disables FDS for all build configs and reverts to pre-FDS make logic.
|
||||
@ -435,6 +433,9 @@ find %{imagesdir}/j2sdk-image -iname '*.debuginfo' -exec rm {} \;
|
||||
|
||||
export JAVA_HOME=$(pwd)/%{imagesdir}/j2sdk-image
|
||||
|
||||
# Copy tz.properties
|
||||
echo "sun.zoneinfo.dir=%{_datadir}/javazi" >> $JAVA_HOME/jre/lib/tz.properties
|
||||
|
||||
# cacerts are generated in runtime in openSUSE
|
||||
if [ -f %{imagesdir}/j2sdk-image/jre/lib/security/cacerts ]; then
|
||||
rm %{imagesdir}/j2sdk-image/jre/lib/security/cacerts
|
||||
|
Loading…
x
Reference in New Issue
Block a user