/[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.167 Revision 1.168
4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> 4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
5# Copyright (c) 2004-2015, Gentoo Foundation 5# Copyright (c) 2004-2015, 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.167 2015/07/30 22:17:08 chewi Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.168 2015/07/31 07:56:17 monsieurp Exp $
10 10
11# @ECLASS: java-utils-2.eclass 11# @ECLASS: java-utils-2.eclass
12# @MAINTAINER: 12# @MAINTAINER:
13# java@gentoo.org 13# java@gentoo.org
14# @AUTHOR: 14# @AUTHOR:
122# Should generallyonly be used for testing and debugging. 122# Should generallyonly be used for testing and debugging.
123# 123#
124# emerge bar to be compatible with 1.3 124# emerge bar to be compatible with 1.3
125# @CODE 125# @CODE
126# JAVA_PKG_WANT_TARGET=1.3 emerge bar 126# JAVA_PKG_WANT_TARGET=1.3 emerge bar
127# @CODE
128
129# @ECLASS-VARIABLE: JAVA_RM_FILES
130# @DEFAULT_UNSET
131# @DESCRIPTION:
132# An array containing a list of files to remove. If defined, this array will be
133# automatically handed over to java-pkg_rm_files for processing during the
134# src_prepare phase.
135#
136# @CODE
137# JAVA_RM_FILES=(
138# path/to/File1.java
139# DELETEME.txt
140# )
127# @CODE 141# @CODE
128 142
129# @VARIABLE: JAVA_PKG_COMPILER_DIR 143# @VARIABLE: JAVA_PKG_COMPILER_DIR
130# @INTERNAL 144# @INTERNAL
131# @DESCRIPTION: 145# @DESCRIPTION:
261# the list of files you wish to remove. 275# the list of files you wish to remove.
262# - defining an array in the ebuild named JAVA_RM_FILES with the list of files 276# - defining an array in the ebuild named JAVA_RM_FILES with the list of files
263# you wish to remove. 277# you wish to remove.
264# 278#
265# Both way work and it is left to the developer's preferences. If the 279# Both way work and it is left to the developer's preferences. If the
266# JAVA_RM_FILES array is defined, it is will be automatically handed over to 280# JAVA_RM_FILES array is defined, it will be automatically handed over to
267# java-pkg_rm_files. 281# java-pkg_rm_files during the src_prepare phase.
268# 282#
269# See java-utils-2_src_prepare. 283# See java-utils-2_src_prepare.
270# 284#
271# @CODE 285# @CODE
286# java-pkg_rm_files File1.java File2.java
287# @CODE
272# 288#
273# @param $* - list of files to remove. 289# @param $* - list of files to remove.
274# JAVA_RM_FILES - array containing files to remove.
275# if defined, automatically handed over to java-pkg_rm_files in java-utils-2_src_prepare.
276#
277# @CODE
278java-pkg_rm_files() { 290java-pkg_rm_files() {
279 debug-print-function ${FUNCNAME} $* 291 debug-print-function ${FUNCNAME} $*
280 OIFS="$IFS"
281 IFS="\n" 292 local IFS="\n"
282 for filename in "$@"; do 293 for filename in "$@"; do
283 [[ ! -f "${filename}" ]] && die "${filename} is not a regular file. Aborting." 294 [[ ! -f "${filename}" ]] && die "${filename} is not a regular file. Aborting."
284 einfo "Removing unneeded file ${filename}" 295 einfo "Removing unneeded file ${filename}"
285 rm -f "${S}/${filename}" || die "cannot remove ${filename}" 296 rm -f "${S}/${filename}" || die "cannot remove ${filename}"
286 eend $? 297 eend $?
287 done 298 done
288 IFS="$OIFS"
289} 299}
290 300
291# @FUNCTION: java-pkg_dojar 301# @FUNCTION: java-pkg_dojar
292# @USAGE: <jar1> [<jar2> ...] 302# @USAGE: <jar1> [<jar2> ...]
293# @DESCRIPTION: 303# @DESCRIPTION:

Legend:
Removed from v.1.167  
changed lines
  Added in v.1.168

  ViewVC Help
Powered by ViewVC 1.1.20