[SCM] Maintenance of the freemat package branch, master, updated. debian/4.0-2-4-gbaaac84

Giuseppe Iuculano iuculano at debian.org
Fri Jun 4 11:13:21 UTC 2010


The following commit has been merged in the master branch:
commit baaac842ac4f332cac97a8cc8735567e02a1c091
Author: Giuseppe Iuculano <iuculano at debian.org>
Date:   Fri Jun 4 13:12:23 2010 +0200

    Fix ftbfs with gcc-4.5
    
    Closes: #564988

diff --git a/debian/patches/gcc4.5.patch b/debian/patches/gcc4.5.patch
new file mode 100644
index 0000000..405a13d
--- /dev/null
+++ b/debian/patches/gcc4.5.patch
@@ -0,0 +1,205 @@
+Fix FTBFS with gcc4.5
+--- a/libs/libFreeMat/Array.cpp
++++ b/libs/libFreeMat/Array.cpp
+@@ -465,7 +465,7 @@ void Array::resize(index_t size) {
+ 
+ void Array::set(const QString& field, ArrayVector& data) {
+   if (isEmpty() && m_type.Class != Struct)
+-    *this = Array::Array(Struct);
++    *this = Array(Struct);
+   if (m_type.Class != Struct) throw Exception("Unsupported type for A.field=B");
+   StructArray &rp(structPtr());
+   if (isEmpty()) 
+--- a/libs/libFreeMat/Math.cpp
++++ b/libs/libFreeMat/Math.cpp
+@@ -1590,9 +1590,9 @@ static bool notfunc(bool t) {
+ 
+ Array Not(const Array& A) {
+   if (A.isScalar())
+-    return Array::Array(!A.toClass(Bool).constRealScalar<bool>());
++    return Array(!A.toClass(Bool).constRealScalar<bool>());
+   const Array &Abool(A.toClass(Bool));
+-  return Array::Array(Apply(Abool.constReal<bool>(),notfunc));
++  return Array(Apply(Abool.constReal<bool>(),notfunc));
+ }
+ 
+ Array Plus(const Array& A) {
+--- a/libs/libFreeMat/Operators.hpp
++++ b/libs/libFreeMat/Operators.hpp
+@@ -142,11 +142,11 @@ Array DotOp(const Array &Ain, const Arra
+   if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
+   if (Acast.isScalar() && Bcast.isScalar()) {
+     if (Acast.allReal() && Bcast.allReal()) {
+-      F = Array::Array(Op::func(Acast.constRealScalar<T>(),
++      F = Array(Op::func(Acast.constRealScalar<T>(),
+ 				Bcast.constRealScalar<T>()));
+     } else {
+       Acast.forceComplex(); Bcast.forceComplex();
+-      F = Array::Array(T(0),T(0));
++      F = Array(T(0),T(0));
+       Op::func(Acast.constRealScalar<T>(),
+ 	       Acast.constImagScalar<T>(),
+ 	       Bcast.constRealScalar<T>(),
+@@ -155,7 +155,7 @@ Array DotOp(const Array &Ain, const Arra
+     }
+   } else if (Acast.isScalar()) {
+     if (Acast.allReal() && Bcast.allReal()) {
+-      F = Array::Array(Tclass,Bcast.dimensions());
++      F = Array(Tclass,Bcast.dimensions());
+       T* ret = F.real<T>().data();
+       const T& Ap = Acast.constRealScalar<T>();
+       const T* Bp = Bcast.constReal<T>().constData();
+@@ -163,7 +163,7 @@ Array DotOp(const Array &Ain, const Arra
+       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
+     } else {
+       Acast.forceComplex(); Bcast.forceComplex();
+-      F = Array::Array(Tclass,Bcast.dimensions());
++      F = Array(Tclass,Bcast.dimensions());
+       T* Cr = F.real<T>().data();
+       T* Ci = F.imag<T>().data();
+       const T& Ar = Acast.constRealScalar<T>();
+@@ -175,7 +175,7 @@ Array DotOp(const Array &Ain, const Arra
+     }
+   } else if (Bcast.isScalar()) {
+     if (Bcast.allReal() && Acast.allReal()) {
+-      F = Array::Array(Tclass,Acast.dimensions());
++      F = Array(Tclass,Acast.dimensions());
+       T* ret = F.real<T>().data();
+       const T* Ap = Acast.constReal<T>().constData();
+       const T& Bp = Bcast.constRealScalar<T>();
+@@ -183,7 +183,7 @@ Array DotOp(const Array &Ain, const Arra
+       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp);
+     } else { 
+       Acast.forceComplex(); Bcast.forceComplex();
+-      F = Array::Array(Tclass,Acast.dimensions());
++      F = Array(Tclass,Acast.dimensions());
+       T* Cr = F.real<T>().data();
+       T* Ci = F.imag<T>().data();
+       const T* Ar = Acast.constReal<T>().constData();
+@@ -197,7 +197,7 @@ Array DotOp(const Array &Ain, const Arra
+     if (Acast.dimensions() != Bcast.dimensions())
+       throw Exception("size mismatch in arguments to binary operator");
+     if (Bcast.allReal() && Acast.allReal()) {
+-      F = Array::Array(Tclass,Acast.dimensions());
++      F = Array(Tclass,Acast.dimensions());
+       T* ret = F.real<T>().data();
+       const T* Ap = Acast.constReal<T>().constData();
+       const T* Bp = Bcast.constReal<T>().constData();
+@@ -205,7 +205,7 @@ Array DotOp(const Array &Ain, const Arra
+       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp[i]);
+     } else {
+       Acast.forceComplex(); Bcast.forceComplex();
+-      F = Array::Array(Tclass,Acast.dimensions());
++      F = Array(Tclass,Acast.dimensions());
+       T* Cr = F.real<T>().data();
+       T* Ci = F.imag<T>().data();
+       const T* Ar = Acast.constReal<T>().constData();
+@@ -328,17 +328,17 @@ static inline Array CmpOp(const Array &A
+   if (!Acast.isScalar()) Acast = Acast.asDenseArray();
+   if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
+   if (Acast.isScalar() && Bcast.isScalar()) {
+-    F = Array::Array(Op::func(Acast.constRealScalar<T>(),
++    F = Array(Op::func(Acast.constRealScalar<T>(),
+ 			      Bcast.constRealScalar<T>()));
+   } else if (Acast.isScalar()) {
+-    F = Array::Array(Bool,Bcast.dimensions());
++    F = Array(Bool,Bcast.dimensions());
+     bool* ret = F.real<bool>().data();
+     const T& Ap = Acast.constRealScalar<T>();
+     const T* Bp = Bcast.constReal<T>().constData();
+     uint64 q = uint64(Bcast.length());
+     for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
+   } else if (Bcast.isScalar()) {
+-    F = Array::Array(Bool,Acast.dimensions());
++    F = Array(Bool,Acast.dimensions());
+     bool* ret = F.real<bool>().data();
+     const T* Ap = Acast.constReal<T>().constData();
+     const T& Bp = Bcast.constRealScalar<T>();
+@@ -347,7 +347,7 @@ static inline Array CmpOp(const Array &A
+   } else {
+     if (Acast.dimensions() != Bcast.dimensions())
+       throw Exception("size mismatch in arguments to binary operator");
+-    F = Array::Array(Bool,Acast.dimensions());
++    F = Array(Bool,Acast.dimensions());
+     bool* ret = F.real<bool>().data();
+     const T* Ap = Acast.constReal<T>().constData();
+     const T* Bp = Bcast.constReal<T>().constData();
+@@ -395,18 +395,18 @@ static inline Array EqOp(const Array &Ai
+   if (!Bcast.isScalar()) Bcast = Bcast.asDenseArray();
+   if (Acast.isScalar() && Bcast.isScalar()) {
+     if (Acast.allReal() && Bcast.allReal()) {
+-      F = Array::Array(Op::func(Acast.constRealScalar<T>(),
++      F = Array(Op::func(Acast.constRealScalar<T>(),
+ 				Bcast.constRealScalar<T>()));
+     } else {
+       Acast.forceComplex(); Bcast.forceComplex();
+-      F = Array::Array(Op::func(Acast.constRealScalar<T>(),
++      F = Array(Op::func(Acast.constRealScalar<T>(),
+ 				Acast.constImagScalar<T>(),
+ 				Bcast.constRealScalar<T>(),
+ 				Bcast.constImagScalar<T>()));
+     }
+   } else if (Acast.isScalar()) {
+     if (Acast.allReal() && Bcast.allReal()) {
+-      F = Array::Array(Bool,Bcast.dimensions());
++      F = Array(Bool,Bcast.dimensions());
+       bool* ret = F.real<bool>().data();
+       const T& Ap = Acast.constRealScalar<T>();
+       const T* Bp = Bcast.constReal<T>().constData();
+@@ -414,7 +414,7 @@ static inline Array EqOp(const Array &Ai
+       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap,Bp[i]);
+     } else {
+       Acast.forceComplex(); Bcast.forceComplex();
+-      F = Array::Array(Bool,Bcast.dimensions());
++      F = Array(Bool,Bcast.dimensions());
+       bool* ret = F.real<bool>().data();
+       const T& Ar = Acast.constRealScalar<T>();
+       const T& Ai = Acast.constImagScalar<T>();
+@@ -425,7 +425,7 @@ static inline Array EqOp(const Array &Ai
+     }
+   } else if (Bcast.isScalar()) {
+     if (Bcast.allReal() && Acast.allReal()) {
+-      F = Array::Array(Bool,Acast.dimensions());
++      F = Array(Bool,Acast.dimensions());
+       bool* ret = F.real<bool>().data();
+       const T* Ap = Acast.constReal<T>().constData();
+       const T& Bp = Bcast.constRealScalar<T>();
+@@ -433,7 +433,7 @@ static inline Array EqOp(const Array &Ai
+       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp);
+     } else {
+       Acast.forceComplex(); Bcast.forceComplex();
+-      F = Array::Array(Bool,Acast.dimensions());
++      F = Array(Bool,Acast.dimensions());
+       bool* ret = F.real<bool>().data();
+       const T* Ar = Acast.constReal<T>().constData();
+       const T* Ai = Acast.constImag<T>().constData();
+@@ -446,7 +446,7 @@ static inline Array EqOp(const Array &Ai
+     if (Acast.dimensions() != Bcast.dimensions())
+       throw Exception("size mismatch in arguments to binary operator");
+     if (Bcast.allReal() && Acast.allReal()) {
+-      F = Array::Array(Bool,Acast.dimensions());
++      F = Array(Bool,Acast.dimensions());
+       bool* ret = F.real<bool>().data();
+       const T* Ap = Acast.constReal<T>().constData();
+       const T* Bp = Bcast.constReal<T>().constData();
+@@ -454,7 +454,7 @@ static inline Array EqOp(const Array &Ai
+       for (uint64 i=0;i<q;i++) ret[i] = Op::func(Ap[i],Bp[i]);
+     } else {
+       Acast.forceComplex(); Bcast.forceComplex();
+-      F = Array::Array(Bool,Acast.dimensions());
++      F = Array(Bool,Acast.dimensions());
+       bool* ret = F.real<bool>().data();
+       const T* Ar = Acast.constReal<T>().constData();
+       const T* Ai = Acast.constImag<T>().constData();
+@@ -533,9 +533,9 @@ static inline Array UnaryOp(const Array
+   if (!Acast.isScalar()) Acast = Acast.asDenseArray();
+   if (Acast.isScalar()) {
+     if (Acast.allReal()) {
+-      F = Array::Array(Op::func(Acast.constRealScalar<T>()));
++      F = Array(Op::func(Acast.constRealScalar<T>()));
+     } else {
+-      F = Array::Array(T(0),T(0));
++      F = Array(T(0),T(0));
+       Op::func(Acast.constRealScalar<T>(),
+ 	       Acast.constImagScalar<T>(),
+ 	       F.realScalar<T>(),F.imagScalar<T>());
diff --git a/debian/patches/series b/debian/patches/series
index 3d24f4d..4a9f14f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 07_fix_FTBFS_with_GCC_4.4.patch
 09_warning.patch
 10_llvm.patch
+gcc4.5.patch

-- 
Maintenance of the freemat package



More information about the debian-science-commits mailing list