Skip to content

Commit

Permalink
dev-java/oracle-jdk-bin: unbreak darwin, a -O snuck in on the xar com…
Browse files Browse the repository at this point in the history
…mand

Package-Manager: Portage-2.3.19, Repoman-2.3.6
  • Loading branch information
grobian committed Jan 25, 2018
1 parent a21e447 commit 944e059
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 8 additions & 2 deletions dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.162.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,14 @@ pkg_nofetch() {
src_unpack() {
if use x64-macos ; then
mkdir -p "${T}"/dmgmount || die
hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg -mountpoint "${T}"/dmgmount || die
xar -Oxf "${T}"/dmgmount/JDK\ $(get_version_component_range 2)\ Update\ ${update}.pkg jdk${PV//.}.pkg/Payload | zcat | cpio -idv || die
hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
-mountpoint "${T}"/dmgmount || die
local jdkgen=$(get_version_component_range 2)
local uver=$(get_version_component_range 4)
( cd "${T}" &&
xar -xf "${T}/dmgmount/JDK ${jdkgen} Update ${uver}.pkg" \
jdk${PV//.}.pkg/Payload ) || die
zcat "${T}"/jdk${PV//.}.pkg/Payload | cpio -idv || die
hdiutil detach "${T}"/dmgmount || die
mv Contents/Home "${S}" || die
fi
Expand Down
7 changes: 5 additions & 2 deletions dev-java/oracle-jdk-bin/oracle-jdk-bin-9.0.4.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6
Expand Down Expand Up @@ -92,7 +92,10 @@ src_unpack() {
S="${WORKDIR}/Contents/Home"
mkdir -p "${T}"/dmgmount || die
hdiutil attach "${DISTDIR}/${A}" -mountpoint "${T}"/dmgmount || die
xar -Oxf "${T}"/dmgmount/JDK\ ${PV}.pkg jdk${PV//.}.pkg/Payload | zcat | cpio -idv || die
( cd "${T}" &&
xar -xf "${T}/dmgmount/JDK ${PV}.pkg" \
jdk${PV//.}.pkg/Payload ) || die
zcat "${T}"/jdk${PV//.}.pkg/Payload | cpio -idv || die
hdiutil detach "${T}"/dmgmount || die
else
S="${WORKDIR}/jdk-${PV}"
Expand Down

0 comments on commit 944e059

Please sign in to comment.