gnu: scilab: Update to 2023.1.0.
* gnu/packages/maths.scm (scilab): Update to 2023.1.0. [source] Use git-fetch. <modules>: Add (guix build utils) and (ice-9 ftw). <patches>: Add patch for hdf5 >= 1.10. <snippet>: Move contents of the "scilab" directory to its parents. Remove the other files and autogenerated files. [native-inputs]: Add autoconf, autoconf-archive, automake, bison, eigen, flex, libtool, ocaml and ocaml-findlib. [inputs]: Add ocaml-num, replace hdf5-1.8 by hdf5-1.14 and suitesparse-3 by suitesparse. [arguments]: Remove quasiquote. Add --enable-build-parser, --with-eigen-include=..., OCAMLC=... and OCAMLOPT=... to #:configure-flags. <#:phases>: Add fix-ocaml-num, remove-desktop-files, bootstrap-dynamic_link-scripts and build-parsers phases. Remove fixes for compilation and linker errors from the pre-build phase. [home-page]: Update URL. [description]: Add two spaces between sentences. [license]: Update to gpl2 and bsd-3. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>master
parent
37d0befca0
commit
151687a7a2
|
@ -61,6 +61,7 @@
|
||||||
;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com>
|
;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com>
|
||||||
;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com>
|
;;; Copyright © 2023 Jake Leporte <jakeleporte@outlook.com>
|
||||||
;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
|
;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
|
||||||
|
;;; Copyright © 2023 David Elsing <david.elsing@posteo.net>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -8575,112 +8576,186 @@ computation is supported via MPI.")
|
||||||
(define-public scilab
|
(define-public scilab
|
||||||
(package
|
(package
|
||||||
(name "scilab")
|
(name "scilab")
|
||||||
(version "5.5.2")
|
(version "2023.1.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method git-fetch)
|
||||||
(uri
|
(uri (git-reference
|
||||||
(string-append "https://www.scilab.org/download/"
|
(url "https://gitlab.com/scilab/scilab")
|
||||||
version "/scilab-" version "-src.tar.gz"))
|
(commit version)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0phg9pn24yw98hbh475ik84dnikf1225b2knh7qbhdbdx6fm2d57"))))
|
(base32
|
||||||
|
"0hbqsnc67b4f8zc690kl79bwhjaasykjlmqbln8iymnjcn3l5ypd"))
|
||||||
|
(modules '((guix build utils)
|
||||||
|
(ice-9 ftw)))
|
||||||
|
(patches (search-patches "scilab-hdf5-1.8-api.patch"))
|
||||||
|
(snippet
|
||||||
|
#~(begin
|
||||||
|
;; Delete everything except for scilab itself:
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(unless (member file '("." ".." "scilab"))
|
||||||
|
(delete-file-recursively file)))
|
||||||
|
(scandir "."))
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(unless (member file '("." ".."))
|
||||||
|
(rename-file (string-append "scilab/" file) file)))
|
||||||
|
(scandir "scilab"))
|
||||||
|
|
||||||
|
;; Some clean-up in scilab:
|
||||||
|
(for-each delete-file-recursively
|
||||||
|
'("scilab"
|
||||||
|
"config"
|
||||||
|
"libs/GetWindowsVersion"))
|
||||||
|
(for-each delete-file
|
||||||
|
(cons* "aclocal.m4"
|
||||||
|
"configure"
|
||||||
|
"m4/ax_cxx_compile_stdcxx.m4"
|
||||||
|
"m4/lib-ld.m4"
|
||||||
|
"m4/libtool.m4"
|
||||||
|
"m4/ltoptions.m4"
|
||||||
|
"m4/ltsugar.m4"
|
||||||
|
"m4/ltversion.m4"
|
||||||
|
"m4/lt~obsolete.m4"
|
||||||
|
"m4/pkg.m4"
|
||||||
|
(find-files "." "^Makefile\\.in$")))
|
||||||
|
|
||||||
|
;; And finally some files in the modules directory:
|
||||||
|
(for-each
|
||||||
|
(lambda (file)
|
||||||
|
(delete-file
|
||||||
|
(string-append "modules/dynamic_link/src/scripts/" file)))
|
||||||
|
'("aclocal.m4"
|
||||||
|
"configure"
|
||||||
|
"compile"
|
||||||
|
"config.guess"
|
||||||
|
"config.sub"
|
||||||
|
"ltmain.sh"
|
||||||
|
"depcomp"
|
||||||
|
"install-sh"
|
||||||
|
"missing"))
|
||||||
|
(delete-file-recursively "modules/dynamic_link/src/scripts/m4")
|
||||||
|
(for-each delete-file
|
||||||
|
'("modules/ast/src/cpp/parse/scanscilab.cpp"
|
||||||
|
"modules/ast/src/cpp/parse/bison/parsescilab.output"
|
||||||
|
"modules/ast/includes/parse/parsescilab.hxx"
|
||||||
|
"modules/ast/src/cpp/parse/parsescilab.cpp"))))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs (list pkg-config gfortran))
|
(native-inputs
|
||||||
(inputs (list libxml2
|
(list autoconf
|
||||||
`(,pcre "bin")
|
autoconf-archive
|
||||||
|
automake
|
||||||
|
bison
|
||||||
|
eigen
|
||||||
|
flex
|
||||||
|
gfortran
|
||||||
|
libtool
|
||||||
|
ocaml
|
||||||
|
ocaml-findlib
|
||||||
|
pkg-config))
|
||||||
|
(inputs (list `(,pcre "bin")
|
||||||
`(,pcre "out")
|
`(,pcre "out")
|
||||||
readline
|
|
||||||
hdf5-1.8
|
|
||||||
curl
|
|
||||||
openblas
|
|
||||||
lapack
|
|
||||||
arpack-ng
|
arpack-ng
|
||||||
|
curl
|
||||||
fftw
|
fftw
|
||||||
gettext-minimal
|
gettext-minimal
|
||||||
suitesparse-3
|
hdf5-1.14
|
||||||
tcl
|
lapack
|
||||||
tk
|
|
||||||
libx11
|
libx11
|
||||||
matio))
|
libxml2
|
||||||
|
matio
|
||||||
|
ocaml-num
|
||||||
|
openblas
|
||||||
|
readline
|
||||||
|
suitesparse
|
||||||
|
tcl
|
||||||
|
tk))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f
|
(list
|
||||||
#:configure-flags
|
;; The tests require java code.
|
||||||
,#~(list
|
#:tests? #f
|
||||||
"--enable-relocatable"
|
#:configure-flags
|
||||||
"--disable-static-system-lib"
|
#~(list
|
||||||
;; Disable all java code.
|
"--enable-relocatable"
|
||||||
"--without-gui"
|
"--disable-static-system-lib"
|
||||||
"--without-javasci"
|
"--enable-build-parser"
|
||||||
"--disable-build-help"
|
;; Disable all java code.
|
||||||
"--with-external-scirenderer"
|
"--without-gui"
|
||||||
;; Tcl and Tk library locations.
|
"--without-javasci"
|
||||||
(string-append "--with-tcl-include="
|
"--disable-build-help"
|
||||||
(string-drop-right
|
"--with-external-scirenderer"
|
||||||
(search-input-file %build-inputs "include/tcl.h")
|
;; Tcl and Tk library locations.
|
||||||
(string-length "/tcl.h")))
|
(string-append "--with-tcl-include="
|
||||||
(string-append "--with-tcl-library="
|
(dirname
|
||||||
(string-drop-right
|
(search-input-file %build-inputs "include/tcl.h")))
|
||||||
(search-input-directory %build-inputs "lib/tcl8")
|
(string-append "--with-tcl-library="
|
||||||
(string-length "/tcl8")))
|
(dirname
|
||||||
(string-append "--with-tk-include="
|
(search-input-directory %build-inputs "lib/tcl8")))
|
||||||
(string-drop-right
|
(string-append "--with-tk-include="
|
||||||
(search-input-file %build-inputs "include/tk.h")
|
(dirname
|
||||||
(string-length "/tk.h")))
|
(search-input-file %build-inputs "include/tk.h")))
|
||||||
(string-append "--with-tk-library="
|
(string-append "--with-tk-library="
|
||||||
(string-drop-right
|
(dirname
|
||||||
(search-input-directory %build-inputs "lib/tk8.6")
|
(search-input-directory %build-inputs "lib/tk8.6")))
|
||||||
(string-length "/tk8.6")))
|
(string-append "--with-eigen-include="
|
||||||
;; There are some 2018-fortran errors that are ignored
|
(search-input-directory %build-inputs "include/eigen3"))
|
||||||
;; with this fortran compiler flag.
|
;; Find and link to the OCaml Num package
|
||||||
"FFLAGS=-fallow-argument-mismatch")
|
"OCAMLC=ocamlfind ocamlc -package num"
|
||||||
#:phases
|
"OCAMLOPT=ocamlfind ocamlopt -package num -linkpkg"
|
||||||
,#~(modify-phases %standard-phases
|
;; There are some 2018-fortran errors that are ignored
|
||||||
(add-before 'build 'pre-build
|
;; with this fortran compiler flag.
|
||||||
(lambda _
|
"FFLAGS=-fallow-argument-mismatch")
|
||||||
;; Fix scilab script.
|
#:phases
|
||||||
(substitute* "bin/scilab"
|
#~(modify-phases %standard-phases
|
||||||
(("\\/bin\\/ls")
|
;; The Num library is specified with the OCAMLC and
|
||||||
(which "ls")))
|
;; OCAMLOPT variables above.
|
||||||
;; Fix core.start.
|
(add-after 'unpack 'fix-ocaml-num
|
||||||
(substitute* "modules/core/etc/core.start"
|
(lambda _
|
||||||
(("'SCI/modules")
|
(substitute*
|
||||||
"SCI+'/modules"))
|
'("modules/scicos/Makefile.modelica.am"
|
||||||
;; Fix fortran compilation error.
|
"modules/scicos/src/translator/makefile.mak"
|
||||||
(substitute*
|
"modules/scicos/src/modelica_compiler/makefile.mak")
|
||||||
"modules/differential_equations/src/fortran/twodq.f"
|
(("nums\\.cmx?a") ""))))
|
||||||
(("node\\(10\\),node1\\(10\\),node2\\(10\\),coef")
|
;; Install only scilab-cli.desktop
|
||||||
"node(9),node1(9),node2(9),coef"))
|
(add-after 'unpack 'remove-desktop-files
|
||||||
;; Fix C compilation errors.
|
(lambda _
|
||||||
;; remove &
|
(substitute* "desktop/Makefile.am"
|
||||||
(substitute* "modules/hdf5/src/c/h5_readDataFromFile_v1.c"
|
(("desktop_DATA =")
|
||||||
(("(H5Rdereference\\(_iDatasetId, H5R_OBJECT, )&(.*)\\);$"
|
"desktop_DATA = scilab-cli.desktop\nDUMMY ="))))
|
||||||
all common ref)
|
;; These generated files are assumed to be present during
|
||||||
(string-append common ref)))
|
;; the build.
|
||||||
;; fix multiple definitions
|
(add-after 'bootstrap 'bootstrap-dynamic_link-scripts
|
||||||
(substitute* "modules/tclsci/src/c/TCL_Command.h"
|
(lambda _
|
||||||
(("^__thread")
|
(with-directory-excursion "modules/dynamic_link/src/scripts"
|
||||||
"extern __thread"))
|
((assoc-ref %standard-phases 'bootstrap)))))
|
||||||
(substitute* "modules/tclsci/src/c/InitTclTk.c"
|
(add-before 'build 'pre-build
|
||||||
(("BOOL TK_Started = FALSE;" all)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(string-append all "\n"
|
;; Fix scilab script.
|
||||||
"__threadId TclThread;" "\n"
|
(substitute* "bin/scilab"
|
||||||
"__threadSignal InterpReady;" "\n"
|
(("\\/bin\\/ls")
|
||||||
"__threadSignalLock InterpReadyLock;"
|
(search-input-file inputs "bin/ls")))
|
||||||
"\n")))
|
;; Fix core.start.
|
||||||
;; Fix CPP compilation errors.
|
(substitute* "modules/core/etc/core.start"
|
||||||
(substitute* "modules/output_stream/src/cpp/diary_manager.cpp"
|
(("'SCI/modules")
|
||||||
(("if \\(array_size > 0\\)")
|
"SCI+'/modules"))
|
||||||
"if (*array_size > 0)"))
|
;; Set SCIHOME to /tmp before macros compilation.
|
||||||
;; Set SCIHOME to /tmp before macros compilation.
|
(setenv "SCIHOME" "/tmp")))
|
||||||
(setenv "SCIHOME" "/tmp"))))))
|
;; Prevent race condition
|
||||||
(home-page "https://scilab.org")
|
(add-after 'pre-build 'build-parsers
|
||||||
|
(lambda* (#:key (make-flags #~'()) #:allow-other-keys)
|
||||||
|
(with-directory-excursion "modules/ast"
|
||||||
|
(apply invoke "make"
|
||||||
|
"src/cpp/parse/parsescilab.cpp"
|
||||||
|
"src/cpp/parse/scanscilab.cpp"
|
||||||
|
make-flags)))))))
|
||||||
|
(home-page "https://www.scilab.org/")
|
||||||
(synopsis "Software for engineers and scientists")
|
(synopsis "Software for engineers and scientists")
|
||||||
(description "This package provides the non-graphical version of the Scilab
|
(description "This package provides the non-graphical version of the Scilab
|
||||||
software for engineers and scientists. Scilab is used for signal processing,
|
software for engineers and scientists. Scilab is used for signal processing,
|
||||||
statistical analysis, image enhancement, fluid dynamics simulations, numerical
|
statistical analysis, image enhancement, fluid dynamics simulations, numerical
|
||||||
optimization, and modeling, simulation of explicit and implicit dynamical
|
optimization, and modeling, simulation of explicit and implicit dynamical
|
||||||
systems and symbolic manipulations.")
|
systems and symbolic manipulations.")
|
||||||
(license license:cecill))) ;CeCILL v2.1
|
(license (list license:gpl2 license:bsd-3))))
|
||||||
|
|
||||||
(define-public ruy
|
(define-public ruy
|
||||||
(let ((commit "caa244343de289f913c505100e6a463d46c174de")
|
(let ((commit "caa244343de289f913c505100e6a463d46c174de")
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
This patch fixes the compilation with hdf5 version >= 1.10. Adapted from
|
||||||
|
https://aur.archlinux.org/cgit/aur.git/plain/hdf5_18_api.patch?h=scilab-git.
|
||||||
|
|
||||||
|
diff -ur a/scilab/modules/hdf5/includes/HDF5Objects.h b/scilab/modules/hdf5/includes/HDF5Objects.h
|
||||||
|
--- a/scilab/modules/hdf5/includes/HDF5Objects.h
|
||||||
|
+++ b/scilab/modules/hdf5/includes/HDF5Objects.h
|
||||||
|
@@ -16,14 +16,12 @@
|
||||||
|
#ifndef __HDF5OBJECTS_H__
|
||||||
|
#define __HDF5OBJECTS_H__
|
||||||
|
|
||||||
|
-#define H5_NO_DEPRECATED_SYMBOLS
|
||||||
|
#undef H5_USE_16_API
|
||||||
|
+#define H5_USE_18_API
|
||||||
|
|
||||||
|
-#define H5Eset_auto_vers 2
|
||||||
|
#include <hdf5.h>
|
||||||
|
#include <hdf5_hl.h>
|
||||||
|
|
||||||
|
-#undef H5_NO_DEPRECATED_SYMBOLS
|
||||||
|
|
||||||
|
//#define __HDF5OBJECTS_DEBUG__
|
||||||
|
//#define __HDF5ERROR_PRINT__
|
||||||
|
diff -ur a/scilab/modules/hdf5/Makefile.am b/scilab/modules/hdf5/Makefile.am
|
||||||
|
--- a/scilab/modules/hdf5/Makefile.am
|
||||||
|
+++ b/scilab/modules/hdf5/Makefile.am
|
||||||
|
@@ -104,8 +104,7 @@
|
||||||
|
-DH5Gopen_vers=2 \
|
||||||
|
-DH5Tget_array_dims_vers=2 \
|
||||||
|
-DH5Acreate_vers=2 \
|
||||||
|
- -DH5Rdereference_vers=2 \
|
||||||
|
- -DNO_DEPRECATED_SYMBOLS
|
||||||
|
+ -DH5Rdereference_vers=2
|
||||||
|
|
||||||
|
|
||||||
|
libscihdf5_la_CPPFLAGS = \
|
||||||
|
diff -ur a/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp b/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
|
||||||
|
--- a/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
|
||||||
|
+++ b/scilab/modules/hdf5/sci_gateway/cpp/sci_hdf5_listvar_v3.cpp
|
||||||
|
@@ -13,6 +13,8 @@
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#define H5_USE_18_API
|
||||||
|
+
|
||||||
|
#include <vector>
|
||||||
|
#include "function.hxx"
|
||||||
|
#include "string.hxx"
|
||||||
|
diff -ur a/scilab/modules/hdf5/src/c/h5_readDataFromFile.c b/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
|
||||||
|
--- a/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
|
||||||
|
+++ b/scilab/modules/hdf5/src/c/h5_readDataFromFile.c
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#define H5_NO_DEPRECATED_SYMBOLS
|
||||||
|
+#define H5_USE_18_API
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#include <sys/time.h>
|
||||||
|
diff -ur a/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c b/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
|
||||||
|
--- a/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
|
||||||
|
+++ b/scilab/modules/hdf5/src/c/h5_readDataFromFile_v1.c
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#define H5_NO_DEPRECATED_SYMBOLS
|
||||||
|
+#define H5_USE_18_API
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#include <sys/time.h>
|
Reference in New Issue