From e68d405c5d712af4387159df07e226217bdda049 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 6 Apr 2022 22:33:41 +0100 Subject: gentoo resync : 06.04.2022 --- dev-java/bsf/Manifest | 3 +- dev-java/bsf/bsf-2.4.0-r3.ebuild | 109 ++++++++++++++++++++++ dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch | 4 +- 3 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 dev-java/bsf/bsf-2.4.0-r3.ebuild (limited to 'dev-java/bsf') diff --git a/dev-java/bsf/Manifest b/dev-java/bsf/Manifest index 9e8e05088005..ce71b7ff5219 100644 --- a/dev-java/bsf/Manifest +++ b/dev-java/bsf/Manifest @@ -1,5 +1,6 @@ -AUX bsf-2.4.0-PyJavaInstance.patch 1650 BLAKE2B ceb772a69d454d1d85e05486d28d13824724813e7875f731a165aaf97bdd7f0c006baa927e849f82de7fa16228c3de5847f8d59013142f8df4823a951b42c785 SHA512 7946622658473ef4cf6b5921f58d224f7378cb00c345a748653306d2648a89b5ab3ed68786d09bbb170b95dc657f7f55501013c854536d6dfd6b38e6a1f3963e +AUX bsf-2.4.0-PyJavaInstance.patch 1654 BLAKE2B c6a0efc5c429adb7dd0ba6a7fd68e7b49ac13b98b1bd3998e70294dd4bf15516c719807c940fbf0b2203f6804878edce223b12b29cccefd790812db186a71cf1 SHA512 ceb07c1613c4a68654132a1b95d4db2494183cb86fe20be050bf4f57079fc1967ac76dda17b28df586d3fe34b696eef4d5790e6fe82a73d13c5a4f64267048f0 AUX bsf-2.4.0-build-properties.xml 1984 BLAKE2B 6db0c1ca7f899e95a0728d61b79ef6c0a1320ee747b5479c9c50a7bd258dc7fee0b6b569e3813f323cbc694d405f9af1d269dd5370ac82e6eca2bde5072d905d SHA512 d262daec432d7a22c217e24089f22e4c349be0487fd00a2e6992e77770a3699e7e2b5977e2108455d7f73c31b372d6a73febdff2856e256f93b25f3781e11679 DIST bsf-src-2.4.0.tar.gz 299749 BLAKE2B 41f3cfe77b1ccf6b78493df7f5f288b397234b3236977c4b7d2e6c85b330e40319474419f560eefa1632da4d0524593b8c3e0c66cd27b852749b1405c20df5a6 SHA512 a1e7564fd14abbf725fee75c4b0ba5f92d7eada0e242ad05897753bb4afe639d859c42cae1d684e8dd9151409d4cc68e1a422a70bc74d8016144cc30d03a2d43 EBUILD bsf-2.4.0-r2.ebuild 2703 BLAKE2B 21733021922b517a7de471aa3688899d169e3accffe5859cfa16d08844f2ef0c91ad658e7b1439d2ea95a5dab9f83f0ada0db63b865beb351286274ac1269ad0 SHA512 52c57333a2bc951dcc37de9d0ef113b671f0e52a9e9c2d4cd459b9cc0f54e241adcb51b6a4196c3331d855665fb3537afcf9e88a5672fee72101ba8c9eac4d2d +EBUILD bsf-2.4.0-r3.ebuild 2727 BLAKE2B 92e3e8b2e14b26f823abc503af43cd3baa86dfbea694a349cc8791615290b27e0479475faa31e13a692440dc211a7fe09688507e7486e34ea5e6135b82818ddb SHA512 e4ae153513c3a83b049099449afa137b18991651a656679268d7e7c5de8cdfda950024c54fb31f4b51f8c9d0f9a7ecead1c12ea3669c806abdf862686cee29f9 MISC metadata.xml 904 BLAKE2B 6e791ca9562cd211b97a13c79701155efa8b58be87f9af9c076017da0ca9f406a2ccc673eefb1d56db9cb2b9481fc77b01e9f762a98bd858199883ac06fde17e SHA512 36cd9c82eaa80842fae4c0f51ca63611d6a2b7a5724d755d0651edf069a67dcad3ce13789ca07cf2be353efb1c8b3a04e367be548925e29507155235749af66b diff --git a/dev-java/bsf/bsf-2.4.0-r3.ebuild b/dev-java/bsf/bsf-2.4.0-r3.ebuild new file mode 100644 index 000000000000..3310d4809efd --- /dev/null +++ b/dev-java/bsf/bsf-2.4.0-r3.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +JAVA_PKG_IUSE="doc examples source" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="Bean Script Framework" +HOMEPAGE="https://commons.apache.org/proper/commons-bsf/" +SRC_URI="mirror://apache/commons/bsf/source/${PN}-src-${PV}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="2.3" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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.8:*" + +DEPEND=" + ${CDEPEND} + >=virtual/jdk-1.8:*" + +JAVA_ANT_REWRITE_CLASSPATH="yes" + +src_prepare() { + default + 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. + eapply "${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 + + 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 index bef35c168e48..4e8c4de7b015 100644 --- a/dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch +++ b/dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch @@ -1,5 +1,5 @@ ---- 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 +--- a/src/org/apache/bsf/engines/jython/JythonEngine.java.orig 2015-07-04 08:00:17.120000000 +0000 ++++ b/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; -- cgit v1.2.3