Import of Scilab port. Scilab is a matlab-like package.

PR:		3867
Submitted by:	Paulo Menezes <paulo@isr.uc.pt>
This commit is contained in:
Thomas Gellekum 1997-06-18 12:14:52 +00:00
parent 5c040456db
commit cad64cdf20
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=6991
42 changed files with 9712 additions and 0 deletions

36
math/Scilab/Makefile Normal file
View File

@ -0,0 +1,36 @@
# New ports collection makefile for: Scilab
# Version required: 2.3
# Date created: 13 June 1997
# Whom: paulo@isr.uc.pt
#
# $Id$
#
DISTNAME= scilab-2.3
PKGNAME= Scilab-2.3
CATEGORIES= math cad
MASTER_SITES= ftp://ftp.inria.fr/INRIA/Projects/Meta2/Scilab/
DISTFILES= scilab-2.3-src.tar.gz
MAINTAINER= paulo@isr.uc.pt
RUN_DEPENDS= xless:${PORTSDIR}/misc/xless
NO_CDROM= "Don't sell for profit."
HAS_CONFIGURE= yes
USE_X11= yes
SCIDIR= ${X11BASE}/lib/X11/scilab
post-install:
@echo "******************************************************************************"
@echo 0 - COPYRIGHT NOTICE
@echo
@echo To use Scilab, you need to fill and return the end of the file notice.tex
@echo "or notice.ps (postscript file). You may email to Scilab@inria.fr."
@echo
@echo "******************************************************************************"
.include <bsd.port.mk>

1
math/Scilab/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (scilab-2.3-src.tar.gz) = d4fc8537ffdb3b355841c737b26b4877

View File

@ -0,0 +1,26 @@
--- Makefile.in.orig Mon May 12 17:30:43 1997
+++ Makefile.in Wed Jun 18 13:44:05 1997
@@ -54,7 +54,8 @@
distclean::
$(RM) bin/scilex
-SUBDIRS = scripts macros imp intersci @MANVIEWER@ @XMETANET@ tests demos @COMM@
+# FreeBSD Has xless so we dont need it here
+SUBDIRS = scripts macros imp intersci @XMETANET@ tests demos @COMM@
SUBDIRS-DOC = man doc
@@ -135,3 +136,13 @@
touch .binary
cd .. ; tar cvf $(SCIDIR)/$(SCIBASE)-bin.tar $(BINDISTFILES)
$(RM) .binary
+
+install:
+ touch .binary
+ cd .. ; tar cvf - $(BINDISTFILES) | (cd ${PREFIX}/lib/X11; tar xf -)
+ cd ${PREFIX}/lib/X11/scilab-2.3; make
+ rm -f ${PREFIX}/bin/scilab
+ ln -fs ${PREFIX}/lib/X11/scilab-2.3/bin/scilab ${PREFIX}/bin/scilab
+ ln -fs ${PREFIX}/bin/xless ${PREFIX}/lib/X11/scilab-2.3/bin/xless
+ cp ${PREFIX}/lib/X11/scilab-2.3/X11_defaults/Xscilab ${PREFIX}/lib/X11/app-defaults
+ cp ${PREFIX}/lib/X11/scilab-2.3/X11_defaults/Metanet-color ${PREFIX}/lib/X11/app-defaults

View File

@ -0,0 +1,35 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/configure ./configure
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/configure Tue May 13 14:08:49 1997
--- ./configure Sun May 25 21:16:16 1997
***************
*** 1050,1055 ****
--- 1050,1078 ----
fi
MAKEFILE_TARGET=Makefile.solaris
;;
+ # FreeBSD
+ *-*-freebsd*)
+ CC=gcc
+ CC_OPTIONS='-O2 -Dfreebsd'
+ CC_LDFLAGS=-lm
+ # script shell f77 have bugs, get ours
+ FC=f77
+ FC_OPTIONS='-O2 -Dfreebsd'
+ FC_LDFLAGS=-lm
+ LD=ld
+ LD_LDFLAGS=-lm
+ if test "$enable_debug" = yes; then
+ CC_OPTIONS='-g -Dfreebsd'
+ FC_OPTIONS=-g
+ fi
+ if test "$G77" = yes; then
+ FC=g77
+ fi
+ DLDLIB='${SCIDIR}/libs/libdld.a'
+ DLD_SUBDIR=dld
+ MAKEFILE_TARGET=Makefile.sunos
+ ;;
+
# Linux a.out
*-pc-linux-gnuaout)
LIEEELIB=

View File

@ -0,0 +1,27 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/geci/scruteur.c ./geci/scruteur.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/geci/scruteur.c Mon May 12 16:34:55 1997
--- ./geci/scruteur.c Wed May 21 00:58:59 1997
***************
*** 12,17 ****
--- 12,20 ----
#include <stdio.h>
#include <signal.h>
#include <netdb.h>
+ #ifdef __FreeBSD__
+ #include <floatingpoint.h>
+ #endif
#include "listes_chainees.h"
#include "utilitaires.h"
***************
*** 45,50 ****
--- 48,56 ----
#if defined (sun) && defined (SYSV)
sigset_t set,oset;
#endif
+ #ifdef __FreeBSD__
+ fpsetmask(0);
+ #endif
signal(SIGTERM,signal_arret_scruteur);
signal(SIGQUIT,signal_arret_scruteur);

View File

@ -0,0 +1,27 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/imp/Slatexpr2.c ./imp/Slatexpr2.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/imp/Slatexpr2.c Mon May 12 16:34:55 1997
--- ./imp/Slatexpr2.c Wed May 21 01:00:03 1997
***************
*** 5,10 ****
--- 5,13 ----
#include <malloc.h>
#endif
#include <stdio.h>
+ #ifdef __FreeBSD__
+ #include <floatingpoint.h>
+ #endif
void readOneLine();
***************
*** 142,147 ****
--- 145,153 ----
int i ;
FILE *fd;
FILE *fdo;
+ #ifdef __FreeBSD__
+ fpsetmask(0);
+ #endif
if (argc !=4 ) { int i=0;
while (strcmp(UsageStr[i],"fin")!=0)
{

View File

@ -0,0 +1,27 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/imp/Slpr.c ./imp/Slpr.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/imp/Slpr.c Mon May 12 16:34:55 1997
--- ./imp/Slpr.c Wed May 21 00:55:40 1997
***************
*** 5,10 ****
--- 5,13 ----
#include <malloc.h>
#endif
#include <stdio.h>
+ #ifdef __FreeBSD__
+ #include <floatingpoint.h>
+ #endif
#ifdef __STDC__
***************
*** 52,57 ****
--- 55,63 ----
char buf[256];
int i ;
FILE *fd;
+ #ifdef __FreeBSD__
+ fpsetmask(0);
+ #endif
if (argc <= 2) { int i=0;
while (strcmp(UsageStr[i],"fin")!=0)
{

View File

@ -0,0 +1,13 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/default/mainsci.f ./routines/default/mainsci.f
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/default/mainsci.f Mon May 12 16:33:46 1997
--- ./routines/default/mainsci.f Wed May 21 00:44:49 1997
***************
*** 11,16 ****
--- 11,17 ----
mem=0
nargs = iargc()
call fgetarg(0,pname)
+ call nofpex()
i = 0
10 continue
i=i+1

View File

@ -0,0 +1,26 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/default/scimem.c ./routines/default/scimem.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/default/scimem.c Mon May 12 16:33:46 1997
--- ./routines/default/scimem.c Wed May 21 00:47:34 1997
***************
*** 8,13 ****
--- 8,27 ----
#include "../machine.h"
+ #if defined (__FreeBSD__)
+ #include <floatingpoint.h> /* This should be elsewhere but I had to
+ put it somewhere :( */
+ void C2F(nofpex)()
+ {
+ fpsetmask(0); /* Don't dump core on FPE return Inf or NaN */
+ }
+ #else
+ void C2F(nofpex)()
+ {
+ return;
+ }
+ #endif /*freebsd*/
+
char *the_p=NULL;
char *the_ps=NULL;

View File

@ -0,0 +1,15 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sound/misc.c ./routines/sound/misc.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sound/misc.c Mon May 12 16:34:27 1997
--- ./routines/sound/misc.c Fri May 16 20:25:33 1997
***************
*** 358,364 ****
--- 358,366 ----
{
static char nomesg[30];
extern int sys_nerr;
+ #ifndef __FreeBSD__
extern char *sys_errlist[];
+ #endif
if (errcode < sys_nerr)
return (sys_errlist[errcode]);
else

View File

@ -0,0 +1,22 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sparse/spConfig.h ./routines/sparse/spConfig.h
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sparse/spConfig.h Mon May 12 16:34:02 1997
--- ./routines/sparse/spConfig.h Fri May 16 20:08:24 1997
***************
*** 495,500 ****
--- 495,510 ----
# define LARGEST_SHORT_INTEGER SHRT_MAX
# define LARGEST_LONG_INTEGER LONG_MAX
#endif
+ #ifdef freebsd
+ # include <limits.h>
+ # include <float.h>
+ # define MACHINE_RESOLUTION DBL_EPSILON
+ # define LARGEST_REAL DBL_MAX
+ # define SMALLEST_REAL DBL_MIN
+ # define LARGEST_SHORT_INTEGER SHRT_MAX
+ # define LARGEST_LONG_INTEGER LONG_MAX
+ #endif
+
#ifdef WIN32
# include <limits.h>
# include <float.h>

View File

@ -0,0 +1,37 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sun/link.c ./routines/sun/link.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sun/link.c Mon May 12 16:34:04 1997
--- ./routines/sun/link.c Sun May 25 21:13:41 1997
***************
*** 118,124 ****
}
! #if (defined(sun) && defined(SYSV)) || defined(__alpha) || defined(sgi) || (!defined(hppa_old) && defined(hppa))
#include "link_SYSV.c"
#else
#if defined(sun) || defined(mips) || defined(_IBMR2) || defined(hppa_old)
--- 118,124 ----
}
! #if (defined(sun) && defined(SYSV)) || defined(__alpha) || defined(sgi) || (!defined(hppa_old) && defined(hppa)) || defined(__FreeBSD__)
#include "link_SYSV.c"
#else
#if defined(sun) || defined(mips) || defined(_IBMR2) || defined(hppa_old)
***************
*** 128,134 ****
#include "link_std.c"
#endif /* end of SUNOSDLD */
#else
! #if defined(linux)
#ifdef __ELF__
#include "link_SYSV.c"
#else
--- 128,134 ----
#include "link_std.c"
#endif /* end of SUNOSDLD */
#else
! #if defined(linux)
#ifdef __ELF__
#include "link_SYSV.c"
#else

View File

@ -0,0 +1,60 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sun/link_SYSV.c ./routines/sun/link_SYSV.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sun/link_SYSV.c Mon May 12 16:34:04 1997
--- ./routines/sun/link_SYSV.c Wed May 21 00:12:20 1997
***************
*** 27,42 ****
#include <archives.h>
#endif
! #ifdef linux
#include <unistd.h>
#include <sys/wait.h>
#endif
#ifndef linux
#ifndef hppa
#include <sys/mode.h>
#endif
#endif
#ifdef __alpha
#include <c_asm.h>
--- 27,47 ----
#include <archives.h>
#endif
! #if defined(linux) || defined(__FreeBSD__)
#include <unistd.h>
#include <sys/wait.h>
#endif
+ #ifdef __FreeBSD__
+ #define RTLD_NOW 1
+ #endif
#ifndef linux
+ #ifndef __FreeBSD__
#ifndef hppa
#include <sys/mode.h>
#endif
#endif
+ #endif
#ifdef __alpha
#include <c_asm.h>
***************
*** 169,178 ****
--- 174,187 ----
#ifdef linux
"/usr/bin/ld", "-shared", "-o", 0, 0
#else
+ #ifdef __FreeBSD__
+ "/usr/bin/ld", "-Bshareable", "-o", 0, 0
+ #else
#ifdef hppa
"/bin/ld", "-b", "-o", 0, 0
#else
"/bin/ld", "-shared", "-o", 0, 0
+ #endif
#endif
#endif
#endif

View File

@ -0,0 +1,15 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/xsci/wf_fig.h ./routines/xsci/wf_fig.h
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/xsci/wf_fig.h Mon May 12 16:34:24 1997
--- ./routines/xsci/wf_fig.h Fri May 16 20:27:49 1997
***************
*** 209,215 ****
--- 209,217 ----
extern int errno;
extern int sys_nerr;
+ #ifndef __FreeBSD__
extern char *sys_errlist[];
+ #endif
#include <math.h> /* for sin(), cos() etc */

View File

@ -0,0 +1,15 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/xsci/x_misc.c ./routines/xsci/x_misc.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/xsci/x_misc.c Mon May 12 16:34:23 1997
--- ./routines/xsci/x_misc.c Fri May 16 20:29:07 1997
***************
*** 507,513 ****
--- 507,515 ----
char *SysErrorMsg(n)
int n;
{
+ #ifndef __FreeBSD__
extern char *sys_errlist[];
+ #endif
extern int sys_nerr;
return ((n >= 0 && n < sys_nerr) ? sys_errlist[n] : "unknown error");

View File

@ -0,0 +1,14 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/graphics.c ./xmetanet/graphics.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/graphics.c Mon May 12 16:34:40 1997
--- ./xmetanet/graphics.c Mon May 19 00:28:39 1997
***************
*** 1,6 ****
--- 1,8 ----
#include <X11/Intrinsic.h>
#include <math.h>
+ #ifndef __FreeBSD__
#include <malloc.h>
+ #endif
#include <string.h>
#include <stdio.h>

View File

@ -0,0 +1,12 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/init.c ./xmetanet/init.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/init.c Mon May 12 16:34:40 1997
--- ./xmetanet/init.c Mon May 19 00:29:50 1997
***************
*** 1,3 ****
--- 1,6 ----
+ #ifdef __FreeBSD__
+ #include <sys/types.h>
+ #endif
#include <dirent.h>
#include <stdlib.h>
#include <string.h>

View File

@ -0,0 +1,41 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/metanet.c ./xmetanet/metanet.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/metanet.c Mon May 12 16:34:41 1997
--- ./xmetanet/metanet.c Wed May 21 01:00:49 1997
***************
*** 6,12 ****
#include <X11/StringDefs.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Label.h>
!
#include "defs.h"
#include "color.h"
#include "list.h"
--- 6,14 ----
#include <X11/StringDefs.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Label.h>
! #ifdef __FreeBSD__
! #include <floatingpoint.h>
! #endif
#include "defs.h"
#include "color.h"
#include "list.h"
***************
*** 219,225 ****
XSizeHints sizehints;
iniG = NULL;
!
/* Is xmetanet called by Scilab? */
igeci = find("-pipes",argc,argv);
--- 221,229 ----
XSizeHints sizehints;
iniG = NULL;
! #ifdef __FreeBSD__
! fpsetmask(0);
! #endif
/* Is xmetanet called by Scilab? */
igeci = find("-pipes",argc,argv);

1
math/Scilab/pkg-comment Normal file
View File

@ -0,0 +1 @@
A free CACSD Package by INRIA

27
math/Scilab/pkg-descr Normal file
View File

@ -0,0 +1,27 @@
Scilab is a scientific software package for numerical computations in a
user-friendly environment. It features:
Elaborate data structures (polynomial, rational and string matrices,
lists, multivariable linear systems,...).
Sophisticated interpreter and programming language with Matlab-like syntax.
Hundreds of built-in math functions (new primitives can easily be added).
Stunning graphics (2d, 3d, animation).
Open structure (easy interfacing with Fortran and C via online
dynamic link).
Many built-in libraries:
Linear Algebra (including sparse matrices, Kronecker form,
ordered Schur,...).
Control (Classical, LQG, H-infinity,...).
Package for LMI (Linear Matrix Inequalities) optimization.
Signal processing.
Simulation (various ode's, dassl,...).
Optimization (differentiable and non-differentiable, LQ solver).
Metanet (network analysis and optimization).
Symbolic capabilities through Maple interface.
Note: To configure your local printers, add their names to the PRINTERS
variable in the scilab script.
For more information see Scilab Home Page http://www-rocq.inria.fr/scilab/.
-- P. Menezes (paulo@isr.uc.pt)

4379
math/Scilab/pkg-plist Normal file

File diff suppressed because it is too large Load Diff

36
math/scilab/Makefile Normal file
View File

@ -0,0 +1,36 @@
# New ports collection makefile for: Scilab
# Version required: 2.3
# Date created: 13 June 1997
# Whom: paulo@isr.uc.pt
#
# $Id$
#
DISTNAME= scilab-2.3
PKGNAME= Scilab-2.3
CATEGORIES= math cad
MASTER_SITES= ftp://ftp.inria.fr/INRIA/Projects/Meta2/Scilab/
DISTFILES= scilab-2.3-src.tar.gz
MAINTAINER= paulo@isr.uc.pt
RUN_DEPENDS= xless:${PORTSDIR}/misc/xless
NO_CDROM= "Don't sell for profit."
HAS_CONFIGURE= yes
USE_X11= yes
SCIDIR= ${X11BASE}/lib/X11/scilab
post-install:
@echo "******************************************************************************"
@echo 0 - COPYRIGHT NOTICE
@echo
@echo To use Scilab, you need to fill and return the end of the file notice.tex
@echo "or notice.ps (postscript file). You may email to Scilab@inria.fr."
@echo
@echo "******************************************************************************"
.include <bsd.port.mk>

1
math/scilab/distinfo Normal file
View File

@ -0,0 +1 @@
MD5 (scilab-2.3-src.tar.gz) = d4fc8537ffdb3b355841c737b26b4877

View File

@ -0,0 +1,26 @@
--- Makefile.in.orig Mon May 12 17:30:43 1997
+++ Makefile.in Wed Jun 18 13:44:05 1997
@@ -54,7 +54,8 @@
distclean::
$(RM) bin/scilex
-SUBDIRS = scripts macros imp intersci @MANVIEWER@ @XMETANET@ tests demos @COMM@
+# FreeBSD Has xless so we dont need it here
+SUBDIRS = scripts macros imp intersci @XMETANET@ tests demos @COMM@
SUBDIRS-DOC = man doc
@@ -135,3 +136,13 @@
touch .binary
cd .. ; tar cvf $(SCIDIR)/$(SCIBASE)-bin.tar $(BINDISTFILES)
$(RM) .binary
+
+install:
+ touch .binary
+ cd .. ; tar cvf - $(BINDISTFILES) | (cd ${PREFIX}/lib/X11; tar xf -)
+ cd ${PREFIX}/lib/X11/scilab-2.3; make
+ rm -f ${PREFIX}/bin/scilab
+ ln -fs ${PREFIX}/lib/X11/scilab-2.3/bin/scilab ${PREFIX}/bin/scilab
+ ln -fs ${PREFIX}/bin/xless ${PREFIX}/lib/X11/scilab-2.3/bin/xless
+ cp ${PREFIX}/lib/X11/scilab-2.3/X11_defaults/Xscilab ${PREFIX}/lib/X11/app-defaults
+ cp ${PREFIX}/lib/X11/scilab-2.3/X11_defaults/Metanet-color ${PREFIX}/lib/X11/app-defaults

View File

@ -0,0 +1,35 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/configure ./configure
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/configure Tue May 13 14:08:49 1997
--- ./configure Sun May 25 21:16:16 1997
***************
*** 1050,1055 ****
--- 1050,1078 ----
fi
MAKEFILE_TARGET=Makefile.solaris
;;
+ # FreeBSD
+ *-*-freebsd*)
+ CC=gcc
+ CC_OPTIONS='-O2 -Dfreebsd'
+ CC_LDFLAGS=-lm
+ # script shell f77 have bugs, get ours
+ FC=f77
+ FC_OPTIONS='-O2 -Dfreebsd'
+ FC_LDFLAGS=-lm
+ LD=ld
+ LD_LDFLAGS=-lm
+ if test "$enable_debug" = yes; then
+ CC_OPTIONS='-g -Dfreebsd'
+ FC_OPTIONS=-g
+ fi
+ if test "$G77" = yes; then
+ FC=g77
+ fi
+ DLDLIB='${SCIDIR}/libs/libdld.a'
+ DLD_SUBDIR=dld
+ MAKEFILE_TARGET=Makefile.sunos
+ ;;
+
# Linux a.out
*-pc-linux-gnuaout)
LIEEELIB=

View File

@ -0,0 +1,27 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/geci/scruteur.c ./geci/scruteur.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/geci/scruteur.c Mon May 12 16:34:55 1997
--- ./geci/scruteur.c Wed May 21 00:58:59 1997
***************
*** 12,17 ****
--- 12,20 ----
#include <stdio.h>
#include <signal.h>
#include <netdb.h>
+ #ifdef __FreeBSD__
+ #include <floatingpoint.h>
+ #endif
#include "listes_chainees.h"
#include "utilitaires.h"
***************
*** 45,50 ****
--- 48,56 ----
#if defined (sun) && defined (SYSV)
sigset_t set,oset;
#endif
+ #ifdef __FreeBSD__
+ fpsetmask(0);
+ #endif
signal(SIGTERM,signal_arret_scruteur);
signal(SIGQUIT,signal_arret_scruteur);

View File

@ -0,0 +1,27 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/imp/Slatexpr2.c ./imp/Slatexpr2.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/imp/Slatexpr2.c Mon May 12 16:34:55 1997
--- ./imp/Slatexpr2.c Wed May 21 01:00:03 1997
***************
*** 5,10 ****
--- 5,13 ----
#include <malloc.h>
#endif
#include <stdio.h>
+ #ifdef __FreeBSD__
+ #include <floatingpoint.h>
+ #endif
void readOneLine();
***************
*** 142,147 ****
--- 145,153 ----
int i ;
FILE *fd;
FILE *fdo;
+ #ifdef __FreeBSD__
+ fpsetmask(0);
+ #endif
if (argc !=4 ) { int i=0;
while (strcmp(UsageStr[i],"fin")!=0)
{

View File

@ -0,0 +1,27 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/imp/Slpr.c ./imp/Slpr.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/imp/Slpr.c Mon May 12 16:34:55 1997
--- ./imp/Slpr.c Wed May 21 00:55:40 1997
***************
*** 5,10 ****
--- 5,13 ----
#include <malloc.h>
#endif
#include <stdio.h>
+ #ifdef __FreeBSD__
+ #include <floatingpoint.h>
+ #endif
#ifdef __STDC__
***************
*** 52,57 ****
--- 55,63 ----
char buf[256];
int i ;
FILE *fd;
+ #ifdef __FreeBSD__
+ fpsetmask(0);
+ #endif
if (argc <= 2) { int i=0;
while (strcmp(UsageStr[i],"fin")!=0)
{

View File

@ -0,0 +1,13 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/default/mainsci.f ./routines/default/mainsci.f
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/default/mainsci.f Mon May 12 16:33:46 1997
--- ./routines/default/mainsci.f Wed May 21 00:44:49 1997
***************
*** 11,16 ****
--- 11,17 ----
mem=0
nargs = iargc()
call fgetarg(0,pname)
+ call nofpex()
i = 0
10 continue
i=i+1

View File

@ -0,0 +1,26 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/default/scimem.c ./routines/default/scimem.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/default/scimem.c Mon May 12 16:33:46 1997
--- ./routines/default/scimem.c Wed May 21 00:47:34 1997
***************
*** 8,13 ****
--- 8,27 ----
#include "../machine.h"
+ #if defined (__FreeBSD__)
+ #include <floatingpoint.h> /* This should be elsewhere but I had to
+ put it somewhere :( */
+ void C2F(nofpex)()
+ {
+ fpsetmask(0); /* Don't dump core on FPE return Inf or NaN */
+ }
+ #else
+ void C2F(nofpex)()
+ {
+ return;
+ }
+ #endif /*freebsd*/
+
char *the_p=NULL;
char *the_ps=NULL;

View File

@ -0,0 +1,15 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sound/misc.c ./routines/sound/misc.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sound/misc.c Mon May 12 16:34:27 1997
--- ./routines/sound/misc.c Fri May 16 20:25:33 1997
***************
*** 358,364 ****
--- 358,366 ----
{
static char nomesg[30];
extern int sys_nerr;
+ #ifndef __FreeBSD__
extern char *sys_errlist[];
+ #endif
if (errcode < sys_nerr)
return (sys_errlist[errcode]);
else

View File

@ -0,0 +1,22 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sparse/spConfig.h ./routines/sparse/spConfig.h
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sparse/spConfig.h Mon May 12 16:34:02 1997
--- ./routines/sparse/spConfig.h Fri May 16 20:08:24 1997
***************
*** 495,500 ****
--- 495,510 ----
# define LARGEST_SHORT_INTEGER SHRT_MAX
# define LARGEST_LONG_INTEGER LONG_MAX
#endif
+ #ifdef freebsd
+ # include <limits.h>
+ # include <float.h>
+ # define MACHINE_RESOLUTION DBL_EPSILON
+ # define LARGEST_REAL DBL_MAX
+ # define SMALLEST_REAL DBL_MIN
+ # define LARGEST_SHORT_INTEGER SHRT_MAX
+ # define LARGEST_LONG_INTEGER LONG_MAX
+ #endif
+
#ifdef WIN32
# include <limits.h>
# include <float.h>

View File

@ -0,0 +1,37 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sun/link.c ./routines/sun/link.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sun/link.c Mon May 12 16:34:04 1997
--- ./routines/sun/link.c Sun May 25 21:13:41 1997
***************
*** 118,124 ****
}
! #if (defined(sun) && defined(SYSV)) || defined(__alpha) || defined(sgi) || (!defined(hppa_old) && defined(hppa))
#include "link_SYSV.c"
#else
#if defined(sun) || defined(mips) || defined(_IBMR2) || defined(hppa_old)
--- 118,124 ----
}
! #if (defined(sun) && defined(SYSV)) || defined(__alpha) || defined(sgi) || (!defined(hppa_old) && defined(hppa)) || defined(__FreeBSD__)
#include "link_SYSV.c"
#else
#if defined(sun) || defined(mips) || defined(_IBMR2) || defined(hppa_old)
***************
*** 128,134 ****
#include "link_std.c"
#endif /* end of SUNOSDLD */
#else
! #if defined(linux)
#ifdef __ELF__
#include "link_SYSV.c"
#else
--- 128,134 ----
#include "link_std.c"
#endif /* end of SUNOSDLD */
#else
! #if defined(linux)
#ifdef __ELF__
#include "link_SYSV.c"
#else

View File

@ -0,0 +1,60 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sun/link_SYSV.c ./routines/sun/link_SYSV.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/sun/link_SYSV.c Mon May 12 16:34:04 1997
--- ./routines/sun/link_SYSV.c Wed May 21 00:12:20 1997
***************
*** 27,42 ****
#include <archives.h>
#endif
! #ifdef linux
#include <unistd.h>
#include <sys/wait.h>
#endif
#ifndef linux
#ifndef hppa
#include <sys/mode.h>
#endif
#endif
#ifdef __alpha
#include <c_asm.h>
--- 27,47 ----
#include <archives.h>
#endif
! #if defined(linux) || defined(__FreeBSD__)
#include <unistd.h>
#include <sys/wait.h>
#endif
+ #ifdef __FreeBSD__
+ #define RTLD_NOW 1
+ #endif
#ifndef linux
+ #ifndef __FreeBSD__
#ifndef hppa
#include <sys/mode.h>
#endif
#endif
+ #endif
#ifdef __alpha
#include <c_asm.h>
***************
*** 169,178 ****
--- 174,187 ----
#ifdef linux
"/usr/bin/ld", "-shared", "-o", 0, 0
#else
+ #ifdef __FreeBSD__
+ "/usr/bin/ld", "-Bshareable", "-o", 0, 0
+ #else
#ifdef hppa
"/bin/ld", "-b", "-o", 0, 0
#else
"/bin/ld", "-shared", "-o", 0, 0
+ #endif
#endif
#endif
#endif

View File

@ -0,0 +1,15 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/xsci/wf_fig.h ./routines/xsci/wf_fig.h
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/xsci/wf_fig.h Mon May 12 16:34:24 1997
--- ./routines/xsci/wf_fig.h Fri May 16 20:27:49 1997
***************
*** 209,215 ****
--- 209,217 ----
extern int errno;
extern int sys_nerr;
+ #ifndef __FreeBSD__
extern char *sys_errlist[];
+ #endif
#include <math.h> /* for sin(), cos() etc */

View File

@ -0,0 +1,15 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/xsci/x_misc.c ./routines/xsci/x_misc.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/routines/xsci/x_misc.c Mon May 12 16:34:23 1997
--- ./routines/xsci/x_misc.c Fri May 16 20:29:07 1997
***************
*** 507,513 ****
--- 507,515 ----
char *SysErrorMsg(n)
int n;
{
+ #ifndef __FreeBSD__
extern char *sys_errlist[];
+ #endif
extern int sys_nerr;
return ((n >= 0 && n < sys_nerr) ? sys_errlist[n] : "unknown error");

View File

@ -0,0 +1,14 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/graphics.c ./xmetanet/graphics.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/graphics.c Mon May 12 16:34:40 1997
--- ./xmetanet/graphics.c Mon May 19 00:28:39 1997
***************
*** 1,6 ****
--- 1,8 ----
#include <X11/Intrinsic.h>
#include <math.h>
+ #ifndef __FreeBSD__
#include <malloc.h>
+ #endif
#include <string.h>
#include <stdio.h>

View File

@ -0,0 +1,12 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/init.c ./xmetanet/init.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/init.c Mon May 12 16:34:40 1997
--- ./xmetanet/init.c Mon May 19 00:29:50 1997
***************
*** 1,3 ****
--- 1,6 ----
+ #ifdef __FreeBSD__
+ #include <sys/types.h>
+ #endif
#include <dirent.h>
#include <stdlib.h>
#include <string.h>

View File

@ -0,0 +1,41 @@
diff -c -r /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/metanet.c ./xmetanet/metanet.c
*** /usr/LOCAL/scilab2.3/work/scilab-2.3/xmetanet/metanet.c Mon May 12 16:34:41 1997
--- ./xmetanet/metanet.c Wed May 21 01:00:49 1997
***************
*** 6,12 ****
#include <X11/StringDefs.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Label.h>
!
#include "defs.h"
#include "color.h"
#include "list.h"
--- 6,14 ----
#include <X11/StringDefs.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Label.h>
! #ifdef __FreeBSD__
! #include <floatingpoint.h>
! #endif
#include "defs.h"
#include "color.h"
#include "list.h"
***************
*** 219,225 ****
XSizeHints sizehints;
iniG = NULL;
!
/* Is xmetanet called by Scilab? */
igeci = find("-pipes",argc,argv);
--- 221,229 ----
XSizeHints sizehints;
iniG = NULL;
! #ifdef __FreeBSD__
! fpsetmask(0);
! #endif
/* Is xmetanet called by Scilab? */
igeci = find("-pipes",argc,argv);

1
math/scilab/pkg-comment Normal file
View File

@ -0,0 +1 @@
A free CACSD Package by INRIA

27
math/scilab/pkg-descr Normal file
View File

@ -0,0 +1,27 @@
Scilab is a scientific software package for numerical computations in a
user-friendly environment. It features:
Elaborate data structures (polynomial, rational and string matrices,
lists, multivariable linear systems,...).
Sophisticated interpreter and programming language with Matlab-like syntax.
Hundreds of built-in math functions (new primitives can easily be added).
Stunning graphics (2d, 3d, animation).
Open structure (easy interfacing with Fortran and C via online
dynamic link).
Many built-in libraries:
Linear Algebra (including sparse matrices, Kronecker form,
ordered Schur,...).
Control (Classical, LQG, H-infinity,...).
Package for LMI (Linear Matrix Inequalities) optimization.
Signal processing.
Simulation (various ode's, dassl,...).
Optimization (differentiable and non-differentiable, LQ solver).
Metanet (network analysis and optimization).
Symbolic capabilities through Maple interface.
Note: To configure your local printers, add their names to the PRINTERS
variable in the scilab script.
For more information see Scilab Home Page http://www-rocq.inria.fr/scilab/.
-- P. Menezes (paulo@isr.uc.pt)

4379
math/scilab/pkg-plist Normal file

File diff suppressed because it is too large Load Diff