svn commit: r358592 - in head/math/giacxcas: . files

William Grzybowski wg at FreeBSD.org
Fri Jun 20 15:39:27 UTC 2014


Author: wg
Date: Fri Jun 20 15:39:25 2014
New Revision: 358592
URL: http://svnweb.freebsd.org/changeset/ports/358592
QAT: https://qat.redports.org/buildarchive/r358592/

Log:
  math/giacxcas: fix compile on head
  
  - Make the no cdrom entry match the string in LEGAL
  
  PR:		189541
  Submitted by:	han math jussieu fr

Added:
  head/math/giacxcas/files/
  head/math/giacxcas/files/patch-src-Graph3d.cc   (contents, props changed)
  head/math/giacxcas/files/patch-src-gausspol.h   (contents, props changed)
  head/math/giacxcas/files/patch-src-index.cc   (contents, props changed)
  head/math/giacxcas/files/patch-src-index.h   (contents, props changed)
  head/math/giacxcas/files/patch-src-modfactor.cc   (contents, props changed)
  head/math/giacxcas/files/patch-src-modpoly.cc   (contents, props changed)
  head/math/giacxcas/files/patch-src-threaded.h   (contents, props changed)
Modified:
  head/math/giacxcas/Makefile
  head/math/giacxcas/distinfo
  head/math/giacxcas/pkg-plist

Modified: head/math/giacxcas/Makefile
==============================================================================
--- head/math/giacxcas/Makefile	Fri Jun 20 15:34:38 2014	(r358591)
+++ head/math/giacxcas/Makefile	Fri Jun 20 15:39:25 2014	(r358592)
@@ -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/b
 		${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>

Modified: head/math/giacxcas/distinfo
==============================================================================
--- head/math/giacxcas/distinfo	Fri Jun 20 15:34:38 2014	(r358591)
+++ head/math/giacxcas/distinfo	Fri Jun 20 15:39:25 2014	(r358592)
@@ -2,5 +2,5 @@ SHA256 (giacxcas/fltk-giac.tar.gz) = 538
 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

Added: head/math/giacxcas/files/patch-src-Graph3d.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/giacxcas/files/patch-src-Graph3d.cc	Fri Jun 20 15:39:25 2014	(r358592)
@@ -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){

Added: head/math/giacxcas/files/patch-src-gausspol.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/giacxcas/files/patch-src-gausspol.h	Fri Jun 20 15:39:25 2014	(r358592)
@@ -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

Added: head/math/giacxcas/files/patch-src-index.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/giacxcas/files/patch-src-index.cc	Fri Jun 20 15:39:25 2014	(r358592)
@@ -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;

Added: head/math/giacxcas/files/patch-src-index.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/giacxcas/files/patch-src-index.h	Fri Jun 20 15:39:25 2014	(r358592)
@@ -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;

Added: head/math/giacxcas/files/patch-src-modfactor.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/giacxcas/files/patch-src-modfactor.cc	Fri Jun 20 15:39:25 2014	(r358592)
@@ -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

Added: head/math/giacxcas/files/patch-src-modpoly.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/giacxcas/files/patch-src-modpoly.cc	Fri Jun 20 15:39:25 2014	(r358592)
@@ -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;
+     }

Added: head/math/giacxcas/files/patch-src-threaded.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/giacxcas/files/patch-src-threaded.h	Fri Jun 20 15:39:25 2014	(r358592)
@@ -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;
+   }
+ 

Modified: head/math/giacxcas/pkg-plist
==============================================================================
--- head/math/giacxcas/pkg-plist	Fri Jun 20 15:34:38 2014	(r358591)
+++ head/math/giacxcas/pkg-plist	Fri Jun 20 15:39:25 2014	(r358592)
@@ -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


More information about the svn-ports-head mailing list