diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-16 20:59:03 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-17 11:50:35 +0200 |
commit | 9f025bdad98dfa2e806391142844a727a2014aac (patch) | |
tree | 2ad79efa984e2ded67a5fc991316ecaf80547d74 /external | |
parent | 903e71eb452a0d9be4007497ca06b22765600188 (diff) |
beanshell: upgrade to 2.1.1
* Adapt external/beanshell/java9.patch.0 to fix
[javac] error: Source option 6 is no longer supported. Use 7 or later.
[javac] error: Target option 6 is no longer supported. Use 7 or later.
Downloaded from https://github.com/beanshell/beanshell/releases/download/2.1.1/bsh-2.1.1-src.zip
Change-Id: I969813fd2bb2a910004b6c28f5ed9ba95c39895f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167764
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'external')
-rw-r--r-- | external/beanshell/ExternalPackage_beanshell.mk | 2 | ||||
-rw-r--r-- | external/beanshell/UnpackedTarball_beanshell.mk | 2 | ||||
-rw-r--r-- | external/beanshell/beanshell-invoke.patch | 20 | ||||
-rw-r--r-- | external/beanshell/bsh-2.0b1-src.patch | 10 | ||||
-rw-r--r-- | external/beanshell/java9.patch.0 | 24 |
5 files changed, 21 insertions, 37 deletions
diff --git a/external/beanshell/ExternalPackage_beanshell.mk b/external/beanshell/ExternalPackage_beanshell.mk index ea22d839410d..b0f6b007e7ac 100644 --- a/external/beanshell/ExternalPackage_beanshell.mk +++ b/external/beanshell/ExternalPackage_beanshell.mk @@ -11,6 +11,6 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,beanshell,beanshell)) $(eval $(call gb_ExternalPackage_use_external_project,beanshell,beanshell)) -$(eval $(call gb_ExternalPackage_add_file,beanshell,$(LIBO_SHARE_JAVA_FOLDER)/bsh.jar,dist/bsh-2.0b6.jar)) +$(eval $(call gb_ExternalPackage_add_file,beanshell,$(LIBO_SHARE_JAVA_FOLDER)/bsh.jar,dist/bsh-2.1.1.jar)) # vim: set noet sw=4 ts=4: diff --git a/external/beanshell/UnpackedTarball_beanshell.mk b/external/beanshell/UnpackedTarball_beanshell.mk index dc0ce6dc6cb5..77b45697be77 100644 --- a/external/beanshell/UnpackedTarball_beanshell.mk +++ b/external/beanshell/UnpackedTarball_beanshell.mk @@ -12,7 +12,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,beanshell)) $(eval $(call gb_UnpackedTarball_set_tarball,beanshell,$(BSH_TARBALL),,beanshell)) $(eval $(call gb_UnpackedTarball_fix_end_of_line,beanshell,\ - engine/src/TestBshScriptEngine.java \ + engine/src/bsh/TestBshScriptEngine.java \ )) $(eval $(call gb_UnpackedTarball_add_patches,beanshell,\ diff --git a/external/beanshell/beanshell-invoke.patch b/external/beanshell/beanshell-invoke.patch index b78f1db61642..5c5e04d0cec9 100644 --- a/external/beanshell/beanshell-invoke.patch +++ b/external/beanshell/beanshell-invoke.patch @@ -1,6 +1,6 @@ --- old/beanshell/engine/src/bsh/engine/BshScriptEngine.java +++ new/beanshell/engine/src/bsh/engine/BshScriptEngine.java -@@ -229,6 +229,12 @@ +@@ -281,6 +281,11 @@ } } @@ -9,12 +9,11 @@ + { + return invokeMethod( thiz, name, args ); + } -+ + /** - * Same as invoke(Object, String, Object...) with <code>null</code> as the - * first argument. Used to call top-level procedures defined in scripts. -@@ -249,6 +255,12 @@ - return invokeMethod( getGlobal(), name, args ); + * Same as invoke(Object, String, Object...) with {@code null} as the +@@ -298,6 +303,11 @@ + return invokeMethod(getGlobal(), name, args); } + public Object invoke( String name, Object... args ) @@ -22,12 +21,11 @@ + { + return invokeFunction( name, args ); + } -+ - /** + + /** * Returns an implementation of an interface using procedures compiled in the - * interpreter. The methods of the interface may be implemented using the ---- old/beanshell/engine/src/TestBshScriptEngine.java -+++ new/beanshell/engine/src/TestBshScriptEngine.java +--- old/beanshell/engine/src/bsh/TestBshScriptEngine.java ++++ new/beanshell/engine/src/bsh/TestBshScriptEngine.java @@ -2,11 +2,12 @@ import java.io.*; import javax.script.*; diff --git a/external/beanshell/bsh-2.0b1-src.patch b/external/beanshell/bsh-2.0b1-src.patch index 6124f18d197f..a62517ea1ed7 100644 --- a/external/beanshell/bsh-2.0b1-src.patch +++ b/external/beanshell/bsh-2.0b1-src.patch @@ -4,7 +4,7 @@ - Why can't I nest filesets? This seems like it would be so easy and useful... --> --<project name="beanshell" default="compile" basedir="."> +-<project name="beanshell" default="compile-all" basedir="."> +<project name="beanshell" default="jarall" basedir="."> <!-- Project Configuration --> @@ -39,10 +39,10 @@ import bsh.NameSource; /** -@@ -659,6 +660,8 @@ - URL url = new File( rtjar ).toURI().toURL(); - bootClassPath = new BshClassPath( - "Boot Class Path", new URL[] { url } ); +@@ -661,6 +661,8 @@ + URL url = new File(rtjar).toURI().toURL(); + bootClassPath = new BshClassPath("Boot Class Path", new URL[]{url}); + } + } catch ( SecurityException e ) { + throw new ClassPathException(" can't access to boot jar: "+e); } catch ( MalformedURLException e ) { diff --git a/external/beanshell/java9.patch.0 b/external/beanshell/java9.patch.0 index 824e54286edf..4bc857948afd 100644 --- a/external/beanshell/java9.patch.0 +++ b/external/beanshell/java9.patch.0 @@ -1,25 +1,11 @@ --- build.xml +++ build.xml -@@ -176,7 +176,6 @@ - deprecation="${deprecation}" - optimize="on" +@@ -219,8 +219,6 @@ debug="on" -- target="1.5" includes="**/*.java" excludes="${excludes},**/bak/**" +- source="1.6" +- target="1.6" > ---- src/bsh/util/AWTConsole.java -+++ src/bsh/util/AWTConsole.java -@@ -214,8 +214,11 @@ - Great. What a piece of crap. - */ - public void setCaretPosition( int pos ) { -- ((java.awt.peer.TextComponentPeer)getPeer()).setCaretPosition( -+ try { -+ ((java.awt.peer.TextComponentPeer)getClass().getMethod("getPeer").invoke(this, null)).setCaretPosition( - pos + countNLs() ); -+ } catch (Exception e) { -+ } - } - - /* + <classpath> + <fileset refid="lib-fileset"/> |