diff options
author | Fabian Groffen <grobian@gentoo.org> | 2021-03-13 12:03:01 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2021-03-13 12:03:10 +0100 |
commit | 5596794307a5fa540c27c967323497f6d47590c7 (patch) | |
tree | 2cd31424ee6ebd74b597343415366279913e374a /dev-java/openjdk-bin | |
parent | dev-vcs/hg-evolve: version bumps (diff) | |
download | gentoo-5596794307a5fa540c27c967323497f6d47590c7.tar.gz gentoo-5596794307a5fa540c27c967323497f6d47590c7.tar.bz2 gentoo-5596794307a5fa540c27c967323497f6d47590c7.zip |
dev-java/openjdk-bin: add support for x64-macos
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'dev-java/openjdk-bin')
-rw-r--r-- | dev-java/openjdk-bin/Manifest | 2 | ||||
-rw-r--r-- | dev-java/openjdk-bin/openjdk-bin-11.0.10_p9.ebuild | 77 | ||||
-rw-r--r-- | dev-java/openjdk-bin/openjdk-bin-8.282_p08.ebuild | 76 |
3 files changed, 97 insertions, 58 deletions
diff --git a/dev-java/openjdk-bin/Manifest b/dev-java/openjdk-bin/Manifest index d4839e93afe4..94d7de5e1029 100644 --- a/dev-java/openjdk-bin/Manifest +++ b/dev-java/openjdk-bin/Manifest @@ -6,6 +6,7 @@ DIST OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.10_9.tar.gz 176435718 BLAKE2B c99 DIST OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.9_11.tar.gz 177065013 BLAKE2B 04bb16a464a7984df770c52c5e2b8b1d9ec79142eb8a9c9a95a8ea02656b823a2505085e1521d94b9d994a1f5675fb524b917c9fdea46269e45a43d10c066947 SHA512 45619214cfc54be5b68e1ac8112a239a156be5a126631b2ff994a3b70e2e0aa899e5f9a4d31381eba2eb743790e4bdc2014ac342419a004502ce40945b3f4890 DIST OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz 194069769 BLAKE2B b537bdf553b1da11c06ba8aed7f2baa498da384209b5c94b22995a6d05e1d83b4fee215c6c27e1975e6d2e04805916f85c8fa244f53a6f002d3eb42d56898b74 SHA512 993881259ba470030c589f272d239aa185b1b460c4d505a266cb99f7107de2aa646b3cb8bb8d38fa454d226228c6d3dd8245301c8535c7f6b3bec766cc555bf9 DIST OpenJDK11U-jdk_x64_linux_hotspot_11.0.9_11.tar.gz 193980586 BLAKE2B cc927d923ca29ca41ea9cfc38bf07761904fb9f31fa59b5c882ec260d982a9af6c49034d80e6ed4d141c5ece1a1d297c3c153358ad940e61a4f667c53d6c040c SHA512 1ccaba9673a85287953a6ffbedf7caec4c2d64e0a121277bca6e40a6d47eaf414ed7470971f271e28309b97e95268348a7ad4fb2a03861eeb193d1f0536f2727 +DIST OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz 186160219 BLAKE2B 5a044db5ff02dadd8a1677254c8653e14f41e09e4180dc8726d35dd293193e8a332db54aede19d7a2c2bd3c3b3c799cb0faa315bfd9deda03c231fd01670ff61 SHA512 cd115893162a9db3e7e5763028a0040eb83773ae82cd056fdb9400ae3a2b720e7e1bee24a0251ea29eb01923400a1c459d3fbca08bf563d15f7434f5a4d6c69f DIST OpenJDK8U-jdk_aarch64_linux_hotspot_8u272b10.tar.gz 103598972 BLAKE2B 34ee2fc6a1cf23c9c04522a82f74ba60c53cc461e370c8aa88d6b62b4c4539e96d233a232f38390b9f0932768c5fb662a44e425d0f5bebbf982c657686b163d7 SHA512 5b44f094219daf383743d463c50917c2d60b289187e363748c3a4dc16471d84e4d28b6bc30879d137b79645f7ce977c755e8a5714bc272e012bce900f3db8ea4 DIST OpenJDK8U-jdk_aarch64_linux_hotspot_jdk8u282-b08.tar.gz 102312570 BLAKE2B b4280d8c1e2132956ec103899defb9000bfda303350b72c9797cc1634429cefe173b17617f687eadcb7c8259d7423cef8b68ce9c89e2b31340fa9e3c6e8ad265 SHA512 d2e6795daa7b413d7ee0fb217d3210b809ac87df11e2ecb3a9befaabc7cd501b67c5526b1498666476a3a7526648d85f43a28a170fa870b3e738daecbc8c41a5 DIST OpenJDK8U-jdk_arm_linux_hotspot_8u272b10.tar.gz 99368824 BLAKE2B 970a0859a09002978b7603beb9cd94556fcdbb8923a88e48dca167e5ecc1495fddd00c786c7b9c0e608de48d485b2e8b4da7491d4e85e488fd1baf7ddc021951 SHA512 6974c06644aed4c7fb8f6004f4d8fd7790252e148ecfb3e1d29a7251429e413e8adbd910231b3cd5b9dd195a570b3fbeb95e6ab09b3ae318f3f842eb7ac418c6 @@ -13,3 +14,4 @@ DIST OpenJDK8U-jdk_ppc64le_linux_hotspot_8u272b10.tar.gz 100818464 BLAKE2B b2666 DIST OpenJDK8U-jdk_ppc64le_linux_hotspot_8u282b08.tar.gz 100365310 BLAKE2B 0b7621ba2f5a68d936039d20228b8c7cdddfa528a2b0e5471952ab96ff4d91f30a5892f5deca9b1e1ef88ce334fee5720f0e06bfed67ad9cd170ee0cbb6e65a5 SHA512 36b5fb22c1859710f520255bb6a2c8d4e6b650f77ac2ce988cb9dca570622753c8eae9d27c2955af2f37e6379532babd942ff82863cd771d3f4e247b57a93f84 DIST OpenJDK8U-jdk_x64_linux_hotspot_8u272b10.tar.gz 103650413 BLAKE2B 6fd50cdefa5daf6d155000b653b695511953d486ba9f4bf7426caf8dc6d7b7d3cf46c4426982a400c19a6fe0f6eb557a232853c3e4211e1961e8aa890c1721cf SHA512 22a4b5c27d2fad79b7bf8a8ae896a9b30e3d303bb4ca30611dbbb1f5811f4524a98c44a68c4546906f566b7d672f6ab48d10cf270870c1b86e7a7688d249c555 DIST OpenJDK8U-jdk_x64_linux_hotspot_8u282b08.tar.gz 102873064 BLAKE2B 2331a8c4fd404ea6d44ae5e9f168e7955b96888ebceaa0d72cc1ae044972869bdede26e1d69b926fbac1ad54cdfa4080b2dffd41e6667717a34ceb5da96c8eb3 SHA512 c56b4106f6f21c116d5229973f562e93aec91ae815b9f61291ae052540cd6c473ce74da9f9404c4d9028b313a70beae6bf328d2cdcc5c8ec8ebaca8d0fd3e892 +DIST OpenJDK8U-jdk_x64_mac_hotspot_8u282b08.tar.gz 101808251 BLAKE2B 7abcbe6b0f061f9b5d4cd4709fa2d6a53184c41a313a5bf861ff0796b2673bb2a8c783e56769aab20954258c5e505c6a057b3838408cc948500ea9f3e723f646 SHA512 7fb53d3cc6994d87769c53c992ef7fc4adf2488b6a0c41e3c2004ce334a86da7e9fb4955b58c9e06566c5999f317579736ad0f346dd8dd56037d3ec0d5689812 diff --git a/dev-java/openjdk-bin/openjdk-bin-11.0.10_p9.ebuild b/dev-java/openjdk-bin/openjdk-bin-11.0.10_p9.ebuild index 4583d7823353..3eaf868c6d29 100644 --- a/dev-java/openjdk-bin/openjdk-bin-11.0.10_p9.ebuild +++ b/dev-java/openjdk-bin/openjdk-bin-11.0.10_p9.ebuild @@ -6,8 +6,13 @@ EAPI=6 inherit java-vm-2 toolchain-funcs abi_uri() { + local os=linux + case ${2} in + *-macos) os=mac ;; + *-solaris) os=solaris ;; + esac echo "${2-$1}? ( - https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jdk_${1}_linux_hotspot_${MY_PV//+/_}.tar.gz + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jdk_${1}_${os}_hotspot_${MY_PV//+/_}.tar.gz )" } @@ -19,29 +24,32 @@ SRC_URI=" $(abi_uri aarch64 arm64) $(abi_uri ppc64le ppc64) $(abi_uri x64 amd64) + $(abi_uri x64 x64-macos) " DESCRIPTION="Prebuilt Java JDK binaries provided by AdoptOpenJDK" HOMEPAGE="https://adoptopenjdk.net" LICENSE="GPL-2-with-classpath-exception" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x64-macos" IUSE="alsa cups +gentoo-vm headless-awt selinux source" RDEPEND=" - media-libs/fontconfig:1.0 - media-libs/freetype:2 >=sys-apps/baselayout-java-0.1.0-r1 - >=sys-libs/glibc-2.2.5:* - sys-libs/zlib - alsa? ( media-libs/alsa-lib ) - cups? ( net-print/cups ) - selinux? ( sec-policy/selinux-java ) - !headless-awt? ( - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXi - x11-libs/libXrender - x11-libs/libXtst + kernel_linux? ( + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >=sys-libs/glibc-2.2.5:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + cups? ( net-print/cups ) + selinux? ( sec-policy/selinux-java ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + ) )" RESTRICT="preserve-libs splitdebug" @@ -55,23 +63,36 @@ pkg_pretend() { fi } +src_unpack() { + default + if [[ ${A} == *_mac_* ]] ; then + mv -v "${S}/Contents/Home/"* "${S}" || die + rm -Rf "${S}/Contents" # drop macOS executable + fi +} + src_install() { local dest="/opt/${P}" local ddest="${ED%/}/${dest#/}" - # Not sure why they bundle this as it's commonly available and they - # only do so on x86_64. It's needed by libfontmanager.so. IcedTea - # also has an explicit dependency while Oracle seemingly dlopens it. - rm -vf lib/libfreetype.so || die - - # Oracle and IcedTea have libjsoundalsa.so depending on - # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird. - if ! use alsa ; then - rm -v lib/libjsound.* || die - fi - - if use headless-awt ; then - rm -v lib/lib*{[jx]awt,splashscreen}* || die + # on macOS if they would exist they would be called .dylib, but most + # importantly, there are no different providers, so everything + # that's shipped works. + if [[ ${A} != *_mac_* ]] ; then + # Not sure why they bundle this as it's commonly available and they + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea + # also has an explicit dependency while Oracle seemingly dlopens it. + rm -vf lib/libfreetype.so || die + + # Oracle and IcedTea have libjsoundalsa.so depending on + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird. + if ! use alsa ; then + rm -v lib/libjsound.* || die + fi + + if use headless-awt ; then + rm -v lib/lib*{[jx]awt,splashscreen}* || die + fi fi if ! use source ; then diff --git a/dev-java/openjdk-bin/openjdk-bin-8.282_p08.ebuild b/dev-java/openjdk-bin/openjdk-bin-8.282_p08.ebuild index 7bba13d4c195..861deb4537cb 100644 --- a/dev-java/openjdk-bin/openjdk-bin-8.282_p08.ebuild +++ b/dev-java/openjdk-bin/openjdk-bin-8.282_p08.ebuild @@ -6,8 +6,13 @@ EAPI=6 inherit eapi7-ver java-vm-2 abi_uri() { + local os=linux + case ${2} in + *-macos) os=mac ;; + *-solaris) os=solaris ;; + esac echo "${2-$1}? ( - https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk${MY_PV}/OpenJDK8U-jdk_${1}_linux_hotspot_${3-${MY_PV/-/}}.tar.gz + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk${MY_PV}/OpenJDK8U-jdk_${1}_${os}_hotspot_${3-${MY_PV/-/}}.tar.gz )" } @@ -24,29 +29,32 @@ SRC_URI=" $(abi_uri aarch64 arm64 jdk${MY_PV}) $(abi_uri ppc64le ppc64) $(abi_uri x64 amd64) + $(abi_uri x64 x64-macos) " LICENSE="GPL-2-with-classpath-exception" -KEYWORDS="~amd64 ~arm64 ~ppc64" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x64-macos" IUSE="alsa cups examples headless-awt selinux source" RDEPEND=" - media-libs/fontconfig:1.0 - media-libs/freetype:2 >=sys-apps/baselayout-java-0.1.0-r1 - >=sys-libs/glibc-2.2.5:* - sys-libs/zlib - alsa? ( media-libs/alsa-lib ) - arm? ( dev-libs/libffi-compat:6 ) - cups? ( net-print/cups ) - selinux? ( sec-policy/selinux-java ) - !headless-awt? ( - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXi - x11-libs/libXrender - x11-libs/libXtst + kernel_linux? ( + media-libs/fontconfig:1.0 + media-libs/freetype:2 + >=sys-libs/glibc-2.2.5:* + sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + arm? ( dev-libs/libffi-compat:6 ) + cups? ( net-print/cups ) + selinux? ( sec-policy/selinux-java ) + !headless-awt? ( + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXi + x11-libs/libXrender + x11-libs/libXtst + ) ) " @@ -60,6 +68,9 @@ src_unpack() { # 753575 if use arm; then mv -v "${S}"* "${S}" || die + elif [[ ${A} == *_mac_* ]] ; then + mv -v "${S}/Contents/Home/"* "${S}" || die + rm -Rf "${S}/Contents" # drop macOS executable fi } @@ -69,20 +80,25 @@ src_install() { rm ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README || die - # this does not exist on arm64 hence -f - rm -fv jre/lib/*/libfreetype.so* || die - - if ! use alsa ; then - rm -v jre/lib/*/libjsoundalsa.so* || die - fi - - if ! use examples ; then - rm -vr sample || die - fi - - if use headless-awt ; then - rm -fvr {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \ - {,jre/}bin/policytool bin/appletviewer || die + # on macOS if they would exist they would be called .dylib, but most + # importantly, there are no different providers, so everything + # that's shipped works. + if [[ ${A} != *_mac_* ]] ; then + # this does not exist on arm64 hence -f + rm -fv jre/lib/*/libfreetype.so* || die + + if ! use alsa ; then + rm -v jre/lib/*/libjsoundalsa.so* || die + fi + + if ! use examples ; then + rm -vr sample || die + fi + + if use headless-awt ; then + rm -fvr {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \ + {,jre/}bin/policytool bin/appletviewer || die + fi fi if ! use source ; then |