summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2015-07-31 07:56:17 +0000
committerPatrice Clement <monsieurp@gentoo.org>2015-07-31 07:56:17 +0000
commit0520608ac873418dd0beea8fae03f5c1e2cad200 (patch)
tree2a8611fe4295fa1827059493055e9138d236ee06 /eclass
parentdrop old 2.1.2 (diff)
downloadhistorical-0520608ac873418dd0beea8fae03f5c1e2cad200.tar.gz
historical-0520608ac873418dd0beea8fae03f5c1e2cad200.tar.bz2
historical-0520608ac873418dd0beea8fae03f5c1e2cad200.zip
Document JAVA_RM_FILES variable. Also, fix documentation and correct typos in java-pkg_rm_files.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/java-utils-2.eclass30
2 files changed, 25 insertions, 11 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 0b220490eb50..1467019cf7f8 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1740 2015/07/30 22:17:08 chewi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1741 2015/07/31 07:56:17 monsieurp Exp $
+
+ 31 Jul 2015; Patrice Clement <monsieurp@gentoo.org> java-utils-2.eclass:
+ Document JAVA_RM_FILES variable. Also, fix documentation and correct typos in
+ java-pkg_rm_files.
30 Jul 2015; James Le Cuirot <chewi@gentoo.org> java-utils-2.eclass:
Fix JAVA_RM_FILES by simplifying java-utils-2_src_prepare on the basis that
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 9aff557db63b..c5c75cb12f76 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -6,7 +6,7 @@
#
# Licensed under the GNU General Public License, v2
#
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.167 2015/07/30 22:17:08 chewi Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.168 2015/07/31 07:56:17 monsieurp Exp $
# @ECLASS: java-utils-2.eclass
# @MAINTAINER:
@@ -126,6 +126,20 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
# JAVA_PKG_WANT_TARGET=1.3 emerge bar
# @CODE
+# @ECLASS-VARIABLE: JAVA_RM_FILES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# An array containing a list of files to remove. If defined, this array will be
+# automatically handed over to java-pkg_rm_files for processing during the
+# src_prepare phase.
+#
+# @CODE
+# JAVA_RM_FILES=(
+# path/to/File1.java
+# DELETEME.txt
+# )
+# @CODE
+
# @VARIABLE: JAVA_PKG_COMPILER_DIR
# @INTERNAL
# @DESCRIPTION:
@@ -263,29 +277,25 @@ java-pkg_addres() {
# you wish to remove.
#
# Both way work and it is left to the developer's preferences. If the
-# JAVA_RM_FILES array is defined, it is will be automatically handed over to
-# java-pkg_rm_files.
+# JAVA_RM_FILES array is defined, it will be automatically handed over to
+# java-pkg_rm_files during the src_prepare phase.
#
# See java-utils-2_src_prepare.
#
# @CODE
+# java-pkg_rm_files File1.java File2.java
+# @CODE
#
# @param $* - list of files to remove.
-# JAVA_RM_FILES - array containing files to remove.
-# if defined, automatically handed over to java-pkg_rm_files in java-utils-2_src_prepare.
-#
-# @CODE
java-pkg_rm_files() {
debug-print-function ${FUNCNAME} $*
- OIFS="$IFS"
- IFS="\n"
+ local IFS="\n"
for filename in "$@"; do
[[ ! -f "${filename}" ]] && die "${filename} is not a regular file. Aborting."
einfo "Removing unneeded file ${filename}"
rm -f "${S}/${filename}" || die "cannot remove ${filename}"
eend $?
done
- IFS="$OIFS"
}
# @FUNCTION: java-pkg_dojar