math/scilab-toolbox-swt:

- Fix build with clang and drop USE_GCC
This commit is contained in:
Max Brazhnikov 2014-09-11 09:34:14 +00:00
parent 90e568151c
commit 52bb65e430
2 changed files with 119 additions and 3 deletions

View file

@ -2,7 +2,7 @@
PORTNAME= swt
PORTVERSION= 0.1.20
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= math
MASTER_SITES= http://atoms.scilab.org/toolboxes/swt/${PORTVERSION}/files/
PKGNAMEPREFIX= scilab-toolbox-
@ -14,8 +14,6 @@ COMMENT= Scilab 1-D and 2-D Wavelet Toolbox
BUILD_DEPENDS= ${SCILAB_CMD}:${PORTSDIR}/math/scilab
RUN_DEPENDS:= ${BUILD_DEPENDS}
USE_GCC= any
SCILAB_CMD= ${LOCALBASE}/bin/scilab-adv-cli
SCILAB_ARGS= -noatomsautoload -nb -nouserstartup
MAKE_ENV= LC_ALL="C" SCI_JAVA_ENABLE_HEADLESS=1 SCI_DISABLE_TK=1

View file

@ -0,0 +1,118 @@
--- ./sci_gateway/c/swt_common.h.orig
+++ ./sci_gateway/c/swt_common.h
@@ -323,10 +323,10 @@
//extern int is_scalar (int row, int col);
//extern int is_vector (int row, int col);
//extern int is_matrix (int row, int col);
-extern void void_check (int number, int *type);
-extern void scalar_check (int number, int *type);
-extern void vector_check (int number, int *type);
-extern void matrix_check (int number, int *type);
+extern int void_check (int number, int *type);
+extern int scalar_check (int number, int *type);
+extern int vector_check (int number, int *type);
+extern int matrix_check (int number, int *type);
extern void real_or_complex (int number, int *type);
extern int sci_matrix_vector_real (int number);
extern int sci_matrix_vector_complex (int number);
@@ -341,8 +341,8 @@
extern int scalar_string_check(char *l, char c);
extern int length_check(int number, int leng);
extern int vector_length_check(int number1, int number2);
-extern void vector_length_compare(int number, int leng, int *res);
-extern void matrix_length_compare(int number, int rowLeng,
+extern int vector_length_compare(int number, int leng, int *res);
+extern int matrix_length_compare(int number, int rowLeng,
int colLeng, int *resRow,
int *resCol);
extern int matrix_length_check (int number1, int number2);
--- ./sci_gateway/c/validate.c.orig
+++ ./sci_gateway/c/validate.c
@@ -42,7 +42,7 @@
/*-------------------------------------------
* Dimension Checking
*-----------------------------------------*/
-void void_check (int number, int *type)
+int void_check (int number, int *type)
{
int row, col;
GetMatrixdims(number,&row,&col);
@@ -50,10 +50,10 @@
*type = 1;
else
*type = 0;
- //return;
+ return 1;
}
-void scalar_check (int number, int *type)
+int scalar_check (int number, int *type)
{
int row, col;
GetMatrixdims(number,&row,&col);
@@ -61,10 +61,10 @@
*type = 1;
else
*type = 0;
- //return;
+ return 1;
}
-void vector_check (int number, int *type)
+int vector_check (int number, int *type)
{
int row, col;
GetMatrixdims(number,&row,&col);
@@ -74,10 +74,10 @@
*type = 1;
else
*type = 0;
- //return;
+ return 1;
}
-void matrix_check (int number, int *type)
+int matrix_check (int number, int *type)
{
int row, col;
GetMatrixdims(number,&row,&col);
@@ -85,7 +85,7 @@
*type = 1;
else
*type = 0;
- //return;
+ return 1;
}
void real_or_complex (int number, int *type)
@@ -234,7 +234,7 @@
return 0;
}
-void vector_length_compare(int number, int leng, int *res)
+int vector_length_compare(int number, int leng, int *res)
{
int row, col;
GetMatrixdims(number,&row,&col);
@@ -244,10 +244,10 @@
*res = 1;
else
*res = -1;
- return;
+ return 1;
}
-void matrix_length_compare(int number, int rowLeng, int colLeng,
+int matrix_length_compare(int number, int rowLeng, int colLeng,
int *resRow, int *resCol)
{
int row, col;
@@ -264,7 +264,7 @@
*resCol = 1;
else
*resCol = -1;
- return;
+ return 1;
}
int