/[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.6 Revision 1.7
14 14
15# We need some tools from javatoolkit. We also need portage 2.1 for phase hooks 15# We need some tools from javatoolkit. We also need portage 2.1 for phase hooks
16DEPEND=">=dev-java/javatoolkit-0.1.5 ${JAVA_PKG_PORTAGE_DEP}" 16DEPEND=">=dev-java/javatoolkit-0.1.5 ${JAVA_PKG_PORTAGE_DEP}"
17 17
18# ------------------------------------------------------------------------------ 18# ------------------------------------------------------------------------------
19# @global JAVA_ANT_BSFIX 19# @global JAVA_PKG_BSFIX
20# 20#
21# 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
22# attributes when calling javac? 22# attributes when calling javac?
23# 23#
24# default: on 24# default: on
25# ------------------------------------------------------------------------------ 25# ------------------------------------------------------------------------------
26JAVA_ANT_BSFIX=${JAVA_PKG_BSFIX:="on"} 26JAVA_PKG_BSFIX=${JAVA_PKG_BSFIX:-"on"}
27 27
28# ------------------------------------------------------------------------------ 28# ------------------------------------------------------------------------------
29# @global JAVA_ANT_BSFIX_ALL 29# @global JAVA_PKG_BSFIX_ALL
30# 30#
31# If we're fixing build files, should we try to fix all the ones we can find? 31# If we're fixing build files, should we try to fix all the ones we can find?
32# 32#
33# default: yes 33# default: yes
34# ------------------------------------------------------------------------------ 34# ------------------------------------------------------------------------------
35JAVA_ANT_BSFIX_ALL=${JAVA_PKG_BSFIX_ALL:="yes"} 35JAVA_PKG_BSFIX_ALL=${JAVA_PKG_BSFIX_ALL:-"yes"}
36 36
37# ------------------------------------------------------------------------------ 37# ------------------------------------------------------------------------------
38# @global JAVA_PKG_BSFIX_NAME 38# @global JAVA_PKG_BSFIX_NAME
39# 39#
40# Filename of build files to fix/search for 40# Filename of build files to fix/search for
41# 41#
42# default: build.xml 42# default: build.xml
43# ------------------------------------------------------------------------------ 43# ------------------------------------------------------------------------------
44JAVA_PKG_BSFIX_NAME=${JAVA_PKG_BSFIX_NAME:="build.xml"} 44JAVA_PKG_BSFIX_NAME=${JAVA_PKG_BSFIX_NAME:-"build.xml"}
45 45
46# ------------------------------------------------------------------------------ 46# ------------------------------------------------------------------------------
47# @global JAVA_ANT_BSFIX_TARGETS_TAGS 47# @global JAVA_PKG_BSFIX_TARGETS_TAGS
48# 48#
49# Targets to fix the 'source' attribute in 49# Targets to fix the 'source' attribute in
50# 50#
51# default: javac xjavac javac.preset 51# default: javac xjavac javac.preset
52# ------------------------------------------------------------------------------ 52# ------------------------------------------------------------------------------
53JAVA_ANT_BSFIX_TARGET_TAGS=${JAVA_PKG_BSFIX_TARGET_TAGS:="javac xjavac javac.preset"} 53JAVA_PKG_BSFIX_TARGET_TAGS=${JAVA_PKG_BSFIX_TARGET_TAGS:-"javac xjavac javac.preset"}
54 54
55# ------------------------------------------------------------------------------ 55# ------------------------------------------------------------------------------
56# @global JAVA_ANT_BSFIX_SOURCE_TAGS 56# @global JAVA_PKG_BSFIX_SOURCE_TAGS
57# 57#
58# Targets to fix the 'target' attribute in 58# Targets to fix the 'target' attribute in
59# 59#
60# default: javacdoc javac xjavac javac.preset 60# default: javacdoc javac xjavac javac.preset
61# ------------------------------------------------------------------------------ 61# ------------------------------------------------------------------------------
62JAVA_ANT_BSFIX_SOURCE_TAGS=${JAVA_PKG_BSFIX_SOURCE_TAGS:="javadoc javac xjavac javac.preset"} 62JAVA_PKG_BSFIX_SOURCE_TAGS=${JAVA_PKG_BSFIX_SOURCE_TAGS:-"javadoc javac xjavac javac.preset"}
63 63
64# ------------------------------------------------------------------------------ 64# ------------------------------------------------------------------------------
65# @public java-ant_src_unpack 65# @public java-ant_src_unpack
66# 66#
67# Unpacks the source, and attempts to fix build files. 67# Unpacks the source, and attempts to fix build files.
104 echo "QA Notice: Package is using java-ant, but doesn't depend on a Java VM" 104 echo "QA Notice: Package is using java-ant, but doesn't depend on a Java VM"
105 fi 105 fi
106 106
107 cd "${S}" 107 cd "${S}"
108 108
109 local find_args="-type f" 109 local find_args=""
110 if [[ "${JAVA_PKG_BSFIX_ALL}" == "yes" ]]; then 110 [[ "${JAVA_PKG_BSFIX_ALL}" == "yes" ]] || find_args="-maxdepth 1"
111
111 find_args="${find_args} -name ${JAVA_PKG_BSFIX_NAME// / -o -name }" 112 find_args="${find_args} -type f -name ${JAVA_PKG_BSFIX_NAME// / -o -name } "
112 else
113 find_args="${find_args} -maxdepth 1 -name ${JAVA_PKG_BSFIX_NAME// / -o -name } "
114 fi
115 113
116 local i=0 114 local i=0
117 local -a bsfix_these 115 local -a bsfix_these
118 while read line; do 116 while read line; do
119 [[ -z ${line} ]] && continue 117 [[ -z ${line} ]] && continue

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20