diff options
author | eadler <eadler@FreeBSD.org> | 2012-03-21 08:34:23 +0800 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2012-03-21 08:34:23 +0800 |
commit | 76f7efb8697a21a0b1bdd6b3bae427e6608a78f0 (patch) | |
tree | 9c434c12ec198121b6a1fd91717e645298c4f966 /math | |
parent | f367169a021862247bc00592a1029ea72a3b18d8 (diff) | |
download | freebsd-ports-gnome-76f7efb8697a21a0b1bdd6b3bae427e6608a78f0.tar.gz freebsd-ports-gnome-76f7efb8697a21a0b1bdd6b3bae427e6608a78f0.tar.zst freebsd-ports-gnome-76f7efb8697a21a0b1bdd6b3bae427e6608a78f0.zip |
-Fix segfaults during build w/ OpenJDK
-Fix allowed versions of HDF
PR: ports/166235
Submitted by: Rob Farmer <rfarmer@predatorlabs.net> (maintainer)
Feature safe: yes
Diffstat (limited to 'math')
3 files changed, 124 insertions, 6 deletions
diff --git a/math/scilab/Makefile b/math/scilab/Makefile index a19ac923b514..73c158293421 100644 --- a/math/scilab/Makefile +++ b/math/scilab/Makefile @@ -7,7 +7,7 @@ PORTNAME= scilab PORTVERSION= 5.3.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= math cad parallel java MASTER_SITES= http://www.scilab.org/download/${PORTVERSION}/:scilab \ http://www.predatorlabs.net/dl/:jgraphx \ @@ -50,10 +50,6 @@ OPTIONS= ATLAS "Use Atlas instead of Blas" OFF \ .include <bsd.port.options.mk> -.if ${OSVERSION} < 900000 && ${ARCH} == "amd64" -BROKEN= segfaults during build -.endif - .if defined(WITH_ATLAS) LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas BLAS_LIBS= -lf77blas @@ -140,7 +136,8 @@ USE_XORG= x11 CONFIGURE_ARGS+= --with-jdk=${JAVA_HOME} \ --with-docbook=${LOCALBASE}/share/xsl/docbook \ - --enable-build-help + --enable-build-help \ + --enable-build-swig PLIST_SUB+= WITHOUT_GUI="@comment " .endif @@ -201,6 +198,7 @@ post-patch: @${REINPLACE_CMD} -e 's|TCLTK_LIBS=" -ldl"|TCLTK_LIBS=" "|' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|"x=" ==|"x" =|g' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|"x" ==|"x" =|g' ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|sparc64-\*-netbsd\*|amd64-\*-freebsd\*|' ${WRKSRC}/configure @# Build fixes @${REINPLACE_CMD} -e 's|$$(CFLAGS:-O%=)|-I${LOCALBASE}/include -L${LOCALBASE}/lib|' ${WRKSRC}/modules/elementary_functions/Makefile.in @${REINPLACE_CMD} -e 's|freebsd|__FreeBSD__|g' ${WRKSRC}/modules/sparse/includes/spConfig.h @@ -234,6 +232,10 @@ post-patch: @${REINPLACE_CMD} -e 's|/usr/share/scilab|${DATADIR}|' ${WRKSRC}/desktop/scilab.desktop @${REINPLACE_CMD} -e 's|/usr/share/scilab-cli|${DATADIR}|' \ ${WRKSRC}/desktop/scilab-adv-cli.desktop ${WRKSRC}/desktop/scilab-cli.desktop +.if ${OSVERSION} < 900000 && ${ARCH} == "amd64" + @# Avoids segfault when building help + @${REINPLACE_CMD} 's|JIT|NONE|' ${WRKSRC}/etc/jvm_options.xml +.endif .else @${REINPLACE_CMD} -e '/^check-local:/,/^$$/s/scilab-adv-cli/scilab-cli/g' \ ${WRKSRC}/Makefile.in diff --git a/math/scilab/files/patch-modules__core__src__c__stack2.c b/math/scilab/files/patch-modules__core__src__c__stack2.c new file mode 100644 index 000000000000..b9da3b626f12 --- /dev/null +++ b/math/scilab/files/patch-modules__core__src__c__stack2.c @@ -0,0 +1,105 @@ +--- ./modules/core/src/c/stack2.c.orig 2011-07-20 01:15:44.000000000 -0700 ++++ ./modules/core/src/c/stack2.c 2012-03-06 01:18:59.000000000 -0800 +@@ -667,7 +667,6 @@ + if (*lar != -1) C2F(cvstr1)(&MN, istk(*lr), cstk(*lar), &cx0, MN + 1); + *lar = *lr; + *lr = cadr(*lr); +- M=MN; N= 1; + break; + case 'd' : + if (! C2F(cremat)(fname, &lw1, &it, m, n, lr, &lcs, nlgh)) return FALSE; +@@ -1259,6 +1258,12 @@ + *n = 1; + if (! C2F(getsmat)(fname,&topk,&lw,&m1,&n1,&cx1,&cx1,lr,m, nlgh)) + return FALSE; ++ if ((m1 != 1) || (n1 != 1)) ++ { ++ /* bug 8768 check dimensions */ ++ Scierror(999, _("%s: Wrong size for input argument #%d: A string expected.\n"), fname, *number); ++ return FALSE; ++ } + ix2 = *m * *n; + /* in case where ix2 is 0 in2str adds the \0 char after the end of + the storage of the variable, so it writes over the next variable +@@ -1348,7 +1353,6 @@ + nn= (*m)*(*n); + ScilabMStr2CM(istk(il1),&nn,istk(ild1),&items,&ierr); + if ( ierr == 1) return FALSE; +- Type = '$'; + /* + * Warning : lr must have the proper size when calling getrhsvar + * char **Str1; .... GetRhsVar(...., &lr) +@@ -1621,7 +1625,6 @@ + Sp->icol = istk(icol); + Sp->R = stk(lr1); + Sp->I = stk(lc); +- Type = '$'; + break; + case 'I' : + /* int matrices */ +@@ -1630,7 +1633,6 @@ + return FALSE; + Im->m = *m ; Im->n = *n ; Im->it = it; Im->l = lr1; + Im->D = istk(lr1); +- Type = '$'; + break; + case 'p' : + if (! C2F(getlistpointer)(fname, &topk, &lw, number, lr, nlgh)) +@@ -2086,7 +2088,7 @@ + int ret = FALSE; + int ifin = 0, ifun = 0, tops = 0, moutputs = 0; + int id[nsiz]; +- int lf = 0, op = 0, ile = 0, ils = 0, nnn = thestring_len, ninputs = 0; ++ int lf = 0, op = 0, ile = 0, ils = 0, nnn = thestring_len; + + if (nnn <= 2) + { +@@ -2114,11 +2116,6 @@ + ils = iadr(lf) + 1; + moutputs = *istk(ils); + ile = ils + moutputs * nsiz + 1; +- ninputs = *istk(ile); +- /* +- * ninputs=actual number of inputs, moutputs=actual number of outputs +- * of thestring: checking mlhs=ninputs and mrhs=moutputs not done. +- */ + ret = C2F(scifunction)(ifirst, &lf, mlhs, mrhs); + } + else +@@ -2170,9 +2167,9 @@ + + int C2F(scibuiltin)(int *number,int *ifun,int *ifin,int *mlhs,int *mrhs) + { +- int srhs, slhs; +- int ix, k, intop, lw, pt0; +- int imode,ireftop; ++ int srhs = 0, slhs = 0; ++ int ix = 0, k = 0, intop = 0, lw = 0; ++ int imode = 0, ireftop = 0; + intop = Top; + + if ( intersci_push() == 0 ) +@@ -2187,7 +2184,6 @@ + Lhs = *mlhs; + Rhs = *mrhs; + C2F(recu).krec = -1; +- pt0 = C2F(recu).pt; + ++C2F(recu).niv; + goto L90; + /* ***************************** copied from callinter.h */ +@@ -2564,12 +2560,15 @@ + + for (k = 1; k <= Lhs; k++) + { ++ if (LhsVar(k)) ++ { + plhsk=*Lstk(LhsVar(k)+Top-Rhs); + if (*istk( iadr(plhsk) ) < 0) { + if (*Lstk(Bot) > *Lstk(*istk(iadr (plhsk) +2)) ) + LhsVar(k)=*istk(iadr(plhsk)+2); + /* lcres = 0 */ + } ++ } + } + + if (Err > 0||C2F(errgst).err1> 0) return TRUE ; diff --git a/math/scilab/files/patch-modules__xcos__src__java__org__scilab__modules__xcos__Xcos.java b/math/scilab/files/patch-modules__xcos__src__java__org__scilab__modules__xcos__Xcos.java new file mode 100644 index 000000000000..89165477bf3d --- /dev/null +++ b/math/scilab/files/patch-modules__xcos__src__java__org__scilab__modules__xcos__Xcos.java @@ -0,0 +1,11 @@ +--- ./modules/xcos/src/java/org/scilab/modules/xcos/Xcos.java.orig 2011-07-20 01:16:12.000000000 -0700 ++++ ./modules/xcos/src/java/org/scilab/modules/xcos/Xcos.java 2012-02-13 01:10:14.000000000 -0800 +@@ -61,7 +61,7 @@ + * Dependencies version + */ + private static final List<String> MXGRAPH_VERSIONS = Arrays.asList("1.4.1.0"); +- private static final List<String> HDF5_VERSIONS = Arrays.asList("[1, 8, 4]", "[1, 8, 5]"); ++ private static final List<String> HDF5_VERSIONS = Arrays.asList("[1, 8, 4]", "[1, 8, 5]", "[1, 8, 6]", "[1, 8, 7]", "[1, 8, 8]", "[1, 8, 9]"); + private static final List<String> BATIK_VERSIONS = Arrays.asList("1.7"); + + private static final String UNABLE_TO_LOAD_JGRAPHX =
\ No newline at end of file |