From e9501ffda9fd965fa33ea15086221832cb00dbbc Mon Sep 17 00:00:00 2001 From: Thomas Matthijs Date: Sat, 16 Oct 2004 21:32:09 +0000 Subject: add java-pkg_getjar && java-pkg_getjars --- eclass/java-pkg.eclass | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'eclass') diff --git a/eclass/java-pkg.eclass b/eclass/java-pkg.eclass index 444f630083ae..978cab2dd85c 100644 --- a/eclass/java-pkg.eclass +++ b/eclass/java-pkg.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg.eclass,v 1.15 2004/10/16 16:54:42 axxo Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg.eclass,v 1.16 2004/10/16 21:32:09 axxo Exp $ inherit base ECLASS=java-pkg @@ -256,6 +256,26 @@ java-pkg_jar-from() fi } +java-pkg_getjar() { + local pkg=$1 + local jar=$2 + + for x in $(java-config --classpath=${pkg} | tr ':' ' '); do + if [ ! -f ${x} ] ; then + die "Installation problems with jars in ${pkg} - is it installed?" + elif [ "$(basename ${x})" == "${jar}" ] ; then + echo ${x} + return 0 + fi + done + die "Could not find $2 in $1" +} + +java-pkg_getjars() { + java-config --classpath=$1 +} + + java-pkg_dohtml() { dohtml -f package-list $@ } -- cgit v1.2.3-65-gdbad