[114209] trunk/dports/math/GiNaC

michaelld at macports.org michaelld at macports.org
Mon Dec 2 09:37:44 PST 2013


Revision: 114209
          https://trac.macports.org/changeset/114209
Author:   michaelld at macports.org
Date:     2013-12-02 09:37:44 -0800 (Mon, 02 Dec 2013)
Log Message:
-----------
GiNaC: maintainer timeout: add patches for clang++/libc++; do not seem to hurt on g++/libstdc++; addresses ticket #40851.

Modified Paths:
--------------
    trunk/dports/math/GiNaC/Portfile

Added Paths:
-----------
    trunk/dports/math/GiNaC/files/
    trunk/dports/math/GiNaC/files/patch-check_exam_clifford.cpp.diff
    trunk/dports/math/GiNaC/files/patch-check_exam_inifcns_nstdsums.cpp.diff
    trunk/dports/math/GiNaC/files/patch-ginac_inifcns_nstdsums.cpp.diff

Modified: trunk/dports/math/GiNaC/Portfile
===================================================================
--- trunk/dports/math/GiNaC/Portfile	2013-12-02 16:53:58 UTC (rev 114208)
+++ trunk/dports/math/GiNaC/Portfile	2013-12-02 17:37:44 UTC (rev 114209)
@@ -43,5 +43,11 @@
 depends_lib	port:readline	\
 		port:cln
 
+#patches for clang++/libc++; do not seem to hurt on g++/libstdc++
+
+patchfiles	patch-check_exam_clifford.cpp.diff \
+		patch-check_exam_inifcns_nstdsums.cpp.diff \
+		patch-ginac_inifcns_nstdsums.cpp.diff
+
 test.run            yes
 test.target         check

Added: trunk/dports/math/GiNaC/files/patch-check_exam_clifford.cpp.diff
===================================================================
--- trunk/dports/math/GiNaC/files/patch-check_exam_clifford.cpp.diff	                        (rev 0)
+++ trunk/dports/math/GiNaC/files/patch-check_exam_clifford.cpp.diff	2013-12-02 17:37:44 UTC (rev 114209)
@@ -0,0 +1,11 @@
+--- check/exam_clifford.cpp.orig	2013-12-02 12:05:05.000000000 -0500
++++ check/exam_clifford.cpp	2013-12-02 12:05:20.000000000 -0500
+@@ -546,7 +546,7 @@
+ 	realsymbol a("a");
+ 	varidx mu(symbol("mu", "\\mu"), 1);
+ 
+-	ex e = clifford_unit(mu, diag_matrix(lst(-1))), e0 = e.subs(mu==0);
++	ex e = clifford_unit(mu, diag_matrix(lst(ex(-1)))), e0 = e.subs(mu==0);
+ 	result += ( exp(a*e0)*e0*e0 == -exp(e0*a) ) ? 0 : 1;
+ 
+ 	return result;

Added: trunk/dports/math/GiNaC/files/patch-check_exam_inifcns_nstdsums.cpp.diff
===================================================================
--- trunk/dports/math/GiNaC/files/patch-check_exam_inifcns_nstdsums.cpp.diff	                        (rev 0)
+++ trunk/dports/math/GiNaC/files/patch-check_exam_inifcns_nstdsums.cpp.diff	2013-12-02 17:37:44 UTC (rev 114209)
@@ -0,0 +1,86 @@
+--- check/exam_inifcns_nstdsums.cpp.orig	2013-12-02 11:55:47.000000000 -0500
++++ check/exam_inifcns_nstdsums.cpp	2013-12-02 12:03:09.000000000 -0500
+@@ -192,10 +192,10 @@
+ 	res.append(zeta(lst(4,2,3)) - (-zeta(9)*59 + zeta(2)*zeta(7)*28 + pow(zeta(2),2)*zeta(5)*4 -
+ 	                               pow(zeta(3),3)/3 + pow(zeta(2),3)*zeta(3)*8/21));
+ 	res.append(zeta(lst(3,1,3,1,3,1,3,1)) - (2*pow(Pi,16)/factorial(18)));
+-	res.append(zeta(lst(2),lst(-1)) - -zeta(2)/2);
+-	res.append(zeta(lst(1,2),lst(-1,1)) - (-zeta(3)/4 - zeta(lst(1),lst(-1))*zeta(2)/2));
+-	res.append(zeta(lst(2,1,1),lst(-1,-1,1)) - (-pow(zeta(2),2)*23/40 - pow(zeta(lst(1),lst(-1)),2)*zeta(2)*3/4
+-	                                            - zeta(lst(3,1),lst(-1,1))*3/2 - zeta(lst(1),lst(-1))*zeta(3)*21/8));
++	res.append(zeta(lst(ex(2)),lst(ex(-1))) - -zeta(2)/2);
++	res.append(zeta(lst(1,2),lst(-1,1)) - (-zeta(3)/4 - zeta(lst(ex(1)),lst(ex(-1)))*zeta(2)/2));
++	res.append(zeta(lst(2,1,1),lst(-1,-1,1)) - (-pow(zeta(2),2)*23/40 - pow(zeta(lst(ex(1)),lst(ex(-1))),2)*zeta(2)*3/4
++	                                            - zeta(lst(3,1),lst(-1,1))*3/2 - zeta(lst(ex(1)),lst(ex(-1)))*zeta(3)*21/8));
+ 	
+ 	for (lst::const_iterator it = res.begin(); it != res.end(); it++) {
+ 		Digits = 17;
+@@ -241,7 +241,7 @@
+ 
+ 	lst res;
+ 	
+-	res.append(Li(lst(4), lst(6)).hold() - Li(4, 6.0));
++	res.append(Li(lst(ex(4)), lst(ex(6))).hold() - Li(4, 6.0));
+ 	res.append(G(lst(0,0,5.0,0,2.0,0,0,0,3.0),0.5).hold()
+ 	           + Li(lst(3,2,4), lst(numeric(1,10), numeric(5,2), numeric(2,3))));
+ 	res.append(Li(lst(2,1,1), lst(almostone, almostone, almostone)) - zeta(lst(2,1,1)));
+@@ -258,20 +258,20 @@
+ 	res.append(s1.subs(lst(x==2, y==numeric(4)/5)) - s2.subs(lst(x==2, y==numeric(4)/5)));
+ 
+ 	// shuffle and quasi-shuffle identities
+-	res.append(G(lst(0,0.2),1).hold() * G(lst(0.5),1).hold() - G(lst(0.5,0,0.2),1).hold()
+-			- G(lst(0,0.5,0.2),1).hold() - G(lst(0,0.2,0.5),1).hold());
+-	res.append(G(lst(0,0.5),1).hold() * G(lst(0.6),1).hold() - G(lst(0,0.5,0.5*0.6),1).hold()
++	res.append(G(lst(ex(0),0.2),1).hold() * G(lst(ex(0.5)),1).hold() - G(lst(ex(0.5),0,0.2),1).hold()
++			- G(lst(ex(0),0.5,0.2),1).hold() - G(lst(ex(0),0.2,0.5),1).hold());
++	res.append(G(lst(ex(0),0.5),1).hold() * G(lst(ex(0.6)),1).hold() - G(lst(0,0.5,0.5*0.6),1).hold()
+ 			- G(lst(0.6,0,0.5*0.6),1).hold() + G(lst(0,0,0.5*0.6),1).hold());
+-	res.append(Li(lst(2),lst(numeric(1,5))).hold() * Li(lst(3),lst(7)).hold() - Li(lst(2,3),lst(numeric(1,5),7)).hold()
+-			- Li(lst(3,2),lst(7,numeric(1,5))).hold() - Li(lst(5),lst(numeric(7,5))).hold());
++	res.append(Li(lst(ex(2)),lst(numeric(1,5))).hold() * Li(lst(ex(3)),lst(ex(7))).hold() - Li(lst(2,3),lst(numeric(1,5),7)).hold()
++			- Li(lst(ex(3),2),lst(ex(7),numeric(1,5))).hold() - Li(lst(ex(5)),lst(numeric(7,5))).hold());
+ 	symbol a1, a2, a3, a4;
+ 	res.append((G(lst(a1,a2),1) * G(lst(a3,a4),1) - G(lst(a1,a2,a3,a4),1)
+ 			- G(lst(a1,a3,a2,a4),1) - G(lst(a3,a1,a2,a4),1)
+ 			- G(lst(a1,a3,a4,a2),1) - G(lst(a3,a1,a4,a2),1) - G(lst(a3,a4,a1,a2),1))
+ 				.subs(lst(a1==numeric(1)/10, a2==numeric(3)/10, a3==numeric(7)/10, a4==5)));
+-	res.append(G(lst(-0.009),1).hold() * G(lst(-8,1.4999),1).hold() - G(lst(-0.009,-8,1.4999),1).hold()
++	res.append(G(lst(ex(-0.009)),1).hold() * G(lst(ex(-8),1.4999),1).hold() - G(lst(-0.009,-8,1.4999),1).hold()
+ 			- G(lst(-8,-0.009,1.4999),1).hold() - G(lst(-8,1.4999,-0.009),1).hold());
+-	res.append(G(lst(sqrt(numeric(1)/2)+I*sqrt(numeric(1)/2)),1).hold() * G(lst(1.51,-0.999),1).hold()
++	res.append(G(lst(sqrt(numeric(1)/2)+I*sqrt(numeric(1)/2)),1).hold() * G(lst(ex(1.51),-0.999),1).hold()
+ 			- G(lst(sqrt(numeric(1)/2)+I*sqrt(numeric(1)/2),1.51,-0.999),1).hold()
+ 			- G(lst(1.51,sqrt(numeric(1)/2)+I*sqrt(numeric(1)/2),-0.999),1).hold()
+ 			- G(lst(1.51,-0.999,sqrt(numeric(1)/2)+I*sqrt(numeric(1)/2)),1).hold());
+@@ -313,15 +313,15 @@
+ 
+ 	ex x1 = exp(2*Pi*I/13).evalf();
+ 	ex x2 = exp(24*Pi*I/13).evalf();
+-  	ex r2 = Li(lst(2),lst(x1)).hold().evalf();
+-	ex r3 = Li(lst(2),lst(x2)).hold().evalf();
++  	ex r2 = Li(lst(ex(2)),lst(x1)).hold().evalf();
++	ex r3 = Li(lst(ex(2)),lst(x2)).hold().evalf();
+ 	if ( abs(r2-conjugate(r3)) > prec ) {
+ 		clog << "Legacy test 2 seems to be wrong." << endl;
+ 		result++;
+ 	}
+ 
+   	ex x3 = exp(5*Pi*I/3).evalf();
+-	ex r4 = Li(lst(3),lst(x3)).hold().evalf();
++	ex r4 = Li(lst(ex(3)),lst(x3)).hold().evalf();
+ 	if ( abs(r4 - numeric("0.40068563438653142847-0.95698384815740185713*I")) > prec ) {
+ 		clog << "Legacy test 3 seems to be wrong." << endl;
+ 		result++;
+@@ -353,10 +353,10 @@
+ 		+Li(lst(1,1,1,1),lst(x2,x4,x3,x0)).hold().evalf()
+ 		+Li(lst(1,1,1,1),lst(x2,x3,x4,x0)).hold().evalf()
+ 		+Li(lst(1,1,1,1),lst(x2,x3,x0,x4)).hold().evalf()
+-		+Li(lst(2,2),lst(x5,x4)).hold().evalf()
++		+Li(lst(ex(2),2),lst(x5,x4)).hold().evalf()
+ 		+Li(lst(2,1,1),lst(x5,x0,x4)).hold().evalf()
+ 		+Li(lst(2,1,1),lst(x5,x4,x0)).hold().evalf()
+-		-Li(lst(1,1),lst(x3,x0)).hold().evalf()*Li(lst(1,1),lst(x2,x4)).hold().evalf();
++		-Li(lst(ex(1),1),lst(x3,x0)).hold().evalf()*Li(lst(ex(1),1),lst(x2,x4)).hold().evalf();
+ 	if ( abs(r7) > prec ) {
+ 		clog << "Legacy test 5 seems to be wrong." << endl;
+ 		result++;

Added: trunk/dports/math/GiNaC/files/patch-ginac_inifcns_nstdsums.cpp.diff
===================================================================
--- trunk/dports/math/GiNaC/files/patch-ginac_inifcns_nstdsums.cpp.diff	                        (rev 0)
+++ trunk/dports/math/GiNaC/files/patch-ginac_inifcns_nstdsums.cpp.diff	2013-12-02 17:37:44 UTC (rev 114209)
@@ -0,0 +1,121 @@
+--- ginac/inifcns_nstdsums.cpp.orig	2013-12-02 11:35:34.000000000 -0500
++++ ginac/inifcns_nstdsums.cpp	2013-12-02 11:42:19.000000000 -0500
+@@ -2601,7 +2601,7 @@
+ 		ex addzeta = convert_H_to_zeta(newparameter);
+ 		return e.subs(h == (addzeta-H(newparameter, h.op(1)).hold())).expand();
+ 	} else {
+-		return e * (-H(lst(0),1/arg).hold());
++		return e * (-H(lst(ex(0)),1/arg).hold());
+ 	}
+ }
+ 
+@@ -2632,7 +2632,7 @@
+ 		newparameter.prepend(1);
+ 		return e.subs(h == H(newparameter, h.op(1)).hold());
+ 	} else {
+-		return e * H(lst(1),1-arg).hold();
++		return e * H(lst(ex(1)),1-arg).hold();
+ 	}
+ }
+ 
+@@ -2664,8 +2664,8 @@
+ 		ex addzeta = convert_H_to_zeta(newparameter);
+ 		return e.subs(h == (addzeta-H(newparameter, h.op(1)).hold())).expand();
+ 	} else {
+-		ex addzeta = convert_H_to_zeta(lst(-1));
+-		return (e * (addzeta - H(lst(-1),1/arg).hold())).expand();
++		ex addzeta = convert_H_to_zeta(lst(ex(-1)));
++		return (e * (addzeta - H(lst(ex(-1)),1/arg).hold())).expand();
+ 	}
+ }
+ 
+@@ -2696,7 +2696,7 @@
+ 		newparameter.prepend(-1);
+ 		return e.subs(h == H(newparameter, h.op(1)).hold()).expand();
+ 	} else {
+-		return (e * H(lst(-1),(1-arg)/(1+arg)).hold()).expand();
++		return (e * H(lst(ex(-1)),(1-arg)/(1+arg)).hold()).expand();
+ 	}
+ }
+ 
+@@ -2727,7 +2727,7 @@
+ 		newparameter.prepend(1);
+ 		return e.subs(h == H(newparameter, h.op(1)).hold()).expand();
+ 	} else {
+-		return (e * H(lst(1),(1-arg)/(1+arg)).hold()).expand();
++		return (e * H(lst(ex(1)),(1-arg)/(1+arg)).hold()).expand();
+ 	}
+ }
+ 
+@@ -2806,7 +2806,7 @@
+ 					// leading one
+ 					map_trafo_H_1mx recursion;
+ 					map_trafo_H_mult unify;
+-					ex res = H(lst(1), arg).hold() * H(newparameter, arg).hold();
++					ex res = H(lst(ex(1)), arg).hold() * H(newparameter, arg).hold();
+ 					std::size_t firstzero = 0;
+ 					while (parameter.op(firstzero) == 1) {
+ 						firstzero++;
+@@ -2870,7 +2870,7 @@
+ 					}
+ 					if (allthesame) {
+ 						map_trafo_H_mult unify;
+-						return unify((pow(H(lst(-1),1/arg).hold() - H(lst(0),1/arg).hold(), parameter.nops())
++						return unify((pow(H(lst(ex(-1)),1/arg).hold() - H(lst(ex(0)),1/arg).hold(), parameter.nops())
+ 						       / factorial(parameter.nops())).expand());
+ 					}
+ 				} else {
+@@ -2882,7 +2882,7 @@
+ 					}
+ 					if (allthesame) {
+ 						map_trafo_H_mult unify;
+-						return unify((pow(H(lst(1),1/arg).hold() + H(lst(0),1/arg).hold() + H_polesign, parameter.nops())
++						return unify((pow(H(lst(ex(1)),1/arg).hold() + H(lst(ex(0)),1/arg).hold() + H_polesign, parameter.nops())
+ 						       / factorial(parameter.nops())).expand());
+ 					}
+ 				}
+@@ -2925,7 +2925,7 @@
+ 					// leading one
+ 					map_trafo_H_1overx recursion;
+ 					map_trafo_H_mult unify;
+-					ex res = H(lst(1), arg).hold() * H(newparameter, arg).hold();
++					ex res = H(lst(ex(1)), arg).hold() * H(newparameter, arg).hold();
+ 					std::size_t firstzero = 0;
+ 					while (parameter.op(firstzero) == 1) {
+ 						firstzero++;
+@@ -2981,7 +2981,7 @@
+ 					}
+ 					if (allthesame) {
+ 						map_trafo_H_mult unify;
+-						return unify((pow(-H(lst(1),(1-arg)/(1+arg)).hold() - H(lst(-1),(1-arg)/(1+arg)).hold(), parameter.nops())
++						return unify((pow(-H(lst(ex(1)),(1-arg)/(1+arg)).hold() - H(lst(ex(-1)),(1-arg)/(1+arg)).hold(), parameter.nops())
+ 						       / factorial(parameter.nops())).expand());
+ 					}
+ 				} else if (parameter.op(0) == -1) {
+@@ -2993,7 +2993,7 @@
+ 					}
+ 					if (allthesame) {
+ 						map_trafo_H_mult unify;
+-						return unify((pow(log(2) - H(lst(-1),(1-arg)/(1+arg)).hold(), parameter.nops())
++						return unify((pow(log(2) - H(lst(ex(-1)),(1-arg)/(1+arg)).hold(), parameter.nops())
+ 						       / factorial(parameter.nops())).expand());
+ 					}
+ 				} else {
+@@ -3005,7 +3005,7 @@
+ 					}
+ 					if (allthesame) {
+ 						map_trafo_H_mult unify;
+-						return unify((pow(-log(2) - H(lst(0),(1-arg)/(1+arg)).hold() + H(lst(-1),(1-arg)/(1+arg)).hold(), parameter.nops())
++						return unify((pow(-log(2) - H(lst(ex(0)),(1-arg)/(1+arg)).hold() + H(lst(ex(-1)),(1-arg)/(1+arg)).hold(), parameter.nops())
+ 						       / factorial(parameter.nops())).expand());
+ 					}
+ 				}
+@@ -3048,7 +3048,7 @@
+ 					// leading one
+ 					map_trafo_H_1mxt1px recursion;
+ 					map_trafo_H_mult unify;
+-					ex res = H(lst(1), arg).hold() * H(newparameter, arg).hold();
++					ex res = H(lst(ex(1)), arg).hold() * H(newparameter, arg).hold();
+ 					std::size_t firstzero = 0;
+ 					while (parameter.op(firstzero) == 1) {
+ 						firstzero++;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131202/acc3aeae/attachment.html>


More information about the macports-changes mailing list