From 4aca6fc4984eec0d6695ca8ac0aa90eace805108 Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Sat, 29 Jul 2023 22:09:22 +0300 Subject: [PATCH] openjdk.org (#2684) * openjdk.java.net * linux * maybe insert $PATH on --with-tools-dir= * darwinsys.com/file * linux need to fix * linux deps * linux platform * rename -> openjdk.org * --with-tools-dir= * cflags & cxxflags & ldflags * cat ./config.log * /bin * clang * JDK_DIR * support dir * correct JDK_DIR for linux --- projects/openjdk.org/HelloWorld.java | 5 ++ projects/openjdk.org/package.yml | 130 +++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 projects/openjdk.org/HelloWorld.java create mode 100644 projects/openjdk.org/package.yml diff --git a/projects/openjdk.org/HelloWorld.java b/projects/openjdk.org/HelloWorld.java new file mode 100644 index 00000000..11c2acec --- /dev/null +++ b/projects/openjdk.org/HelloWorld.java @@ -0,0 +1,5 @@ +class HelloWorld { + public static void main(String args[]) { + System.out.println("Hello, world!"); + } +} \ No newline at end of file diff --git a/projects/openjdk.org/package.yml b/projects/openjdk.org/package.yml new file mode 100644 index 00000000..3b325584 --- /dev/null +++ b/projects/openjdk.org/package.yml @@ -0,0 +1,130 @@ +distributable: + url: https://github.com/openjdk/jdk20u/archive/jdk-20.0.2+9.tar.gz + strip-components: 1 +versions: + - 20.0.2.9 + #FIXME +dependencies: + giflib.sourceforge.io: '*' + harfbuzz.org: '*' + 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: '*' +build: + dependencies: + darwin: + tea.xyz/gx/cc: c99 + linux: + gnu.org/gcc: '*' + gnu.org/make: '*' + gnu.org/autoconf: '*' + freedesktop.org/pkg-config: '*' + gnu.org/wget: '*' + script: + - run: wget -c $BOOT_JDK -O - | tar xz -C . --strip-components=$STRIP + working-directory: boot-jdk + - run: | + bash configure $ARGS \ + --with-boot-jdk="$BOOT_JDK_DIR" \ + --with-vendor-version-string="$(tea --version | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')" \ + --with-extra-cflags="$CFLAGS" \ + --with-extra-cxxflags="$CXXFLAGS" \ + --with-extra-ldflags="$LDFLAGS" + - make images + - mkdir -p {{prefix}} + - mv $JDK_DIR {{prefix}}/ + env: + MAKEFLAGS: "JOBS={{ hw.concurrency }}" + darwin: + STRIP: 2 + BOOT_JDK_DIR: $SRCROOT/boot-jdk/Contents/Home + JDK_DIR: build/*/images/jdk-bundle/jdk-20.0.2.jdk/Contents/Home/* + ARGS: + - --enable-dtrace + linux: + STRIP: 1 + BOOT_JDK_DIR: $SRCROOT/boot-jdk + JDK_DIR: build/*/images/jdk/* + ARGS: + - --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 + darwin/aarch64: + BOOT_JDK: https://download.java.net/java/GA/jdk19.0.1/afdd2e245b014143b62ccb916125e3ce/10/GPL/openjdk-19.0.1_macos-aarch64_bin.tar.gz + darwin/x86-64: + BOOT_JDK: https://download.java.net/java/GA/jdk19.0.1/afdd2e245b014143b62ccb916125e3ce/10/GPL/openjdk-19.0.1_macos-x64_bin.tar.gz + linux/aarch64: + BOOT_JDK: https://download.java.net/java/GA/jdk19.0.1/afdd2e245b014143b62ccb916125e3ce/10/GPL/openjdk-19.0.1_linux-aarch64_bin.tar.gz + linux/x86-64: + BOOT_JDK: https://download.java.net/java/GA/jdk19.0.1/afdd2e245b014143b62ccb916125e3ce/10/GPL/openjdk-19.0.1_linux-x64_bin.tar.gz + 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" + - --with-version-build={{version.minor}} + - --without-version-opt + - --without-version-pre + - --with-giflib=system + - --with-harfbuzz=system + - --with-lcms=system + - --with-libjpeg=system + - --with-libpng=system + - --with-zlib=system +provides: + - 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 + - bin/jlink + - bin/jmap + - bin/jmod + - bin/jpackage + - bin/jps + - bin/jrunscript + - bin/jshell + - bin/jstack + - bin/jstat + - bin/jstatd + - bin/jwebserver + - bin/keytool + - bin/rmiregistry + - bin/serialver +test: + script: + - java --version | grep {{version.marketing}} + - javac HelloWorld.java + - java HelloWorld | grep 'Hello, world!' \ No newline at end of file