Files

83 lines
2.8 KiB
Tcl

# -*- 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
set feature 8
name openjdk${feature}-temurin
categories java devel
maintainers {breun @breun} openmaintainer
# JVMMinimumSystemVersion in Contents/Info.plist is set to macOS 10.6.0:
# /usr/libexec/PlistBuddy -c "Print :JavaVM:JVMMinimumSystemVersion" Contents/Info.plist
# Mapping to Darwin version: https://trac.macports.org/wiki/PortfileRecipes#compare-osx-darwin-version
platforms {darwin any >= 10 }
# This port uses prebuilt binaries; 'NoMirror' makes sure MacPorts doesn't mirror/distribute these third-party binaries
license GPL-2 NoMirror
# This port uses prebuilt binaries for a particular architecture; they are not universal binaries
universal_variant no
# https://adoptium.net/temurin/releases/
supported_archs x86_64
version ${feature}u482
set build 08
revision 0
description Eclipse Temurin, based on OpenJDK ${feature} (Long Term Support until at least November 2026)
long_description Eclipse Temurin provides secure, TCK-tested and compliant, production-ready Java runtimes.
master_sites https://github.com/adoptium/temurin${feature}-binaries/releases/download/jdk${version}-b${build}/
distname OpenJDK${feature}U-jdk_x64_mac_hotspot_${version}b${build}
worksrcdir jdk${version}-b${build}
checksums rmd160 d413a1ae191956e2c4effb76a9afa8e1059af25b \
sha256 b57e16395bc5171ddcdce25631ed1402cc2c8efe945e3edf7ddba4e21bea5c53 \
size 108011923
homepage https://adoptium.net
livecheck.type regex
livecheck.url https://github.com/adoptium/temurin${feature}-binaries
livecheck.regex jdk(${feature}u\[0-9\]+)-b
use_configure no
build {}
variant Applets \
description { Advertise the JVM capability "Applets".} {}
variant WebStart \
description { Advertise the JVM capability "WebStart".} {}
patch {
foreach var { Applets WebStart } {
if {[variant_isset ${var}]} {
reinplace -E "s|^(\[\[:space:\]\]*<string>)CommandLine(</string>)|\\1${var}\\2\\\n\\1CommandLine\\2|" ${worksrcpath}/Contents/Info.plist
}
}
}
test.run yes
test.cmd Contents/Home/bin/java
test.target
test.args -version
# macOS Java tools expect to find Java virtual machines under /Library/Java/JavaVirtualMachines, which is not under ${prefix}.
destroot.violate_mtree yes
set target /Library/Java/JavaVirtualMachines/${name}
set destroot_target ${destroot}${target}
destroot {
xinstall -m 755 -d ${destroot_target}
copy ${worksrcpath}/Contents ${destroot_target}
}
notes "
If you have more than one JDK installed you can make ${name} the default\
by adding the following line to your shell profile:
export JAVA_HOME=${target}/Contents/Home
"