View | Details | Raw Unified | Return to bug 189541
Collapse All | Expand All

(-)giacxcas/Makefile (-6 / +9 lines)
Lines 3-12 Link Here
3
3
4
PORTNAME=	giacxcas
4
PORTNAME=	giacxcas
5
PORTVERSION=	1.1.0
5
PORTVERSION=	1.1.0
6
PORTREVISION=	4
6
PORTREVISION=	5
7
CATEGORIES=	math
7
CATEGORIES=	math
8
MASTER_SITES=	http://www-fourier.ujf-grenoble.fr/~parisse/giac/freebsd/ \
8
MASTER_SITES=	http://www-fourier.ujf-grenoble.fr/~parisse/giac/ \
9
		http://www.math.jussieu.fr/~han/xcas/sources/
9
		http://www.math.jussieu.fr/~han/xcas/sources/v2/
10
DISTFILES=	fltk-giac.tar.gz CoCoALib-0.9950.tgz giac-${PORTVERSION}.tar.gz
10
DISTFILES=	fltk-giac.tar.gz CoCoALib-0.9950.tgz giac-${PORTVERSION}.tar.gz
11
DIST_SUBDIR=	${PORTNAME}
11
DIST_SUBDIR=	${PORTNAME}
12
12
Lines 19-31 Link Here
19
		${LOCALBASE}/lib/libntl.a:${PORTSDIR}/math/ntl
19
		${LOCALBASE}/lib/libntl.a:${PORTSDIR}/math/ntl
20
LIB_DEPENDS=	libgmp.so:${PORTSDIR}/math/gmp \
20
LIB_DEPENDS=	libgmp.so:${PORTSDIR}/math/gmp \
21
		libpng.so:${PORTSDIR}/graphics/png \
21
		libpng.so:${PORTSDIR}/graphics/png \
22
                libjpeg.so:${PORTSDIR}/graphics/jpeg \
22
		libjpeg.so:${PORTSDIR}/graphics/jpeg \
23
		libpari.so:${PORTSDIR}/math/pari \
23
		libpari.so:${PORTSDIR}/math/pari \
24
		libmpfr.so:${PORTSDIR}/math/mpfr \
24
		libmpfr.so:${PORTSDIR}/math/mpfr \
25
		libgsl.so:${PORTSDIR}/math/gsl \
25
		libgsl.so:${PORTSDIR}/math/gsl \
26
		liblapack.so:${PORTSDIR}/math/lapack
26
		liblapack.so:${PORTSDIR}/math/lapack
27
27
28
NO_CDROM=	French documentation is for non-commercial use only
28
NO_CDROM=	The french documentation is for non commercial only use
29
29
30
GNU_CONFIGURE=	yes
30
GNU_CONFIGURE=	yes
31
USES=		desktop-file-utils gettext gmake libtool:keepla shebangfix
31
USES=		desktop-file-utils gettext gmake libtool:keepla shebangfix
Lines 33-38 Link Here
33
USE_XORG=	x11 xcursor xft xi
33
USE_XORG=	x11 xcursor xft xi
34
USE_TEX=	latex:build dvipsk:build
34
USE_TEX=	latex:build dvipsk:build
35
USE_LDCONFIG=	yes
35
USE_LDCONFIG=	yes
36
# Warning:  don't remove the USE_GCC without a runtime test *after* make install
36
USE_GCC=	yes
37
USE_GCC=	yes
37
DOCSDIR=	${PREFIX}/share/doc/giac
38
DOCSDIR=	${PREFIX}/share/doc/giac
38
PORTDOCS=	*
39
PORTDOCS=	*
Lines 53-58 Link Here
53
54
54
.include <bsd.port.options.mk>
55
.include <bsd.port.options.mk>
55
56
57
#NB: built of giacxcas with USE_GCC and nlt is successfull if the ntl port is also
58
#    installed  with USE_GCC
56
.if ${OSVERSION} >= 1000000
59
.if ${OSVERSION} >= 1000000
57
CONFIGURE_ARGS+=	--disable-ntl
60
CONFIGURE_ARGS+=	--disable-ntl
58
.endif
61
.endif
Lines 73-78 Link Here
73
	${GMAKE} library && \
76
	${GMAKE} library && \
74
	cd ${FLTKDEV-GIAC} && \
77
	cd ${FLTKDEV-GIAC} && \
75
	./configure --prefix=${FLTKDEV-GIAC} \
78
	./configure --prefix=${FLTKDEV-GIAC} \
76
	&& ${MAKE}
79
	&& cd src && ${MAKE}
77
80
78
.include <bsd.port.mk>
81
.include <bsd.port.mk>
(-)giacxcas/distinfo (-2 / +2 lines)
Lines 2-6 Link Here
2
SIZE (giacxcas/fltk-giac.tar.gz) = 4776876
2
SIZE (giacxcas/fltk-giac.tar.gz) = 4776876
3
SHA256 (giacxcas/CoCoALib-0.9950.tgz) = b30d840593e1930c1629467918b508c429e0a983ef0d1343eab570f238275678
3
SHA256 (giacxcas/CoCoALib-0.9950.tgz) = b30d840593e1930c1629467918b508c429e0a983ef0d1343eab570f238275678
4
SIZE (giacxcas/CoCoALib-0.9950.tgz) = 4120680
4
SIZE (giacxcas/CoCoALib-0.9950.tgz) = 4120680
5
SHA256 (giacxcas/giac-1.1.0.tar.gz) = 23eaad028abc2e5453c8ad5029c5610e4f051f9385973832ec0785cf6cbfe5eb
5
SHA256 (giacxcas/giac-1.1.0.tar.gz) = 2464613ff477a6f7c53dc5dfba6015bf2320ce634742a2aa4aeb8c7196eae6ef
6
SIZE (giacxcas/giac-1.1.0.tar.gz) = 45684044
6
SIZE (giacxcas/giac-1.1.0.tar.gz) = 46376334
(-)giacxcas/files/patch-src-Graph3d.cc (+19 lines)
Line 0 Link Here
1
--- src/Graph3d.cc.orig	2014-05-01 10:34:20.000000000 +0200
2
+++ src/Graph3d.cc	2014-05-01 10:22:33.000000000 +0200
3
@@ -582,7 +582,7 @@
4
   // surface without grid evaluation, should not happen!
5
   void glsurface(const vecteur & point,const gen & uv,double umin,double umax,double vmin,double vmax,int nu,int nv,int draw_mode,GIAC_CONTEXT){
6
     double u=umin,v=vmin,deltau=(umax-umin)/nu,deltav=(vmax-vmin)/nv;
7
-    gen prevline[nv+1];//,line[nv+1];
8
+    gen * prevline=new gen[nv+1];//,line[nv+1]; //cf clang
9
     vecteur curuv(2);
10
     gen old,current;
11
     curuv[0]=u;
12
@@ -615,6 +615,7 @@
13
 	cerr << endl;
14
       */
15
     }
16
+    delete [] prevline; //cf clang
17
   }
18
 
19
   unsigned int line_stipple(unsigned int i){
(-)giacxcas/files/patch-src-gausspol.h (+20 lines)
Line 0 Link Here
1
--- src/gausspol.h.orig	2014-05-01 12:46:28.000000000 +0200
2
+++ src/gausspol.h	2014-05-01 12:36:38.000000000 +0200
3
@@ -440,7 +440,7 @@
4
     U u,prevu=0;
5
     int k;
6
     int count=0;
7
-#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR))
8
+#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__) ||defined(__clang__)) && !defined(GIAC_VECTOR))
9
     if (0){ count=0; }
10
 #else
11
     if (pdim<=POLY_VARS){
12
@@ -551,7 +551,7 @@
13
       convert_from<T,U>(it,itend,deg,jt,0); 
14
       return;
15
     }
16
-#if defined(HAVE_PTHREAD_H) && !defined(EMCC)
17
+#if defined(HAVE_PTHREAD_H) && !defined(EMCC) &&!defined(__clang__)
18
     unsigned taille=itend-it;
19
     if (nthreads>1 
20
 	&& int(taille)>nthreads*1000
(-)giacxcas/files/patch-src-index.cc (+11 lines)
Line 0 Link Here
1
--- src/index.cc.orig	2014-05-01 10:55:21.000000000 +0200
2
+++ src/index.cc	2014-05-01 10:54:07.000000000 +0200
3
@@ -339,7 +339,7 @@
4
     return true;
5
   }
6
 
7
-#if !defined(GIAC_NO_OPTIMIZATIONS) && (defined(GIAC_VECTOR) || (!defined(VISUALC) && !defined(__APPLE__) && !defined(BESTA_WIN32_TARGET)))
8
+#if !defined(GIAC_NO_OPTIMIZATIONS) && (defined(GIAC_VECTOR) || (!defined(VISUALC)&& !defined(__clang__) && !defined(__APPLE__) && !defined(BESTA_WIN32_TARGET)))
9
   index_t index_m::iref() const { 
10
     if ( (taille % 2)==0)
11
       return riptr->i;
(-)giacxcas/files/patch-src-index.h (+20 lines)
Line 0 Link Here
1
--- src/index.h.orig	2013-11-28 09:39:20.000000000 +0100
2
+++ src/index.h	2014-05-01 12:12:57.000000000 +0200
3
@@ -36,7 +36,7 @@
4
 #endif
5
 ///////////////////////////////////////////
6
 
7
-#if defined UNORDERED_MAP && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(VISUALC)
8
+#if defined UNORDERED_MAP && !defined(__APPLE__) && !defined(__clang__) && !defined(VISUALC)
9
 #include <tr1/unordered_map>
10
 #define HASH_MAP_NAMESPACE std::tr1
11
 #define hash_map unordered_map
12
@@ -243,7 +243,7 @@
13
   // capacity of deg_t by direct addressing
14
   const int POLY_VARS=POLY_VARS_DIRECT+POLY_VARS_OTHER-1;
15
 
16
-#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR))
17
+#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__) ||defined(__clang__)) && !defined(GIAC_VECTOR))
18
   class index_m {
19
   public:
20
     ref_index_t * riptr;
(-)giacxcas/files/patch-src-modfactor.cc (+26 lines)
Line 0 Link Here
1
--- src/modfactor.cc.orig	2014-05-01 13:30:20.000000000 +0200
2
+++ src/modfactor.cc	2014-05-01 13:29:26.000000000 +0200
3
@@ -1316,11 +1316,13 @@
4
     }
5
     try {
6
       int n=q.lexsorted_degree();
7
-      inttype tab[n+1]; // dense rep of the polynomial
8
+      inttype * tab=new inttype[n+1]; // dense rep of the polynomial
9
       inttype * result[n]; // array of dense rep of the polynomial
10
       int resultdeg[n];
11
-      if (!polynome2tab(q,n,tab))
12
+      if (!polynome2tab(q,n,tab)){
13
+	delete [] tab; //cf clang
14
 	return false;
15
+      }
16
       // cerr << "NTL factor begins" << endl;
17
       int size=ntlfactor(tab,n,result,resultdeg,debug); 
18
       // cerr << "NTL factor end" << endl;
19
@@ -1329,6 +1331,7 @@
20
 	v.push_back(tab2polynome(result[i],resultdeg[i]));
21
 	delete [] result[i];
22
       }
23
+      delete [] tab; // cf clang
24
     } catch (std::runtime_error & e){
25
     }
26
 #ifdef HAVE_LIBPTHREAD
(-)giacxcas/files/patch-src-modpoly.cc (+33 lines)
Line 0 Link Here
1
--- src/modpoly.cc.orig	2014-05-01 13:30:07.000000000 +0200
2
+++ src/modpoly.cc	2014-05-01 13:29:45.000000000 +0200
3
@@ -4455,12 +4455,17 @@
4
       return giac_gcd_modular_algo1(p,q,d);
5
     bool res=true;
6
     try {
7
-      inttype tabp[np+1]; // dense rep of the polynomial
8
-      if (!polynome2tab(p,np,tabp))
9
+      inttype * tabp=new inttype[np+1]; // dense rep of the polynomial
10
+      if (!polynome2tab(p,np,tabp)){
11
+	delete [] tabp; //cf clang
12
 	return false;
13
-      inttype tabq[nq+1]; // dense rep of the polynomial
14
-      if (!polynome2tab(q,nq,tabq))
15
+      }
16
+      inttype * tabq=new inttype[nq+1]; // dense rep of the polynomial
17
+      if (!polynome2tab(q,nq,tabq)){
18
+	delete [] tabp; //cf clang
19
+	delete [] tabq; //cf clang
20
 	return false;
21
+      }
22
       int nd;
23
       inttype * res;
24
       ntlgcd(tabp,np,tabq,nq,res,nd);
25
@@ -4471,6 +4476,8 @@
26
 	p = p/d;
27
 	q = q/d;
28
       }
29
+    delete [] tabp; // cf clang
30
+    delete [] tabq; // cf clang
31
     } catch(std::runtime_error & e){
32
       res=false;
33
     }
(-)giacxcas/files/patch-src-threaded.h (+44 lines)
Line 0 Link Here
1
--- src/threaded.h.orig	2014-03-27 14:21:00.000000000 +0100
2
+++ src/threaded.h	2014-05-01 10:44:15.000000000 +0200
3
@@ -300,7 +300,7 @@
4
     return os << std::endl;
5
   }
6
 
7
-#ifdef VISUALC
8
+#if defined VISUALC || defined __clang__
9
   template<class T>
10
   class vector_size64:public std::vector<T>{
11
   };
12
@@ -1869,7 +1869,7 @@
13
     // degree of product wrt to the main variable
14
     // will launch deg1v+1 threads to compute each degree
15
     pthread_t tab[deg1v+1];
16
-    threadmult_t<T,U> arg[deg1v+1];
17
+    threadmult_t<T,U> * arg=new threadmult_t<T,U>[deg1v+1];//pr clang
18
     possible_size=0;
19
     int res=0;
20
     int i=deg1v;
21
@@ -1940,6 +1940,7 @@
22
 	res=pthread_create(&tab[i],(pthread_attr_t *) NULL,do_threadmult<T,U>,(void *) &arg[i]);
23
 	if (res){
24
 	  // should cancel previous threads and delete created arg[i].vptr
25
+	  delete [] arg;//pr clang
26
 	  return false;
27
 	}
28
       } // end initial thread creation
29
@@ -1973,6 +1974,7 @@
30
 		res=pthread_create(&tab[i],(pthread_attr_t *) NULL,do_threadmult<T,U>,(void *) &arg[i]);
31
 		if (res){
32
 		  // should cancel previous threads and delete created arg[i].vptr
33
+		  delete [] arg; //cf clang
34
 		  return false;
35
 		}
36
 		in_progress[j]=i;
37
@@ -2051,6 +2053,7 @@
38
     }
39
     if (debug_infolevel>30)
40
       std::cerr << "End copy " << clock() << std::endl;
41
+    delete [] arg; //cf clang
42
     return true;
43
   }
44
 
(-)giacxcas/pkg-plist (+1 lines)
Lines 74-79 Link Here
74
lib/libgiac.la
74
lib/libgiac.la
75
lib/libgiac.so
75
lib/libgiac.so
76
lib/libgiac.so.0
76
lib/libgiac.so.0
77
lib/libgiac.so.0.0.0
77
share/application-registry/xcas.applications
78
share/application-registry/xcas.applications
78
share/applications/xcas.desktop
79
share/applications/xcas.desktop
79
share/icons/hicolor/256x256/apps/xcas.png
80
share/icons/hicolor/256x256/apps/xcas.png

Return to bug 189541