summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD14
-rw-r--r--scilab-fix-ocaml-4.0.4.diff120
3 files changed, 133 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d4cb54fb751d..85b9f009d25d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Tue Feb 21 08:57:50 UTC 2017
+# Wed Mar 29 10:00:19 UTC 2017
pkgbase = scilab
pkgdesc = A scientific software package for numerical computations.
pkgver = 6.0.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.scilab.org
arch = i686
arch = x86_64
@@ -50,6 +50,7 @@ pkgbase = scilab
source = scilab-lucene-6.patch
source = scilab-hdf5-type.patch
source = scilab-hdf5-1.8.10.patch
+ source = scilab-fix-ocaml-4.0.4.diff
sha256sums = b71bde8e397173a713493159a5b559de2e049b493985663418c79b2de0f23137
sha256sums = f19f173e989f72bd55bda35e271b3c180ecef4e29da964df3f230fce8b1330fc
sha256sums = 37f649fea0196b255e5a8576dd1e8c5fd219c6e8c600b703b35303fb90b6a7e0
@@ -57,6 +58,7 @@ pkgbase = scilab
sha256sums = ba7969fff7f839562120534222fbb6421e204f6a382654d80bbab19e0c7a2c66
sha256sums = c992a4f230dac60c3e217efee04b678c58d856f2aafa6173f742d4c5b050ab9d
sha256sums = 2dee1346c240d09ce7870bbbeb3318e0ac5d78f249d855df313e9cb7a2ef7fc0
+ sha256sums = 4288f98e34d0351c21b79bfc5b9fddabdee143965420fd3187d133e5d53ee20e
pkgname = scilab
diff --git a/PKGBUILD b/PKGBUILD
index 176194c4c435..3654cfcf9a21 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=scilab
pkgver=6.0.0
-pkgrel=1
+pkgrel=2
pkgdesc='A scientific software package for numerical computations.'
arch=('i686' 'x86_64')
url='https://www.scilab.org'
@@ -26,14 +26,16 @@ source=("${url}/download/${pkgver}/${pkgname}-${pkgver}-src.tar.gz"
"${pkgname}-strict-jar.patch"
"${pkgname}-lucene-6.patch"
"${pkgname}-hdf5-type.patch"
- "${pkgname}-hdf5-1.8.10.patch")
+ "${pkgname}-hdf5-1.8.10.patch"
+ "${pkgname}-fix-ocaml-4.0.4.diff")
sha256sums=('b71bde8e397173a713493159a5b559de2e049b493985663418c79b2de0f23137'
'f19f173e989f72bd55bda35e271b3c180ecef4e29da964df3f230fce8b1330fc'
'37f649fea0196b255e5a8576dd1e8c5fd219c6e8c600b703b35303fb90b6a7e0'
'38aa094951338fa1d267dc6f397552e175213b0f8ba7b35727c178607861f6dd'
'ba7969fff7f839562120534222fbb6421e204f6a382654d80bbab19e0c7a2c66'
'c992a4f230dac60c3e217efee04b678c58d856f2aafa6173f742d4c5b050ab9d'
- '2dee1346c240d09ce7870bbbeb3318e0ac5d78f249d855df313e9cb7a2ef7fc0')
+ '2dee1346c240d09ce7870bbbeb3318e0ac5d78f249d855df313e9cb7a2ef7fc0'
+ '4288f98e34d0351c21b79bfc5b9fddabdee143965420fd3187d133e5d53ee20e')
prepare(){
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -50,6 +52,8 @@ prepare(){
patch -p0 < "${srcdir}"/${pkgname}-hdf5-type.patch
# Fix for LD_LIBRARY_PATH
patch bin/scilab "${srcdir}"/${pkgname}-LD_LIBRARY_PATH.patch
+ # Fix build with ocaml 4.0.4, https://codereview.scilab.org/#/c/19232
+ patch -p2 < "${srcdir}"/${pkgname}-fix-ocaml-4.0.4.diff
}
build() {
@@ -63,14 +67,14 @@ build() {
--with-matio \
--with-umfpack \
--with-fftw \
- --without-modelica \
+ --with-modelica \
--without-emf \
--with-install-help-xml \
--enable-build-help \
--enable-build-localization \
--disable-static-system-lib
- make
+ make -j1
make doc
}
diff --git a/scilab-fix-ocaml-4.0.4.diff b/scilab-fix-ocaml-4.0.4.diff
new file mode 100644
index 000000000000..9eb81d1cce95
--- /dev/null
+++ b/scilab-fix-ocaml-4.0.4.diff
@@ -0,0 +1,120 @@
+From 39662e94dca4d3c71ba0e7792de2d200f0ec7a08 Mon Sep 17 00:00:00 2001
+From: Clément DAVID <clement.david@esi-group.com>
+Date: Mon, 27 Mar 2017 17:45:41 +0200
+Subject: [PATCH] Fix build with ocaml 4.0.4
+
+Change-Id: I962fe026f1c44f7f76435db0b4838b0d936994c8
+---
+
+diff --git a/scilab/modules/scicos/Makefile.in b/scilab/modules/scicos/Makefile.in
+index bbd4676..033120d 100644
+--- a/scilab/modules/scicos/Makefile.in
++++ b/scilab/modules/scicos/Makefile.in
+@@ -490,7 +490,7 @@
+ @OCAML_TRUE@@XCOS_TRUE@ modelicat$(EXEEXT)
+ PROGRAMS = $(bin_PROGRAMS)
+ am__XML2Modelica_SOURCES_DIST = $(srcdir)/src/xml2modelica/xMLTree.ml \
+- $(srcdir)/src/xml2modelica/linenum.mll \
++ $(srcdir)/src/modelica_compiler/linenum.mll \
+ $(srcdir)/src/xml2modelica/stringParser.ml \
+ $(srcdir)/src/xml2modelica/stringLexer.ml \
+ $(srcdir)/src/xml2modelica/xMLParser.ml \
+@@ -1266,7 +1266,7 @@
+ ### XML2Modelica
+ @OCAML_TRUE@@XCOS_TRUE@XML2Modelica_SOURCES = \
+ @OCAML_TRUE@@XCOS_TRUE@ $(srcdir)/src/xml2modelica/xMLTree.ml \
+-@OCAML_TRUE@@XCOS_TRUE@ $(srcdir)/src/xml2modelica/linenum.mll \
++@OCAML_TRUE@@XCOS_TRUE@ $(srcdir)/src/modelica_compiler/linenum.mll \
+ @OCAML_TRUE@@XCOS_TRUE@ $(srcdir)/src/xml2modelica/stringParser.ml \
+ @OCAML_TRUE@@XCOS_TRUE@ $(srcdir)/src/xml2modelica/stringLexer.ml \
+ @OCAML_TRUE@@XCOS_TRUE@ $(srcdir)/src/xml2modelica/xMLParser.ml \
+@@ -3826,10 +3826,10 @@
+ @OCAML_TRUE@@XCOS_TRUE@ ./src/xml2modelica/xMLTree.ml
+ @OCAML_TRUE@@XCOS_TRUE@./src/xml2modelica/xMLTree.cmx ./src/xml2modelica/xMLTree.o \
+ @OCAML_TRUE@@XCOS_TRUE@ ./src/xml2modelica/xMLTree.cmi : ./src/xml2modelica/xMLTree.ml
+-@OCAML_TRUE@@XCOS_TRUE@./src/xml2modelica/linenum.cmo ./src/xml2modelica/linenum.cmi : \
+-@OCAML_TRUE@@XCOS_TRUE@ ./src/xml2modelica/linenum.ml
+-@OCAML_TRUE@@XCOS_TRUE@./src/xml2modelica/linenum.cmx ./src/xml2modelica/linenum.o \
+-@OCAML_TRUE@@XCOS_TRUE@ ./src/xml2modelica/linenum.cmi : ./src/xml2modelica/linenum.ml
++@OCAML_TRUE@@XCOS_TRUE@./src/modelica_compiler/linenum.cmo ./src/modelica_compiler/linenum.cmi : \
++@OCAML_TRUE@@XCOS_TRUE@ ./src/modelica_compiler/linenum.ml
++@OCAML_TRUE@@XCOS_TRUE@./src/modelica_compiler/linenum.cmx ./src/modelica_compiler/linenum.o \
++@OCAML_TRUE@@XCOS_TRUE@ ./src/modelica_compiler/linenum.cmi : ./src/modelica_compiler/linenum.ml
+ @OCAML_TRUE@@XCOS_TRUE@./src/xml2modelica/stringParser.cmo ./src/xml2modelica/stringParser.cmi : \
+ @OCAML_TRUE@@XCOS_TRUE@ ./src/xml2modelica/stringParser.ml
+ @OCAML_TRUE@@XCOS_TRUE@./src/xml2modelica/stringParser.cmx ./src/xml2modelica/stringParser.o \
+diff --git a/scilab/modules/scicos/Makefile.modelica.am b/scilab/modules/scicos/Makefile.modelica.am
+index 01fd5f1..d12f7d6 100644
+--- a/scilab/modules/scicos/Makefile.modelica.am
++++ b/scilab/modules/scicos/Makefile.modelica.am
+@@ -29,7 +29,7 @@
+
+ XML2Modelica_SOURCES = \
+ $(srcdir)/src/xml2modelica/xMLTree.ml \
+- $(srcdir)/src/xml2modelica/linenum.mll \
++ $(srcdir)/src/modelica_compiler/linenum.mll \
+ $(srcdir)/src/xml2modelica/stringParser.ml \
+ $(srcdir)/src/xml2modelica/stringLexer.ml \
+ $(srcdir)/src/xml2modelica/xMLParser.ml \
+diff --git a/scilab/modules/scicos/src/xml2modelica/linenum.mll b/scilab/modules/scicos/src/xml2modelica/linenum.mll
+deleted file mode 100644
+index c043e44..0000000
+--- a/scilab/modules/scicos/src/xml2modelica/linenum.mll
++++ /dev/null
+@@ -1,56 +0,0 @@
+-(*
+- * Translator from Modelica 2.x to flat Modelica
+- *
+- * Copyright (C) 2005 - 2007 Imagine S.A.
+- * For more information or commercial use please contact us at www.amesim.com
+- *
+- * This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Public License
+- * as published by the Free Software Foundation; either version 2
+- * of the License, or (at your option) any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+- *
+- *)
+-
+-{
+-
+-(** Convert {! Parser.location } to line and column numbers. *)
+-
+-let linenum = ref 0
+-let linebeg = ref 0
+-
+-}
+-
+-rule skip_line = parse
+- | [^ '\n' '\r']* ('\n' | '\r' | "\r\n")
+- { incr linenum;
+- linebeg := Lexing.lexeme_start lexbuf;
+- Lexing.lexeme_end lexbuf }
+- | [^ '\n' '\r']* eof
+- { incr linenum;
+- linebeg := Lexing.lexeme_start lexbuf;
+- raise End_of_file }
+-
+-{
+-
+-let for_position file loc =
+- let ic = open_in_bin file in
+- let lb = Lexing.from_channel ic in
+- linenum := 1;
+- linebeg := 0;
+- begin try
+- while skip_line lb <= loc do () done
+- with End_of_file -> ()
+- end;
+- close_in ic;
+- (!linenum - 1, !linebeg)
+-
+-}