-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build scheme adapted from "OpenJDK 11 'vanilla' builds done on Travis CI". More because of the 'vanilla' aspect, than the idea behind travis :) More info: https://github.com/ojdkbuild/contrib_jdk11u-ci
- Loading branch information
Showing
1 changed file
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#! /bin/bash | ||
|
||
# NOTE: | ||
# the versioning scheme for JDK 9 and up hasn't stablized (i.e. is a mess!). | ||
# see http://hg.openjdk.java.net/jdk-updates/jdk11u/tags | ||
|
||
# this build is inspired by https://github.com/ojdkbuild/contrib_jdk11u-ci/blob/master/.travis.yml | ||
|
||
PKG=openjdk | ||
# get the revision tag from http://hg.openjdk.java.net/jdk-updates/jdk11u/tags | ||
OJDK_TAG=9de3f198995c # -> jdk-11.0.3+2 | ||
# 'jdk-11.0.3+2' ? -- NO WAY ! | ||
VERSION=11.0.3.2 | ||
BUILD=0 | ||
|
||
PREFIX=/pkg/$PKG-$VERSION-$BUILD | ||
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi | ||
|
||
set -xe | ||
umask 022 | ||
|
||
BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp | ||
test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR | ||
mkdir -p $BUILD_TMPDIR/home | ||
export TMPDIR=$BUILD_TMPDIR | ||
export HOME=$BUILD_TMPDIR/home | ||
|
||
exec </dev/null | ||
|
||
mkdir -p $PREFIX | ||
cat >$PREFIX/profile <<-EOF | ||
PATH=$PREFIX/bin:\$PATH | ||
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi | ||
EOF | ||
. $PREFIX/profile | ||
|
||
BUILDDIR=$PREFIX/build | ||
|
||
mkdir -p $BUILDDIR | ||
cd $BUILDDIR | ||
|
||
|
||
# Install a bootstrap jdk first (10 is the minimum), %2B -> '+' | ||
test -e jdk-10.0.2-ojdkbuild-linux-x64.zip || wget \ | ||
https://github.com/ojdkbuild/contrib_jdk10u-ci/releases/download/jdk-10.0.2%2B13/jdk-10.0.2-ojdkbuild-linux-x64.zip | ||
|
||
test -d bootjdk || unzip jdk-10.0.2-ojdkbuild-linux-x64.zip | ||
mv jdk-10.0.2-ojdkbuild-linux-x64 bootjdk | ||
|
||
# And now the real thing | ||
test -e $OJDK_TAG.tar.gz || wget \ | ||
https://hg.openjdk.java.net/jdk-updates/jdk11u/archive/$OJDK_TAG.tar.gz | ||
|
||
test -d jdk11u-$OJDK_TAG || tar -xf $OJDK_TAG.tar.gz | ||
|
||
cd jdk11u-$OJDK_TAG | ||
mkdir jdkbuild | ||
cd jdkbuild | ||
|
||
bash ../configure \ | ||
--enable-unlimited-crypto=yes \ | ||
--disable-warnings-as-errors \ | ||
--disable-hotspot-gtest \ | ||
--with-native-debug-symbols=none \ | ||
--with-debug-level=release \ | ||
--with-stdc++lib=static \ | ||
--with-zlib=bundled \ | ||
--with-boot-jdk=$BUILDDIR/bootjdk \ | ||
--with-cacerts-file=$BUILDDIR/bootjdk/lib/security/cacerts \ | ||
--with-version-pre=ojdkbuild \ | ||
--with-version-update=3 \ | ||
--with-version-build=2 \ | ||
--with-version-opt='' \ | ||
--with-log=info | ||
|
||
make images | ||
|
||
# install | ||
cp -a $BUILDDIR/jdk11u-$OJDK_TAG/jdkbuild/images/jdk/* $PREFIX | ||
|
||
exit |