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 26
|
|
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&arch=any&mode=filter
|
|
supported_archs x86_64 arm64
|
|
|
|
version ${feature}.0.1
|
|
set build 8
|
|
revision 0
|
|
|
|
# End of availability: https://adoptium.net/support
|
|
description Eclipse Temurin, based on OpenJDK ${feature} (Short Term Support until September 2026)
|
|
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 92024d22085efc4e68697a4e96650be3c5fafb3e \
|
|
sha256 032df492c8749864ee8b135e3d0ea5a17ef5c847309d5fdf8f1dd55e246b8319 \
|
|
size 123110704
|
|
} elseif {${configure.build_arch} eq "arm64"} {
|
|
set arch_classifier aarch64
|
|
checksums rmd160 f7d4c8c8282edf0408d118903bc1f5d0ac7e8130 \
|
|
sha256 10c436258e24693ce8baf13dbffce98b77275797455e8b72510967547f13234a \
|
|
size 139583524
|
|
} 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
|
|
"
|