# -*- 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.nl:nils @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}u432 set build 06 revision 0 description Eclipse Temurin, based on OpenJDK ${feature} (Long Term Support) 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 5f8860f55c3cc25de4e5a348aa8c946c7d646255 \ sha256 e5cc78b704cf96f7a6c4ad677048f79331f38cd37fbef6c86dce75e1bfe28895 \ size 109538778 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:\]\]*)CommandLine()|\\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 "