Files

163 lines
5.8 KiB
Tcl
Raw Permalink Normal View History

2022-03-28 21:35:17 +05:30
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
2025-08-28 15:53:19 +02:00
PortGroup deprecated 1.0
deprecated.eol_version yes
2022-03-28 21:35:17 +05:30
name openjdk18
2022-04-09 21:27:35 +05:30
# https://github.com/openjdk/jdk18u/tags
2022-08-24 13:14:21 +02:00
version 18.0.2.1
set build 1
2022-05-15 15:34:31 +05:30
revision 0
2022-03-28 21:35:17 +05:30
categories java devel
supported_archs x86_64 arm64
license GPL-2+
maintainers nomaintainer
2022-07-26 23:40:59 +02:00
description OpenJDK 18
long_description JDK 18 builds of OpenJDK, the Open-Source implementation \
2022-03-28 21:35:17 +05:30
of the Java Platform, Standard Edition, and related projects.
homepage https://openjdk.java.net/
2022-05-15 15:34:31 +05:30
master_sites https://git.openjdk.java.net/jdk18u/archive/refs/tags
distname jdk-${version}+${build}
2023-02-24 17:56:07 -06:00
worksrcdir jdk18u-[string map {+ -} ${distname}]
2022-05-15 15:34:31 +05:30
2022-08-24 13:14:21 +02:00
checksums rmd160 e309f6e16dea9c38b62f3277af94dd02aeb0e8da \
sha256 7d026848a48e8777d3242bab2adf30122f0acda88abbd3f92636f8793eaf3455 \
size 105492402
2022-05-15 15:34:31 +05:30
depends_lib port:freetype
depends_build port:openjdk18-bootstrap \
port:autoconf \
2022-05-15 21:34:46 +05:30
port:gmake \
port:bash
2022-05-15 15:34:31 +05:30
pre-patch {
reinplace "s|libffi.so.?|libffi.?.dylib|g" ${worksrcpath}/make/autoconf/lib-ffi.m4
reinplace "s|xmacosx|xwindows|g" ${worksrcpath}/make/autoconf/lib-freetype.m4
}
2022-03-28 21:35:17 +05:30
set tpath /Library/Java
use_xcode yes
use_configure yes
2022-05-15 21:34:46 +05:30
configure.cmd ${prefix}/bin/bash configure
2022-03-28 21:35:17 +05:30
configure.pre_args --prefix=${tpath}
2022-04-09 21:27:35 +05:30
set bug_url "https://trac.macports.org/newticket?port=${name}"
2023-05-17 02:18:35 -07:00
# default configure args
2022-03-28 21:35:17 +05:30
configure.args --with-debug-level=release \
--with-native-debug-symbols=none \
2022-05-15 15:34:31 +05:30
--with-version-string=${version}+${build} \
2022-03-29 16:24:42 +05:30
--with-sysroot=`xcrun --sdk macosx --show-sdk-path` \
2022-05-15 15:34:31 +05:30
--with-extra-cflags="${configure.cflags}" \
--with-extra-cxxflags="${configure.cxxflags}" \
--with-extra-ldflags="${configure.ldflags}" \
--with-boot-jdk=/Library/Java/JavaVirtualMachines/openjdk18-bootstrap/Contents/Home \
2022-05-15 21:34:46 +05:30
--with-freetype=system \
--with-freetype-include=${prefix}/include/freetype2 \
--with-freetype-lib=${prefix}/lib \
2022-03-28 21:35:17 +05:30
--disable-warnings-as-errors \
2022-03-29 16:24:42 +05:30
--disable-precompiled-headers \
2023-05-17 02:18:35 -07:00
--with-vendor-name="MacPorts" \
--with-vendor-url="https://www.macports.org" \
2022-04-09 21:27:35 +05:30
--with-vendor-bug-url="${bug_url}" \
--with-vendor-vm-bug-url="${bug_url}" \
--with-conf-name=release
2022-04-01 09:32:30 +05:30
2023-12-10 08:49:44 +00:00
if {[option configure.ccache]} {
# replace MacPorts ccache integration into JDK
configure.ccache no
depends_build-append path:bin/ccache:ccache
configure.args-append --enable-ccache \
2023-12-13 00:03:04 -05:00
--with-ccache-dir=${ccache_dir}
2023-12-10 08:49:44 +00:00
}
2022-04-01 09:32:30 +05:30
variant release \
conflicts debug optimized \
2022-05-15 15:34:31 +05:30
description {OpenJDK with no debug information, all optimizations and no asserts} {
configure.args-append --with-debug-level=release
}
2022-04-01 09:32:30 +05:30
variant optimized \
conflicts debug release \
2022-04-01 09:32:30 +05:30
description {OpenJDK with no debug information, all optimizations, no asserts and HotSpot is 'optimized'} {
2022-05-15 15:34:31 +05:30
configure.args-append --with-debug-level=optimized
2022-04-01 09:32:30 +05:30
}
variant debug \
conflicts optimized release \
2022-04-01 09:32:30 +05:30
description {OpenJDK with debug information, all optimizations and all asserts} {
2022-05-15 15:34:31 +05:30
configure.args-append --with-debug-level=fastdebug
2022-04-08 05:41:14 -07:00
configure.args-delete --with-native-debug-symbols=none
2022-04-01 09:32:30 +05:30
}
variant client \
2022-05-15 15:34:31 +05:30
conflicts core minimal server zero \
2022-04-01 09:32:30 +05:30
description {JVM with normal interpreter, C1 and no C2 compiler} {
2022-05-15 15:34:31 +05:30
configure.args-append --with-jvm-variants=client
}
variant server \
conflicts client core minimal zero \
description {JVM with normal interpreter, and a tiered C1/C2 compiler} {
configure.args-append --with-jvm-variants=server
2022-04-01 09:32:30 +05:30
}
variant minimal \
2022-05-15 15:34:31 +05:30
conflicts client core server zero \
2022-04-01 09:32:30 +05:30
description {JVM with reduced form of normal interpreter having C1, no C2 compiler and optional features stripped out} {
2022-05-15 15:34:31 +05:30
configure.args-append --with-jvm-variants=minimal
2022-04-01 09:32:30 +05:30
}
variant core \
2022-05-15 15:34:31 +05:30
conflicts client minimal server zero \
2022-04-01 09:32:30 +05:30
description {JVM with normal interpreter only and no compiler} {
2022-05-15 15:34:31 +05:30
configure.args-append --with-jvm-variants=core
}
variant zero \
conflicts client core minimal server \
description {JVM with C++ based interpreter only, no compiler} {
configure.args-append --with-jvm-variants=zero \
--with-libffi=${prefix} \
--enable-libffi-bundling
depends_lib-append port:libffi
2022-04-01 09:32:30 +05:30
}
if {![variant_isset debug] && ![variant_isset optimized] && ![variant_isset release]} {
default_variants-append +release
}
2022-05-15 15:34:31 +05:30
if {![variant_isset client] && ![variant_isset core] && ![variant_isset minimal] && ![variant_isset server] && ![variant_isset zero]} {
default_variants-append +server
}
2022-04-01 09:32:30 +05:30
2022-03-28 21:35:17 +05:30
build.type gnu
build.target images
use_parallel_build no
set jdkn jdk-${version}.jdk
2022-04-09 21:27:35 +05:30
set bundle_dir build/release/images/jdk-bundle/${jdkn}/Contents
2022-03-28 21:35:17 +05:30
test.run yes
test.cmd ${bundle_dir}/Home/bin/java
test.target --version
set pathb ${tpath}/JavaVirtualMachines/${name}
destroot {
xinstall -m 755 -d ${destroot}${pathb}
copy ${worksrcpath}/${bundle_dir} ${destroot}${pathb}
}
destroot.violate_mtree yes
post-destroot {
delete ${worksrcpath}
}
notes "
2022-04-06 16:23:10 +02:00
If you want to make ${name} the default JDK, add this to shell profile:
2022-03-28 21:35:17 +05:30
export JAVA_HOME=${pathb}/Contents/Home
"
2022-08-24 13:14:21 +02:00
livecheck.type regex
livecheck.url https://github.com/openjdk/jdk18u/tags
livecheck.regex jdk-(18\.\[0-9\.\]+)-ga