summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Brinkmann <luckyduck@gentoo.org>2005-03-10 17:45:40 +0000
committerJan Brinkmann <luckyduck@gentoo.org>2005-03-10 17:45:40 +0000
commit1401720ec74263245886a668e90528ad0e905f11 (patch)
tree3ce2afd649620ac466cfa087b8386564628ec51a /dev-java/bsh
parentStable on ppc64 (diff)
downloadhistorical-1401720ec74263245886a668e90528ad0e905f11.tar.gz
historical-1401720ec74263245886a668e90528ad0e905f11.tar.bz2
historical-1401720ec74263245886a668e90528ad0e905f11.zip
new version, improvements, build from source, generall cleanup and much more. fixes #62664 and #81879. Ebuild based on the contribution by Saleem A. <compnerd@gentoo.org>, thanks to Diego Pettenò' <dgp85@users.sourceforge.net> for the patch.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'dev-java/bsh')
-rw-r--r--dev-java/bsh/ChangeLog12
-rw-r--r--dev-java/bsh/Manifest24
-rw-r--r--dev-java/bsh/bsh-2.0_beta2.ebuild77
-rw-r--r--dev-java/bsh/files/bsh.Console4
-rw-r--r--dev-java/bsh/files/bsh.Interpreter4
-rw-r--r--dev-java/bsh/files/bsh2-build.patch54
-rw-r--r--dev-java/bsh/files/bsh2-readline.patch151
-rw-r--r--dev-java/bsh/files/digest-bsh-2.0_beta22
8 files changed, 318 insertions, 10 deletions
diff --git a/dev-java/bsh/ChangeLog b/dev-java/bsh/ChangeLog
index 0054c06d1205..f3f513387feb 100644
--- a/dev-java/bsh/ChangeLog
+++ b/dev-java/bsh/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for dev-java/bsh
# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/bsh/ChangeLog,v 1.21 2005/01/26 20:42:53 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/bsh/ChangeLog,v 1.22 2005/03/10 17:45:39 luckyduck Exp $
+
+*bsh-2.0_beta2 (10 Mar 2005)
+
+ 10 Mar 2005; Jan Brinkmann <luckyduck@gentoo.org> files/bsh.Console,
+ files/bsh.Interpreter, +files/bsh2-build.patch, +files/bsh2-readline.patch,
+ +bsh-2.0_beta2.ebuild:
+ new version, improvements, build from source, generall cleanup and much more.
+ fixes #62664 and #81879. Ebuild based on the contribution by Saleem A.
+ <compnerd@gentoo.org>, thanks to Diego Pettenò <dgp85@users.sourceforge.net>
+ for the patch.
26 Jan 2005; Markus Rothe <corsair@gentoo.org> bsh-1.3.0.ebuild:
Stable on ppc64
diff --git a/dev-java/bsh/Manifest b/dev-java/bsh/Manifest
index 5ffeb81b4d38..68b0496e5984 100644
--- a/dev-java/bsh/Manifest
+++ b/dev-java/bsh/Manifest
@@ -1,9 +1,23 @@
-MD5 a854ef6c73afdcb18fe63520346efc82 ChangeLog 2520
-MD5 8bd71a260abed0bb42193acb1ec2c8df bsh-1.3.0.ebuild 870
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
MD5 a2ef69a52ec3d691245f9403dce5496f bsh-2.0_beta1-r1.ebuild 1172
+MD5 8bd71a260abed0bb42193acb1ec2c8df bsh-1.3.0.ebuild 870
+MD5 918ca657072ca8db9795b861fd134628 bsh-2.0_beta2.ebuild 2049
+MD5 1bf5ad106e4e9b88debe2a4b8c7b181a ChangeLog 2977
MD5 a6ec7d7724fbd068ffb39b5be56134ed metadata.xml 157
-MD5 32448cba89ef5394ffab7a7cdb399ded files/beanshell.desktop 266
-MD5 ccab3d00e6269efa375e2896eaa2f96f files/bsh.Console 818
-MD5 fc2cfd9fd2724563f8979d2e8b4cbc20 files/bsh.Interpreter 833
MD5 5ec33004601026e3f5206a441853b1ed files/digest-bsh-1.3.0 58
+MD5 e98c8ab811f673d6089a092d3b8a3d97 files/bsh.Console 856
+MD5 c0ad0331cfc0855056051a83d34fc35f files/bsh.Interpreter 871
+MD5 af516cc82d6597c5f6f49ad83916647e files/bsh2-build.patch 1704
+MD5 b2666166806a0cf58b311a9a77511fdb files/digest-bsh-2.0_beta2 125
+MD5 356a59a8ed4e03783dc4ec5a143ef75f files/bsh2-readline.patch 5428
MD5 0321e1ba45e1f4f328eae0eecf037105 files/digest-bsh-2.0_beta1-r1 120
+MD5 32448cba89ef5394ffab7a7cdb399ded files/beanshell.desktop 266
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.0 (GNU/Linux)
+
+iD8DBQFCMIfW06ebR+OMO78RAm1UAJ9/Zbccyk4sdwGdX9IFtLGpfKk5XwCggG4M
+fhyHWNbznGCDSxPKtgpn3bI=
+=7z5D
+-----END PGP SIGNATURE-----
diff --git a/dev-java/bsh/bsh-2.0_beta2.ebuild b/dev-java/bsh/bsh-2.0_beta2.ebuild
new file mode 100644
index 000000000000..0819603be947
--- /dev/null
+++ b/dev-java/bsh/bsh-2.0_beta2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/bsh/bsh-2.0_beta2.ebuild,v 1.1 2005/03/10 17:45:39 luckyduck Exp $
+
+inherit java-pkg eutils
+
+MY_DIST=${P/_beta/b}-src.jar
+
+DESCRIPTION="BeanShell: A small embeddable Java source interpreter"
+HOMEPAGE="http://www.beanshell.org"
+SRC_URI="http://www.beanshell.org/${MY_DIST}
+ mirror://gentoo/beanshell-icon.png"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE="doc gnome jikes junit kde readline"
+
+DEPEND="${RDEPEND}
+ >=dev-java/ant-core-1.5.4"
+RDEPEND=">=virtual/jdk-1.4
+ =dev-java/bsf-2.3*
+ =servletapi-2.4*
+ readline? ( dev-java/libreadline-java )"
+
+S=${WORKDIR}/BeanShell
+
+src_unpack() {
+ # Extract the sources
+ cd ${WORKDIR}
+ jar xf ${DISTDIR}/${MY_DIST}
+
+ # Apply the build patch
+ cd ${S}
+ epatch ${FILESDIR}/bsh2-build.patch
+
+ # Copy the needed files
+ cp ${FILESDIR}/bsh.Console ${FILESDIR}/bsh.Interpreter ${S}
+
+ # Patch with readline if required
+ if use readline ; then
+ # Apply the patch
+ epatch ${FILESDIR}/bsh2-readline.patch
+
+ # Update the classpath
+ local ADD_CLASSPATH="`java-config -p libreadline-java`"
+ sed -e "s:__ADD_CLASSPATH__:${ADD_CLASSPATH}:" \
+ -i ${S}/bsh.Console \
+ -i ${S}/bsh.Interpreter
+ fi
+}
+
+src_compile() {
+ local classpath="bsf-2.3,servletapi-2.4"
+ use readline && classpath="${classpath},libreadline-java"
+ classpath=`java-config -p ${classpath}`
+
+ local antflags="jarall"
+ use doc && antflags="${antflags} javadoc"
+ use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
+ ant -lib ${classpath} ${antflags} || die "Compile Failed!"
+}
+
+src_install() {
+ mv ${S}/dist/${P/_beta/b}.jar ${S}/dist/${PN}.jar
+ java-pkg_dojar ${S}/dist/${PN}.jar
+
+ newbin ${S}/bsh.Console bsh-console
+ newbin ${S}/bsh.Interpreter bsh-interpreter
+
+ use doc && java-pkg_dohtml -r ${S}/javadoc/*
+
+ insinto /usr/share/icons/hicolor/scalable/apps
+ doins ${DISTDIR}/beanshell-icon.png beanshell.png
+
+ make_desktop_entry bsh-console "BeanShell Prompt" beanshell
+}
diff --git a/dev-java/bsh/files/bsh.Console b/dev-java/bsh/files/bsh.Console
index 2fcb81f83086..fe7f938e96a8 100644
--- a/dev-java/bsh/files/bsh.Console
+++ b/dev-java/bsh/files/bsh.Console
@@ -2,13 +2,13 @@
# bsh.Console Launch Script
# Author: Dylan Carlson
# May 2003
-# $Header: /var/cvsroot/gentoo-x86/dev-java/bsh/files/bsh.Console,v 1.2 2004/07/18 02:50:53 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/bsh/files/bsh.Console,v 1.3 2005/03/10 17:45:40 luckyduck Exp $
JAVA_HOME=`/usr/bin/java-config --jdk-home`
if [ -z "${JAVA_HOME}" ] ; then
JAVA_HOME=`/usr/bin/java-config --jre-home`
fi
-CLASSPATH="${CLASSPATH}:`/usr/bin/java-config --classpath=bsh`"
+CLASSPATH="${CLASSPATH}:`/usr/bin/java-config --classpath=bsh,bsf-2.3,servletapi-2.4,libreadline-java`"
if [ ! -f ${JAVA_HOME}/bin/java ] ; then
echo " "
diff --git a/dev-java/bsh/files/bsh.Interpreter b/dev-java/bsh/files/bsh.Interpreter
index ae49a7cd4631..ae80eeb5b9cc 100644
--- a/dev-java/bsh/files/bsh.Interpreter
+++ b/dev-java/bsh/files/bsh.Interpreter
@@ -2,13 +2,13 @@
# bsh.Interpreter Launch Script
# Author: Dylan Carlson
# May 2003
-# $Header: /var/cvsroot/gentoo-x86/dev-java/bsh/files/bsh.Interpreter,v 1.2 2004/07/18 02:50:53 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/bsh/files/bsh.Interpreter,v 1.3 2005/03/10 17:45:40 luckyduck Exp $
JAVA_HOME=`/usr/bin/java-config --jdk-home`
if [ -z "${JAVA_HOME}" ] ; then
JAVA_HOME=`/usr/bin/java-config --jre-home`
fi
-CLASSPATH="${CLASSPATH}:`/usr/bin/java-config --classpath=bsh`"
+CLASSPATH="${CLASSPATH}:`/usr/bin/java-config --classpath=bsh,bsf-2.3,servletapi-2.4,libreadline-java`"
if [ ! -f ${JAVA_HOME}/bin/java ] ; then
echo " "
diff --git a/dev-java/bsh/files/bsh2-build.patch b/dev-java/bsh/files/bsh2-build.patch
new file mode 100644
index 000000000000..4ab3112c47cb
--- /dev/null
+++ b/dev-java/bsh/files/bsh2-build.patch
@@ -0,0 +1,54 @@
+--- BeanShell/build.xml~ 2004-01-20 19:12:20.888557245 -0500
++++ BeanShell/build.xml 2004-01-20 19:13:36.150184282 -0500
+@@ -103,50 +103,7 @@
+ value="docs/manual/bshcommands-bshdoc.xml"/>
+
+ <!-- Begin Targets -->
+-
+- <!-- The javacc targets could be smarter... -->
+- <target name="checkjjt">
+- <uptodate property="jjtree.notRequired"
+- targetfile="${src-dir}/bsh/bsh.jj"
+- >
+- <srcfiles dir="${src-dir}/bsh" includes="bsh.jjt"/>
+- </uptodate>
+- </target>
+- <target name="checkjj">
+- <uptodate property="javacc.notRequired"
+- targetfile="${src-dir}/bsh/Parser.java"
+- >
+- <srcfiles dir="${src-dir}/bsh" includes="bsh.jj"/>
+- </uptodate>
+- </target>
+-
+- <!-- Create bsh.jj when bsh.jjt changes. -->
+- <target name="jjtree" unless="jjtree.notRequired" depends="checkjjt">
+- <java classname="jjtree"
+- fork="yes"
+- failonerror="yes" >
+- <arg
+- line="-OUTPUT_DIRECTORY=${src-dir}/bsh ${src-dir}/bsh/bsh.jjt"/>
+- <classpath>
+- <fileset refid="lib-fileset"/>
+- </classpath>
+- </java>
+- </target>
+-
+- <!-- Create Parser.java when bsh.jj changes. -->
+- <target name="javacc" unless="javacc.notRequired" depends="checkjj">
+- <java classname="javacc"
+- fork="yes"
+- failonerror="yes" >
+- <!-- classpath="${javacc-lib}" -->
+- <arg line="-OUTPUT_DIRECTORY=${src-dir}/bsh ${src-dir}/bsh/bsh.jj"/>
+- <classpath>
+- <fileset refid="lib-fileset"/>
+- </classpath>
+- </java>
+- </target>
+-
+- <target name="compile" depends="jjtree,javacc,builddir">
++ <target name="compile" depends="builddir">
+ <!-- exclude the ${excludes} as well as anything under a "bak" dir -->
+ <!--compiler="${build-compiler}"-->
+ <javac srcdir="${src-dir}:${test-src-dir}:${bsf-src-dir}"
diff --git a/dev-java/bsh/files/bsh2-readline.patch b/dev-java/bsh/files/bsh2-readline.patch
new file mode 100644
index 000000000000..f6aa7d4aee7d
--- /dev/null
+++ b/dev-java/bsh/files/bsh2-readline.patch
@@ -0,0 +1,151 @@
+--- BeanShell/src/bsh/Interpreter.java~ 2003-09-03 19:56:58.000000000 -0400
++++ BeanShell/src/bsh/Interpreter.java 2004-01-25 09:59:41.730059108 -0500
+@@ -38,6 +38,13 @@
+ import java.lang.reflect.Method;
+ import java.lang.reflect.InvocationTargetException;
+
++import bsh.util.BshCompleter;
++import bsh.util.NameCompletionTable;
++import bsh.classpath.ClassManagerImpl;
++import org.gnu.readline.Readline;
++import org.gnu.readline.ReadlineLibrary;
++import org.gnu.readline.ReadlineReader;
++
+ /**
+ The BeanShell script interpreter.
+
+@@ -394,10 +401,59 @@
+ else
+ src = System.in;
+
+- Reader in = new CommandLineReader( new InputStreamReader(src));
+- Interpreter interpreter =
+- new Interpreter( in, System.out, System.err, true );
+- interpreter.run();
++ Reader in = null;
++ boolean usingReadline = false;
++ String backingLib = System.getProperty("bsh.console.readlinelib"); System.out.println("backingLib is " + backingLib);
++ if (backingLib != null && backingLib.length() > 0) {
++ try {
++ File history = new File(System.getProperty("user.home") +
++ File.separator + ".bsh_history");
++ if (!history.exists()) {
++ try {
++ history.createNewFile();
++ } catch(IOException ioe) {
++ debug("Unable to create history " + history.getAbsolutePath());
++ }
++ }
++ ReadlineLibrary lib = ReadlineLibrary.byName(backingLib);
++ // should I wrap CommandLineReader around it?
++ if (history.canWrite() && history.canRead()) {
++ in = new ReadlineReader("bsh % ", history,lib);
++ } else {
++ in = new ReadlineReader("bsh % ",lib);
++ debug("Unable to read/write history " + history.getAbsolutePath());
++ }
++ } catch (IOException ioe) {
++ System.err.println("Unable to invoke ReadlineReader " +
++ "due to: " + ioe);
++ }
++ }
++ if (in == null)
++ in = new CommandLineReader( new InputStreamReader(src));
++ else
++ usingReadline = true;
++ Interpreter interpreter =
++ new Interpreter( in, System.out, System.err, true );
++ if (usingReadline) {
++ NameCompletionTable nct = new NameCompletionTable();
++ nct.add(interpreter.getNameSpace());
++
++ /** ClassManager does a lot of chatting to the stdout,
++ * so this has been commented out for the time being
++ **/
++
++// try {
++// BshClassManager bcm = BshClassManager.getClassManager();
++// if (bcm != null) {
++// nct.add(((ClassManagerImpl)bcm).getClassPath());
++// }
++// } catch(ClassPathException cpe) {
++// debug("classpath exception in name compl:" + cpe);
++// }
++
++ Readline.setCompleter(new BshCompleter(nct));
++ }
++ interpreter.run();
+ }
+ }
+
+@@ -445,7 +501,7 @@
+ System.err.flush();
+ Thread.yield(); // this helps a little
+
+- if ( interactive )
++ if ( interactive && !(in instanceof ReadlineReader))
+ print( getBshPrompt() );
+
+ eof = Line();
+@@ -548,10 +604,17 @@
+ }
+ }
+
+- if ( interactive && exitOnEOF )
+- System.exit(0);
++ if ( interactive && exitOnEOF ) {
++ /* should be done for all streams in general, but this
++ * ensures that the history for readline is flushed */
++ try {
++ in.close();
++ } catch (IOException ioe) {
++ }
++
++ System.exit(0);
+ }
+-
++ }
+ // begin source and eval
+
+ /**
+--- /dev/null 2003-10-19 02:52:03.000000000 -0400
++++ BeanShell/src/bsh/util/BshCompleter.java 2004-01-25 10:14:10.184458217 -0500
+@@ -0,0 +1,38 @@
++package bsh.util;
++
++import org.gnu.readline.ReadlineCompleter;
++
++/**
++ * An adapter for org.gnu.readline's ReadlineCompleter interface to map to
++ * BeanShell's NameCompleter interface.
++ *
++ * @see org.gnu.readline.ReadlineReader
++ * @version $Revision: 1.1 $
++ * @author Shane Celis <shane@terraspring.com>
++ **/
++public class BshCompleter implements ReadlineCompleter {
++
++ private NameCompletion completer;
++
++ /**
++ * Constructs a <code>ReadlineCompleter</code> out of a
++ * <code>NameCompleter</code> object.
++ **/
++ public BshCompleter(NameCompletion completer) {
++ this.completer = completer;
++ }
++
++ /**
++ * Returns String of completion if unambiguous, otherwise null
++ **/
++ public String completer(String text, int state) {
++ // Not sure what state is used for in ReadlineCompleter
++ String[] completions = completer.completeName(text);
++ if (completions.length == 1 && state == 0) {
++ return completions[0];
++ } else {
++ return null; // ambiguous result
++ }
++ }
++
++}
diff --git a/dev-java/bsh/files/digest-bsh-2.0_beta2 b/dev-java/bsh/files/digest-bsh-2.0_beta2
new file mode 100644
index 000000000000..eb60e56cfbba
--- /dev/null
+++ b/dev-java/bsh/files/digest-bsh-2.0_beta2
@@ -0,0 +1,2 @@
+MD5 f9c938446e5d97b74fd37f3bdbebf84a bsh-2.0b2-src.jar 1044734
+MD5 ebba3ce4fcf75c2835a3691cd588a446 beanshell-icon.png 29784