Index: java-ant-2.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v retrieving revision 1.24 diff -u -B -r1.24 java-ant-2.eclass --- java-ant-2.eclass 18 Dec 2007 00:23:06 -0000 1.24 +++ java-ant-2.eclass 30 Dec 2007 11:16:14 -0000 @@ -30,16 +30,6 @@ #WANT_ANT_TASKS # ----------------------------------------------------------------------------- -# @variable-preinherit WANT_SPLIT_ANT -# @variable-default "" -# -# If set, ant-core dependency specifies version with startup script that -# honours ANT_TASKS variable, i.e. >=1.7.0. Using WANT_ANT_TASKS implies -# split-ant already, so you need this only if you manually depend on some -# external package providing ant tasks and want to use it via ANT_TASKS. -[[ -n "${WANT_ANT_TASKS}" ]] && WANT_SPLIT_ANT="true" - -# ----------------------------------------------------------------------------- # @variable-preinherit JAVA_ANT_DISABLE_ANT_CORE_DEP # @variable-default unset for java-pkg-2, true for java-pkg-opt-2 # @@ -48,13 +38,9 @@ # construct ant-speficic DEPEND JAVA_ANT_E_DEPEND="" -# add ant-core into DEPEND, unless disabled; respect WANT_SPLIT_ANT +# add ant-core into DEPEND, unless disabled if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then - if [[ -n "${WANT_SPLIT_ANT}" ]]; then JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} >=dev-java/ant-core-1.7.0" - else - JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} dev-java/ant-core" - fi fi # add ant tasks specified in WANT_ANT_TASKS to DEPEND Index: java-utils-2.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v retrieving revision 1.100 diff -u -B -r1.100 java-utils-2.eclass --- java-utils-2.eclass 28 Nov 2007 02:03:48 -0000 1.100 +++ java-utils-2.eclass 30 Dec 2007 11:16:14 -0000 @@ -1724,41 +1724,6 @@ } # ------------------------------------------------------------------------------ -# @internal-function java-pkg_ant-tasks-from-deps -# -# Function to determine ANT_TASKS from DEPEND variable for backwards -# compatibility with ebuilds that don't set ANT_TASKS before calling eant() or -# WANT_ANT_TASKS before inheriting java-pkg-2. If the DEPEND string contains -# "dev-java/ant" or "dev-java/ant-tasks", then it returns "all", otherwise -# "none". It's not smart enough to cope with USE flag depends but that shouldn't -# be a problem, the worst it can do is activace all tasks when not needed. -# Note that this is called only with JAVA_PKG_STRICT=1, to find ebuilds with -# insufficient dependencies, otherwise all available tasks are used for -# backwards compatilbility. -# -# @return "all" or "none" -# ------------------------------------------------------------------------------ -java-pkg_ant-tasks-from-deps() { - local found_ant found_ant_tasks - - for dep in ${DEPEND} - do - local ant="$(awk '/(dev-java\/ant)/ { if (match($1, "(dev-java/ant)((-[0-9])+|$)", m)) print m[1] }' <<< ${dep})" - [[ "${ant}" == "dev-java/ant" ]] && found_ant=true - [[ "${dep}" == *"ant-tasks"* ]] && found_ant_tasks=true - done - - if [[ -n "${found_ant}" || -n "${found_ant_tasks}" ]]; then - java-pkg_announce-qa-violation --nodie "The ebuild DEPENDS on deprecated ant or ant-tasks" - echo "all" - else - # ebuild doesn't set ANT_TASKS and doesn't depend on ant-tasks or ant - # so we deactivate all tasks that may be installed - echo "none" - fi -} - -# ------------------------------------------------------------------------------ # @internal-function java-pkg_ant-tasks-depend # # Translates the WANT_ANT_TASKS variable into valid dependencies. @@ -1913,36 +1878,26 @@ fi done - # we use this in src_* so we run ant from / - if ROOT=/ has_version ">=dev-java/ant-core-1.7.0"; then - # default ANT_TASKS to WANT_ANT_TASKS, if ANT_TASKS is not set explicitly - ANT_TASKS="${ANT_TASKS:-${WANT_ANT_TASKS}}" - - # override ANT_TASKS with JAVA_PKG_FORCE_ANT_TASKS if it's set - ANT_TASKS="${JAVA_PKG_FORCE_ANT_TASKS:-${ANT_TASKS}}" + # default ANT_TASKS to WANT_ANT_TASKS, if ANT_TASKS is not set explicitly + ANT_TASKS="${ANT_TASKS:-${WANT_ANT_TASKS}}" - if is-java-strict; then - # if ant-tasks were not set by ebuild or forced, try to determine them from depends - if [[ -z "${ANT_TASKS}" ]]; then - ANT_TASKS="$(java-pkg_ant-tasks-from-deps)" - fi - else - # if ant-tasks is not set by ebuild or forced, activate all of them - ANT_TASKS="${ANT_TASKS:-all}" - fi + # override ANT_TASKS with JAVA_PKG_FORCE_ANT_TASKS if it's set + ANT_TASKS="${JAVA_PKG_FORCE_ANT_TASKS:-${ANT_TASKS}}" - # at this point, ANT_TASKS should be "all", "none" or explicit list - if [[ "${ANT_TASKS}" == "all" ]]; then - einfo "Using all available ANT_TASKS" - elif [[ "${ANT_TASKS}" == "none" ]]; then - einfo "Disabling all optional ANT_TASKS" - else - einfo "Using following ANT_TASKS: ${ANT_TASKS}" - fi + # if ant-tasks is not set by ebuild or forced, use none + ANT_TASKS="${ANT_TASKS:-none}" - export ANT_TASKS + # at this point, ANT_TASKS should be "all", "none" or explicit list + if [[ "${ANT_TASKS}" == "all" ]]; then + einfo "Using all available ANT_TASKS" + elif [[ "${ANT_TASKS}" == "none" ]]; then + einfo "Disabling all optional ANT_TASKS" + else + einfo "Using following ANT_TASKS: ${ANT_TASKS}" fi + export ANT_TASKS + [[ -n ${JAVA_PKG_DEBUG} ]] && antflags="${antflags} --execdebug -debug" [[ -n ${PORTAGE_QUIET} ]] && antflags="${antflags} -q"