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/bsf
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/bsf')
-rw-r--r--dev-java/bsf/Manifest1
-rw-r--r--dev-java/bsf/bsf-2.4.0-r1.ebuild89
-rw-r--r--dev-java/bsf/bsf-2.4.0-r2.ebuild97
-rw-r--r--dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch35
-rw-r--r--dev-java/bsf/files/bsf-2.4.0-build-properties.xml44
-rw-r--r--dev-java/bsf/metadata.xml19
6 files changed, 285 insertions, 0 deletions
diff --git a/dev-java/bsf/Manifest b/dev-java/bsf/Manifest
new file mode 100644
index 000000000000..9bd40a9f5d19
--- /dev/null
+++ b/dev-java/bsf/Manifest
@@ -0,0 +1 @@
+DIST bsf-src-2.4.0.tar.gz 299749 SHA256 5ab58cf5738c144f4d85a4a442c2f33be2c4c502dca6e29e0c570c2a51ae6ae9 SHA512 a1e7564fd14abbf725fee75c4b0ba5f92d7eada0e242ad05897753bb4afe639d859c42cae1d684e8dd9151409d4cc68e1a422a70bc74d8016144cc30d03a2d43 WHIRLPOOL 95ef77a21ad3ac013d354222655b3d4ff42ef7cd154f8529d8798c6b226385adc231edc5daa1bf2575111765fe2ae376d9071c496da050ab9ce73a569330ee84
diff --git a/dev-java/bsf/bsf-2.4.0-r1.ebuild b/dev-java/bsf/bsf-2.4.0-r1.ebuild
new file mode 100644
index 000000000000..5bfdfc3fd626
--- /dev/null
+++ b/dev-java/bsf/bsf-2.4.0-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="1"
+JAVA_PKG_IUSE="doc examples source"
+inherit java-pkg-2 eutils java-ant-2
+
+DESCRIPTION="Bean Script Framework"
+HOMEPAGE="http://commons.apache.org/bsf/"
+SRC_URI="mirror://apache/jakarta/bsf/source/${PN}-src-${PV}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="2.3"
+KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+# If you add new ones, add them to ant-apache-bsf too for use dependencies
+IUSE="javascript python tcl"
+
+COMMON_DEP="dev-java/commons-logging:0
+ dev-java/xalan:0
+ python? ( >=dev-java/jython-2.1-r5:0 )
+ javascript? ( dev-java/rhino:1.6 )
+ tcl? ( dev-java/jacl:0 )"
+RDEPEND=">=virtual/jre-1.4
+ ${COMMON_DEP}"
+DEPEND=">=virtual/jdk-1.4
+ ${COMMON_DEP}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ rm -v lib/*.jar || die
+ rm samples/*/*.class || die
+
+ java-ant_ignore-system-classes
+ java-ant_rewrite-classpath
+
+ # somebody forgot to add them to source tarball... fetched from svn
+ cp "${FILESDIR}/${P}-build-properties.xml" build-properties.xml || die
+}
+
+src_compile() {
+ local pkgs="commons-logging,xalan"
+ local antflags="-Dxalan.present=true"
+ if use python; then
+ antflags="${antflags} -Djython.present=true"
+ pkgs="${pkgs},jython"
+ fi
+ if use javascript; then
+ antflags="${antflags} -Drhino.present=true"
+ pkgs="${pkgs},rhino-1.6"
+ fi
+ if use tcl; then
+ antflags="${antflags} -Djacl.present=true"
+ pkgs="${pkgs},jacl"
+ fi
+
+ local cp="$(java-pkg_getjars ${pkgs})"
+ eant -Dgentoo.classpath="${cp}" ${antflags} jar
+ # stupid clean
+ mv build/lib/${PN}.jar "${S}" || die
+ use doc && eant -Dgentoo.classpath="${cp}" ${antflags} javadocs
+}
+
+# does not have any, overwrite the one from java-pkg-2
+src_test() {
+ true;
+}
+
+src_install() {
+ java-pkg_dojar ${PN}.jar
+
+ java-pkg_dolauncher ${PN} --main org.apache.bsf.Main
+
+ dodoc CHANGES.txt NOTICE.txt README.txt RELEASE-NOTE.txt TODO.txt || die
+
+ use doc && java-pkg_dojavadoc build/javadocs
+ use examples && java-pkg_doexamples samples
+ use source && java-pkg_dosrc src/org
+
+ java-pkg_register-optional-dependency bsh,groovy-1,jruby
+}
+
+pkg_postinst() {
+ elog "Support for python, javascript, and tcl is controlled via USE flags."
+ elog "Also, following languages can be supported just by installing"
+ elog "respective package with USE=\"bsf\": BeanShell (dev-java/bsh),"
+ elog "Groovy (dev-java/groovy) and JRuby (dev-java/jruby)"
+}
diff --git a/dev-java/bsf/bsf-2.4.0-r2.ebuild b/dev-java/bsf/bsf-2.4.0-r2.ebuild
new file mode 100644
index 000000000000..7185636500e5
--- /dev/null
+++ b/dev-java/bsf/bsf-2.4.0-r2.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+JAVA_PKG_IUSE="doc examples source"
+
+inherit java-pkg-2 eutils java-ant-2
+
+DESCRIPTION="Bean Script Framework"
+HOMEPAGE="http://commons.apache.org/bsf/"
+SRC_URI="mirror://apache/jakarta/bsf/source/${PN}-src-${PV}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="2.3"
+KEYWORDS="amd64 x86 ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+# If you add new ones, add them to ant-apache-bsf too for use dependencies
+IUSE="javascript python tcl"
+
+CDEPEND="dev-java/commons-logging:0
+ dev-java/xalan:0
+ python? ( dev-java/jython:2.7 )
+ javascript? ( dev-java/rhino:1.6 )
+ tcl? ( dev-java/jacl:0 )"
+RDEPEND=">=virtual/jre-1.6
+ ${CDEPEND}"
+DEPEND=">=virtual/jdk-1.6
+ ${CDEPEND}"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+
+java_prepare() {
+ rm -v lib/*.jar || die
+ rm samples/*/*.class || die
+
+ java-ant_ignore-system-classes
+
+ # somebody forgot to add them to source tarball... fetched from svn
+ cp "${FILESDIR}/${P}-build-properties.xml" build-properties.xml || die
+
+ # Silence javadoc.
+ java-ant_xml-rewrite -f build.xml -c \
+ -e javadoc \
+ -a failonerror \
+ -v no
+
+ # http://bugs.jython.org/issue1814
+ # Also, bsf is an old project (2011) and hasn't officially taken the leap to
+ # jython-2.7. This patch fixes the issue.
+ epatch "${FILESDIR}"/${P}-PyJavaInstance.patch
+}
+
+src_compile() {
+ local pkgs="commons-logging,xalan"
+ local antflags="-Dxalan.present=true"
+
+ if use python; then
+ antflags="${antflags} -Djython.present=true"
+ pkgs="${pkgs},jython-2.7"
+ fi
+ if use javascript; then
+ antflags="${antflags} -Drhino.present=true"
+ pkgs="${pkgs},rhino-1.6"
+ fi
+ if use tcl; then
+ antflags="${antflags} -Djacl.present=true"
+ pkgs="${pkgs},jacl"
+ fi
+
+ local cp="$(java-pkg_getjars ${pkgs})"
+ eant -Dgentoo.classpath="${cp}" ${antflags} jar
+
+ # stupid clean
+ mv build/lib/${PN}.jar "${S}" || die
+ use doc && eant -Dgentoo.classpath="${cp}" ${antflags} javadocs
+}
+
+src_install() {
+ java-pkg_dojar ${PN}.jar
+
+ java-pkg_dolauncher ${PN} --main org.apache.bsf.Main
+
+ dodoc CHANGES.txt NOTICE.txt README.txt RELEASE-NOTE.txt TODO.txt || die
+
+ use doc && java-pkg_dojavadoc build/javadocs
+ use examples && java-pkg_doexamples samples
+ use source && java-pkg_dosrc src/org
+
+ java-pkg_register-optional-dependency bsh,groovy-1,jruby
+}
+
+pkg_postinst() {
+ elog "Support for python, javascript, and tcl is controlled via USE flags."
+ elog "Also, following languages can be supported just by installing"
+ elog "respective package with USE=\"bsf\": BeanShell (dev-java/bsh),"
+ elog "Groovy (dev-java/groovy) and JRuby (dev-java/jruby)"
+}
diff --git a/dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch b/dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch
new file mode 100644
index 000000000000..bef35c168e48
--- /dev/null
+++ b/dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch
@@ -0,0 +1,35 @@
+--- src/org/apache/bsf/engines/jython/JythonEngine.java.orig 2015-07-04 08:00:17.120000000 +0000
++++ src/org/apache/bsf/engines/jython/JythonEngine.java 2015-07-04 08:04:55.230000000 +0000
+@@ -26,7 +26,7 @@
+ import org.apache.bsf.util.BSFFunctions;
+ import org.python.core.Py;
+ import org.python.core.PyException;
+-import org.python.core.PyJavaInstance;
++import org.python.core.PyJavaType;
+ import org.python.core.PyObject;
+ import org.python.util.InteractiveInterpreter;
+
+@@ -110,8 +110,9 @@
+
+ Object result = interp.eval ("bsf_temp_fn()");
+
+- if (result != null && result instanceof PyJavaInstance)
+- result = ((PyJavaInstance)result).__tojava__(Object.class);
++ if (result != null && result instanceof PyJavaType)
++ //result = ((PyJavaInstance)result).__tojava__(Object.class);
++ result = PyJavaType.wrapJavaObject(result).__tojava__(Object.class);
+ return result;
+ } catch (PyException e) {
+ throw new BSFException (BSFException.REASON_EXECUTION_ERROR,
+@@ -126,8 +127,9 @@
+ Object script) throws BSFException {
+ try {
+ Object result = interp.eval (byteify(script.toString ()));
+- if (result != null && result instanceof PyJavaInstance)
+- result = ((PyJavaInstance)result).__tojava__(Object.class);
++ if (result != null && result instanceof PyJavaType)
++ //result = ((PyJavaInstance)result).__tojava__(Object.class);
++ result = PyJavaType.wrapJavaObject(result).__tojava__(Object.class);
+ return result;
+ } catch (PyException e) {
+ throw new BSFException (BSFException.REASON_EXECUTION_ERROR,
diff --git a/dev-java/bsf/files/bsf-2.4.0-build-properties.xml b/dev-java/bsf/files/bsf-2.4.0-build-properties.xml
new file mode 100644
index 000000000000..6d716ed00563
--- /dev/null
+++ b/dev-java/bsf/files/bsf-2.4.0-build-properties.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project name="props">
+ <property name="project.name" value="bsf"/>
+ <property name="project.fullName" value="Bean Scripting Framework"/>
+ <property name="project.version" value="2.4.0"/>
+ <property name="project.debug" value="on"/>
+ <property name="project.deprecation" value="on"/>
+
+ <property name="build.file" value="build.xml"/>
+ <property name="build.properties.file" value="build-properties.xml"/>
+ <property name="build.dir" value="build"/>
+ <property name="build.dest" value="build/classes"/>
+ <property name="build.lib" value="build/lib"/>
+ <property name="build.lib.win32" value="build/lib/win32"/>
+ <property name="build.samples" value="build/samples"/>
+ <property name="build.samples.calc" value="build/samples/calc"/>
+ <property name="build.samples.scriptedui" value="build/samples/scriptedui"/>
+ <property name="build.samples.xsl" value="build/samples/xsl"/>
+ <property name="build.javadocs" value="build/javadocs"/>
+ <property name="build.tests" value="build/testcases" />
+
+ <property name="dist.dir" value="dist"/>
+ <property name="dist.dir.root" value="${dist.dir}/${project.name}-${project.version}"/>
+ <property name="dist.bin.file" value="${dist.dir}/${project.name}-bin-${project.version}"/>
+ <property name="dist.src.file" value="${dist.dir}/${project.name}-src-${project.version}"/>
+
+ <property name="packages" value="org.apache.*"/>
+
+ <property name="samples.dir" value="samples"/>
+
+ <property name="site.src" location="xdocs"/>
+ <property name="site.dest" location="docs"/>
+ <property name="site.projectFile" value="stylesheets/project.xml"/>
+
+ <property name="source.level" value="1.4" />
+
+ <property name="src.dir" value="src"/>
+
+ <property name="templ.path" location="xdocs/stylesheets"/>
+
+ <property name="tests.dir" value="test"/>
+
+ <property name="velocity.props" location="${site.src}/velocity.properties"/>
+</project>
diff --git a/dev-java/bsf/metadata.xml b/dev-java/bsf/metadata.xml
new file mode 100644
index 000000000000..abc882c6cece
--- /dev/null
+++ b/dev-java/bsf/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+<herd>java</herd>
+
+<longdescription>
+Bean Scripting Framework (BSF) is a set of Java classes which provides
+scripting language support within Java applications, and access to Java
+objects and methods from scripting languages. BSF allows one to write
+JSPs in languages other than Java while providing access to the Java
+class library. In addition, BSF permits any Java application to be
+implemented in part (or dynamically extended) by a language that is
+embedded within it. This is achieved by providing an API that permits
+calling scripting language engines from within Java, as well as an
+object registry that exposes Java objects to these scripting language
+engines.
+</longdescription>
+</pkgmetadata>