diff options
author | 2015-07-04 08:26:22 +0000 | |
---|---|---|
committer | 2015-07-04 08:26:22 +0000 | |
commit | 410ab1e715480bc90fc431cd12d997238e03d11e (patch) | |
tree | 6e1ac406833044f910834b417bc0f0879d0ca332 /dev-java/bsf | |
parent | Create stable candidate. (diff) | |
download | gentoo-2-410ab1e715480bc90fc431cd12d997238e03d11e.tar.gz gentoo-2-410ab1e715480bc90fc431cd12d997238e03d11e.tar.bz2 gentoo-2-410ab1e715480bc90fc431cd12d997238e03d11e.zip |
EAPI 5 bump. dev-java/jython SLOT bump from :0 to :2.7. Patch to add missing imports due to jython:2.7 move. Drop ppc+ppc64. Fix bug 553892.
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 93491BB8)
Diffstat (limited to 'dev-java/bsf')
-rw-r--r-- | dev-java/bsf/ChangeLog | 11 | ||||
-rw-r--r-- | dev-java/bsf/bsf-2.4.0-r2.ebuild | 97 | ||||
-rw-r--r-- | dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch | 35 |
3 files changed, 141 insertions, 2 deletions
diff --git a/dev-java/bsf/ChangeLog b/dev-java/bsf/ChangeLog index c3f4a5b5459f..4bdac85047a3 100644 --- a/dev-java/bsf/ChangeLog +++ b/dev-java/bsf/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-java/bsf -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/bsf/ChangeLog,v 1.58 2011/12/31 13:27:47 sera Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/bsf/ChangeLog,v 1.59 2015/07/04 08:26:22 monsieurp Exp $ + +*bsf-2.4.0-r2 (04 Jul 2015) + + 04 Jul 2015; Patrice Clement <monsieurp@gentoo.org> +bsf-2.4.0-r2.ebuild, + +files/bsf-2.4.0-PyJavaInstance.patch: + EAPI 5 bump. dev-java/jython SLOT bump from :0 to :2.7. Patch to add missing + imports due to jython:2.7 move. Drop ppc+ppc64. Fix bug 553892. 31 Dec 2011; Ralph Sennhauser <sera@gentoo.org> bsf-2.4.0-r1.ebuild: Drop ia64 support #345433 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..e38d9670d14a --- /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 +# $Header: /var/cvsroot/gentoo-x86/dev-java/bsf/bsf-2.4.0-r2.ebuild,v 1.1 2015/07/04 08:26:22 monsieurp Exp $ + +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, |