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

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

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

Revision 1.1 Revision 1.2
10 10
11# This eclass provides functionality for Java packages which use 11# This eclass provides functionality for Java packages which use
12# ant to build. In particular, it will attempt to fix build.xml files, so that 12# ant to build. In particular, it will attempt to fix build.xml files, so that
13# they use the appropriate 'target' and 'source' attributes. 13# they use the appropriate 'target' and 'source' attributes.
14 14
15# Only exports src_unpack 15# We need some tools from javatoolkit. We also need portage 2.1 for phase hooks
16EXPORT_FUNCTIONS src_unpack
17
18# We need some tools from java-toolkit
19DEPEND=">=dev-java/javatoolkit-0.1.5" 16DEPEND=">=dev-java/javatoolkit-0.1.5 ${JAVA_PKG_PORTAGE_DEP}"
20 17
21# ------------------------------------------------------------------------------ 18# ------------------------------------------------------------------------------
22# @global JAVA_ANT_BSFIX 19# @global JAVA_ANT_BSFIX
23# 20#
24# Should we attempt to 'fix' ant build files to include the source/target 21# Should we attempt to 'fix' ant build files to include the source/target
67# ------------------------------------------------------------------------------ 64# ------------------------------------------------------------------------------
68# @public java-ant_src_unpack 65# @public java-ant_src_unpack
69# 66#
70# Unpacks the source, and attempts to fix build files. 67# Unpacks the source, and attempts to fix build files.
71# ------------------------------------------------------------------------------ 68# ------------------------------------------------------------------------------
72java-ant-2_src_unpack() { 69post_src_unpack() {
70 if java-pkg_func-exists ant_src_unpack; then
71 java-pkg_announce-qa-violation "Using old ant_src_unpack. Should be src_unpack"
73 ant_src_unpack 72 ant_src_unpack
73 fi
74 java-ant_bsfix 74 java-ant_bsfix
75} 75}
76 76
77# ------------------------------------------------------------------------------ 77# ------------------------------------------------------------------------------
78# @private ant_src_unpack 78# @private ant_src_unpack
79# 79#
80# Helper function which does the actual unpacking 80# Helper function which does the actual unpacking
81# ------------------------------------------------------------------------------ 81# ------------------------------------------------------------------------------
82# TODO maybe use base.eclass for some patching love? 82# TODO maybe use base.eclass for some patching love?
83ant_src_unpack() { 83#ant_src_unpack() {
84 debug-print-function ${FUNCNAME} $* 84# debug-print-function ${FUNCNAME} $*
85 if [[ -n "${A}" ]]; then 85# if [[ -n "${A}" ]]; then
86 unpack ${A} 86# unpack ${A}
87 fi 87# fi
88} 88#}
89 89
90# ------------------------------------------------------------------------------ 90# ------------------------------------------------------------------------------
91# @private java-ant_bsfix 91# @private java-ant_bsfix
92# 92#
93# Attempts to fix build files. The following variables will affect its behavior 93# Attempts to fix build files. The following variables will affect its behavior

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20