diff --git a/java/openjdk21-corretto/Portfile b/java/openjdk21-corretto/Portfile index 9e2e5f33cc370..4d3cdb9c6f6dc 100644 --- a/java/openjdk21-corretto/Portfile +++ b/java/openjdk21-corretto/Portfile @@ -2,13 +2,15 @@ PortSystem 1.0 -name openjdk21-corretto +set feature 21 +name openjdk${feature}-corretto categories java devel maintainers {breun.nl:nils @breun} openmaintainer -# See https://aws.amazon.com/corretto/faqs/#Using_Amazon_Corretto -# and https://trac.macports.org/wiki/PortfileRecipes#compare-osx-darwin-version -platforms {darwin any} {darwin >= 21} +# JVMMinimumSystemVersion in Contents/Info.plist is set to macOS 11.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 >= 20 } # This port uses prebuilt binaries; 'NoMirror' makes sure MacPorts doesn't mirror/distribute these third-party binaries license GPL-2 NoMirror @@ -19,10 +21,10 @@ universal_variant no supported_archs x86_64 arm64 # https://github.com/corretto/corretto-21/releases -version 21.0.4.7.1 +version ${feature}.0.4.7.1 revision 0 -description Amazon Corretto OpenJDK 21 (Long Term Support) +description Amazon Corretto OpenJDK ${feature} (Long Term Support) long_description No-cost, multiplatform, production-ready distribution of OpenJDK from Amazon. master_sites https://corretto.aws/downloads/resources/${version}/ @@ -39,13 +41,13 @@ if {${configure.build_arch} eq "x86_64"} { size 201257714 } -worksrcdir amazon-corretto-21.jdk +worksrcdir amazon-corretto-${feature}.jdk homepage https://aws.amazon.com/corretto/ livecheck.type regex -livecheck.url https://github.com/corretto/corretto-21/releases -livecheck.regex amazon-corretto-(21\.\[0-9\.\]+)-macosx-.*\.tar\.gz +livecheck.url https://github.com/corretto/corretto-${feature}/releases +livecheck.regex amazon-corretto-(${feature}\.\[0-9\.\]+)-macosx-.*\.tar\.gz use_configure no build {} @@ -79,7 +81,7 @@ test.args -version destroot.violate_mtree yes set jvms /Library/Java/JavaVirtualMachines -set jdk ${jvms}/jdk-21-amazon-corretto.jdk +set jdk ${jvms}/jdk-${feature}-amazon-corretto.jdk destroot { xinstall -m 755 -d ${destroot}${prefix}${jdk}