mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
math/giacxcas: fix compile on head
- Make the no cdrom entry match the string in LEGAL PR: 189541 Submitted by: han math jussieu fr
This commit is contained in:
parent
4210c089e3
commit
0e7225c838
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=358592
@ -3,10 +3,10 @@
|
||||
|
||||
PORTNAME= giacxcas
|
||||
PORTVERSION= 1.1.0
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= math
|
||||
MASTER_SITES= http://www-fourier.ujf-grenoble.fr/~parisse/giac/freebsd/ \
|
||||
http://www.math.jussieu.fr/~han/xcas/sources/
|
||||
MASTER_SITES= http://www-fourier.ujf-grenoble.fr/~parisse/giac/ \
|
||||
http://www.math.jussieu.fr/~han/xcas/sources/v2/
|
||||
DISTFILES= fltk-giac.tar.gz CoCoALib-0.9950.tgz giac-${PORTVERSION}.tar.gz
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
|
||||
@ -19,7 +19,7 @@ BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \
|
||||
${LOCALBASE}/lib/libntl.a:${PORTSDIR}/math/ntl
|
||||
LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp \
|
||||
libpng.so:${PORTSDIR}/graphics/png \
|
||||
libjpeg.so:${PORTSDIR}/graphics/jpeg \
|
||||
libjpeg.so:${PORTSDIR}/graphics/jpeg \
|
||||
libpari.so:${PORTSDIR}/math/pari \
|
||||
libmpfr.so:${PORTSDIR}/math/mpfr \
|
||||
libgsl.so:${PORTSDIR}/math/gsl \
|
||||
@ -33,6 +33,7 @@ USE_GL= gl
|
||||
USE_XORG= x11 xcursor xft xi
|
||||
USE_TEX= latex:build dvipsk:build
|
||||
USE_LDCONFIG= yes
|
||||
# Warning: don't remove the USE_GCC without a runtime test *after* make install
|
||||
USE_GCC= yes
|
||||
DOCSDIR= ${PREFIX}/share/doc/giac
|
||||
PORTDOCS= *
|
||||
@ -53,6 +54,8 @@ INFO= giac_es giac_us
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
#NB: built of giacxcas with USE_GCC and nlt is successfull if the ntl port is also
|
||||
# installed with USE_GCC
|
||||
.if ${OSVERSION} >= 1000000
|
||||
CONFIGURE_ARGS+= --disable-ntl
|
||||
.endif
|
||||
@ -73,6 +76,6 @@ pre-configure:
|
||||
${GMAKE} library && \
|
||||
cd ${FLTKDEV-GIAC} && \
|
||||
./configure --prefix=${FLTKDEV-GIAC} \
|
||||
&& ${MAKE}
|
||||
&& cd src && ${MAKE}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -2,5 +2,5 @@ SHA256 (giacxcas/fltk-giac.tar.gz) = 538243c536a62e562bc26dec1c54454f54ce614cc54
|
||||
SIZE (giacxcas/fltk-giac.tar.gz) = 4776876
|
||||
SHA256 (giacxcas/CoCoALib-0.9950.tgz) = b30d840593e1930c1629467918b508c429e0a983ef0d1343eab570f238275678
|
||||
SIZE (giacxcas/CoCoALib-0.9950.tgz) = 4120680
|
||||
SHA256 (giacxcas/giac-1.1.0.tar.gz) = 23eaad028abc2e5453c8ad5029c5610e4f051f9385973832ec0785cf6cbfe5eb
|
||||
SIZE (giacxcas/giac-1.1.0.tar.gz) = 45684044
|
||||
SHA256 (giacxcas/giac-1.1.0.tar.gz) = 2464613ff477a6f7c53dc5dfba6015bf2320ce634742a2aa4aeb8c7196eae6ef
|
||||
SIZE (giacxcas/giac-1.1.0.tar.gz) = 46376334
|
||||
|
19
math/giacxcas/files/patch-src-Graph3d.cc
Normal file
19
math/giacxcas/files/patch-src-Graph3d.cc
Normal file
@ -0,0 +1,19 @@
|
||||
--- src/Graph3d.cc.orig 2014-05-01 10:34:20.000000000 +0200
|
||||
+++ src/Graph3d.cc 2014-05-01 10:22:33.000000000 +0200
|
||||
@@ -582,7 +582,7 @@
|
||||
// surface without grid evaluation, should not happen!
|
||||
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){
|
||||
double u=umin,v=vmin,deltau=(umax-umin)/nu,deltav=(vmax-vmin)/nv;
|
||||
- gen prevline[nv+1];//,line[nv+1];
|
||||
+ gen * prevline=new gen[nv+1];//,line[nv+1]; //cf clang
|
||||
vecteur curuv(2);
|
||||
gen old,current;
|
||||
curuv[0]=u;
|
||||
@@ -615,6 +615,7 @@
|
||||
cerr << endl;
|
||||
*/
|
||||
}
|
||||
+ delete [] prevline; //cf clang
|
||||
}
|
||||
|
||||
unsigned int line_stipple(unsigned int i){
|
20
math/giacxcas/files/patch-src-gausspol.h
Normal file
20
math/giacxcas/files/patch-src-gausspol.h
Normal file
@ -0,0 +1,20 @@
|
||||
--- src/gausspol.h.orig 2014-05-01 12:46:28.000000000 +0200
|
||||
+++ src/gausspol.h 2014-05-01 12:36:38.000000000 +0200
|
||||
@@ -440,7 +440,7 @@
|
||||
U u,prevu=0;
|
||||
int k;
|
||||
int count=0;
|
||||
-#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR))
|
||||
+#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__) ||defined(__clang__)) && !defined(GIAC_VECTOR))
|
||||
if (0){ count=0; }
|
||||
#else
|
||||
if (pdim<=POLY_VARS){
|
||||
@@ -551,7 +551,7 @@
|
||||
convert_from<T,U>(it,itend,deg,jt,0);
|
||||
return;
|
||||
}
|
||||
-#if defined(HAVE_PTHREAD_H) && !defined(EMCC)
|
||||
+#if defined(HAVE_PTHREAD_H) && !defined(EMCC) &&!defined(__clang__)
|
||||
unsigned taille=itend-it;
|
||||
if (nthreads>1
|
||||
&& int(taille)>nthreads*1000
|
11
math/giacxcas/files/patch-src-index.cc
Normal file
11
math/giacxcas/files/patch-src-index.cc
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/index.cc.orig 2014-05-01 10:55:21.000000000 +0200
|
||||
+++ src/index.cc 2014-05-01 10:54:07.000000000 +0200
|
||||
@@ -339,7 +339,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
-#if !defined(GIAC_NO_OPTIMIZATIONS) && (defined(GIAC_VECTOR) || (!defined(VISUALC) && !defined(__APPLE__) && !defined(BESTA_WIN32_TARGET)))
|
||||
+#if !defined(GIAC_NO_OPTIMIZATIONS) && (defined(GIAC_VECTOR) || (!defined(VISUALC)&& !defined(__clang__) && !defined(__APPLE__) && !defined(BESTA_WIN32_TARGET)))
|
||||
index_t index_m::iref() const {
|
||||
if ( (taille % 2)==0)
|
||||
return riptr->i;
|
20
math/giacxcas/files/patch-src-index.h
Normal file
20
math/giacxcas/files/patch-src-index.h
Normal file
@ -0,0 +1,20 @@
|
||||
--- src/index.h.orig 2013-11-28 09:39:20.000000000 +0100
|
||||
+++ src/index.h 2014-05-01 12:12:57.000000000 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
#endif
|
||||
///////////////////////////////////////////
|
||||
|
||||
-#if defined UNORDERED_MAP && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(VISUALC)
|
||||
+#if defined UNORDERED_MAP && !defined(__APPLE__) && !defined(__clang__) && !defined(VISUALC)
|
||||
#include <tr1/unordered_map>
|
||||
#define HASH_MAP_NAMESPACE std::tr1
|
||||
#define hash_map unordered_map
|
||||
@@ -243,7 +243,7 @@
|
||||
// capacity of deg_t by direct addressing
|
||||
const int POLY_VARS=POLY_VARS_DIRECT+POLY_VARS_OTHER-1;
|
||||
|
||||
-#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR))
|
||||
+#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__) ||defined(__clang__)) && !defined(GIAC_VECTOR))
|
||||
class index_m {
|
||||
public:
|
||||
ref_index_t * riptr;
|
26
math/giacxcas/files/patch-src-modfactor.cc
Normal file
26
math/giacxcas/files/patch-src-modfactor.cc
Normal file
@ -0,0 +1,26 @@
|
||||
--- src/modfactor.cc.orig 2014-05-01 13:30:20.000000000 +0200
|
||||
+++ src/modfactor.cc 2014-05-01 13:29:26.000000000 +0200
|
||||
@@ -1316,11 +1316,13 @@
|
||||
}
|
||||
try {
|
||||
int n=q.lexsorted_degree();
|
||||
- inttype tab[n+1]; // dense rep of the polynomial
|
||||
+ inttype * tab=new inttype[n+1]; // dense rep of the polynomial
|
||||
inttype * result[n]; // array of dense rep of the polynomial
|
||||
int resultdeg[n];
|
||||
- if (!polynome2tab(q,n,tab))
|
||||
+ if (!polynome2tab(q,n,tab)){
|
||||
+ delete [] tab; //cf clang
|
||||
return false;
|
||||
+ }
|
||||
// cerr << "NTL factor begins" << endl;
|
||||
int size=ntlfactor(tab,n,result,resultdeg,debug);
|
||||
// cerr << "NTL factor end" << endl;
|
||||
@@ -1329,6 +1331,7 @@
|
||||
v.push_back(tab2polynome(result[i],resultdeg[i]));
|
||||
delete [] result[i];
|
||||
}
|
||||
+ delete [] tab; // cf clang
|
||||
} catch (std::runtime_error & e){
|
||||
}
|
||||
#ifdef HAVE_LIBPTHREAD
|
33
math/giacxcas/files/patch-src-modpoly.cc
Normal file
33
math/giacxcas/files/patch-src-modpoly.cc
Normal file
@ -0,0 +1,33 @@
|
||||
--- src/modpoly.cc.orig 2014-05-01 13:30:07.000000000 +0200
|
||||
+++ src/modpoly.cc 2014-05-01 13:29:45.000000000 +0200
|
||||
@@ -4455,12 +4455,17 @@
|
||||
return giac_gcd_modular_algo1(p,q,d);
|
||||
bool res=true;
|
||||
try {
|
||||
- inttype tabp[np+1]; // dense rep of the polynomial
|
||||
- if (!polynome2tab(p,np,tabp))
|
||||
+ inttype * tabp=new inttype[np+1]; // dense rep of the polynomial
|
||||
+ if (!polynome2tab(p,np,tabp)){
|
||||
+ delete [] tabp; //cf clang
|
||||
return false;
|
||||
- inttype tabq[nq+1]; // dense rep of the polynomial
|
||||
- if (!polynome2tab(q,nq,tabq))
|
||||
+ }
|
||||
+ inttype * tabq=new inttype[nq+1]; // dense rep of the polynomial
|
||||
+ if (!polynome2tab(q,nq,tabq)){
|
||||
+ delete [] tabp; //cf clang
|
||||
+ delete [] tabq; //cf clang
|
||||
return false;
|
||||
+ }
|
||||
int nd;
|
||||
inttype * res;
|
||||
ntlgcd(tabp,np,tabq,nq,res,nd);
|
||||
@@ -4471,6 +4476,8 @@
|
||||
p = p/d;
|
||||
q = q/d;
|
||||
}
|
||||
+ delete [] tabp; // cf clang
|
||||
+ delete [] tabq; // cf clang
|
||||
} catch(std::runtime_error & e){
|
||||
res=false;
|
||||
}
|
44
math/giacxcas/files/patch-src-threaded.h
Normal file
44
math/giacxcas/files/patch-src-threaded.h
Normal file
@ -0,0 +1,44 @@
|
||||
--- src/threaded.h.orig 2014-03-27 14:21:00.000000000 +0100
|
||||
+++ src/threaded.h 2014-05-01 10:44:15.000000000 +0200
|
||||
@@ -300,7 +300,7 @@
|
||||
return os << std::endl;
|
||||
}
|
||||
|
||||
-#ifdef VISUALC
|
||||
+#if defined VISUALC || defined __clang__
|
||||
template<class T>
|
||||
class vector_size64:public std::vector<T>{
|
||||
};
|
||||
@@ -1869,7 +1869,7 @@
|
||||
// degree of product wrt to the main variable
|
||||
// will launch deg1v+1 threads to compute each degree
|
||||
pthread_t tab[deg1v+1];
|
||||
- threadmult_t<T,U> arg[deg1v+1];
|
||||
+ threadmult_t<T,U> * arg=new threadmult_t<T,U>[deg1v+1];//pr clang
|
||||
possible_size=0;
|
||||
int res=0;
|
||||
int i=deg1v;
|
||||
@@ -1940,6 +1940,7 @@
|
||||
res=pthread_create(&tab[i],(pthread_attr_t *) NULL,do_threadmult<T,U>,(void *) &arg[i]);
|
||||
if (res){
|
||||
// should cancel previous threads and delete created arg[i].vptr
|
||||
+ delete [] arg;//pr clang
|
||||
return false;
|
||||
}
|
||||
} // end initial thread creation
|
||||
@@ -1973,6 +1974,7 @@
|
||||
res=pthread_create(&tab[i],(pthread_attr_t *) NULL,do_threadmult<T,U>,(void *) &arg[i]);
|
||||
if (res){
|
||||
// should cancel previous threads and delete created arg[i].vptr
|
||||
+ delete [] arg; //cf clang
|
||||
return false;
|
||||
}
|
||||
in_progress[j]=i;
|
||||
@@ -2051,6 +2053,7 @@
|
||||
}
|
||||
if (debug_infolevel>30)
|
||||
std::cerr << "End copy " << clock() << std::endl;
|
||||
+ delete [] arg; //cf clang
|
||||
return true;
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ lib/libgiac.a
|
||||
lib/libgiac.la
|
||||
lib/libgiac.so
|
||||
lib/libgiac.so.0
|
||||
lib/libgiac.so.0.0.0
|
||||
share/application-registry/xcas.applications
|
||||
share/applications/xcas.desktop
|
||||
share/icons/hicolor/256x256/apps/xcas.png
|
||||
|
Loading…
Reference in New Issue
Block a user