From a9c8334be20ea49ed7ac8dd7630aa3d12bd48285 Mon Sep 17 00:00:00 2001 From: Nils Breunese Date: Sun, 11 Nov 2018 23:43:59 +0100 Subject: [PATCH] openjdk8, openjdk11: Add new port for OpenJDK 8 and migrate OpenJDK 11 to AdoptOpenJDK --- java/openjdk10/Portfile | 74 --------------------------- java/openjdk8/Portfile | 111 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 74 deletions(-) delete mode 100644 java/openjdk10/Portfile create mode 100644 java/openjdk8/Portfile diff --git a/java/openjdk10/Portfile b/java/openjdk10/Portfile deleted file mode 100644 index c3a9068df029..000000000000 --- a/java/openjdk10/Portfile +++ /dev/null @@ -1,74 +0,0 @@ -# -*- 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 openjdk10 -version 10.0.2 -revision 2 -set openjdk_version 10 - -subport openjdk11 { - version 11.0.1 - set openjdk_version 11 -} - -categories java devel -maintainers {breun.nl:nils @breun} openmaintainer -platforms darwin -license GPL-2 -supported_archs x86_64 - -description Open Java Development Kit ${openjdk_version} - -long_description Production-ready, free and open-source build of the Java \ - Development Kit, an implementation of the Java Standard \ - Edition (SE) ${openjdk_version} Platform. OpenJDK is the official reference \ - implementation of Java SE. Included components are the \ - HotSpot virtual machine, the Java class library and the Java \ - compiler. - -homepage https://jdk.java.net/${openjdk_version}/ - -if {${subport} eq ${name}} { - # openjdk10 - master_sites https://download.java.net/java/GA/jdk${openjdk_version}/${version}/19aef61b38124481863b1413dce1855f/13/ - - checksums rmd160 d29498411adc487bf8191adbc4276c72602022cf \ - sha256 77ea7675ee29b85aa7df138014790f91047bfdafbc997cb41a1030a0417356d7 \ - size 200916897 -} else { - # openjdk11 - master_sites https://download.java.net/java/GA/jdk${openjdk_version}/13/GPL/ - - checksums rmd160 7429dfd885b42c731092b9fa40e51cd665289b14 \ - sha256 fa07eee08fa0f3de541ee1770de0cdca2ae3876f3bd78c329f27e85c287cd070 \ - size 182090011 -} - -distname openjdk-${version}_osx-x64_bin -worksrcdir jdk-${version}.jdk - -use_configure no - -build {} - -# macOS Java tools expect to find Java virtual machines under /Library/Java/JavaVirtualMachines, which is not under ${prefix}. -destroot.violate_mtree yes - -destroot { - set target ${destroot}/Library/Java/JavaVirtualMachines/openjdk${openjdk_version} - xinstall -m 755 -d ${target} - copy ${worksrcpath}/Contents ${target} -} - -if {${subport} eq ${name}} { - notes " - Warning: Support for OpenJDK 10.x has reached end of life and there will be no more updates. - Please consider upgrading to a supported OpenJDK version. - " -} - -livecheck.type regex -livecheck.url ${homepage} -livecheck.regex "version (\\d+(?:\\.\\d+)*(?:-\\d+)?)" -livecheck.version ${version} diff --git a/java/openjdk8/Portfile b/java/openjdk8/Portfile new file mode 100644 index 000000000000..3e32132bbd65 --- /dev/null +++ b/java/openjdk8/Portfile @@ -0,0 +1,111 @@ +# -*- 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 +version 8u192 +revision 0 + +set build 12 +set major 8 + +subport openjdk10 { + version 10.0.2 + revision 2 + + set build 13 + set major 10 +} + +subport openjdk11 { + version 11.0.1 + revision 3 + + set build 13 + set major 11 +} + +categories java devel +maintainers {breun.nl:nils @breun} openmaintainer +platforms darwin +license GPL-2 +supported_archs x86_64 + +description Open Java Development Kit ${major} + +long_description AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully \ + open-source set of build scripts and infratructure. + +homepage https://adoptopenjdk.net/ + +if {${subport} eq ${name}} { + # openjdk8 (AdoptOpenJDK) + master_sites https://github.com/AdoptOpenJDK/openjdk${major}-binaries/releases/download/jdk${version}-b${build}/ + + checksums rmd160 625de009ff2a8a31d72774a863ae6dc6a17fbc96 \ + sha256 cde59e884c473c3be52400bfad14b3ea1d8c42c994649f064ef335a727a36594 \ + size 75821422 + + distname OpenJDK${major}U-jdk_x64_mac_hotspot_${version}b${build} + worksrcdir jdk${version}-b${build} + + configure.cxx_stdlib libstdc++ +} elseif {${subport} eq "openjdk10"} { + # openjdk10 (Oracle) + master_sites https://download.java.net/java/GA/jdk${major}/${version}/19aef61b38124481863b1413dce1855f/${build}/ + + checksums rmd160 d29498411adc487bf8191adbc4276c72602022cf \ + sha256 77ea7675ee29b85aa7df138014790f91047bfdafbc997cb41a1030a0417356d7 \ + size 200916897 + + distname openjdk-${version}_osx-x64_bin + worksrcdir jdk-${version}.jdk + + long_description Production-ready, free and open-source build of the Java \ + Development Kit, an implementation of the Java Standard \ + Edition (SE) ${major} Platform. OpenJDK is the official reference \ + implementation of Java SE. Included components are the \ + HotSpot virtual machine, the Java class library and the Java \ + compiler. + + homepage https://jdk.java.net/${major}/ +} else { + # openjdk11 (AdoptOpenJDK) + master_sites https://github.com/AdoptOpenJDK/openjdk${major}-binaries/releases/download/jdk-${version}%2B${build}/ + + checksums rmd160 e579e79d76ba1692a1ac5ea59ea0ffa9a3a1daa3 \ + sha256 e219e7e2d586ed09ae65f4ec390fca5d5f0c37a61b47677648610194daf1aaa7 \ + size 189911499 + + distname OpenJDK${major}U-jdk_x64_mac_hotspot_${version}_${build} + worksrcdir jdk-${version}+${build} +} + +use_configure no + +build {} + +# macOS Java tools expect to find Java virtual machines under /Library/Java/JavaVirtualMachines, which is not under ${prefix}. +destroot.violate_mtree yes + +set target /Library/Java/JavaVirtualMachines/openjdk${major} +set destroot_target ${destroot}${target} + +destroot { + xinstall -m 755 -d ${destroot_target} + copy ${worksrcpath}/Contents ${destroot_target} +} + +notes " +If you have more than one JDK installed you can make JDK ${major} the default +by adding the following line to your Bash shell profile (~/.bash_profile): + + export JAVA_HOME=${target}/Contents/Home +" + +if {${subport} eq "openjdk10"} { + notes-append " + Warning: Support for OpenJDK ${major} has reached end of life and there will be no more updates. + Please consider migrating to a supported OpenJDK version. + " +}