Skip to content

Commit ce6c0c4

Browse files
committed
Add Scilab 5.5.2 6.0.2 and 6.1.0 from upstream
This commit log Scilab version at ./configure to ease maintenance. It uses Scilab include next to the bin directory which will work for both system-wide install and binaries from scilab.org. SCILAB_VERSION is define as an automake variable for easier failure investigation. Note: the Ubuntu Scilab version is used when available, in the current CI config there is: * Scilab 5.5 from scilab.org * Scilab 6.0 from Ubuntu 18.04 * Scilab 6.1 from Ubuntu 20.04
1 parent 5e85cf6 commit ce6c0c4

File tree

4 files changed

+38
-22
lines changed

4 files changed

+38
-22
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ jobs:
180180
VER: '3.0'
181181
CPPSTD: c++11
182182
- SWIGLANG: scilab
183-
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
183+
VER: '5.5.2'
184+
- SWIGLANG: scilab
185+
os: ubuntu-18.04 # scilab 6.0
186+
- SWIGLANG: scilab
184187
- SWIGLANG: tcl
185188
# c++11 testing
186189
- SWIGLANG: csharp
@@ -213,7 +216,9 @@ jobs:
213216
CPPSTD: c++11
214217
- SWIGLANG: scilab
215218
CPPSTD: c++11
216-
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
219+
os: ubuntu-18.04 # scilab 6.0
220+
- SWIGLANG: scilab
221+
CPPSTD: c++11
217222
- SWIGLANG: tcl
218223
CPPSTD: c++11
219224
# c++14 testing
@@ -249,7 +254,9 @@ jobs:
249254
CPPSTD: c++14
250255
- SWIGLANG: scilab
251256
CPPSTD: c++14
252-
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
257+
os: ubuntu-18.04 # scilab 6.0
258+
- SWIGLANG: scilab
259+
CPPSTD: c++14
253260
- SWIGLANG: tcl
254261
CPPSTD: c++14
255262
# c++17 testing (using gcc11)
@@ -298,7 +305,6 @@ jobs:
298305
- SWIGLANG: scilab
299306
CPPSTD: c++17
300307
GCC: 11
301-
os: ubuntu-18.04 # scilab-6.1 in ubuntu-20.04 not yet working
302308
- SWIGLANG: tcl
303309
CPPSTD: c++17
304310
GCC: 11

Examples/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,6 +1357,7 @@ r_clean:
13571357
SCILAB = @SCILAB@
13581358
SCILAB_INC= @SCILABINCLUDE@
13591359
SCILAB_OPT = @SCILABOPT@
1360+
SCILAB_VERSION = @SCILAB_VERSION@
13601361
SCILAB_LIBPREFIX = lib
13611362

13621363
# ----------------------------------------------------------------
@@ -1389,7 +1390,7 @@ scilab_run:
13891390
# -----------------------------------------------------------------
13901391

13911392
scilab_version:
1392-
echo `$(SCILAB) -version | head -1`
1393+
echo `$(SCILAB) -nwni -version | head -1`
13931394

13941395
# -----------------------------------------------------------------
13951396
# Cleaning the scilab examples

Tools/CI-linux-install.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,14 @@ case "$SWIGLANG" in
137137
fi
138138
;;
139139
"scilab")
140-
# Travis has the wrong version of Java pre-installed resulting in error using scilab:
141-
# /usr/bin/scilab-bin: error while loading shared libraries: libjava.so: cannot open shared object file: No such file or directory
142-
echo "JAVA_HOME was set to $JAVA_HOME"
143-
unset JAVA_HOME
144-
$RETRY sudo apt-get -qq install scilab
140+
if [[ -z "$VER" ]]; then
141+
$RETRY sudo apt-get -qq install scilab scilab-include
142+
else
143+
$RETRY wget --progress=dot:giga "https://www.scilab.org/download/$VER/scilab-$VER.bin.linux-x86_64.tar.gz"
144+
# $HOME/.local/bin is in PATH and writeable
145+
mkdir -p "$HOME/.local"
146+
tar -xzf "scilab-$VER.bin.linux-x86_64.tar.gz" --strip-components=1 -C "$HOME/.local"
147+
fi
145148
;;
146149
"tcl")
147150
$RETRY sudo apt-get -qq install tcl-dev

configure.ac

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ if test x"${SCILABBIN}" = xno; then
12181218
else
12191219
# Check for Scilab executable
12201220
if test "x$SCILABBIN" = xyes; then
1221-
AC_CHECK_PROGS(SCILAB, scilab)
1221+
AC_PATH_PROG(SCILAB, scilab)
12221222
else
12231223
AC_MSG_CHECKING(for scilab)
12241224
if test -f "$SCILABBIN"; then
@@ -1231,41 +1231,46 @@ else
12311231

12321232
if test -n "$SCILAB"; then
12331233
# Check for Scilab version (needs api_scilab so needs version 5.3.3 or higher)
1234-
SCILAB_FULL_VERSION=`$SCILAB -version | head -1 | sed -e 's|Scilab version \"\(.*\)\"|\1|g'`
1234+
SCILAB_VERSION=`$SCILAB -nwni -version | head -1 | sed -e 's|Scilab version \"\(.*\)\"|\1|g'`
12351235

12361236
AC_MSG_CHECKING(Scilab version is 5.3.3 or higher)
1237-
SCILAB_MAJOR_VERSION=`echo $SCILAB_FULL_VERSION | cut -d. -f1`
1238-
SCILAB_MINOR_VERSION=`echo $SCILAB_FULL_VERSION | cut -d. -f2`
1239-
SCILAB_MAINTENANCE_VERSION=`echo $SCILAB_FULL_VERSION | cut -d. -f3`
1240-
SCILAB_VERSION="$SCILAB_MAJOR_VERSION$SCILAB_MINOR_VERSION$SCILAB_MAINTENANCE_VERSION"
1237+
SCILAB_MAJOR_VERSION=`echo $SCILAB_VERSION | cut -d. -f1`
1238+
SCILAB_MINOR_VERSION=`echo $SCILAB_VERSION | cut -d. -f2`
1239+
SCILAB_MAINTENANCE_VERSION=`echo $SCILAB_VERSION | cut -d. -f3`
1240+
SCILAB_VERSION_NO_DOTS="$SCILAB_MAJOR_VERSION$SCILAB_MINOR_VERSION$SCILAB_MAINTENANCE_VERSION"
12411241

1242-
if test $SCILAB_VERSION -ge 533; then
1243-
AC_MSG_RESULT(yes)
1242+
if test -n "$SCILAB_VERSION_NO_DOTS" && test "$SCILAB_VERSION_NO_DOTS" -ge 533; then
1243+
AC_MSG_RESULT(yes - $SCILAB_VERSION)
12441244
else
1245-
AC_MSG_RESULT(no)
1245+
AC_MSG_RESULT(no - $SCILAB_VERSION)
12461246
SCILAB=
12471247
fi
12481248

12491249
if test -n "$SCILAB"; then
12501250
# Set Scilab startup options depending on version
12511251
AC_MSG_CHECKING(for Scilab startup options)
12521252
SCILABOPT="-nwni -nb"
1253-
if test $SCILAB_VERSION -ge 540; then
1253+
if test $SCILAB_VERSION_NO_DOTS -ge 540; then
12541254
SCILABOPT+=" -noatomsautoload"
12551255
fi
1256-
if test $SCILAB_VERSION -ge 600; then
1256+
if test $SCILAB_VERSION_NO_DOTS -ge 600; then
12571257
SCILABOPT+=" -quit"
12581258
fi
12591259
AC_MSG_RESULT($SCILABOPT)
12601260

12611261
# Check for Scilab header files
12621262
AC_MSG_CHECKING(for Scilab header files)
1263+
headers="`AS_DIRNAME(["$SCILAB"])`/../include"
12631264
if test "$SCILABINCDIR" != ""; then
12641265
dirs="$SCILABINCDIR"
1266+
elif test -d "$SCI"; then
1267+
dirs="$SCI/include $SCI/../../include"
1268+
elif test -d "$headers"; then
1269+
dirs="$headers"
12651270
elif test -n "$PKG_CONFIG "; then
12661271
dirs=`$PKG_CONFIG scilab --cflags-only-I | sed -e 's/-I//g'`
12671272
else
1268-
dirs=""
1273+
dirs="/usr/include"
12691274
fi
12701275
for i in $dirs; do
12711276
if test -r $i/api_scilab.h; then
@@ -1290,6 +1295,7 @@ fi
12901295
AC_SUBST(SCILAB)
12911296
AC_SUBST(SCILABINCLUDE)
12921297
AC_SUBST(SCILABOPT)
1298+
AC_SUBST(SCILAB_VERSION)
12931299

12941300

12951301
#----------------------------------------------------------------

0 commit comments

Comments
 (0)