File: fixing_doc_build.patch

package info (click to toggle)
scilab 2024.1.0%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • 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 (60 lines) | stat: -rw-r--r-- 3,600 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Description: fixing the build of the doc by skipping the Russian part,
 including the shared libs in the modules in java.library.path and also loading
 the native libraries in a clean, non-reflective way.
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2023-03-10

--- a/scilab/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.java
+++ b/scilab/modules/jvm/src/java/org/scilab/modules/jvm/LibraryPath.java
@@ -67,8 +67,8 @@
             /* The order matter here... see bug #4022 */
             String newLibPath = System.getProperty(JAVALIBRARYPATH) + File.pathSeparator + p;
             System.setProperty(JAVALIBRARYPATH, newLibPath);
-            try {
-            	/* Enable modifications on USER_PATHS field in LibraryPaths class */
+            /*try {
+            	/* Enable modifications on USER_PATHS field in LibraryPaths class
             	final Class<?>[] declClassArr = NativeLibraries.class.getDeclaredClasses();
             	final Class<?> libraryPaths = Arrays.stream(declClassArr).filter(klass -> klass.getSimpleName().equals("LibraryPaths")).findFirst().get();
             	final Field field = libraryPaths.getDeclaredField("USER_PATHS");
@@ -77,7 +77,7 @@
             	varHandle.set(field, field.getModifiers() & ~Modifier.FINAL);
             	field.setAccessible(true);
             	
-            	/* Update field by adding new path to current value */
+            	/* Update field by adding new path to current value
             	String[] paths = (String[])field.get(null);
                 String[] newPaths = new String[paths.length+1];
                 System.arraycopy(paths, 0, newPaths, 0, paths.length);
@@ -88,7 +88,7 @@
         		throw new IOException("Error NoSuchFieldException, could not add path to " + JAVALIBRARYPATH);
             } catch (IllegalAccessException e) {
                 throw new IOException("Error IllegalAccessException, could not add path to " + JAVALIBRARYPATH);
-            }
+            }*/
         }
     }
 
--- a/scilab/Makefile.am
+++ b/scilab/Makefile.am
@@ -305,7 +305,7 @@
 				LANG=$$l.UTF-8 SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 _JAVA_OPTIONS='-Djava.awt.headless=true' HOME=/tmp $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -l $$l -nouserstartup -e "$$COMMAND" || exit 1;\
 			else \
 				echo "LANG=$$l.UTF-8 LC_ALL=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 _JAVA_OPTIONS='-Djava.awt.headless=true' HOME=/tmp $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -l $$l -nouserstartup -e \"$$COMMAND\"";\
-				LANG=$$l.UTF-8 LC_ALL=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 _JAVA_OPTIONS='-Djava.awt.headless=true' HOME=/tmp $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -l $$l -nouserstartup -e "$$COMMAND" || exit 1;\
+				LANG=$$l.UTF-8 LC_ALL=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 _JAVA_OPTIONS="-Djava.awt.headless=true -Djava.library.path=/usr/lib/jni:$$(find . -name "*.so" -a -wholename "*modules*" | sed 's/\/[^/]*$$//' | sort | uniq | tr '\n' ':' | sed 's/:$$//')" HOME=/tmp $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -l $$l -nouserstartup -e "$$COMMAND" || exit 1;\
 			fi; \
 		done; \
 	else \
--- a/scilab/configure.ac
+++ b/scilab/configure.ac
@@ -1629,7 +1629,7 @@
 #######################
 
 ALL_LINGUAS="en_US fr_FR zh_CN zh_TW ru_RU ca_ES de_DE es_ES pt_BR ja_JP it_IT uk_UA pl_PL cs_CZ"
-ALL_LINGUAS_DOC="en_US fr_FR pt_BR ja_JP ru_RU"
+ALL_LINGUAS_DOC="en_US fr_FR pt_BR ja_JP"
 
 AC_ARG_ENABLE(build-localization,
         AS_HELP_STRING([--disable-build-localization],[Disable the localization build])