2023-07-29 22:09:22 +03:00
|
|
|
distributable:
|
2024-03-09 02:31:09 +03:00
|
|
|
# TODO: add jdk8
|
2024-03-07 17:54:44 +03:00
|
|
|
- url: https://github.com/openjdk/jdk21u/archive/{{version.tag}}.tar.gz
|
|
|
|
strip-components: 1
|
2024-01-12 22:39:49 +03:00
|
|
|
- url: https://github.com/openjdk/jdk17u/archive/{{version.tag}}.tar.gz
|
|
|
|
strip-components: 1
|
2024-03-09 02:31:09 +03:00
|
|
|
- url: https://github.com/openjdk/jdk11u/archive/{{version.tag}}.tar.gz
|
|
|
|
strip-components: 1
|
2023-10-27 20:12:18 +03:00
|
|
|
|
2023-07-29 22:09:22 +03:00
|
|
|
versions:
|
2024-03-07 17:54:44 +03:00
|
|
|
# each repo contains all the prior repo tags at the time of the fork,
|
|
|
|
# as well as tags like 21+10, which should be 21.0.0.10, but parses to
|
|
|
|
# 21.10.0.
|
|
|
|
- github: openjdk/jdk21u/tags
|
|
|
|
transform: 'v => v.match(/jdk-21\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined'
|
2024-01-12 22:39:49 +03:00
|
|
|
- github: openjdk/jdk17u/tags
|
|
|
|
transform: 'v => v.match(/jdk-17\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined'
|
2024-03-09 02:31:09 +03:00
|
|
|
- github: openjdk/jdk11u/tags
|
|
|
|
transform: 'v => v.match(/jdk-11\.0\./) ? v.replace(/\+/, ".").replace(/^jdk-/, "") : undefined'
|
2023-10-27 20:12:18 +03:00
|
|
|
|
|
|
|
interprets:
|
|
|
|
extensions: java
|
|
|
|
args: java
|
|
|
|
|
2023-07-29 22:09:22 +03:00
|
|
|
dependencies:
|
|
|
|
giflib.sourceforge.io: '*'
|
2023-08-14 03:17:12 +03:00
|
|
|
harfbuzz.org: ^8
|
2023-07-29 22:09:22 +03:00
|
|
|
libjpeg-turbo.org: '*'
|
|
|
|
libpng.org: '*'
|
|
|
|
littlecms.com: '*'
|
|
|
|
openprinting.github.io/cups: '*'
|
|
|
|
info-zip.org/unzip: '*'
|
|
|
|
zlib.net: '*'
|
|
|
|
libzip.org: '*'
|
|
|
|
linux:
|
|
|
|
alsa-project.org/alsa-lib: '*'
|
|
|
|
freedesktop.org/fontconfig: '*'
|
|
|
|
freetype.org: '*'
|
|
|
|
x.org/x11: '*'
|
|
|
|
x.org/exts: '*'
|
|
|
|
x.org/xrandr: '*'
|
|
|
|
x.org/xrender: '*'
|
|
|
|
x.org/xt: '*'
|
|
|
|
x.org/xtst: '*'
|
|
|
|
info-zip.org/zip: '*'
|
|
|
|
darwinsys.com/file: '*'
|
2023-10-27 20:12:18 +03:00
|
|
|
|
2023-08-14 03:17:12 +03:00
|
|
|
runtime:
|
|
|
|
env:
|
2023-10-02 03:41:57 +03:00
|
|
|
JAVA_HOME: '{{prefix}}'
|
2023-10-27 20:12:18 +03:00
|
|
|
|
2023-07-29 22:09:22 +03:00
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
linux:
|
2024-03-10 22:51:47 +03:00
|
|
|
llvm.org: ^16
|
2023-10-27 20:34:14 +03:00
|
|
|
gnu.org/make: '*'
|
2023-07-29 22:09:22 +03:00
|
|
|
gnu.org/autoconf: '*'
|
|
|
|
freedesktop.org/pkg-config: '*'
|
|
|
|
gnu.org/wget: '*'
|
|
|
|
script:
|
2024-03-09 02:31:09 +03:00
|
|
|
- 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
|
2024-03-10 22:51:47 +03:00
|
|
|
unset BOOT_JDK_VERSION BOOT_JDK_MAJOR BOOT_JDK_URL
|
2023-07-29 22:09:22 +03:00
|
|
|
working-directory: boot-jdk
|
2024-03-09 02:31:09 +03:00
|
|
|
- run: |
|
|
|
|
ARGS+=" --disable-hotspot-gtest --with-jvm-features=shenandoahgc --with-conf-name=release"
|
|
|
|
MAKE_ARGS+=" CONF=release"
|
2024-03-10 22:51:47 +03:00
|
|
|
|
2024-03-11 22:24:58 +03:00
|
|
|
# This is hacky, but it's necessary to version the LLVM dependency by openjdk version.
|
|
|
|
if test {{hw.platform}} = "linux"; then
|
|
|
|
LLVM_VERSION_MAJOR='12'
|
|
|
|
pkgx "+llvm.org^${LLVM_VERSION_MAJOR}"
|
|
|
|
LLVM_BIN_PATH="$(realpath "{{deps.llvm.org.prefix}}/../v${LLVM_VERSION_MAJOR}/bin")"
|
|
|
|
PATH_WITHOUT_LLVM="$(echo "${PATH}" | tr ':' '\n' | grep -v '/llvm.org/' | tr '\n' ':')"
|
|
|
|
export PATH="${LLVM_BIN_PATH}:${PATH_WITHOUT_LLVM}"
|
|
|
|
clang --version | grep "clang version ${LLVM_VERSION_MAJOR}"
|
|
|
|
unset LLVM_VERSION_MAJOR LLVM_BIN_PATH PATH_WITHOUT_.LLVM
|
|
|
|
fi
|
2024-03-09 02:31:09 +03:00
|
|
|
if: <12
|
2023-10-27 20:34:14 +03:00
|
|
|
- bash configure $ARGS
|
|
|
|
--with-boot-jdk="$BOOT_JDK_DIR"
|
2024-03-09 02:31:09 +03:00
|
|
|
--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]\+')"
|
2023-10-27 20:34:14 +03:00
|
|
|
--with-extra-cflags="$CFLAGS"
|
|
|
|
--with-extra-cxxflags="$CXXFLAGS"
|
|
|
|
--with-extra-ldflags="$LDFLAGS"
|
2024-03-09 02:31:09 +03:00
|
|
|
- make images $MAKE_ARGS
|
2023-07-29 22:09:22 +03:00
|
|
|
- mkdir -p {{prefix}}
|
|
|
|
- mv $JDK_DIR {{prefix}}/
|
|
|
|
env:
|
2024-03-09 02:31:09 +03:00
|
|
|
MAKE_ARGS: 'JOBS={{ hw.concurrency }}'
|
2023-07-29 22:09:22 +03:00
|
|
|
darwin:
|
|
|
|
BOOT_JDK_DIR: $SRCROOT/boot-jdk/Contents/Home
|
2024-01-13 08:42:08 +03:00
|
|
|
JDK_DIR: build/*/images/jdk-bundle/jdk-{{version.marketing}}.{{version.patch}}.jdk/Contents/Home/*
|
2023-07-29 22:09:22 +03:00
|
|
|
ARGS:
|
|
|
|
- --enable-dtrace
|
2024-03-09 02:31:09 +03:00
|
|
|
- --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
|
2023-07-29 22:09:22 +03:00
|
|
|
linux:
|
|
|
|
BOOT_JDK_DIR: $SRCROOT/boot-jdk
|
|
|
|
JDK_DIR: build/*/images/jdk/*
|
|
|
|
ARGS:
|
2024-03-09 02:31:09 +03:00
|
|
|
- --with-x={{deps.x.org/x11.prefix}}
|
2023-07-29 22:09:22 +03:00
|
|
|
- --with-cups={{deps.openprinting.github.io/cups.prefix}}
|
|
|
|
- --with-fontconfig={{deps.freedesktop.org/fontconfig.prefix}}
|
|
|
|
- --with-freetype=system
|
|
|
|
- --with-stdc++lib=dynamic
|
|
|
|
- --with-toolchain-type=clang
|
2024-03-09 02:31:09 +03:00
|
|
|
- CXXFILT=llvm-cxxfilt
|
2023-07-29 22:09:22 +03:00
|
|
|
darwin/aarch64:
|
2024-03-09 02:31:09 +03:00
|
|
|
BOOT_JDK_ARCH: aarch64_mac
|
2023-07-29 22:09:22 +03:00
|
|
|
darwin/x86-64:
|
2024-03-09 02:31:09 +03:00
|
|
|
BOOT_JDK_ARCH: x64_mac
|
2023-07-29 22:09:22 +03:00
|
|
|
linux/aarch64:
|
2024-03-09 02:31:09 +03:00
|
|
|
BOOT_JDK_ARCH: aarch64_linux
|
2023-07-29 22:09:22 +03:00
|
|
|
linux/x86-64:
|
2024-03-09 02:31:09 +03:00
|
|
|
BOOT_JDK_ARCH: x64_linux
|
2024-03-07 17:54:44 +03:00
|
|
|
|
|
|
|
# the boot jdk should point to the last version of the previous major version
|
|
|
|
# or the last previous version of the current major version
|
2024-03-09 02:31:09 +03:00
|
|
|
# https://github.com/adoptium/temurin21-binaries/releases
|
|
|
|
BOOT_JDK21_VERSION: 21.0.2+13
|
|
|
|
# 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
|
2024-01-12 22:39:49 +03:00
|
|
|
|
2023-07-29 22:09:22 +03:00
|
|
|
ARGS:
|
|
|
|
- --disable-warnings-as-errors
|
|
|
|
- --with-debug-level=release
|
|
|
|
- --with-jvm-variants=server
|
|
|
|
- --with-native-debug-symbols=none
|
|
|
|
- --with-vendor-bug-url="https://github.com/teaxyz/pantry/issues"
|
|
|
|
- --with-vendor-name="tea.xyz"
|
|
|
|
- --with-vendor-url="https://github.com/teaxyz/pantry/issues"
|
|
|
|
- --with-vendor-vm-bug-url="https://github.com/teaxyz/pantry/issues"
|
2024-03-09 02:31:09 +03:00
|
|
|
- --with-version-opt=""
|
|
|
|
- --with-version-pre=""
|
2023-07-29 22:09:22 +03:00
|
|
|
- --with-giflib=system
|
|
|
|
- --with-harfbuzz=system
|
|
|
|
- --with-lcms=system
|
|
|
|
- --with-libjpeg=system
|
|
|
|
- --with-libpng=system
|
|
|
|
- --with-zlib=system
|
2023-10-27 20:12:18 +03:00
|
|
|
|
2023-07-29 22:09:22 +03:00
|
|
|
provides:
|
2024-03-09 21:43:40 +03:00
|
|
|
# TODO: https://github.com/pkgxdev/libpkgx/issues/68
|
|
|
|
# - bin/jaotc # <=11
|
2023-07-29 22:09:22 +03:00
|
|
|
- bin/jar
|
|
|
|
- bin/jarsigner
|
|
|
|
- bin/java
|
|
|
|
- bin/javac
|
|
|
|
- bin/javadoc
|
|
|
|
- bin/javap
|
|
|
|
- bin/jcmd
|
|
|
|
- bin/jconsole
|
|
|
|
- bin/jdb
|
|
|
|
- bin/jdeprscan
|
|
|
|
- bin/jdeps
|
|
|
|
- bin/jfr
|
|
|
|
- bin/jhsdb
|
|
|
|
- bin/jimage
|
|
|
|
- bin/jinfo
|
2024-03-09 21:43:40 +03:00
|
|
|
# - bin/jjs # <=11
|
2023-07-29 22:09:22 +03:00
|
|
|
- bin/jlink
|
|
|
|
- bin/jmap
|
|
|
|
- bin/jmod
|
2024-03-09 21:43:40 +03:00
|
|
|
# - bin/jpackage # >=17
|
2023-07-29 22:09:22 +03:00
|
|
|
- bin/jps
|
|
|
|
- bin/jrunscript
|
|
|
|
- bin/jshell
|
|
|
|
- bin/jstack
|
|
|
|
- bin/jstat
|
|
|
|
- bin/jstatd
|
2024-03-09 21:43:40 +03:00
|
|
|
# - bin/jwebserver # >=21
|
2023-07-29 22:09:22 +03:00
|
|
|
- bin/keytool
|
2024-03-09 21:43:40 +03:00
|
|
|
# - bin/pack200 # <=11
|
|
|
|
# - bin/rmic # <=11
|
|
|
|
# - bin/rmid # <=11
|
2023-07-29 22:09:22 +03:00
|
|
|
- bin/rmiregistry
|
|
|
|
- bin/serialver
|
2024-03-09 21:43:40 +03:00
|
|
|
# - bin/unpack200 # <=11
|
2023-10-27 20:12:18 +03:00
|
|
|
|
2023-07-29 22:09:22 +03:00
|
|
|
test:
|
|
|
|
script:
|
|
|
|
- java --version | grep {{version.marketing}}
|
|
|
|
- javac HelloWorld.java
|
2023-08-14 03:17:12 +03:00
|
|
|
- java HelloWorld | grep 'Hello, world!'
|