/[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.39 Revision 1.40
4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> 4# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
5# Copyright (c) 2004-2005, Gentoo Foundation 5# Copyright (c) 2004-2005, 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.39 2007/01/03 09:18:20 caster Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.40 2007/01/10 09:52:51 betelgeuse Exp $
10 10
11 11
12# ----------------------------------------------------------------------------- 12# -----------------------------------------------------------------------------
13# @eclass-begin 13# @eclass-begin
14# @eclass-shortdesc Java Utility eclass 14# @eclass-shortdesc Java Utility eclass
1009# 1009#
1010# export DEPEND="${DEPEND} ${depstr}" 1010# export DEPEND="${DEPEND} ${depstr}"
1011# export RDEPEND="${RDEPEND} ${depstr}" 1011# export RDEPEND="${RDEPEND} ${depstr}"
1012#} 1012#}
1013 1013
1014# ------------------------------------------------------------------------------
1015# @ebuild-function java-pkg_find-normal-jars
1016#
1017# Find the files with suffix .jar file in the given directory or $WORKDIR
1018#
1019# @param $1 - The directory to search for jar files (default: ${WORKDIR})
1020# ------------------------------------------------------------------------------
1021java-pkg_find-normal-jars() {
1022 local dir=$1
1023 [[ "${dir}" ]] || dir="${WORKDIR}"
1024 local found
1025 for jar in $(find "${dir}" -name "*.jar" -type f); do
1026 echo "${jar}"
1027 found="true"
1028 done
1029 [[ "${found}" ]]
1030 return $?
1031}
1032
1033# ------------------------------------------------------------------------------
1034# @ebuild-function java-pkg_ensure-no-bundled-jars
1035#
1036# Try to locate bundled jar files in ${WORKDIR} and die if found.
1014# This should be used after S has been populated with symlinks to jars 1037# This function should be called after WORKDIR has been populated with symlink
1015# TODO document 1038# to system jar files or bundled jars removed.
1039# ------------------------------------------------------------------------------
1016java-pkg_ensure-no-bundled-jars() { 1040java-pkg_ensure-no-bundled-jars() {
1017 debug-print-function ${FUNCNAME} $* 1041 debug-print-function ${FUNCNAME} $*
1018 pushd ${WORKDIR} >/dev/null 2>/dev/null
1019 1042
1020 local bundled_jars=$(find . -name "*.jar" -type f) 1043 local bundled_jars=$(java-pkg_find-normal-jars)
1021 if [[ -n ${bundled_jars} ]]; then 1044 if [[ -n ${bundled_jars} ]]; then
1022 echo "Bundled jars found:" 1045 echo "Bundled jars found:"
1023 local jar 1046 local jar
1024 for jar in ${bundled_jars}; do 1047 for jar in ${bundled_jars}; do
1025 echo $(pwd)${jar/./} 1048 echo $(pwd)${jar/./}
1026 done 1049 done
1027 die "Bundled jars found!" 1050 die "Bundled jars found!"
1028
1029 fi 1051 fi
1030 popd >/dev/null 2>/dev/null
1031} 1052}
1032 1053
1033# ------------------------------------------------------------------------------ 1054# ------------------------------------------------------------------------------
1034# @internal-function java-pkg_ensure-vm-version-sufficient 1055# @internal-function java-pkg_ensure-vm-version-sufficient
1035# 1056#

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

  ViewVC Help
Powered by ViewVC 1.1.20