public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bsh] epel10: adjustments for Java 11 compatibility
@ 2026-07-15  9:36 Fabio Valentini
  0 siblings, 0 replies; only message in thread
From: Fabio Valentini @ 2026-07-15  9:36 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/bsh
Branch : epel10
Commit : c218a3c73e9a87adfb17fa1f14b2effc5df60ce6
Author : Fabio Valentini <decathorpe@gmail.com>
Date   : 2020-07-20T21:38:46+02:00
Stats  : +74/-1 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/bsh/c/c218a3c73e9a87adfb17fa1f14b2effc5df60ce6?branch=epel10

Log:
adjustments for Java 11 compatibility

---
diff --git a/0000-source-target-1.8.patch b/0000-source-target-1.8.patch
new file mode 100644
index 0000000..bb33137
--- /dev/null
+++ b/0000-source-target-1.8.patch
@@ -0,0 +1,35 @@
+From 62ea7bb2656177fbb61d94b90d9a526990876cb8 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Mon, 20 Jul 2020 21:27:20 +0200
+Subject: [PATCH 0/1] source / target 1.8
+
+---
+ build.xml | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/build.xml b/build.xml
+index 4f400dc..0d28a7f 100644
+--- a/build.xml
++++ b/build.xml
+@@ -170,7 +170,8 @@
+ 			deprecation="${deprecation}"
+ 			optimize="on"
+ 			debug="on"
+-      target="1.5"
++			source="1.8"
++			target="1.8"
+ 			includes="**/*.java"
+ 			excludes="${excludes},**/bak/**"
+ 		>
+@@ -213,7 +214,7 @@
+ 			 destdir="${javadoc-dir}"
+ 			 author="true"
+ 			 version="true"
+-       source="1.5"
++			 source="1.8"
+ 			 use="true"
+ 			 windowtitle="BeanShell ${version}"
+ 			 doctitle="&lt;h1&gt;BeanShell ${version}&lt;h1&gt;"
+-- 
+2.26.2
+

diff --git a/0001-java-11-compatibility.patch b/0001-java-11-compatibility.patch
new file mode 100644
index 0000000..36271b8
--- /dev/null
+++ b/0001-java-11-compatibility.patch
@@ -0,0 +1,27 @@
+From 9b83372c64f30f44bd56696ae6adcbe6a83e1e2f Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe@gmail.com>
+Date: Mon, 20 Jul 2020 21:28:13 +0200
+Subject: [PATCH 1/1] java 11 compatibility
+
+---
+ src/bsh/util/AWTConsole.java | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/bsh/util/AWTConsole.java b/src/bsh/util/AWTConsole.java
+index e88fbff..fbb237b 100644
+--- a/src/bsh/util/AWTConsole.java
++++ b/src/bsh/util/AWTConsole.java
+@@ -214,8 +214,8 @@ public class AWTConsole extends TextArea
+ 		Great.  What a piece of crap.
+ 	*/
+ 	public void setCaretPosition( int pos ) {
+-		((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition( 
+-			pos + countNLs() );
++		//((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition( 
++		//	pos + countNLs() );
+ 	}
+ 
+ 	/*
+-- 
+2.26.2
+

diff --git a/bsh.spec b/bsh.spec
index fb7a928..ae5cf67 100644
--- a/bsh.spec
+++ b/bsh.spec
@@ -33,7 +33,7 @@
 
 Name:           bsh
 Version:        2.0
-Release:        17.%{reltag}%{?dist}
+Release:        18.%{reltag}%{?dist}
 Epoch:          0
 Summary:        Lightweight Scripting for Java
 URL:            http://www.beanshell.org/
@@ -48,6 +48,12 @@ Source1:        %{name}-desktop.desktop
 # Remove code marked as SUN PROPRIETARY/CONFIDENTAIL
 Source2:        generate-tarball.sh
 
+# compatibility with Java 11:
+# - set javac / javadoc source and target values to 1.8
+Patch0:         0000-source-target-1.8.patch
+# - remove references to invisible symbols and methods
+Patch1:         0001-java-11-compatibility.patch
+
 BuildRequires:  javapackages-local
 BuildRequires:  ant
 BuildRequires:  bsf
@@ -109,6 +115,8 @@ This package provides %{summary}.
 
 %prep
 %setup -q -n beanshell-%{version}%{reltag}
+%patch0 -p1
+%patch1 -p1
 
 sed -i 's,org.apache.xalan.xslt.extensions.Redirect,http://xml.apache.org/xalan/redirect,' docs/manual/xsl/*.xsl
 
@@ -170,6 +178,9 @@ cat scripts/bshdoc.bsh >> %{buildroot}%{_bindir}/bshdoc
 %license LICENSE NOTICE
 
 %changelog
+* Mon Jul 20 2020 Fabio Valentini <decathorpe@gmail.com> - 0:2.0-18.b6
+- Make adjustments for Java 11 compatibility.
+
 * Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 0:2.0-17.b6
 - Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-15  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15  9:36 [rpms/bsh] epel10: adjustments for Java 11 compatibility Fabio Valentini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox