openjdk-make-bootstrap: Use openjdk8

This commit is contained in:
William A. Kennington III 2015-06-06 21:55:09 -07:00
parent bdcb721546
commit 0cc68fa478
3 changed files with 32 additions and 23 deletions

View File

@ -1,26 +1,31 @@
{ runCommand, openjdk, nukeReferences }:
let arch = openjdk.architecture; in
runCommand "${openjdk.name}-bootstrap.tar.xz" {} ''
mkdir -p openjdk-bootstrap/bin
mkdir -p openjdk-bootstrap/lib
mkdir -p openjdk-bootstrap/jre/lib/{security,ext,${arch}/{jli,server,client,headless}}
cp ${openjdk}/bin/{idlj,ja{va{,c,p,h},r},rmic} openjdk-bootstrap/bin
cp ${openjdk}/lib/tools.jar openjdk-bootstrap/lib
cp ${openjdk}/jre/lib/{meta-index,{charsets,jce,jsse,rt,resources}.jar,currency.data} openjdk-bootstrap/jre/lib
cp ${openjdk}/jre/lib/security/java.security openjdk-bootstrap/jre/lib/security
cp ${openjdk}/jre/lib/ext/{meta-index,sunjce_provider.jar} openjdk-bootstrap/jre/lib/ext
cp ${openjdk}/jre/lib/${arch}/{jvm.cfg,lib{awt,java,verify,zip,nio,net}.so} openjdk-bootstrap/jre/lib/${arch}
cp ${openjdk}/jre/lib/${arch}/jli/libjli.so openjdk-bootstrap/jre/lib/${arch}/jli
cp ${openjdk}/jre/lib/${arch}/server/libjvm.so openjdk-bootstrap/jre/lib/${arch}/server
cp ${openjdk}/jre/lib/${arch}/client/libjvm.so openjdk-bootstrap/jre/lib/${arch}/client ||
rmdir openjdk-bootstrap/jre/lib/${arch}/client
cp ${openjdk}/jre/lib/${arch}/headless/libmawt.so openjdk-bootstrap/jre/lib/${arch}/headless
cp -a ${openjdk}/include openjdk-bootstrap
mkdir -pv openjdk-bootstrap/lib
# Do a deep copy of the openjdk
cp -vrL ${openjdk.home} openjdk-bootstrap/lib
# Includes are needed for building the native jvm
cp -vrL ${openjdk}/include openjdk-bootstrap
# The binaries are actually stored in the openjdk lib
ln -sv lib/openjdk/bin openjdk-bootstrap/bin
find . -name libjli.so
(cd openjdk-bootstrap/lib; find . -name libjli.so -exec ln -sfv {} libjli.so \;)
chmod -R +w openjdk-bootstrap
# Remove components we don't need
find openjdk-bootstrap -name \*.diz -exec rm {} \;
find openjdk-bootstrap -name \*.ttf -exec rm {} \;
find openjdk-bootstrap -name \*.gif -exec rm {} \;
find openjdk-bootstrap -name src.zip -exec rm {} \;
rm -rf openjdk-bootstrap/lib/openjdk/jre/bin
# Remove all of the references to the native nix store
find openjdk-bootstrap -print0 | xargs -0 ${nukeReferences}/bin/nuke-refs
# Create the output tarball
tar cv openjdk-bootstrap | xz > $out
''

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, cpio, file, which, unzip, zip, xorg, cups, freetype, alsaLib, bootjdk, cacert, perl, liberation_ttf, fontconfig } :
{ stdenv, fetchurl, cpio, file, which, unzip, zip, xorg, cups, freetype, alsaLib, bootjdk, cacert, perl, liberation_ttf, fontconfig
, minimal ? false } :
let
update = "40";
build = "27";
@ -66,7 +68,6 @@ let
./read-truststore-from-env-jdk8.patch
./currency-date-range-jdk8.patch
./JDK-8074312-hotspot.patch
];
preConfigure = ''
chmod +x configure
@ -84,11 +85,11 @@ let
"--with-override-nashorn=../nashorn-${repover}"
"--with-boot-jdk=${bootjdk.home}"
"--with-update-version=${update}"
"--with-build-number=b${build}"
"--with-build-number=${build}"
"--with-milestone=fcs"
"--disable-debug-symbols"
];
NIX_LDFLAGS= "-lfontconfig";
] ++ stdenv.lib.optional minimal "--disable-headful";
NIX_LDFLAGS= if minimal then null else "-lfontconfig";
buildFlags = "all";
installPhase = ''
mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk
@ -142,7 +143,6 @@ let
ln -s $out/lib/openjdk/bin $out/bin
ln -s $jre/lib/openjdk/jre/bin $jre/bin
'';
meta = with stdenv.lib; {

View File

@ -3933,6 +3933,10 @@ let
openjdk-bootstrap = callPackage ../development/compilers/openjdk/bootstrap.nix { };
openjdk-make-bootstrap = callPackage ../development/compilers/openjdk/make-bootstrap.nix {
openjdk = openjdk.override { minimal = true; };
};
openjdk-darwin = callPackage ../development/compilers/openjdk-darwin { };
openjdk7 = callPackage ../development/compilers/openjdk {