From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- dev-java/bsf/Manifest | 7 ++ dev-java/bsf/bsf-2.4.0-r2.ebuild | 107 ++++++++++++++++++++++ dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch | 35 +++++++ dev-java/bsf/files/bsf-2.4.0-build-properties.xml | 44 +++++++++ dev-java/bsf/metadata.xml | 21 +++++ 5 files changed, 214 insertions(+) create mode 100644 dev-java/bsf/Manifest create mode 100644 dev-java/bsf/bsf-2.4.0-r2.ebuild create mode 100644 dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch create mode 100644 dev-java/bsf/files/bsf-2.4.0-build-properties.xml create mode 100644 dev-java/bsf/metadata.xml (limited to 'dev-java/bsf') diff --git a/dev-java/bsf/Manifest b/dev-java/bsf/Manifest new file mode 100644 index 000000000000..fabcc6685d19 --- /dev/null +++ b/dev-java/bsf/Manifest @@ -0,0 +1,7 @@ +AUX bsf-2.4.0-PyJavaInstance.patch 1650 SHA256 0996789ba490c7d5b4b3b318c4cd99a32b2da39c6c1da88171ee28e6de3b5c00 SHA512 7946622658473ef4cf6b5921f58d224f7378cb00c345a748653306d2648a89b5ab3ed68786d09bbb170b95dc657f7f55501013c854536d6dfd6b38e6a1f3963e WHIRLPOOL 7a0c0c1e07e5fc1a92647dcd0d51a54f31a05f8c3bdb96c53180f649598ab0db7d1f14cd9eaecf2ecca544edda04f10c261d44ff75a705803dc49d1ffc960183 +AUX bsf-2.4.0-build-properties.xml 1984 SHA256 517b97081b13f4ac597a56c1d09d4a4961edca316429becf5fe3d440b3770c12 SHA512 d262daec432d7a22c217e24089f22e4c349be0487fd00a2e6992e77770a3699e7e2b5977e2108455d7f73c31b372d6a73febdff2856e256f93b25f3781e11679 WHIRLPOOL e61433d19cac575366316bf387c26cc5b645ddb63b1d60724ad082ea2cfef0b302af56420c270f50eed69228feb374e655545058871f2f6671fb3f342f6bfdbc +DIST bsf-src-2.4.0.tar.gz 299749 SHA256 5ab58cf5738c144f4d85a4a442c2f33be2c4c502dca6e29e0c570c2a51ae6ae9 SHA512 a1e7564fd14abbf725fee75c4b0ba5f92d7eada0e242ad05897753bb4afe639d859c42cae1d684e8dd9151409d4cc68e1a422a70bc74d8016144cc30d03a2d43 WHIRLPOOL 95ef77a21ad3ac013d354222655b3d4ff42ef7cd154f8529d8798c6b226385adc231edc5daa1bf2575111765fe2ae376d9071c496da050ab9ce73a569330ee84 +EBUILD bsf-2.4.0-r2.ebuild 2723 SHA256 10a2496b48cb7796f173e2c61e5bd13fbf7187af6804872d26ebbc15eae6bae5 SHA512 6b53ba359ac3700336d89886d1bc4dcc30632cd40ff4d618741a9fd030ec9d9f3f4d76acfb7ceae6603cce23e1c6e242e69ef24737d8da4be22a48a8bba0165a WHIRLPOOL d94a4b91cf18b9b9a9a112daa75dea59b9d05f01115e60e5a9f964891e184ab670a9eb48252ca8892254d074aad90b09dd3bfa537a81b7ad1115e1f4e89bea44 +MISC ChangeLog 4107 SHA256 0fd452378e77db81798d12e42acfb21ee761984ec0767b8077351124616dac47 SHA512 7846e60bb2dd5dde5d64190e564d68982c843c0dfe68fe029aaf0c11962a294349f252387368bc7cfabe3ead7910ee52a21cab2b09a1bf809e2137e7894f1a7a WHIRLPOOL fea781e1af02c29a9da2280c5aa018f12ce80ca6aabf020874c0fb0a567bcce3f211b2b2e0f0ff9c0d52a71424cc1b3319dab059f8eb185a54703d8ae424e5a4 +MISC ChangeLog-2015 8146 SHA256 238ce997abc89158f11d199a6029f0ae9b8fd2d9490e41870464f7eda1aeef28 SHA512 c42f5448e935c89e8d18ac50f831ef05365d17a6d39d90fc67a4603df5dc32f5a59b21fa38a8431507d80b61398873298b57205605b83b4c455d0acf5bcda051 WHIRLPOOL 460e0856ca63675297d4ac72751b0789182e21332319f0913dd59d32716e4f4170929f35c011339bd8cb9aec5819fd1bdea6edcc756d8b5ea00dc4fa7b403bde +MISC metadata.xml 903 SHA256 1b4cc0ddf93a7457ec455f51b61318303a586fa3558be6644d1182ebaa8c6df5 SHA512 f55f803d1d0fc7a1ce20ea5d46ee89afe46b738362a2b78adfd5f6a4e9d09360f3522de148c56a9b2fae9370df1ed003611d7b68b8ba8e2e4cd7ff5683696abf WHIRLPOOL 0188fc3885f3aac94b29f8266ac26d5954305facf43932e7f6621c2f5219fa27028c7057632761cebe765240debb148918609bc23b4556b9b925c68f0b212825 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..d079cbe696f2 --- /dev/null +++ b/dev-java/bsf/bsf-2.4.0-r2.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 ppc64 x86 ~x86-fbsd ~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=" + python? ( + dev-java/jython:2.7 + ) + javascript? ( + dev-java/rhino:1.6 + ) + tcl? ( + dev-java/jacl:0 + ) + dev-java/xalan:0 + dev-java/commons-logging:0" + +RDEPEND=" + ${CDEPEND} + >=virtual/jre-1.6" + +DEPEND=" + ${CDEPEND} + >=virtual/jdk-1.6" + +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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev-java/bsf/metadata.xml b/dev-java/bsf/metadata.xml new file mode 100644 index 000000000000..688e2583cfb6 --- /dev/null +++ b/dev-java/bsf/metadata.xml @@ -0,0 +1,21 @@ + + + + + java@gentoo.org + Java + + + +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. + + -- cgit v1.2.3