Skip to content

Commit

Permalink
java-vm-2.eclass: Drop support for EAPI <5
Browse files Browse the repository at this point in the history
  • Loading branch information
chewi committed Jun 29, 2016
1 parent 533bd6d commit c7e51c7
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions eclass/java-vm-2.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
# This eclass provides functionality which assists with installing
# virtual machines, and ensures that they are recognized by java-config.

inherit eutils fdo-mime multilib pax-utils prefix
case ${EAPI:-0} in
5|6) ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac

inherit fdo-mime multilib pax-utils prefix

EXPORT_FUNCTIONS pkg_setup pkg_postinst pkg_prerm pkg_postrm

RDEPEND="
>=dev-java/java-config-2.2.0-r3
>=app-eselect/eselect-java-0.2.0"
DEPEND="${RDEPEND}"
has "${EAPI}" 0 1 && DEPEND="${DEPEND} >=sys-apps/portage-2.1"

export WANT_JAVA_CONFIG=2

Expand Down Expand Up @@ -70,7 +74,6 @@ java-vm-2_pkg_setup() {
# invalid. Also update mime database.

java-vm-2_pkg_postinst() {
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=${ROOT}
# Note that we cannot rely on java-config here, as it will silently recognize
# e.g. icedtea6-bin as valid system VM if icedtea6 is set but invalid (e.g. due
# to the migration to icedtea-6)
Expand All @@ -95,7 +98,6 @@ java-vm-2_pkg_postinst() {
# Warn user if removing system-vm.

java-vm-2_pkg_prerm() {
# Although REPLACED_BY_VERSION is EAPI=4, we shouldn't need to check EAPI for this use case
if [[ "$(GENTOO_VM="" java-config -f 2>/dev/null)" == "${VMHANDLE}" && -z "${REPLACED_BY_VERSION}" ]]; then
ewarn "It appears you are removing your system-vm!"
ewarn "Please run java-config -L to list available VMs,"
Expand Down Expand Up @@ -149,11 +151,6 @@ get_system_arch() {
set_java_env() {
debug-print-function ${FUNCNAME} $*

if has ${EAPI:-0} 0 1 2 && ! use prefix ; then
ED="${D}"
EPREFIX=""
fi

local platform="$(get_system_arch)"
local env_file="${ED}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
local old_env_file="${ED}/etc/env.d/java/20${P}"
Expand Down Expand Up @@ -255,11 +252,6 @@ java-vm_set-pax-markings() {
# @CODE

java-vm_revdep-mask() {
if has ${EAPI:-0} 0 1 2 && ! use prefix; then
ED="${D}"
EPREFIX=
fi

local VMROOT="${1-"${EPREFIX}"/opt/${P}}"

dodir /etc/revdep-rebuild/
Expand All @@ -281,8 +273,6 @@ java-vm_sandbox-predict() {
debug-print-function ${FUNCNAME} "$*"
[[ -z "${1}" ]] && die "${FUNCNAME} takes at least one argument"

has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"

local path path_arr=("$@")
# subshell this to prevent IFS bleeding out dependant on bash version.
# could use local, which *should* work, but that requires a lot of testing.
Expand Down

0 comments on commit c7e51c7

Please sign in to comment.