diff options
author | Karl Trygve Kalleberg <karltk@gentoo.org> | 2004-01-12 09:43:18 +0000 |
---|---|---|
committer | Karl Trygve Kalleberg <karltk@gentoo.org> | 2004-01-12 09:43:18 +0000 |
commit | 1ad5f6451bf415b3ad73a472711355af1bef8bb5 (patch) | |
tree | c5d8d09f6af5a9184a48f4a5c8f1f8cdce0ac571 /eclass/java-pkg.eclass | |
parent | New upstream release. Ebuild now supports threads USE flag for x86. This me... (diff) | |
download | gentoo-2-1ad5f6451bf415b3ad73a472711355af1bef8bb5.tar.gz gentoo-2-1ad5f6451bf415b3ad73a472711355af1bef8bb5.tar.bz2 gentoo-2-1ad5f6451bf415b3ad73a472711355af1bef8bb5.zip |
Added java-pkg_jar-from
Diffstat (limited to 'eclass/java-pkg.eclass')
-rw-r--r-- | eclass/java-pkg.eclass | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/eclass/java-pkg.eclass b/eclass/java-pkg.eclass index 86ab1864e371..4e2275c25166 100644 --- a/eclass/java-pkg.eclass +++ b/eclass/java-pkg.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg.eclass,v 1.4 2003/05/15 01:37:01 absinthe Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg.eclass,v 1.5 2004/01/12 09:43:18 karltk Exp $ inherit base ECLASS=java-pkg @@ -172,3 +172,26 @@ java-pkg_dozip() java-pkg_dojar $* } +java-pkg_jar-from() +{ + local pkg=$1 + local jar=$2 + local destjar=$3 + + if [ -z "${destjar}" ] ; then + destjar=${jar} + fi + + for x in `java-config --classpath=${pkg} | tr ':' ' '`; do + if [ ! -f ${x} ] ; then + eerror "Installation problems with jars in ${pkg} - is it installed?" + return 1 + fi + if [ "`basename ${x}`" == "${jar}" ] ; then + ln -sf ${x} ${destjar} + return 0 + fi + done + return 1 +} + |