mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
89 lines
3.0 KiB
Tcl
89 lines
3.0 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 25
|
|
name openjdk${feature}-temurin
|
|
categories java devel
|
|
maintainers {breun @breun} openmaintainer
|
|
|
|
# JVMMinimumSystemVersion in Contents/Info.plist is set to macOS 11 for x86_64:
|
|
# /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 }
|
|
|
|
license GPL-2+
|
|
# This port uses prebuilt binaries for a particular architecture
|
|
# They are not universal binaries
|
|
universal_variant no
|
|
|
|
# https://adoptium.net/temurin/releases/?version=25&os=mac
|
|
supported_archs x86_64 arm64
|
|
|
|
version ${feature}.0.3
|
|
set build 9
|
|
revision 0
|
|
|
|
# End of availability: https://adoptium.net/support
|
|
description Eclipse Temurin, based on OpenJDK ${feature} (Long Term Support until at least September 2031)
|
|
long_description {*}${description} \
|
|
\n\nOpenJDK ${feature} (Java Development Kit) distribution from Adoptium.
|
|
|
|
master_sites https://github.com/adoptium/temurin${feature}-binaries/releases/download/jdk-${version}%2B${build}/
|
|
|
|
if {${configure.build_arch} eq "x86_64"} {
|
|
set arch_classifier x64
|
|
checksums rmd160 fa2d496babb96dea3e152a0a93214f6881e7d114 \
|
|
sha256 4c539a18b4d656960ff6766727e9ca546fc17f7a29714dba9e7b47bdcb37c447 \
|
|
size 120533867
|
|
} elseif {${configure.build_arch} eq "arm64"} {
|
|
set arch_classifier aarch64
|
|
checksums rmd160 1ebb3ee20f09b6ac49d3db141e2a4baf1b778fa8 \
|
|
sha256 7baab4d69a15554e119b86ff78d40e3fdc28819b5b322955c913cebfe3f6a37c \
|
|
size 136601548
|
|
} else {
|
|
set arch_classifier unsupported_arch
|
|
}
|
|
|
|
distname OpenJDK${feature}U-jdk_${arch_classifier}_mac_hotspot_${version}_${build}
|
|
|
|
worksrcdir jdk-${version}+${build}
|
|
|
|
homepage https://adoptium.net
|
|
|
|
livecheck.type regex
|
|
livecheck.url https://github.com/adoptium/temurin${feature}-binaries
|
|
livecheck.regex jdk-(${feature}\[\.0-9\]+)\+
|
|
|
|
use_configure no
|
|
build {}
|
|
|
|
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 jvms /Library/Java/JavaVirtualMachines
|
|
set jdk ${jvms}/jdk-${feature}-eclipse-temurin.jdk
|
|
|
|
destroot {
|
|
xinstall -m 755 -d ${destroot}${prefix}${jdk}
|
|
copy ${worksrcpath}/Contents ${destroot}${prefix}${jdk}
|
|
|
|
# macOS Java tools expect to find Java virtual machines under
|
|
# /Library/Java/JavaVirtualMachines, so let's create a symlink there
|
|
xinstall -m 755 -d ${destroot}${jvms}
|
|
ln -s ${prefix}${jdk} ${destroot}${jdk}
|
|
}
|
|
|
|
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=${jdk}/Contents/Home
|
|
"
|