/[gentoo-x86]/eclass/java-utils-2.eclass
Gentoo

Diff of /eclass/java-utils-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.81 Revision 1.82
4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> 4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
5# Copyright (c) 2004-2005, Gentoo Foundation 5# Copyright (c) 2004-2005, Gentoo Foundation
6# 6#
7# Licensed under the GNU General Public License, v2 7# Licensed under the GNU General Public License, v2
8# 8#
9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.81 2007/04/27 10:14:15 caster Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.82 2007/04/29 13:13:03 caster Exp $
10 10
11 11
12# ----------------------------------------------------------------------------- 12# -----------------------------------------------------------------------------
13# @eclass-begin 13# @eclass-begin
14# @eclass-shortdesc Java Utility eclass 14# @eclass-shortdesc Java Utility eclass
1616 [[ "${ant}" == "dev-java/ant" ]] && found_ant=true 1616 [[ "${ant}" == "dev-java/ant" ]] && found_ant=true
1617 [[ "${dep}" == *"ant-tasks"* ]] && found_ant_tasks=true 1617 [[ "${dep}" == *"ant-tasks"* ]] && found_ant_tasks=true
1618 done 1618 done
1619 1619
1620 if [[ -n "${found_ant}" || -n "${found_ant_tasks}" ]]; then 1620 if [[ -n "${found_ant}" || -n "${found_ant_tasks}" ]]; then
1621 java-pkg_announce-qa-violation "The ebuild DEPENDS on deprecated ant or ant-tasks" 1621 java-pkg_announce-qa-violation --nodie "The ebuild DEPENDS on deprecated ant or ant-tasks"
1622 echo "all" 1622 echo "all"
1623 else 1623 else
1624 # ebuild doesn't set ANT_TASKS and doesn't depend on ant-tasks or ant 1624 # ebuild doesn't set ANT_TASKS and doesn't depend on ant-tasks or ant
1625 # so we deactivate all tasks that may be installed 1625 # so we deactivate all tasks that may be installed
1626 echo "none" 1626 echo "none"
1676# *ANT_TASKS - used to determine ANT_TASKS before calling Ant. 1676# *ANT_TASKS - used to determine ANT_TASKS before calling Ant.
1677# ------------------------------------------------------------------------------ 1677# ------------------------------------------------------------------------------
1678eant() { 1678eant() {
1679 debug-print-function ${FUNCNAME} $* 1679 debug-print-function ${FUNCNAME} $*
1680 1680
1681 # FIXME get this working
1682# if is-java-strict && [[ ! ${DEPEND} =~ "dev-java/ant" ]]; then
1683# java-pkg_announce-qa-violation \
1684# "Using eant, but not depending on dev-java/ant or dev-java/ant-core"
1685# fi
1686
1687 if ! hasq java-ant-2 ${INHERITED} && is-java-strict; then 1681 if ! hasq java-ant-2 ${INHERITED}; then
1688 local msg="You should inherit java-ant-2 when using eant" 1682 local msg="You should inherit java-ant-2 when using eant"
1689 java-pkg_announce-qa-violation ${msg} 1683 java-pkg_announce-qa-violation "${msg}"
1690 die ${msg}
1691 fi 1684 fi
1692 1685
1693 local antflags="-Dnoget=true -Dmaven.mode.offline=true" 1686 local antflags="-Dnoget=true -Dmaven.mode.offline=true"
1694 1687
1695 java-pkg_init-compiler_ 1688 java-pkg_init-compiler_
2459# @section-end internal 2452# @section-end internal
2460# ------------------------------------------------------------------------------ 2453# ------------------------------------------------------------------------------
2461 2454
2462java-pkg_check-phase() { 2455java-pkg_check-phase() {
2463 local phase=${1} 2456 local phase=${1}
2464 local funcname=${2} 2457 local funcname=${FUNCNAME[1]}
2465 if is-java-strict && [[ ${EBUILD_PHASE} != ${phase} ]]; then 2458 if [[ ${EBUILD_PHASE} != ${phase} ]]; then
2466 java-pkg_announce-qa-violation \
2467 "${funcname} used outside of src_${phase}" 2459 local msg="${funcname} used outside of src_${phase}"
2460 java-pkg_announce-qa-violation "${msg}"
2468 fi 2461 fi
2469} 2462}
2470 2463
2471java-pkg_check-versioned-jar() { 2464java-pkg_check-versioned-jar() {
2472 local jar=${1} 2465 local jar=${1}
2481 java-pkg_announce-qa-violation "deprecated USE flag 'jikes' in IUSE" 2474 java-pkg_announce-qa-violation "deprecated USE flag 'jikes' in IUSE"
2482 fi 2475 fi
2483} 2476}
2484 2477
2485java-pkg_announce-qa-violation() { 2478java-pkg_announce-qa-violation() {
2486 if is-java-strict; then 2479 local nodie
2480 if [[ ${1} == "--nodie" ]]; then
2481 nodie="true"
2482 shift
2483 fi
2487 echo "Java QA Notice: $@" >&2 2484 echo "Java QA Notice: $@" >&2
2488 increment-qa-violations 2485 increment-qa-violations
2489 fi 2486 [[ -z "${nodie}" ]] && is-java-strict && die "${@}"
2490} 2487}
2491 2488
2492increment-qa-violations() { 2489increment-qa-violations() {
2493 let "JAVA_PKG_QA_VIOLATIONS+=1" 2490 let "JAVA_PKG_QA_VIOLATIONS+=1"
2494 export JAVA_PKG_QA_VIOLATIONS 2491 export JAVA_PKG_QA_VIOLATIONS

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82

  ViewVC Help
Powered by ViewVC 1.1.20