2022-03-27 12:00:23 +05:30
|
|
|
# -*- 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-bootstrap
|
|
|
|
|
# use format based on macports:
|
|
|
|
|
# https://guide.macports.org/chunked/reference.portgroup.html#reference.portgroup.java
|
2023-05-05 22:20:56 +05:30
|
|
|
version 8
|
|
|
|
|
revision 0
|
2022-03-27 12:00:23 +05:30
|
|
|
categories java devel
|
2023-08-09 09:25:13 +10:00
|
|
|
# TODO: specify which darwin versions the binary actually works on
|
|
|
|
|
platforms {darwin any}
|
2024-01-15 22:39:32 +11:00
|
|
|
supported_archs arm64 x86_64
|
2022-03-27 12:00:23 +05:30
|
|
|
license Restrictive/Distributable
|
2025-01-29 09:37:34 +01:00
|
|
|
maintainers nomaintainer
|
2022-03-27 12:00:23 +05:30
|
|
|
description Java 8 Boot JDK
|
|
|
|
|
long_description Java 8 Boot JDK to bootstrap Openjdk8 port
|
2023-05-05 22:20:56 +05:30
|
|
|
homepage https://openjdk.org/
|
2022-03-27 12:00:23 +05:30
|
|
|
|
2023-05-05 22:20:56 +05:30
|
|
|
if {${configure.build_arch} eq "x86_64"} {
|
|
|
|
|
set ver 1.8.0_201
|
|
|
|
|
master_sites ${homepage}webapps/download/${distfiles}?BundleId=236866_42970487e3af4f5aa5bca3f542482c60&dummy=
|
|
|
|
|
distfiles AutoDL
|
|
|
|
|
|
|
|
|
|
checksums rmd160 b237dd06774127454df314a28fa6b297b50a0dbf \
|
|
|
|
|
sha256 5b52df4b3efd51480c40ad5abfa18a075365afbb2040bbc5e9f2db568435a6e2 \
|
|
|
|
|
size 257863467
|
2022-03-27 12:00:23 +05:30
|
|
|
|
2023-05-05 22:20:56 +05:30
|
|
|
depends_extract port:xar
|
2022-03-27 12:00:23 +05:30
|
|
|
|
2023-05-05 22:20:56 +05:30
|
|
|
extract {
|
|
|
|
|
system -W ${workpath} "mkdir -p ${worksrcpath}/packages"
|
|
|
|
|
file copy ${distpath}/${distfiles} ${worksrcpath}/packages
|
|
|
|
|
system -W ${workpath} "mkdir -p ${worksrcpath}/dmg"
|
|
|
|
|
system -W ${workpath} "mkdir -p ${worksrcpath}/pkg"
|
|
|
|
|
system -W ${workpath} "mkdir -p ${worksrcpath}/files"
|
|
|
|
|
system -W ${worksrcpath}/packages "hdiutil attach ${worksrcpath}/packages/${distfiles} -mountroot ${worksrcpath}/dmg"
|
|
|
|
|
system -W ${worksrcpath}/dmg "cp ${worksrcpath}/dmg/*/*.pkg ${worksrcpath}/pkg"
|
|
|
|
|
system -W ${worksrcpath}/dmg "hdiutil detach ${worksrcpath}/dmg/*"
|
|
|
|
|
system -W ${worksrcpath}/pkg "mv ${worksrcpath}/pkg/*.pkg ${worksrcpath}/pkg/jdk${ver}.pkg"
|
|
|
|
|
system -W ${worksrcpath}/pkg "${prefix}/bin/xar -xf ${worksrcpath}/pkg/jdk${ver}.pkg -C ${worksrcpath}/files"
|
|
|
|
|
system -W ${worksrcpath} "cpio -i < ${worksrcpath}/files/jdk180201.pkg/Payload"
|
|
|
|
|
}
|
|
|
|
|
worksrcdir jdk${ver}
|
|
|
|
|
} elseif {${configure.build_arch} eq "arm64"} {
|
|
|
|
|
set ver 8.54.0.21
|
2024-01-16 01:44:11 +11:00
|
|
|
set openjdk_ver 8.0.292
|
2023-05-05 22:20:56 +05:30
|
|
|
master_sites https://cdn.azul.com/zulu/bin/
|
|
|
|
|
distname zulu${ver}-ca-jdk${openjdk_ver}-macosx_aarch64
|
|
|
|
|
checksums rmd160 cafab852e7263d3b1077b7b37f8d9019f4d3797a \
|
|
|
|
|
sha256 2cf0af3118dd4b6244724308b190587804a76ad7919b6da5c377392a1d4f8817 \
|
|
|
|
|
size 105926746
|
|
|
|
|
|
|
|
|
|
configure.cxx_stdlib libstdc++
|
|
|
|
|
|
|
|
|
|
worksrcdir ${distname}/zulu-8.jdk
|
2023-08-09 09:25:13 +10:00
|
|
|
} else {
|
|
|
|
|
master_sites
|
|
|
|
|
distfiles
|
2022-03-27 12:00:23 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
use_configure no
|
|
|
|
|
|
|
|
|
|
build {}
|
|
|
|
|
|
2023-05-05 22:20:56 +05:30
|
|
|
if {${configure.build_arch} eq "x86_64"} {
|
|
|
|
|
pre-destroot {
|
2023-08-09 09:25:13 +10:00
|
|
|
# MacPorts report `Contents/Home/jre/lib/libdeploy.dylib` as broken file during `port rev-upgrade`
|
2023-05-05 22:20:56 +05:30
|
|
|
# see https://trac.macports.org/ticket/65049
|
|
|
|
|
delete ${worksrcpath}/Contents/Home/jre/lib/libdeploy.dylib
|
|
|
|
|
}
|
2022-05-06 14:18:11 +05:30
|
|
|
}
|
|
|
|
|
|
2022-03-27 12:00:23 +05:30
|
|
|
set path /Library/Java/JavaVirtualMachines/${name}
|
|
|
|
|
destroot {
|
|
|
|
|
xinstall -m 755 -d ${destroot}${path}
|
|
|
|
|
copy ${worksrcpath}/Contents ${destroot}${path}
|
|
|
|
|
}
|
|
|
|
|
destroot.violate_mtree yes
|