/[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.104 Revision 1.105
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.104 2008/03/03 17:55:21 betelgeuse Exp $ 9# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.105 2008/03/26 23:00:23 ali_bush Exp $
10 10
11# ----------------------------------------------------------------------------- 11# -----------------------------------------------------------------------------
12# @eclass-begin 12# @eclass-begin
13# @eclass-shortdesc Java Utility eclass 13# @eclass-shortdesc Java Utility eclass
14# @eclass-maintainer java@gentoo.org 14# @eclass-maintainer java@gentoo.org
896 896
897 local target_pkg="${1}" target_jar="${2}" destjar="${3}" 897 local target_pkg="${1}" target_jar="${2}" destjar="${3}"
898 898
899 [[ -z ${target_pkg} ]] && die "Must specify a package" 899 [[ -z ${target_pkg} ]] && die "Must specify a package"
900 900
901 if [[ "${EAPI}" == "1" ]]; then
902 target_pkg="${target_pkg//:/-}"
903 fi
904
901 # default destjar to the target jar 905 # default destjar to the target jar
902 [[ -z "${destjar}" ]] && destjar="${target_jar}" 906 [[ -z "${destjar}" ]] && destjar="${target_jar}"
903 907
904 local error_msg="There was a problem getting the classpath for ${target_pkg}." 908 local error_msg="There was a problem getting the classpath for ${target_pkg}."
905 local classpath 909 local classpath
1017 1021
1018 [[ ${#} -ne 1 ]] && die "${FUNCNAME} takes only one argument besides --*" 1022 [[ ${#} -ne 1 ]] && die "${FUNCNAME} takes only one argument besides --*"
1019 1023
1020 1024
1021 local classpath pkgs="${1}" 1025 local classpath pkgs="${1}"
1026
1027 if [[ "${EAPI}" == "1" ]]; then
1028 pkgs="${pkgs//:/-}"
1029 fi
1030
1022 jars="$(java-config ${deep} --classpath=${pkgs})" 1031 jars="$(java-config ${deep} --classpath=${pkgs})"
1023 [[ $? != 0 || -z "${jars}" ]] && die "java-config --classpath=${pkgs} failed" 1032 [[ $? != 0 || -z "${jars}" ]] && die "java-config --classpath=${pkgs} failed"
1024 debug-print "${pkgs}:${jars}" 1033 debug-print "${pkgs}:${jars}"
1025 1034
1026 for pkg in ${pkgs//,/ }; do 1035 for pkg in ${pkgs//,/ }; do
1084 done 1093 done
1085 1094
1086 [[ ${#} -ne 2 ]] && die "${FUNCNAME} takes only two arguments besides --*" 1095 [[ ${#} -ne 2 ]] && die "${FUNCNAME} takes only two arguments besides --*"
1087 1096
1088 local pkg="${1}" target_jar="${2}" jar 1097 local pkg="${1}" target_jar="${2}" jar
1098
1099 if [[ "${EAPI}" == "1" ]]; then
1100 pkg="${pkg//:/-}"
1101 fi
1102
1089 [[ -z ${pkg} ]] && die "Must specify package to get a jar from" 1103 [[ -z ${pkg} ]] && die "Must specify package to get a jar from"
1090 [[ -z ${target_jar} ]] && die "Must specify jar to get" 1104 [[ -z ${target_jar} ]] && die "Must specify jar to get"
1091 1105
1092 local error_msg="Could not find classpath for ${pkg}. Are you sure its installed?" 1106 local error_msg="Could not find classpath for ${pkg}. Are you sure its installed?"
1093 local classpath 1107 local classpath
1154 1168
1155 local pkgs="${1}" 1169 local pkgs="${1}"
1156 local jar="${2}" 1170 local jar="${2}"
1157 1171
1158 [[ -z "${pkgs}" ]] && die "${FUNCNAME} called with no package(s) specified" 1172 [[ -z "${pkgs}" ]] && die "${FUNCNAME} called with no package(s) specified"
1173
1174 if [[ "${EAPI}" == "1" ]]; then
1175 pkgs="${pkgs//:/-}"
1176 fi
1159 1177
1160 if [[ -z "${jar}" ]]; then 1178 if [[ -z "${jar}" ]]; then
1161 for pkg in ${pkgs//,/ }; do 1179 for pkg in ${pkgs//,/ }; do
1162 java-pkg_ensure-dep runtime "${pkg}" 1180 java-pkg_ensure-dep runtime "${pkg}"
1163 java-pkg_record-jar_ "${pkg}" 1181 java-pkg_record-jar_ "${pkg}"
1205 1223
1206 local pkgs="${1}" 1224 local pkgs="${1}"
1207 local jar="${2}" 1225 local jar="${2}"
1208 1226
1209 [[ -z "${pkgs}" ]] && die "${FUNCNAME} called with no package(s) specified" 1227 [[ -z "${pkgs}" ]] && die "${FUNCNAME} called with no package(s) specified"
1228
1229 if [[ "${EAPI}" == "1" ]]; then
1230 pkgs="${pkgs//:/-}"
1231 fi
1210 1232
1211 if [[ -z "${jar}" ]]; then 1233 if [[ -z "${jar}" ]]; then
1212 for pkg in ${pkgs//,/ }; do 1234 for pkg in ${pkgs//,/ }; do
1213 java-pkg_record-jar_ --optional "${pkg}" 1235 java-pkg_record-jar_ --optional "${pkg}"
1214 done 1236 done

Legend:
Removed from v.1.104  
changed lines
  Added in v.1.105

  ViewVC Help
Powered by ViewVC 1.1.20