+openjdk.org@11 (#5472)

* +openjdk.org@11

* add customizations for v11

* address comments

* more fixes

* Fix boot jdk
This commit is contained in:
Felipe Santos 2024-03-08 20:31:09 -03:00 committed by GitHub
parent 0294c230aa
commit ee660cf130
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,11 +1,13 @@
distributable: distributable:
# TODO: add jdk11 and jdk8 # TODO: add jdk8
- url: https://github.com/openjdk/jdk21u/archive/{{version.tag}}.tar.gz - url: https://github.com/openjdk/jdk21u/archive/{{version.tag}}.tar.gz
strip-components: 1 strip-components: 1
- url: https://github.com/openjdk/jdk20u/archive/{{version.tag}}.tar.gz - url: https://github.com/openjdk/jdk20u/archive/{{version.tag}}.tar.gz
strip-components: 1 strip-components: 1
- url: https://github.com/openjdk/jdk17u/archive/{{version.tag}}.tar.gz - url: https://github.com/openjdk/jdk17u/archive/{{version.tag}}.tar.gz
strip-components: 1 strip-components: 1
- url: https://github.com/openjdk/jdk11u/archive/{{version.tag}}.tar.gz
strip-components: 1
versions: versions:
# each repo contains all the prior repo tags at the time of the fork, # each repo contains all the prior repo tags at the time of the fork,
@ -17,6 +19,8 @@ versions:
transform: 'v => v.match(/jdk-20\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined' transform: 'v => v.match(/jdk-20\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined'
- github: openjdk/jdk17u/tags - github: openjdk/jdk17u/tags
transform: 'v => v.match(/jdk-17\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined' transform: 'v => v.match(/jdk-17\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined'
- github: openjdk/jdk11u/tags
transform: 'v => v.match(/jdk-11\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined'
interprets: interprets:
extensions: java extensions: java
@ -52,60 +56,70 @@ runtime:
build: build:
dependencies: dependencies:
linux: linux:
llvm.org: <17 llvm.org: <16 # due to jdk11, jdk17+ compiles with llvm.org <17
gnu.org/make: '*' gnu.org/make: '*'
gnu.org/autoconf: '*' gnu.org/autoconf: '*'
freedesktop.org/pkg-config: '*' freedesktop.org/pkg-config: '*'
gnu.org/wget: '*' gnu.org/wget: '*'
script: script:
- run: wget -c ${BOOT_JDK{{version.major}}}_${JDK_ARCH}_bin.tar.gz -O - | tar xz -C . --strip-components=$STRIP - run: |
BOOT_JDK_VERSION="${BOOT_JDK{{version.major}}_VERSION}"
BOOT_JDK_MAJOR=$(echo "${BOOT_JDK_VERSION}" | grep -o '^[0-9]\+')
BOOT_JDK_URL="https://github.com/adoptium/temurin${BOOT_JDK_MAJOR}-binaries/releases/download/jdk-${BOOT_JDK_VERSION}/OpenJDK${BOOT_JDK_MAJOR}U-jdk_${BOOT_JDK_ARCH}_hotspot_${BOOT_JDK_VERSION//+/_}.tar.gz"
wget -c "${BOOT_JDK_URL}" -O - | tar xz -C . --strip-components=1
working-directory: boot-jdk working-directory: boot-jdk
# autoconf won't find llvm-cxxfilt for c++filt, and won't take an envvar - run: |
- run: sed -i -e's/c..filt/llvm-cxxfilt/' toolchain.m4 ARGS+=" --disable-hotspot-gtest --with-jvm-features=shenandoahgc --with-conf-name=release"
working-directory: make/autoconf MAKE_ARGS+=" CONF=release"
if: linux if: <12
- bash configure $ARGS - bash configure $ARGS
--with-boot-jdk="$BOOT_JDK_DIR" --with-boot-jdk="$BOOT_JDK_DIR"
--with-vendor-version-string="$(pkgx --version | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')" --with-version-build=$(echo {{version.raw}} | grep -o '[0-9]\+$')
--with-vendor-version-string="pkgx@$(pkgx --version | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')"
--with-extra-cflags="$CFLAGS" --with-extra-cflags="$CFLAGS"
--with-extra-cxxflags="$CXXFLAGS" --with-extra-cxxflags="$CXXFLAGS"
--with-extra-ldflags="$LDFLAGS" --with-extra-ldflags="$LDFLAGS"
- make images - make images $MAKE_ARGS
- mkdir -p {{prefix}} - mkdir -p {{prefix}}
- mv $JDK_DIR {{prefix}}/ - mv $JDK_DIR {{prefix}}/
env: env:
MAKEFLAGS: 'JOBS={{ hw.concurrency }}' MAKE_ARGS: 'JOBS={{ hw.concurrency }}'
darwin: darwin:
STRIP: 2
BOOT_JDK_DIR: $SRCROOT/boot-jdk/Contents/Home BOOT_JDK_DIR: $SRCROOT/boot-jdk/Contents/Home
JDK_DIR: build/*/images/jdk-bundle/jdk-{{version.marketing}}.{{version.patch}}.jdk/Contents/Home/* JDK_DIR: build/*/images/jdk-bundle/jdk-{{version.marketing}}.{{version.patch}}.jdk/Contents/Home/*
ARGS: ARGS:
- --enable-dtrace - --enable-dtrace
- --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
linux: linux:
STRIP: 1
BOOT_JDK_DIR: $SRCROOT/boot-jdk BOOT_JDK_DIR: $SRCROOT/boot-jdk
JDK_DIR: build/*/images/jdk/* JDK_DIR: build/*/images/jdk/*
ARGS: ARGS:
- --with-x={{deps.x.org/x11.prefix}}
- --with-cups={{deps.openprinting.github.io/cups.prefix}} - --with-cups={{deps.openprinting.github.io/cups.prefix}}
- --with-fontconfig={{deps.freedesktop.org/fontconfig.prefix}} - --with-fontconfig={{deps.freedesktop.org/fontconfig.prefix}}
- --with-freetype=system - --with-freetype=system
- --with-stdc++lib=dynamic - --with-stdc++lib=dynamic
- --with-toolchain-type=clang - --with-toolchain-type=clang
- CXXFILT=llvm-cxxfilt
darwin/aarch64: darwin/aarch64:
JDK_ARCH: macos-aarch64 BOOT_JDK_ARCH: aarch64_mac
darwin/x86-64: darwin/x86-64:
JDK_ARCH: macos-x64 BOOT_JDK_ARCH: x64_mac
linux/aarch64: linux/aarch64:
JDK_ARCH: linux-aarch64 BOOT_JDK_ARCH: aarch64_linux
linux/x86-64: linux/x86-64:
JDK_ARCH: linux-x64 BOOT_JDK_ARCH: x64_linux
# from https://jdk.java.net/archive/
# the boot jdk should point to the last version of the previous major version # the boot jdk should point to the last version of the previous major version
# or the last previous version of the current major version # or the last previous version of the current major version
BOOT_JDK17: https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2 # https://github.com/adoptium/temurin21-binaries/releases
BOOT_JDK20: https://download.java.net/java/GA/jdk20.0.2/6e380f22cbe7469fa75fb448bd903d8e/9/GPL/openjdk-20.0.2 BOOT_JDK21_VERSION: 21.0.2+13
BOOT_JDK21: https://download.java.net/java/GA/jdk21.0.1/415e3f918a1f4062a0074a2794853d0d/12/GPL/openjdk-21.0.1 # https://github.com/adoptium/temurin20-binaries/releases
BOOT_JDK20_VERSION: 20.0.2+9
# https://github.com/adoptium/temurin17-binaries/releases
BOOT_JDK17_VERSION: 17.0.9+9
# https://github.com/adoptium/temurin11-binaries/releases
BOOT_JDK11_VERSION: 11.0.22+7
ARGS: ARGS:
- --disable-warnings-as-errors - --disable-warnings-as-errors
@ -116,9 +130,8 @@ build:
- --with-vendor-name="tea.xyz" - --with-vendor-name="tea.xyz"
- --with-vendor-url="https://github.com/teaxyz/pantry/issues" - --with-vendor-url="https://github.com/teaxyz/pantry/issues"
- --with-vendor-vm-bug-url="https://github.com/teaxyz/pantry/issues" - --with-vendor-vm-bug-url="https://github.com/teaxyz/pantry/issues"
- --with-version-build={{version.minor}} - --with-version-opt=""
- --without-version-opt - --with-version-pre=""
- --without-version-pre
- --with-giflib=system - --with-giflib=system
- --with-harfbuzz=system - --with-harfbuzz=system
- --with-lcms=system - --with-lcms=system
@ -152,7 +165,8 @@ provides:
- bin/jstack - bin/jstack
- bin/jstat - bin/jstat
- bin/jstatd - bin/jstatd
# TODO: if: {{version.major}} >= 21 # TODO: this bin should only be available in jdk21+
# https://github.com/pkgxdev/libpkgx/issues/68
# - bin/jwebserver # - bin/jwebserver
- bin/keytool - bin/keytool
- bin/rmiregistry - bin/rmiregistry