Gentoo Archives: gentoo-java

From: Alistair Bush <ali_bush@g.o>
To: gentoo-java@l.g.o
Subject: [gentoo-java] EAP1=1 eclass patch
Date: Sat, 22 Mar 2008 07:25:16
Message-Id: 47E4B43B.3020909@gentoo.org
1 Ok, here is a patch to support slot dependencies within the
2 jar-from,getjar and getjars functions.
3
4 Its untested at present. But that will change.
5
6 Any comments?
7
8 > cvs diff java-utils-2.eclass
9 > Index: java-utils-2.eclass
10 > ===================================================================
11 > RCS file: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v
12 > retrieving revision 1.104
13 > diff -u -b -B -r1.104 java-utils-2.eclass
14 > --- java-utils-2.eclass 3 Mar 2008 17:55:21 -0000 1.104
15 > +++ java-utils-2.eclass 22 Mar 2008 07:23:10 -0000
16 > @@ -896,6 +896,10 @@
17 >
18 > local target_pkg="${1}" target_jar="${2}" destjar="${3}"
19 >
20 > + if[[ ${EAPI} == "1" ]]; then
21 > + target_pkg="${target_pkg//:/-}"
22 > + fi
23 > +
24 > [[ -z ${target_pkg} ]] && die "Must specify a package"
25 >
26 > # default destjar to the target jar
27 > @@ -1019,6 +1023,11 @@
28 >
29 >
30 > local classpath pkgs="${1}"
31 > +
32 > + if[[ ${EAPI} == "1" ]]; then
33 > + pkgs="${pkgs//:/-}"
34 > + fi
35 > +
36 > jars="$(java-config ${deep} --classpath=${pkgs})"
37 > [[ $? != 0 || -z "${jars}" ]] && die "java-config --classpath=${pkgs} failed"
38 > debug-print "${pkgs}:${jars}"
39 > @@ -1086,6 +1095,11 @@
40 > [[ ${#} -ne 2 ]] && die "${FUNCNAME} takes only two arguments besides --*"
41 >
42 > local pkg="${1}" target_jar="${2}" jar
43 > +
44 > + if[[ ${EAPI} == "1" ]]; then
45 > + pkg="${pkg//:/-}"
46 > + fi
47 > +
48 > [[ -z ${pkg} ]] && die "Must specify package to get a jar from"
49 > [[ -z ${target_jar} ]] && die "Must specify jar to get"
50 --
51 gentoo-java@l.g.o mailing list