summaryrefslogtreecommitdiff
path: root/dev-java/bsh
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-java/bsh
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-java/bsh')
-rw-r--r--dev-java/bsh/Manifest1
-rw-r--r--dev-java/bsh/bsh-2.1.1-r2.ebuild123
-rw-r--r--dev-java/bsh/files/bsh-2.1.1-skip-tests.patch119
-rw-r--r--dev-java/bsh/metadata.xml9
4 files changed, 252 insertions, 0 deletions
diff --git a/dev-java/bsh/Manifest b/dev-java/bsh/Manifest
new file mode 100644
index 000000000000..f4efff50c5dc
--- /dev/null
+++ b/dev-java/bsh/Manifest
@@ -0,0 +1 @@
+DIST bsh-2.1.1.tar.gz 1922883 BLAKE2B d60ebfab96f81a17120733887468571dd991dce663d725d9bee2dc44146e320d36600be70a3b7f76516645030d40fcda17db70989d54e98ffdc69c91738bcaf1 SHA512 585fcb9fdc8c36063a7d4dfe9a909e68b61d611f023731c955b7ced3f894cb6c48b0d463735e6825cb6f0181ba97902279212d285e325267aa533490e0bbfe00
diff --git a/dev-java/bsh/bsh-2.1.1-r2.ebuild b/dev-java/bsh/bsh-2.1.1-r2.ebuild
new file mode 100644
index 000000000000..d61fba244315
--- /dev/null
+++ b/dev-java/bsh/bsh-2.1.1-r2.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.apache-extras.beanshell:bsh:2.1.1"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="A small embeddable Java source interpreter"
+HOMEPAGE="https://github.com/beanshell/beanshell"
+SRC_URI="https://github.com/beanshell/beanshell/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/beanshell-${PV}"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 arm64 ppc64"
+
+# There was 1 failure:
+# 1) do_not_access_non_open_methods(bsh.Java_9_Test)
+# bsh.TargetError: Sourced file: inline evaluation of: ``import java.net.URL;
+PROPERTIES="test_network"
+RESTRICT="test"
+
+CP_DEPEND="
+ dev-java/bsf:2.3
+ dev-java/jakarta-servlet-api:4
+"
+
+# restrict to max Java 25
+# https://bugs.openjdk.org/browse/JDK-8359053
+DEPEND="
+ ${CP_DEPEND}
+ <virtual/jdk-26:*
+"
+
+RDEPEND="
+ ${CP_DEPEND}
+ >=virtual/jre-1.8:*
+"
+
+DOCS=(
+ CHANGES.md
+ NOTICE
+ README.md
+)
+
+PATCHES=( "${FILESDIR}/bsh-2.1.1-skip-tests.patch" )
+
+JAVA_LAUNCHER_FILENAME="bsh-console"
+JAVA_MAIN_CLASS="bsh.Console"
+JAVA_RESOURCE_DIRS="resources/src"
+JAVA_SRC_DIR=( src bsf/src engine/src )
+JAVA_TEST_GENTOO_CLASSPATH="junit-4"
+JAVA_TEST_SRC_DIR="tests"
+
+src_prepare() {
+ default #780585
+ java-pkg-2_src_prepare
+ java-pkg_clean ! -path "./tests/test-scripts/*"
+
+ # These classes are not in upstream jar file
+ mkdir -p tests/src/bsh/engine || die
+ mv {engine,tests}/src/bsh/TestBshScriptEngine.java || die
+ mv {,tests/}src/bsh/JThis.java || die
+
+ # java-pkg-simple.eclass wants resources in JAVA_RESOURCE_DIRS
+ mkdir resources || die
+ find src -type f \
+ ! -name '*.java' \
+ ! -name 'bsh.jj*' \
+ ! -name '*.scripted' \
+ ! -name '*.txt' \
+ ! -name '*.xml' \
+ ! -name '.errLog' \
+ ! -name 'index.html' \
+ ! -name 'Changes.html' \
+ ! -name 'CodeMap.html' \
+ ! -name 'Manifest.*' \
+ | xargs cp --parent -t resources || die
+}
+
+src_test() {
+ # tests/junitTests/src/bsh/Issue_55_Test.java:47: error: cannot find symbol
+ # final Object scriptEngineResult = new BshScriptEngineFactory().getScriptEngine().eval(script);
+ # ^
+ # symbol: class BshScriptEngineFactory
+ # location: class Issue_55_Test
+ rm tests/junitTests/src/bsh/Issue_55_Test.java || die
+
+ # We add 3 test classes which are not covered by the default test selection of java-pkg-simple
+ # We skip "OldScriptsTest" and 4 failing test classes.
+ # Test failures are documeted in bug #903519.
+ local JAVA_TEST_RUN_ONLY=$(find tests/junitTests/src \
+ -type f \
+ ! -name 'OldScriptsTest.java' \
+ ! -name 'Class3_Test.java' \
+ ! -name 'Class13Test.java' \
+ ! -name 'Issue_7_Test.java' \
+ ! -name 'Issue_8_Test.java' \
+ \( \
+ -name "*Test.java" \
+ -o -name "AnnotationsParsing.java" \
+ -o -name "GoogleReports.java" \
+ -o -name "Namespace_chaining.java" \
+ \) -printf '%P\n')
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
+
+ local vm_version="$(java-config -g PROVIDES_VERSION)"
+ if ver_test "${vm_version}" -ge 17; then
+ JAVA_TEST_EXTRA_ARGS+=( --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED)
+ fi
+ java-pkg-simple_src_test
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ # The eclass installs only the main launcher.
+ java-pkg_dolauncher "${PN}-interpreter" --main bsh.Interpreter
+}
diff --git a/dev-java/bsh/files/bsh-2.1.1-skip-tests.patch b/dev-java/bsh/files/bsh-2.1.1-skip-tests.patch
new file mode 100644
index 000000000000..23c68e041fad
--- /dev/null
+++ b/dev-java/bsh/files/bsh-2.1.1-skip-tests.patch
@@ -0,0 +1,119 @@
+Test failures are documeted in https://bugs.gentoo.org/903519
+--- a/tests/junitTests/src/bsh/Project_Coin_Test.java
++++ b/tests/junitTests/src/bsh/Project_Coin_Test.java
+@@ -26,6 +26,7 @@
+ package bsh;
+
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.junit.experimental.categories.Category;
+ import org.junit.runner.RunWith;
+
+@@ -48,6 +49,7 @@ public class Project_Coin_Test {
+
+ @Test
+ @Category(ProjectCoinFeature.class)
++ @Ignore
+ public void integer_literal_enhancements() throws Exception {
+ final Interpreter interpreter = new Interpreter();
+ assertEquals("0x99", 153, interpreter.eval("return 0x99;"));
+@@ -61,6 +63,7 @@ public class Project_Coin_Test {
+
+ @Test
+ @Category(ProjectCoinFeature.class)
++ @Ignore
+ public void diamond_operator() throws Exception {
+ eval("List<String> list = new ArrayList<>()");
+ final Object anagrams = eval(
+@@ -98,6 +101,7 @@ public class Project_Coin_Test {
+
+ @Test
+ @Category(Project_Coin_Test.class)
++ @Ignore
+ public void try_with_resource() throws Exception {
+ final Interpreter interpreter = new Interpreter();
+ final AtomicBoolean closed = new AtomicBoolean(false);
+--- a/tests/junitTests/src/bsh/NumberLiteralTest.java
++++ b/tests/junitTests/src/bsh/NumberLiteralTest.java
+@@ -1,6 +1,7 @@
+ package bsh;
+
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.junit.runner.RunWith;
+
+ import static bsh.TestUtil.eval;
+@@ -22,6 +23,7 @@ public class NumberLiteralTest {
+ }
+
+ @Test
++ @Ignore
+ public void integer_literal_enhancements_binary() throws Exception {
+ assertEquals("0b10011001", 153, eval("return 0b10011001;"));
+ }
+@@ -49,11 +51,13 @@ public class NumberLiteralTest {
+ }
+
+ @Test
++ @Ignore
+ public void parsing_large_hex_literal() throws Exception {
+ assertEquals(0xff000000L, eval("return 0xff000000;"));
+ }
+
+ @Test
++ @Ignore
+ public void parsing_very_large_hex_literal() throws Exception {
+ assertEquals(new BigInteger("ff00000000000000", 16), eval("return 0xff00000000000000;"));
+ }
+--- a/tests/junitTests/src/bsh/ClassGeneratorTest.java
++++ b/tests/junitTests/src/bsh/ClassGeneratorTest.java
+@@ -27,6 +27,7 @@ package bsh;
+
+ import org.junit.Assert;
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.junit.experimental.categories.Category;
+ import org.junit.runner.RunWith;
+
+@@ -86,6 +87,7 @@ public class ClassGeneratorTest {
+ */
+ @Test
+ @Category(KnownIssue.class)
++ @Ignore
+ public void define_interface_with_constants() throws Exception {
+ // these three are treated equal in java
+ TestUtil.eval("interface Test { public static final int x = 1; }");
+--- a/tests/junitTests/src/bsh/GoogleReports.java
++++ b/tests/junitTests/src/bsh/GoogleReports.java
+@@ -26,6 +26,7 @@
+ package bsh;
+
+ import org.junit.Test;
++import org.junit.Ignore;
+ import org.junit.runner.RunWith;
+
+ import javax.script.ScriptEngine;
+@@ -69,6 +70,7 @@ public class GoogleReports {
+ * <a href="http://code.google.com/p/beanshell2/issues/detail?id=6">issue#60</a>
+ */
+ @Test
++ @Ignore
+ public void accessibility_issue_a() throws Exception {
+ final Interpreter interpreter = new Interpreter();
+ interpreter.set("x", this);
+@@ -83,6 +85,7 @@ public class GoogleReports {
+ * <a href="http://code.google.com/p/beanshell2/issues/detail?id=6">issue#60</a>
+ */
+ @Test
++ @Ignore
+ public void accessibility_issue_b() throws Exception {
+ final Interpreter interpreter = new Interpreter();
+ interpreter.set("x", this);
+@@ -96,6 +99,7 @@ public class GoogleReports {
+ * <a href="http://code.google.com/p/beanshell2/issues/detail?id=10">issue#10</a>
+ */
+ @Test(expected = ParseException.class)
++ @Ignore
+ public void parse_error() throws Exception {
+ eval("\1;");
+ }
diff --git a/dev-java/bsh/metadata.xml b/dev-java/bsh/metadata.xml
new file mode 100644
index 000000000000..3f89ec24b9fb
--- /dev/null
+++ b/dev-java/bsh/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>