summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2010-05-05 16:11:18 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2010-05-05 16:11:18 +0000
commitd154233d89245535bed3965fedf58d7db62a3687 (patch)
tree8e04d01eed4407d62ed728311f28ca31bf5f9f09 /sci-mathematics
parentRestored ugly old version to satisfy math-pari old stable (diff)
downloadgentoo-2-d154233d89245535bed3965fedf58d7db62a3687.tar.gz
gentoo-2-d154233d89245535bed3965fedf58d7db62a3687.tar.bz2
gentoo-2-d154233d89245535bed3965fedf58d7db62a3687.zip
Added a patch to compile with gcc-4.5, thanks Xarthisius, bug #318045
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/freemat/ChangeLog6
-rw-r--r--sci-mathematics/freemat/files/freemat-4.0-gcc45.patch208
-rw-r--r--sci-mathematics/freemat/freemat-4.0.ebuild6
3 files changed, 218 insertions, 2 deletions
diff --git a/sci-mathematics/freemat/ChangeLog b/sci-mathematics/freemat/ChangeLog
index fe8286041d8f..368c90198615 100644
--- a/sci-mathematics/freemat/ChangeLog
+++ b/sci-mathematics/freemat/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sci-mathematics/freemat
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/freemat/ChangeLog,v 1.21 2010/01/12 03:12:19 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/freemat/ChangeLog,v 1.22 2010/05/05 16:11:17 bicatali Exp $
+
+ 05 May 2010; Sébastien Fabbro <bicatali@gentoo.org> freemat-4.0.ebuild,
+ +files/freemat-4.0-gcc45.patch:
+ Added a patch to compile with gcc-4.5, thanks Xarthisius, bug #318045
12 Jan 2010; Sébastien Fabbro <bicatali@gentoo.org> freemat-4.0.ebuild:
Fixed for qt-4.6, thanks hanno
diff --git a/sci-mathematics/freemat/files/freemat-4.0-gcc45.patch b/sci-mathematics/freemat/files/freemat-4.0-gcc45.patch
new file mode 100644
index 000000000000..7492e16b783e
--- /dev/null
+++ b/sci-mathematics/freemat/files/freemat-4.0-gcc45.patch
@@ -0,0 +1,208 @@
+Fix building with gcc-4.5
+
+http://bugs.gentoo.org/show_bug.cgi?id=318045
+
+--- libs/libFreeMat/Array.cpp
++++ libs/libFreeMat/Array.cpp
+@@ -465,7 +465,7 @@
+
+ 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())
+--- libs/libFreeMat/Math.cpp
++++ libs/libFreeMat/Math.cpp
+@@ -1590,9 +1590,9 @@
+
+ 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) {
+--- libs/libFreeMat/Operators.hpp
++++ libs/libFreeMat/Operators.hpp
+@@ -142,11 +142,11 @@
+ 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 @@
+ }
+ } 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 @@
+ 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 @@
+ }
+ } 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 @@
+ 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 @@
+ 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 @@
+ 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 @@
+ 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 @@
+ } 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 @@
+ 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 @@
+ 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 @@
+ }
+ } 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 @@
+ 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 @@
+ 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 @@
+ 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 @@
+ 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/sci-mathematics/freemat/freemat-4.0.ebuild b/sci-mathematics/freemat/freemat-4.0.ebuild
index 18e437b78c10..4d8a781dea82 100644
--- a/sci-mathematics/freemat/freemat-4.0.ebuild
+++ b/sci-mathematics/freemat/freemat-4.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/freemat/freemat-4.0.ebuild,v 1.2 2010/01/12 03:12:19 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/freemat/freemat-4.0.ebuild,v 1.3 2010/05/05 16:11:17 bicatali Exp $
EAPI="2"
inherit eutils cmake-utils fdo-mime
@@ -35,6 +35,10 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MY_P}.1-Source"
+src_prepare(){
+ epatch "${FILESDIR}"/${P}-gcc45.patch
+}
+
src_configure() {
rm -f CMakeCache.txt libs/lib*/*.moc.* src/*.moc.*
mycmakeargs="${mycmakeargs}