|
| 1 | +# -*- 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 |
| 2 | + |
| 3 | +PortSystem 1.0 |
| 4 | + |
| 5 | +set feature 26 |
| 6 | +name openjdk${feature}-temurin |
| 7 | +categories java devel |
| 8 | +maintainers {breun @breun} openmaintainer |
| 9 | + |
| 10 | +# JVMMinimumSystemVersion in Contents/Info.plist is set to macOS 11 for x86_64: |
| 11 | +# /usr/libexec/PlistBuddy -c "Print :JavaVM:JVMMinimumSystemVersion" Contents/Info.plist |
| 12 | +# Mapping to Darwin version: https://trac.macports.org/wiki/PortfileRecipes#compare-osx-darwin-version |
| 13 | +platforms { darwin any >= 20 } |
| 14 | + |
| 15 | +license GPL-2+ |
| 16 | +# This port uses prebuilt binaries for a particular architecture |
| 17 | +# They are not universal binaries |
| 18 | +universal_variant no |
| 19 | + |
| 20 | +# https://adoptium.net/temurin/releases/?version=25&os=mac&arch=any&mode=filter |
| 21 | +supported_archs x86_64 arm64 |
| 22 | + |
| 23 | +version ${feature} |
| 24 | +set build 35 |
| 25 | +revision 0 |
| 26 | + |
| 27 | +# End of availability: https://adoptium.net/support |
| 28 | +description Eclipse Temurin, based on OpenJDK ${feature} (Short Term Support until September 2026) |
| 29 | +long_description {*}${description} \ |
| 30 | + \n\nOpenJDK ${feature} (Java Development Kit) distribution from Adoptium. |
| 31 | + |
| 32 | +master_sites https://github.com/adoptium/temurin${feature}-binaries/releases/download/jdk-${version}%2B${build}/ |
| 33 | + |
| 34 | +if {${configure.build_arch} eq "x86_64"} { |
| 35 | + set arch_classifier x64 |
| 36 | + checksums rmd160 3e591d8dc1fd3fef94d04b94095ef2090b1302b9 \ |
| 37 | + sha256 a5cabec41a19e83e33fde381a978f93bc7f5bd5accadf5b7c34770f08f4b5504 \ |
| 38 | + size 123145359 |
| 39 | +} elseif {${configure.build_arch} eq "arm64"} { |
| 40 | + set arch_classifier aarch64 |
| 41 | + checksums rmd160 2a33ae1c488d8f60ddca1632734d21bd61a93ad4 \ |
| 42 | + sha256 596ba026474808b75e934aa8c32cf9b340fafc455d06f366ede4f2932f206eb1 \ |
| 43 | + size 139617548 |
| 44 | +} else { |
| 45 | + set arch_classifier unsupported_arch |
| 46 | +} |
| 47 | + |
| 48 | +distname OpenJDK${feature}U-jdk_${arch_classifier}_mac_hotspot_${version}_${build} |
| 49 | + |
| 50 | +worksrcdir jdk-${version}+${build} |
| 51 | + |
| 52 | +homepage https://adoptium.net |
| 53 | + |
| 54 | +livecheck.type regex |
| 55 | +livecheck.url https://github.com/adoptium/temurin${feature}-binaries |
| 56 | +livecheck.regex jdk-(${feature}\[\.0-9\]+)\+ |
| 57 | + |
| 58 | +use_configure no |
| 59 | +build {} |
| 60 | + |
| 61 | +test.run yes |
| 62 | +test.cmd Contents/Home/bin/java |
| 63 | +test.target |
| 64 | +test.args -version |
| 65 | + |
| 66 | +# macOS Java tools expect to find Java virtual machines under |
| 67 | +# /Library/Java/JavaVirtualMachines, which is not under ${prefix}. |
| 68 | +destroot.violate_mtree yes |
| 69 | + |
| 70 | +set jvms /Library/Java/JavaVirtualMachines |
| 71 | +set jdk ${jvms}/jdk-${feature}-eclipse-temurin.jdk |
| 72 | + |
| 73 | +destroot { |
| 74 | + xinstall -m 755 -d ${destroot}${prefix}${jdk} |
| 75 | + copy ${worksrcpath}/Contents ${destroot}${prefix}${jdk} |
| 76 | + |
| 77 | + # macOS Java tools expect to find Java virtual machines under |
| 78 | + # /Library/Java/JavaVirtualMachines, so let's create a symlink there |
| 79 | + xinstall -m 755 -d ${destroot}${jvms} |
| 80 | + ln -s ${prefix}${jdk} ${destroot}${jdk} |
| 81 | +} |
| 82 | + |
| 83 | +notes " |
| 84 | +If you have more than one JDK installed you can make ${name} the default\ |
| 85 | +by adding the following line to your shell profile: |
| 86 | +
|
| 87 | + export JAVA_HOME=${jdk}/Contents/Home |
| 88 | +" |
0 commit comments