/[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.78 Revision 1.79
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.78 2007/04/24 21:11:41 caster Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.79 2007/04/26 14:50:00 caster 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
832# --build-only - makes the jar(s) not added into package.env DEPEND line. 832# --build-only - makes the jar(s) not added into package.env DEPEND line.
833# (assumed automatically when called inside src_test) 833# (assumed automatically when called inside src_test)
834# --with-dependencies - get jars also from requested package's dependencies 834# --with-dependencies - get jars also from requested package's dependencies
835# transitively. 835# transitively.
836# --into $dir - symlink jar(s) into $dir (must exist) instead of . 836# --into $dir - symlink jar(s) into $dir (must exist) instead of .
837# @param $1 - Package to get jars from. 837# @param $1 - Package to get jars from, or comma-separated list of packages in
838# case other parameters are not used.
838# @param $2 - jar from package. If not specified, all jars will be used. 839# @param $2 - jar from package. If not specified, all jars will be used.
839# @param $3 - When a single jar is specified, destination filename of the 840# @param $3 - When a single jar is specified, destination filename of the
840# symlink. Defaults to the name of the jar. 841# symlink. Defaults to the name of the jar.
841# ------------------------------------------------------------------------------ 842# ------------------------------------------------------------------------------
842# TODO could probably be cleaned up a little 843# TODO could probably be cleaned up a little
873 local error_msg="There was a problem getting the classpath for ${target_pkg}." 874 local error_msg="There was a problem getting the classpath for ${target_pkg}."
874 local classpath 875 local classpath
875 classpath="$(java-config ${deep} --classpath=${target_pkg})" 876 classpath="$(java-config ${deep} --classpath=${target_pkg})"
876 [[ $? != 0 ]] && die ${error_msg} 877 [[ $? != 0 ]] && die ${error_msg}
877 878
879 # When we have commas this functions is called to bring jars from multiple
880 # packages. This affects recording of dependencencies performed later
881 # which expects one package only, so we do it here.
882 if [[ ${target_pkg} = *,* ]]; then
883 for pkg in ${target_pkg//,/ }; do
884 java-pkg_ensure-dep "${build_only}" "${pkg}"
885 [[ -z "${build_only}" ]] && java-pkg_record-jar_ "${pkg}"
886 done
887 # setting this disables further record-jar_ calls later
888 build_only="build"
889 else
878 java-pkg_ensure-dep "${build_only}" "${target_pkg}" 890 java-pkg_ensure-dep "${build_only}" "${target_pkg}"
891 fi
879 892
880 pushd ${destdir} > /dev/null \ 893 pushd ${destdir} > /dev/null \
881 || die "failed to change directory to ${destdir}" 894 || die "failed to change directory to ${destdir}"
882
883 # When we have commas this functions is called to bring jars from multiple
884 # packages. This affects recording of dependencencies because that syntax uses :
885 # if we don't change them to : gjl and java-config -d -p break
886 if [[ ${target_pkg} = *,* ]]; then
887 build_only="build"
888 java-pkg_record-jar_ ${target_pkg//,/:}
889 fi
890 895
891 local jar 896 local jar
892 for jar in ${classpath//:/ }; do 897 for jar in ${classpath//:/ }; do
893 local jar_name=$(basename "${jar}") 898 local jar_name=$(basename "${jar}")
894 if [[ ! -f "${jar}" ]] ; then 899 if [[ ! -f "${jar}" ]] ; then

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79

  ViewVC Help
Powered by ViewVC 1.1.20