summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Wulf C. Krueger <philantrop@exherbo.org> 2016-07-31 13:01:46 +0200
committerAvatar Wulf C. Krueger <philantrop@exherbo.org> 2016-08-01 06:27:40 +0200
commit000fa93e31728e1842cf1315e904fff22816963e (patch)
tree6de0bd418ef6827577eb77d3304d3a92282d02a1
parent7afe63e304fc9dc84595db2d317fc3e2b8371702 (diff)
downloadjava-000fa93e31728e1842cf1315e904fff22816963e.tar.gz
java-000fa93e31728e1842cf1315e904fff22816963e.tar.xz
openjdk.exlib: Drop the bootstrap option, use auto-bootstrapping
Change-Id: I8d9a7e54fea9cea8a0663ba5c2d705e0b91eec83 Reviewed-on: https://galileo.mailstation.de/gerrit/6790 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Wulf C. Krueger <philantrop@exherbo.org>
-rw-r--r--exlibs/openjdk.exlib58
1 files changed, 29 insertions, 29 deletions
diff --git a/exlibs/openjdk.exlib b/exlibs/openjdk.exlib
index f271bac..e7ad643 100644
--- a/exlibs/openjdk.exlib
+++ b/exlibs/openjdk.exlib
@@ -15,7 +15,7 @@ SLOT=$(ever range 1-2)
JTREG_VER=4.1-b10
require java [ virtual_jdk_and_jre_deps=false ] java-jdk
-export_exlib_phases pkg_pretend src_unpack src_prepare src_configure src_compile src_test_expensive src_install
+export_exlib_phases pkg_setup src_unpack src_prepare src_configure src_compile src_test_expensive src_install
SUMMARY="OpenJDK $(ever range 2)"
HOMEPAGE="http://openjdk.java.net"
@@ -54,24 +54,20 @@ fi
if ever at_least 1.9.0 ; then
DOWNLOADS+="
- bootstrap? (
- platform:amd64? (
- http://dev.exherbo.org/~philantrop/distfiles/openjdk8-bin-${BOOTSTRAP_VERSION}-amd64.tar.xz
- )
- platform:x86? (
- http://dev.exherbo.org/~philantrop/distfiles/openjdk8-bin-${BOOTSTRAP_VERSION}-x86.tar.xz
- )
+ platform:amd64? (
+ http://dev.exherbo.org/~philantrop/distfiles/openjdk8-bin-${BOOTSTRAP_VERSION}-amd64.tar.xz
+ )
+ platform:x86? (
+ http://dev.exherbo.org/~philantrop/distfiles/openjdk8-bin-${BOOTSTRAP_VERSION}-x86.tar.xz
)
"
else
DOWNLOADS+="
- bootstrap? (
- platform:amd64? (
- http://dev.exherbo.org/~philantrop/distfiles/icedtea7-bin-${BOOTSTRAP_VERSION}-amd64.tar.xz
- )
- platform:x86? (
- http://dev.exherbo.org/~philantrop/distfiles/icedtea7-bin-${BOOTSTRAP_VERSION}-x86.tar.xz
- )
+ platform:amd64? (
+ http://dev.exherbo.org/~philantrop/distfiles/icedtea7-bin-${BOOTSTRAP_VERSION}-amd64.tar.xz
+ )
+ platform:x86? (
+ http://dev.exherbo.org/~philantrop/distfiles/icedtea7-bin-${BOOTSTRAP_VERSION}-x86.tar.xz
)
"
fi
@@ -80,7 +76,6 @@ BUGS_TO="philantrop@exherbo.org"
LICENCES="GPL-2"
MYOPTIONS="
- bootstrap [[ description = [ Use a pre-compiled JDK to build ${PN} ] ]]
doc
examples
( platform: amd64 x86 )
@@ -96,7 +91,6 @@ DEPENDENCIES="
x11-proto/renderproto
x11-proto/xcb-proto
x11-proto/xextproto
- !bootstrap? ( dev-lang/${PN}:${SLOT} )
build+run:
app-misc/ca-certificates
media-libs/freetype:2
@@ -121,15 +115,21 @@ else
WORK=${WORKBASE}/${BRANCH}-${BRANCH/9/-9}+${JDK_BUILD}
fi
-openjdk_pkg_pretend() {
- if ! ever at_least 1.9.0 && ! option bootstrap && ! has_version dev-lang/icedtea7 && ! has_version dev-lang/${PN} ; then
- ewarn "You need ${PN} or dev-lang/icedtea7 to compile ${PN} from source."
- ewarn "Try installing ${PN}[bootstrap]"
- die "Could not find ${PN} to bootstrap with"
- elif ever at_least 1.9.0 && ! option bootstrap && ! has_version virtual/jdk:1.8 && ! has_version dev-lang/${PN}; then
- ewarn "You need ${PN} or virtual/jdk:1.8 to compile ${PN} from source."
- ewarn "Try installing ${PN}[bootstrap]"
- die "Could not find ${PN} to bootstrap with"
+openjdk_pkg_setup() {
+ if ! ever at_least 1.9.0 ; then
+ if ! has_version dev-lang/icedtea7 && ! has_version dev-lang/icedtea8 && ! has_version dev-lang/${PN} ; then
+ MUST_BOOTSTRAP=1
+ einfo "Auto-bootstrapping ${PN}"
+ else
+ unset MUST_BOOTSTRAP
+ fi
+ elif ever at_least 1.9.0 ; then
+ if ! has_version virtual/jdk:1.8 && ! has_version dev-lang/${PN} ; then
+ MUST_BOOTSTRAP=1
+ einfo "Auto-bootstrapping ${PN}"
+ else
+ unset MUST_BOOTSTRAP
+ fi
fi
}
@@ -150,13 +150,13 @@ openjdk_src_unpack() {
edo mv jtreg "${WORK}"/
fi
- if option platform:amd64 && option bootstrap ; then
+ if option platform:amd64 && [[ -n ${MUST_BOOTSTRAP} ]] ; then
if ever at_least 1.9.0 ; then
unpack openjdk8-bin-${BOOTSTRAP_VERSION}-amd64.tar.xz
else
unpack icedtea7-bin-${BOOTSTRAP_VERSION}-amd64.tar.xz
fi
- elif option platform:x86 && option bootstrap ; then
+ elif option platform:x86 && [[ -n ${MUST_BOOTSTRAP} ]] ; then
if ever at_least 1.9.0 ; then
unpack openjdk8-bin-${BOOTSTRAP_VERSION}-x86.tar.xz
else
@@ -223,7 +223,7 @@ openjdk_src_configure() {
myconf+=( --with-cups=/usr/$(exhost --target) )
fi
- if option bootstrap ; then
+ if [[ -n ${MUST_BOOTSTRAP} ]] ; then
if ever at_least 1.9.0 ; then
myconf+=( --with-boot-jdk=${WORKBASE}/openjdk8 )
else