Skip to content

Commit

Permalink
openjdk: add version 21.0.0.35
Browse files Browse the repository at this point in the history
Mind: It looks like the versioning scheme was changed
again, 'minor', 'security' seems to be dropped. But
it does not hurt to keep it, also for the case it gets
reintroduced again. The name pattern for the source
directory changed too. Rationale behind is unknown.
  • Loading branch information
thomas committed Oct 25, 2023
1 parent 01493de commit 94c0123
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions openjdk-21.0.0.35-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#! /bin/bash

PKG=openjdk
VERSION=21.0.0.35 # schema: major.minor.security.update
BUILD=0

PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi

set -xe
umask 022

BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.$USER.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 precompiled bootstrap jdk first
# src: https://download.java.net/java/GA/jdk21.0.1/415e3f918a1f4062a0074a2794853d0d/12/GPL/openjdk-21.0.1_linux-x64_bin.tar.gz
# find the above via https://jdk.java.net/21/

test -e openjdk-21.0.1_linux-x64_bin.tar.gz || wget \
https://beehive.molgen.mpg.de/80f727037c1346f0b5d30b84c32318df/openjdk-21.0.1_linux-x64_bin.tar.gz

test -d bootjdk || (tar -xf openjdk-21.0.1_linux-x64_bin.tar.gz; mv jdk-21.0.1 bootjdk)

# And now the real thing
# src: https://github.com/openjdk/jdk/archive/refs/tags/jdk-21+35.tar.gz

test -e jdk-21+35.tar.gz || wget \
https://beehive.molgen.mpg.de/57f94adacd3c79055587cce27e2d520f/jdk-21%2b35.tar.gz

test -d jdk-jdk-21-35 || tar -xf jdk-21+35.tar.gz

cd jdk-jdk-21-35
mkdir -p jdkbuild
cd jdkbuild

bash ../configure \
--enable-unlimited-crypto=yes \
--disable-warnings-as-errors \
--with-native-debug-symbols=none \
--with-debug-level=release \
--with-stdc++lib=static \
--with-zlib=bundled \
--with-boot-jdk=$BUILDDIR/bootjdk \
--with-version-update=0 \
--with-version-build=35 \
--with-version-opt='' \
--with-log=info

make images

# install
cp -a $BUILDDIR/jdk-jdk-21-35/jdkbuild/images/jdk/* $PREFIX

exit

0 comments on commit 94c0123

Please sign in to comment.