summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2002-03-05 21:05:52 +0000
committerdmcmahill <dmcmahill>2002-03-05 21:05:52 +0000
commit67f7b5fc9a7220e6eb2a9b33c986fc6db5340ffe (patch)
treebef76cafdf0f21a17b12f594968cec816ccb287c /math
parent539732aaed05487352e0e97700fc365e3ba9e388 (diff)
downloadpkgsrc-67f7b5fc9a7220e6eb2a9b33c986fc6db5340ffe.tar.gz
enable this on NetBSD>1.5U on alpha since alpha FPC code is now in place.
While here, add some missing headers and squish a LP64 bug. Passes all self tests and all but 2 examples on a 1.5ZA alpha.
Diffstat (limited to 'math')
-rw-r--r--math/scilab/Makefile29
-rw-r--r--math/scilab/distinfo13
-rw-r--r--math/scilab/files/chk_ieee.c14
-rw-r--r--math/scilab/patches/patch-ac27
-rw-r--r--math/scilab/patches/patch-ad28
-rw-r--r--math/scilab/patches/patch-ar24
-rw-r--r--math/scilab/patches/patch-as12
-rw-r--r--math/scilab/patches/patch-at13
-rw-r--r--math/scilab/patches/patch-au13
-rw-r--r--math/scilab/patches/patch-av11
-rw-r--r--math/scilab/patches/patch-aw11
-rw-r--r--math/scilab/patches/patch-ax11
12 files changed, 190 insertions, 16 deletions
diff --git a/math/scilab/Makefile b/math/scilab/Makefile
index 76d4cab5eb4..5356500190e 100644
--- a/math/scilab/Makefile
+++ b/math/scilab/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.29 2001/12/22 00:03:25 dmcmahill Exp $
+# $NetBSD: Makefile,v 1.30 2002/03/05 21:05:52 dmcmahill Exp $
#
DISTNAME= ${SCIBASE}.src
PKGNAME= ${SCIBASE}
-PKGREVISION= 2
+PKGREVISION= 3
SCIBASE= scilab-2.6
WRKSRC= ${WRKDIR}/${DISTNAME:.src=}
CATEGORIES= math
@@ -16,10 +16,9 @@ COMMENT= High-level scientific math programming environment with graphics
DEPENDS+= xless-[0-9]*:../../x11/xless
DEPENDS+= pvm-3.4.3:../../parallel/pvm3
-# needs full floating point math. Once the FPC code for alpha is integrated
-# this line can be changed to only exclude older versions of the operating
-# system. Additionally, -mieee will need to be added.
-NOT_FOR_PLATFORM= *-*-alpha
+#needs FPC code not found in older versions of NetBSD
+NOT_FOR_PLATFORM= NetBSD-1.[0-4]*-alpha NetBSD-1.5-alpha \
+ NetBSD-1.5.*-alpha NetBSD-1.5[A-U]-alpha
USE_FORTRAN= yes
USE_LIBTOOL= yes
@@ -37,6 +36,22 @@ CONFIGURE_ENV+= PVM_ROOT=${PVM_ROOT}
CONFIGURE_ENV+= X11BASE=${X11BASE}
PLIST_SUBST+= SCIBASE=${SCIBASE}
+.include "../../mk/bsd.prefs.mk"
+
+.if (${MACHINE_ARCH} == "alpha")
+pre-fetch:
+ @${ECHO} "===> Checking if you have working FPC"
+ @${MKDIR} ${WRKDIR}
+ ${CC} ${CFLAGS} -o ${WRKDIR}/chk_ieee ${FILESDIR}/chk_ieee.c
+ @cd ${WRKDIR} && if ./chk_ieee ; then ${ECHO} "yes" ; else \
+ ${ECHO} "no" ; \
+ ${ECHO} "${PKGNAME} requires floating point completion on this system" ;\
+ ${ECHO} "Possible causes for this check failing are:" ;\
+ ${ECHO} " - you have an old /usr/lib/* which was not compiled with -mieee" ;\
+ ${ECHO} " - you have overridden CFLAGS for pkgsrc removing the -mieee flag" ;\
+ ${ECHO} "Without fixing this problem ${PKGNAME} will not work." ; ${FALSE} ; fi
+.endif
+
# remove some stuff which is broken in the distfile. The config's
# are links to ../config (ie circular).
post-extract:
@@ -58,7 +73,7 @@ post-build:
pre-install:
cd ${WRKSRC}/tests && ${MAKE_PROGRAM} distclean
cd ${WRKSRC}/examples && ${MAKE_PROGRAM} distclean
- find ${WRKSRC}/ -name \*.orig -print -exec rm {} \;
+ ${FIND} ${WRKSRC}/ -name \*.orig -print -exec ${RM} {} \;
post-install:
${LN} -sf ${X11PREFIX}/bin/xless ${PREFIX}/${SCIBASE}/bin/xless
diff --git a/math/scilab/distinfo b/math/scilab/distinfo
index 8b224343534..862c26139ca 100644
--- a/math/scilab/distinfo
+++ b/math/scilab/distinfo
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.5 2001/12/22 00:03:25 dmcmahill Exp $
+$NetBSD: distinfo,v 1.6 2002/03/05 21:05:52 dmcmahill Exp $
SHA1 (scilab-2.6.src.tar.gz) = a91d9a33e849844ec8d6ce98657ded085c5928e0
Size (scilab-2.6.src.tar.gz) = 6725259 bytes
SHA1 (patch-aa) = a4028254852fb938eb9e3a64b9964526195e13ab
SHA1 (patch-ab) = 8896079c2b11e41faf1760d5e88cfc2771a30120
-SHA1 (patch-ac) = f1f5f90b7f0c3ca2cf5dd0e602395a0b4c56cd1b
-SHA1 (patch-ad) = b44dc5cfc08a3c91c6230bff9cedd28d3cc62427
+SHA1 (patch-ac) = fb7bddba451b7737c031a7eabe12c341daa7b4d0
+SHA1 (patch-ad) = dd61bb74802f892d558e282450073ac013a89599
SHA1 (patch-ae) = 5dc250f876b0932adbc7f2771843f71440c9038e
SHA1 (patch-af) = 5a94f300bfbaf7791cc3dc52382ee48693189647
SHA1 (patch-ag) = ba61ea2d65f4e4dfef8e32b1383a956140f61871
@@ -19,3 +19,10 @@ SHA1 (patch-an) = c0086cf9d5f89c952ec3d5b9ddf8b25835ec696d
SHA1 (patch-ao) = 7ce1918c057a9f55626dcdd511c7dcbda9ff53d6
SHA1 (patch-ap) = 50f6adb8083c317e9f61b6d85236b41dd850f696
SHA1 (patch-aq) = 41326a5f035c827a0c9c8595e175273297dc20c8
+SHA1 (patch-ar) = 2162ecb3f6571b6ac81288c3ac74c8986147a319
+SHA1 (patch-as) = fbd24619bcd50d0975bdd687f7458300b3598c05
+SHA1 (patch-at) = 7b7911f192bd5fb9cda288b65bfd2f1b4ed22759
+SHA1 (patch-au) = 6d4bb69d7ff1bc1c06c1bc7359725c14da6222da
+SHA1 (patch-av) = 96297761da050b71096f41d32566152a52e470a5
+SHA1 (patch-aw) = b243b52711a6219811d26d8640e185b698585493
+SHA1 (patch-ax) = 760f7b506fbe47d6db6ecfdf4440c03dce07d6cf
diff --git a/math/scilab/files/chk_ieee.c b/math/scilab/files/chk_ieee.c
new file mode 100644
index 00000000000..bb92a951fd0
--- /dev/null
+++ b/math/scilab/files/chk_ieee.c
@@ -0,0 +1,14 @@
+/* $NetBSD: chk_ieee.c,v 1.1 2002/03/05 21:05:53 dmcmahill Exp $ */
+
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ double x=0.0;
+ double y=1.0;
+ double z;
+
+ z=y/x;
+
+ return 0;
+}
diff --git a/math/scilab/patches/patch-ac b/math/scilab/patches/patch-ac
index b11dec5c155..1ce47a172db 100644
--- a/math/scilab/patches/patch-ac
+++ b/math/scilab/patches/patch-ac
@@ -1,11 +1,13 @@
-$NetBSD: patch-ac,v 1.4 2001/04/08 16:25:28 dmcmahill Exp $
+$NetBSD: patch-ac,v 1.5 2002/03/05 21:05:53 dmcmahill Exp $
check for the fortran libs. We need to check this way
to keep compatibility with both f2c and f77 rather than
hard coding something like "-lg2c".
+also honor {C,F,LD}FLAGS
+
--- configure.in.orig Mon Mar 26 07:08:33 2001
-+++ configure.in Fri Mar 30 06:08:18 2001
++++ configure.in Sun Mar 3 13:19:35 2002
@@ -112,4 +112,12 @@
fi
@@ -19,6 +21,27 @@ hard coding something like "-lg2c".
+
#############################################
## Compilers and options according to machine
+@@ -847,7 +855,7 @@
+ # C Compiler
+ #
+- CC=cc
+- CC_OPTIONS='-O2 -Dnetbsd'
+- CC_LDFLAGS="-Wl,-R${X11BASE}/lib"
++ CC="${CC}"
++ CC_OPTIONS="${CFLAGS} -Dnetbsd"
++ CC_LDFLAGS="${LDFLAGS} -Wl,-R${X11BASE}/lib"
+ CC_PICFLAGS='-fPIC'
+ # check for --export-dynamic
+@@ -875,7 +883,7 @@
+ fi
+ FC="$F77"
+- FC_OPTIONS='-O2'
++ FC_OPTIONS="${FFLAGS}"
+ FC_OPTIONS_O0=
+- FC_LDFLAGS="-Wl,-R${X11BASE}/lib"
++ FC_LDFLAGS="${LDFLAGS} -Wl,-R${X11BASE}/lib"
+ FC_PICFLAGS='-fPIC'
+ # check for --export-dynamic
@@ -1339,4 +1347,5 @@
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
diff --git a/math/scilab/patches/patch-ad b/math/scilab/patches/patch-ad
index fd2e98af10c..e12dc3516d0 100644
--- a/math/scilab/patches/patch-ad
+++ b/math/scilab/patches/patch-ad
@@ -1,10 +1,9 @@
-$NetBSD: patch-ad,v 1.4 2001/04/08 16:25:28 dmcmahill Exp $
+$NetBSD: patch-ad,v 1.5 2002/03/05 21:05:53 dmcmahill Exp $
-Result of running 'autoconf' after patching configure.in
-no other manual changes.
+result of running autoconf on patched configure.in
--- configure.orig Mon Mar 26 07:10:37 2001
-+++ configure Fri Mar 30 06:08:41 2001
++++ configure Sun Mar 3 13:19:25 2002
@@ -991,4 +991,303 @@
fi
@@ -561,6 +560,17 @@ no other manual changes.
+echo "configure:2734: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
+@@ -2558,7 +2857,7 @@
+ # C Compiler
+ #
+- CC=cc
+- CC_OPTIONS='-O2 -Dnetbsd'
+- CC_LDFLAGS="-Wl,-R${X11BASE}/lib"
++ CC="${CC}"
++ CC_OPTIONS="${CFLAGS} -Dnetbsd"
++ CC_LDFLAGS="${LDFLAGS} -Wl,-R${X11BASE}/lib"
+ CC_PICFLAGS='-fPIC'
+ # check for --export-dynamic
@@ -2566,7 +2865,7 @@
LDFLAGS='-Wl,--export-dynamic'
echo $ac_n "checking if the linker accepts --export-dynamic""... $ac_c" 1>&6
@@ -592,6 +602,16 @@ no other manual changes.
+echo "configure:2937: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
+@@ -2670,7 +2969,7 @@
+ fi
+ FC="$F77"
+- FC_OPTIONS='-O2'
++ FC_OPTIONS="${FFLAGS}"
+ FC_OPTIONS_O0=
+- FC_LDFLAGS="-Wl,-R${X11BASE}/lib"
++ FC_LDFLAGS="${LDFLAGS} -Wl,-R${X11BASE}/lib"
+ FC_PICFLAGS='-fPIC'
+ # check for --export-dynamic
@@ -2678,7 +2977,7 @@
LDFLAGS='-Wl,--export-dynamic'
echo $ac_n "checking if the linker accepts --export-dynamic""... $ac_c" 1>&6
diff --git a/math/scilab/patches/patch-ar b/math/scilab/patches/patch-ar
new file mode 100644
index 00000000000..c9b9961b603
--- /dev/null
+++ b/math/scilab/patches/patch-ar
@@ -0,0 +1,24 @@
+$NetBSD: patch-ar,v 1.4 2002/03/05 21:05:53 dmcmahill Exp $
+
+longs aren't always 32 bits...
+
+--- routines/sound/misc.c.orig Mon Feb 5 07:19:35 2001
++++ routines/sound/misc.c Mon Mar 4 16:43:06 2002
+@@ -12,4 +12,6 @@
+ ****************************************************************/
+
++#include <sys/types.h>
++
+ #include "st.h"
+ #include "../machine.h"
+@@ -326,5 +328,9 @@
+ {
+ union {
+- unsigned long l; /** we assume here long i s4 bytes **/
++#ifdef netbsd
++ u_int32_t l;
++#else
++ unsigned long l; /** we assume here long i s4 bytes **/
++#endif
+ float f;
+ } u;
diff --git a/math/scilab/patches/patch-as b/math/scilab/patches/patch-as
new file mode 100644
index 00000000000..3912b365a3e
--- /dev/null
+++ b/math/scilab/patches/patch-as
@@ -0,0 +1,12 @@
+$NetBSD: patch-as,v 1.4 2002/03/05 21:05:53 dmcmahill Exp $
+
+--- routines/interf/intfilestat.c.orig Fri Jul 21 07:54:59 2000
++++ routines/interf/intfilestat.c Mon Mar 4 20:55:04 2002
+@@ -4,4 +4,7 @@
+ #include <locale.h>
+ #include <stdio.h>
++#ifdef netbsd
++#include <string.h>
++#endif
+ #include "../stack-c.h"
+ int C2F(intfilestat)(fname)
diff --git a/math/scilab/patches/patch-at b/math/scilab/patches/patch-at
new file mode 100644
index 00000000000..b57d29f9e38
--- /dev/null
+++ b/math/scilab/patches/patch-at
@@ -0,0 +1,13 @@
+$NetBSD: patch-at,v 1.4 2002/03/05 21:05:53 dmcmahill Exp $
+
+--- routines/dcd/DcdInterf.c.orig Mon Feb 5 07:19:39 2001
++++ routines/dcd/DcdInterf.c Tue Mar 5 07:18:35 2002
+@@ -2,4 +2,8 @@
+ ENPC */
+
++#ifdef __NetBSD__
++#include <string.h>
++#endif
++
+ #include "../../routines/stack-c.h"
+
diff --git a/math/scilab/patches/patch-au b/math/scilab/patches/patch-au
new file mode 100644
index 00000000000..b7da59bfe88
--- /dev/null
+++ b/math/scilab/patches/patch-au
@@ -0,0 +1,13 @@
+$NetBSD: patch-au,v 1.6 2002/03/05 21:05:54 dmcmahill Exp $
+
+--- routines/randlib/Rand.c.orig Mon Jul 17 09:02:35 2000
++++ routines/randlib/Rand.c Tue Mar 5 07:21:27 2002
+@@ -1,4 +1,8 @@
+ /* Copyright Enpc/Cergrene */
+
++#ifdef __NetBSD__
++#include <string.h>
++#endif
++
+ #include "../../routines/stack-c.h"
+ #include "grand.h"
diff --git a/math/scilab/patches/patch-av b/math/scilab/patches/patch-av
new file mode 100644
index 00000000000..cc33e2d713f
--- /dev/null
+++ b/math/scilab/patches/patch-av
@@ -0,0 +1,11 @@
+$NetBSD: patch-av,v 1.4 2002/03/05 21:05:54 dmcmahill Exp $
+
+--- routines/int/genmdsp.c.orig Thu Jun 29 08:12:16 2000
++++ routines/int/genmdsp.c Tue Mar 5 07:27:06 2002
+@@ -1,2 +1,6 @@
++#ifdef __NetBSD__
++#include <string.h>
++#endif
++
+ #include "../machine.h"
+ #include <math.h>
diff --git a/math/scilab/patches/patch-aw b/math/scilab/patches/patch-aw
new file mode 100644
index 00000000000..9cd0dceeae3
--- /dev/null
+++ b/math/scilab/patches/patch-aw
@@ -0,0 +1,11 @@
+$NetBSD: patch-aw,v 1.4 2002/03/05 21:05:54 dmcmahill Exp $
+
+--- routines/int/mgeti.c.orig Wed Jan 5 12:25:48 2000
++++ routines/int/mgeti.c Tue Mar 5 07:35:39 2002
+@@ -1,3 +1,6 @@
+ /* Copyright INRIA */
++#ifdef __NetBSD__
++#include <string.h>
++#endif
+ #include <stdio.h>
+ #ifdef __STDC__
diff --git a/math/scilab/patches/patch-ax b/math/scilab/patches/patch-ax
new file mode 100644
index 00000000000..76ea2c3669b
--- /dev/null
+++ b/math/scilab/patches/patch-ax
@@ -0,0 +1,11 @@
+$NetBSD: patch-ax,v 1.4 2002/03/05 21:05:54 dmcmahill Exp $
+
+--- routines/int/mputi.c.orig Wed Feb 28 05:16:14 2001
++++ routines/int/mputi.c Tue Mar 5 07:36:06 2002
+@@ -1,3 +1,6 @@
+ /* Copyright INRIA */
++#ifdef __NetBSD__
++#include <string.h>
++#endif
+ #include <stdio.h>
+ #ifdef __STDC__