Files

169 lines
6.2 KiB
Tcl
Raw Permalink Normal View History

2022-03-27 12:00:23 +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-27 12:00:23 +05:30
name openjdk13
# https://github.com/openjdk/jdk13u/tags
2022-04-24 15:46:11 +05:30
# remove 'jdk-' from the latest tag without '-ga' that has commit that corresponds to the latest tag with '-ga'
2022-10-30 00:30:14 +02:00
version 13.0.13
set build 5
2022-04-24 15:46:11 +05:30
revision 0
2022-03-27 12:00:23 +05:30
categories java devel
supported_archs x86_64
license GPL-2+
maintainers nomaintainer
2022-10-30 00:30:14 +02:00
description OpenJDK 13
long_description JDK 13 builds of OpenJDK, the Open-Source implementation \
2022-03-27 12:00:23 +05:30
of the Java Platform, Standard Edition, and related projects.
homepage https://openjdk.java.net/
2022-04-24 15:46:11 +05:30
master_sites https://git.openjdk.java.net/jdk13u/archive/refs/tags
2022-05-15 15:34:31 +05:30
distname jdk-${version}+${build}
2023-02-24 10:57:51 -06:00
worksrcdir jdk13u-[string map {+ -} ${distname}]
2022-04-24 15:46:11 +05:30
2022-10-30 00:30:14 +02:00
checksums rmd160 7379e843b56740a6d3619692c1c37210de86fb69 \
sha256 7740ba43918b32cf15c6d712400006aae267a576fae85ffb6547c7cc2af69d09 \
size 109415981
2022-04-24 15:46:11 +05:30
2022-05-15 15:34:31 +05:30
depends_lib port:freetype
2022-03-27 12:00:23 +05:30
depends_build port:autoconf \
2022-04-01 09:32:30 +05:30
port:gmake \
port:bash \
port:openjdk13-bootstrap
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-07-29 19:01:16 +05:30
reinplace "s|assert|vmassert|g" ${worksrcpath}/src/hotspot/share/jfr/periodic/jfrNetworkUtilization.cpp
2022-05-15 15:34:31 +05:30
}
2022-03-27 12:00:23 +05:30
set tpath /Library/Java
use_configure yes
2022-04-01 09:32:30 +05:30
configure.cmd ${prefix}/bin/bash configure
2022-03-27 12:00:23 +05:30
configure.pre_args --prefix=${tpath}
2022-04-09 21:19:18 +05:30
set bug_url "https://trac.macports.org/newticket?port=${name}"
2022-04-08 05:55:19 -07:00
# default configure args
2022-03-27 12:00:23 +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-04-09 21:19:18 +05:30
--with-target-bits=64 \
2022-03-27 12:00:23 +05:30
--with-sysroot=`xcrun --sdk macosx --show-sdk-path` \
2022-04-24 15:46:11 +05:30
--with-extra-cflags="${configure.cflags}" \
--with-extra-cxxflags="${configure.cxxflags}" \
--with-extra-ldflags="${configure.ldflags}" \
2022-03-27 12:00:23 +05:30
--with-boot-jdk=/Library/Java/JavaVirtualMachines/openjdk13-bootstrap/Contents/Home \
2022-05-15 15:34:31 +05:30
--with-freetype=system \
--with-freetype-include=${prefix}/include/freetype2 \
--with-freetype-lib=${prefix}/lib \
2022-03-27 12:00:23 +05:30
--disable-warnings-as-errors \
2022-03-29 16:24:42 +05:30
--disable-precompiled-headers \
2022-04-09 21:19:18 +05:30
--with-vendor-name="OpenJDK Porters Group" \
--with-vendor-url="${homepage}" \
--with-vendor-bug-url="${bug_url}" \
--with-vendor-vm-bug-url="${bug_url}" \
2022-04-24 15:46:11 +05:30
--with-conf-name=openjdk13
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 server \
conflicts client core minimal zero \
2022-04-24 15:46:11 +05:30
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 release \
conflicts debug optimized \
2022-04-24 15:46:11 +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-04-24 15:46:11 +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-04-24 15:46:11 +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 \
conflicts core minimal server zero \
2022-04-01 09:32:30 +05:30
description {JVM with normal interpreter, C1 and no C2 compiler} {
2022-04-24 15:46:11 +05:30
configure.args-append --with-jvm-variants=client
2022-04-01 09:32:30 +05:30
}
2022-04-01 09:32:30 +05:30
variant minimal \
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-04-24 15:46:11 +05:30
configure.args-append --with-jvm-variants=minimal
2022-04-01 09:32:30 +05:30
}
variant core \
conflicts client minimal server zero \
2022-04-01 09:32:30 +05:30
description {JVM with normal interpreter only and no compiler} {
2022-04-24 15:46:11 +05:30
configure.args-append --with-jvm-variants=core
}
variant zero \
conflicts client core minimal server \
2022-04-24 15:46:11 +05:30
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
}
if {![variant_isset client] && ![variant_isset core] && ![variant_isset minimal] && ![variant_isset server] && ![variant_isset zero]} {
if {${os.platform} eq "darwin" && ${os.major} < 16} {
default_variants-append +zero
} else {
default_variants-append +server
}
}
2022-03-27 12:00:23 +05:30
build.type gnu
build.target images
use_parallel_build no
2022-05-15 15:34:31 +05:30
set jdkn jdk-${version}.jdk
2022-04-24 15:46:11 +05:30
set bundle_dir build/openjdk13/images/jdk-bundle/${jdkn}/Contents
2022-03-27 12:00:23 +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:17:37 +02:00
If you want to make ${name} the default JDK, add this to shell profile:
2022-03-27 12:00:23 +05:30
export JAVA_HOME=${pathb}/Contents/Home
"
2022-08-24 13:26:12 +02:00
livecheck.type regex
livecheck.url https://github.com/openjdk/jdk13u/tags
livecheck.regex jdk-(13\.\[0-9\.\]+)-ga