From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EAA1C15808B for ; Mon, 28 Mar 2022 12:12:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 26452E08FB; Mon, 28 Mar 2022 12:12:09 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E31FDE08FB for ; Mon, 28 Mar 2022 12:12:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F3D4C34136A for ; Mon, 28 Mar 2022 12:12:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 93E64177 for ; Mon, 28 Mar 2022 12:12:06 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1648469521.b9d7cce3cc7466fe80b1715cbc1c6c7d3ce66099.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/bsf/, dev-java/bsf/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/bsf/bsf-2.4.0-r3.ebuild dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch X-VCS-Directories: dev-java/bsf/ dev-java/bsf/files/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: b9d7cce3cc7466fe80b1715cbc1c6c7d3ce66099 X-VCS-Branch: master Date: Mon, 28 Mar 2022 12:12:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f2a730f6-bbe1-46b3-97ee-726ca366644c X-Archives-Hash: e908da683864f6c13675362c3684aa27 commit: b9d7cce3cc7466fe80b1715cbc1c6c7d3ce66099 Author: Volkmar W. Pogatzki pogatzki net> AuthorDate: Sun Mar 27 10:12:13 2022 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Mon Mar 28 12:12:01 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9d7cce3 dev-java/bsf: min java 1.8:* Bug: https://bugs.gentoo.org/836266 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Volkmar W. Pogatzki pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/24769 Signed-off-by: Florian Schmaus gentoo.org> dev-java/bsf/bsf-2.4.0-r3.ebuild | 109 ++++++++++++++++++++++ dev-java/bsf/files/bsf-2.4.0-PyJavaInstance.patch | 4 +- 2 files changed, 111 insertions(+), 2 deletions(-) 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;