# -*- 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 name openjdk8-temurin categories java devel maintainers {breun.nl:nils @breun} openmaintainer # See https://adoptium.net/supported_platforms.html platforms {darwin any} {darwin >= 16} # 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 8u412 set build 08 revision 0 description Eclipse Temurin, based on OpenJDK 8 long_description Eclipse Temurin provides secure, TCK-tested and compliant, production-ready Java runtimes. master_sites https://github.com/adoptium/temurin8-binaries/releases/download/jdk${version}-b${build}/ distname OpenJDK8U-jdk_x64_mac_hotspot_${version}b${build} worksrcdir jdk${version}-b${build} checksums rmd160 321d80d13a7c3f871846aa17864b5b372c8ab814 \ sha256 fd62491f7634c1cbed7557d6b21db7ef4818fbc0e63e678110d9d92cbea4ad8c \ size 109506799 homepage https://adoptium.net livecheck.type regex livecheck.url https://github.com/adoptium/temurin8-binaries/releases livecheck.regex OpenJDK8U-jdk_x64_mac_hotspot_(8u\[0-9\]+)b\[0-9\]+\.tar\.gz 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 "