EAP1=1 eclass patch

Alistair Bush <[email protected]> Sat, 22 Mar 2008 20:24:43 +1300
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
Ok, here is a patch to support slot dependencies within the 
jar-from,getjar and getjars functions.

Its untested at present.  But that will change.

Any comments?

> cvs diff java-utils-2.eclass
> Index: java-utils-2.eclass
> ===================================================================
> RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
> retrieving revision 1.104
> diff -u -b -B -r1.104 java-utils-2.eclass
> --- java-utils-2.eclass 3 Mar 2008 17:55:21 -0000       1.104
> +++ java-utils-2.eclass 22 Mar 2008 07:23:10 -0000
> @@ -896,6 +896,10 @@
> 
>         local target_pkg="${1}" target_jar="${2}" destjar="${3}"
> 
> +       if[[ ${EAPI} == "1" ]]; then
> +               target_pkg="${target_pkg//:/-}"
> +       fi
> +
>         [[ -z ${target_pkg} ]] && die "Must specify a package"
> 
>         # default destjar to the target jar
> @@ -1019,6 +1023,11 @@
> 
> 
>         local classpath pkgs="${1}"
> +
> +       if[[ ${EAPI} == "1" ]]; then
> +               pkgs="${pkgs//:/-}"
> +       fi
> +
>         jars="$(java-config ${deep} --classpath=${pkgs})"
>         [[ $? != 0 || -z "${jars}" ]] && die "java-config --classpath=${pkgs} failed"
>         debug-print "${pkgs}:${jars}"
> @@ -1086,6 +1095,11 @@
>         [[ ${#} -ne 2 ]] && die "${FUNCNAME} takes only two arguments besides --*"
> 
>         local pkg="${1}" target_jar="${2}" jar
> +
> +       if[[ ${EAPI} == "1" ]]; then
> +               pkg="${pkg//:/-}"
> +       fi
> +
>         [[ -z ${pkg} ]] && die "Must specify package to get a jar from"
>         [[ -z ${target_jar} ]] && die "Must specify jar to get"
-- 
[email protected] mailing list