monsieurp 15/07/31 07:56:17 Modified: ChangeLog java-utils-2.eclass Log: Document JAVA_RM_FILES variable. Also, fix documentation and correct typos in java-pkg_rm_files.
Revision Changes Path 1.1741 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1741&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1741&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1740&r2=1.1741 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.1740 retrieving revision 1.1741 diff -u -r1.1740 -r1.1741 --- ChangeLog 30 Jul 2015 22:17:08 -0000 1.1740 +++ ChangeLog 31 Jul 2015 07:56:17 -0000 1.1741 @@ -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 <[email protected]> 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 <[email protected]> java-utils-2.eclass: Fix JAVA_RM_FILES by simplifying java-utils-2_src_prepare on the basis that 1.168 eclass/java-utils-2.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?rev=1.168&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?rev=1.168&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-utils-2.eclass?r1=1.167&r2=1.168 Index: java-utils-2.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v retrieving revision 1.167 retrieving revision 1.168 diff -u -r1.167 -r1.168 --- java-utils-2.eclass 30 Jul 2015 22:17:08 -0000 1.167 +++ java-utils-2.eclass 31 Jul 2015 07:56:17 -0000 1.168 @@ -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_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 @@ # 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
