File: selecting_unversioned_jars.patch

package info (click to toggle)
scilab 2024.1.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 383,124 kB
  • sloc: xml: 765,066; ansic: 282,051; cpp: 264,881; java: 172,629; fortran: 91,526; ml: 23,103; tcl: 16,853; makefile: 9,716; sh: 7,027; f90: 6,437; lex: 1,656; perl: 1,566; yacc: 1,308; php: 690; cs: 613; javascript: 50
file content (19 lines) | stat: -rw-r--r-- 1,322 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: selecting the unversioned jars instead of the versioned ones,
 taking profit of the ranks of '.' and '-'.
Author: Pierre Gruet <pgt@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030205
Forwarded: not-needed
Last-Update: 2023-03-10

--- a/scilab/m4/java-thirdparty.m4
+++ b/scilab/m4/java-thirdparty.m4
@@ -239,7 +239,8 @@
 
     DEFAULT_JAR_DIR="$(pwd)/thirdparty/ $(pwd)/jar/ /usr/local/java/ /usr/local/java/jar /usr/local/share/java/ /usr/local/share/java/jar/ /usr/local/lib/java/ $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null | sort) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find  /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null) /opt/java/lib/"
    
-    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name '$1.jar' -or -name 'lib$1.jar' -or -name 'lib$1-java.jar' -or -name '$1*.jar' \) 2>/dev/null |tr '\n' ':')."
+    # sorting jars in reverse order so that unversioned jars are before versioned ones.
+    jar_resolved="$(find $DEFAULT_JAR_DIR -maxdepth 1 \( -type f -name '$1.jar' -or -name 'lib$1.jar' -or -name 'lib$1-java.jar' -or -name '$1*.jar' \) 2>/dev/null | sort -r |tr '\n' ':')."
 
     if test ! -f conftestSharedChecker.class ; then
 	AC_JAVA_COMPILE_CHECKER_CLASS()