File: populating_java_options_by_default.patch

package info (click to toggle)
scilab 2024.1.0%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 381,880 kB
  • sloc: xml: 765,066; ansic: 285,813; cpp: 264,881; java: 172,629; fortran: 91,526; ml: 23,103; tcl: 16,853; makefile: 9,722; sh: 7,027; f90: 6,437; lex: 1,656; perl: 1,566; yacc: 1,308; php: 690; cs: 613; javascript: 50
file content (22 lines) | stat: -rw-r--r-- 870 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: initiating _JAVA_OPTIONS so that we can start scilab with
 OpenJDK 17 on Debian, and also we provide the necessary java.library.path.
Author: Pierre Gruet <pgt@debian.org>
Bug-Debian: https://bugs.debian.org/1012099
Forwarded: not-needed
Last-Update: 2023-03-11

--- a/scilab/bin/scilab
+++ b/scilab/bin/scilab
@@ -43,6 +43,12 @@
 #
 ###
 
+# We initialize _JAVA_OPTIONS so that the right paths are looked into and we
+# add the needed --add-opens to work with OpenJDK 17.
+if ! echo "${_JAVA_OPTIONS}" | grep -q "java\.library\.path" ; then
+    _JAVA_OPTIONS="${_JAVA_OPTIONS} -Djava.library.path=/usr/lib/jni:/usr/lib/scilab --add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED --add-opens=java.desktop/sun.java2d.opengl=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED"
+fi
+
 if test ! -z "$SCIVERBOSE"; then
     SCIVERBOSE=1
 else