summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-java/bsh
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-java/bsh')
-rw-r--r--dev-java/bsh/Manifest2
-rw-r--r--dev-java/bsh/bsh-2.0_beta4-r4.ebuild68
-rw-r--r--dev-java/bsh/files/bsh2-readline.patch151
-rw-r--r--dev-java/bsh/files/bsh2.0b4-build.patch53
-rw-r--r--dev-java/bsh/metadata.xml5
5 files changed, 279 insertions, 0 deletions
diff --git a/dev-java/bsh/Manifest b/dev-java/bsh/Manifest
new file mode 100644
index 000000000000..d0f694b078b5
--- /dev/null
+++ b/dev-java/bsh/Manifest
@@ -0,0 +1,2 @@
+DIST beanshell-icon.png 29784 SHA256 a3df458c6e892ec328e8865f081da8c3f3d9ff4c979ecb701a57fc7cedacdef9 SHA512 731cc0e39e69ef84230e2cea8f9eaf00f80b607c70d83f767d600d8f76fae024516e9b97a988bfcb1ad963da279a6b97ad2559bb8213dc9aaa23c65aa5946d45 WHIRLPOOL 018f8915426bb77bcb62e9f811a51436c6467e01b4d24fc4e2ddb92a3635c18ab1ba7f3154e74fdaccd1621a81b7fc735e53b7cb09caffcd8c103f5462e71e77
+DIST bsh-2.0b4-src.jar 1636723 SHA256 beaa29a8bcbd00db2563a5a9f0fdcfa8ae268e959880baef0a59167ff1729f8e SHA512 867e960420f8ad0f49ffa1c7cb291ddc64e75dc20f91bd33b91151e9ba96033250b94efbf8e3d4b8d4f8c7193017efcb88840536080809ecb45e2ee0fb8e9040 WHIRLPOOL 1dc8f6d3600ca22fbf993ccb6aafa3954b1d2127f0940cbe84468aa8f323ad69b02c2a3619435ee0e6e1024e1784e57e138f781314ac735f01b909629e074109
diff --git a/dev-java/bsh/bsh-2.0_beta4-r4.ebuild b/dev-java/bsh/bsh-2.0_beta4-r4.ebuild
new file mode 100644
index 000000000000..706b616c6e94
--- /dev/null
+++ b/dev-java/bsh/bsh-2.0_beta4-r4.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 eutils java-ant-2
+
+MY_PV=${PV/_beta/b}
+MY_DIST=${PN}-${MY_PV}-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="amd64 ppc ppc64 x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="bsf readline"
+# some tests fail but ant doesn't fail
+RESTRICT="test"
+
+RDEPEND=">=virtual/jdk-1.4
+ java-virtuals/servlet-api:3.0
+ readline? ( dev-java/libreadline-java:0 )"
+DEPEND="${RDEPEND}
+ bsf? ( dev-java/bsf:2.3 )"
+
+S=${WORKDIR}/BeanShell-${MY_PV}
+
+src_unpack() {
+ jar xf "${DISTDIR}"/${MY_DIST} || die "failed to unpack"
+}
+
+java_prepare() {
+ find "${WORKDIR}" -name '*.jar' -delete || die
+
+ epatch "${FILESDIR}/bsh${MY_PV}-build.patch"
+ use readline && epatch "${FILESDIR}/bsh2-readline.patch"
+
+ java-pkg_jar-from --into lib servlet-api-3.0
+ use readline && java-pkg_jar-from --into lib libreadline-java
+ use bsf && java-pkg_jar-from --into lib --build-only bsf-2.3
+}
+
+src_compile() {
+ eant $(use bsf && echo -Dexclude-bsf=) jarall $(use_doc)
+}
+
+src_test() {
+ eant test
+}
+
+src_install() {
+ java-pkg_newjar dist/${P/_beta/b}.jar
+
+ java-pkg_dolauncher bsh-console --main bsh.Console
+ java-pkg_dolauncher bsh-interpreter --main bsh.Interpreter
+
+ use doc && java-pkg_dojavadoc javadoc
+ use source && java-pkg_dosrc src/bsh
+
+ newicon "${DISTDIR}"/beanshell-icon.png beanshell.png
+
+ make_desktop_entry bsh-console "BeanShell Prompt" beanshell
+}
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/bsh2.0b4-build.patch b/dev-java/bsh/files/bsh2.0b4-build.patch
new file mode 100644
index 000000000000..3899d78cc648
--- /dev/null
+++ b/dev-java/bsh/files/bsh2.0b4-build.patch
@@ -0,0 +1,53 @@
+--- build.xml 2005-06-22 18:01:39.000000000 +0200
++++ build.xml 2005-06-22 18:02:48.000000000 +0200
+@@ -108,49 +108,7 @@
+
+ <!-- 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}:${classgen-src-dir}"
diff --git a/dev-java/bsh/metadata.xml b/dev-java/bsh/metadata.xml
new file mode 100644
index 000000000000..250f2d1940ea
--- /dev/null
+++ b/dev-java/bsh/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+</pkgmetadata>