diff options
author | Justin Lecher <jlec@gentoo.org> | 2012-06-24 07:43:11 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2012-06-24 07:43:11 +0000 |
commit | 559dfead50c8dd5bda398c0a12301e0e82211bb4 (patch) | |
tree | 3b0e77f8cac64ed060bf0042e610041c3c174529 /sci-libs | |
parent | Add patch to solve 'jobserver unavailable' issues (and increase parallel build). (diff) | |
download | gentoo-2-559dfead50c8dd5bda398c0a12301e0e82211bb4.tar.gz gentoo-2-559dfead50c8dd5bda398c0a12301e0e82211bb4.tar.bz2 gentoo-2-559dfead50c8dd5bda398c0a12301e0e82211bb4.zip |
sci-libs/libcmatrix: Fix compilation with gcc-4.7, #423181
(Portage version: 2.2.0_alpha112/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/libcmatrix/ChangeLog | 6 | ||||
-rw-r--r-- | sci-libs/libcmatrix/files/3.2.1-gcc4.7.patch | 227 | ||||
-rw-r--r-- | sci-libs/libcmatrix/libcmatrix-3.9.0.ebuild | 3 |
3 files changed, 234 insertions, 2 deletions
diff --git a/sci-libs/libcmatrix/ChangeLog b/sci-libs/libcmatrix/ChangeLog index a9e4bd1578f5..2d8081700b12 100644 --- a/sci-libs/libcmatrix/ChangeLog +++ b/sci-libs/libcmatrix/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sci-libs/libcmatrix # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcmatrix/ChangeLog,v 1.7 2012/05/21 15:08:59 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcmatrix/ChangeLog,v 1.8 2012/06/24 07:43:11 jlec Exp $ + + 24 Jun 2012; Justin Lecher <jlec@gentoo.org> +files/3.2.1-gcc4.7.patch, + libcmatrix-3.9.0.ebuild: + Fix compilation with gcc-4.7, #423181 *libcmatrix-3.11.0 (21 May 2012) diff --git a/sci-libs/libcmatrix/files/3.2.1-gcc4.7.patch b/sci-libs/libcmatrix/files/3.2.1-gcc4.7.patch new file mode 100644 index 000000000000..633c9d50cf94 --- /dev/null +++ b/sci-libs/libcmatrix/files/3.2.1-gcc4.7.patch @@ -0,0 +1,227 @@ + include/MultiMatrix.h | 14 +++++++------- + include/UnionHolder.h | 40 ++++++++++++++++++++-------------------- + include/basedefs.h | 22 ++++++++++++---------- + utils/Fork_controller.cc | 3 +++ + utils/ttyio.cc | 2 ++ + 5 files changed, 44 insertions(+), 37 deletions(-) + +diff --git a/include/MultiMatrix.h b/include/MultiMatrix.h +index b6fec33..2d54db5 100755 +--- a/include/MultiMatrix.h ++++ b/include/MultiMatrix.h +@@ -254,19 +254,19 @@ namespace libcmatrix { + } + + size_t operator()(size_t r) const +- { check_bounds_open(dim,r); ++ { this->check_bounds_open(dim,r); + return r*mults[0]; } + + size_t operator()(size_t r,size_t s) const +- { check_bounds_open(dim,r,s); ++ { this->check_bounds_open(dim,r,s); + return r*mults[0]+s*mults[1]; } + + size_t operator()(size_t r,size_t s,size_t t) const +- { check_bounds_open(dim,r,s,t); ++ { this->check_bounds_open(dim,r,s,t); + return r*mults[0]+s*mults[1]+t*mults[2]; } + + size_t operator()(size_t r,size_t s,size_t t,size_t u) const +- { check_bounds_open(dim,r,s,t,u); ++ { this->check_bounds_open(dim,r,s,t,u); + return r*mults[0]+s*mults[1]+t*mults[2]+u*mults[3]; } + + size_t index(size_t r) const +@@ -293,14 +293,14 @@ namespace libcmatrix { + + void reverse(size_t& r, size_t& s, size_t ind) const { + LCM_STATIC_CHECK(N==2, Indexer_non2D_object); +- check(ind<size(),"Indexer::reverse"); ++ this->check(ind<size(),"Indexer::reverse"); + r=ind / mults[0]; + s=ind-r*mults[0]; + } + + void reverse(size_t& r, size_t& s, size_t& t, size_t ind) const { + LCM_STATIC_CHECK(N==3, Indexer_non3D_object); +- check(ind<size(),"Indexer::reverse"); ++ this->check(ind<size(),"Indexer::reverse"); + r=ind / mults[0]; + ind-=r*mults[0]; + s=ind / mults[1]; +@@ -309,7 +309,7 @@ namespace libcmatrix { + + void reverse(size_t& r, size_t& s, size_t& t, size_t& u, size_t ind) const { + LCM_STATIC_CHECK(N==4, Indexer_non4D_object); +- check(ind<size(),"Indexer::reverse"); ++ this->check(ind<size(),"Indexer::reverse"); + r=ind / mults[0]; + ind-=r*mults[0]; + s=ind / mults[1]; +diff --git a/include/UnionHolder.h b/include/UnionHolder.h +index f447501..3157330 100755 +--- a/include/UnionHolder.h ++++ b/include/UnionHolder.h +@@ -359,21 +359,21 @@ namespace libcmatrix { + //! overrides ::clear method from ::CommonHolder + void clear() { + switch (type_) { +- case 1: clear_(first_); break; +- case 2: clear_(second_); break; +- case 3: clear_(third_); break; +- case 4: clear_(fourth_); break; +- case 5: clear_(fifth_); break; +- case 6: clear_(sixth_); break; +- case 7: clear_(seventh_); break; +- case 8: clear_(eighth_); break; +- case 9: clear_(nineth_); break; ++ case 1: this->clear_(first_); break; ++ case 2: this->clear_(second_); break; ++ case 3: this->clear_(third_); break; ++ case 4: this->clear_(fourth_); break; ++ case 5: this->clear_(fifth_); break; ++ case 6: this->clear_(sixth_); break; ++ case 7: this->clear_(seventh_); break; ++ case 8: this->clear_(eighth_); break; ++ case 9: this->clear_(nineth_); break; + } + type_=0; + } + + template<class T> UnionHolder& operator= (const T& v) { +- get(Type2Type<T>())=v; ++ this->get(Type2Type<T>())=v; + type(Type2Type<T>()); //only change type if assignment was successful + return *this; + } +@@ -399,12 +399,12 @@ namespace libcmatrix { + + template<class T> T& set(Type2Type<T> in) { + type(in); +- return get(in); ++ return this->get(in); + } + + template<int M> typename reverse<M>::type& set(Int2Type<M> in) { + type(in); +- return get(Type2Type<typename reverse<M>::type>()); ++ return this->get(Type2Type<typename reverse<M>::type>()); + } + + template<class T> T& operator()(Type2Type<T> in) { +@@ -429,12 +429,12 @@ namespace libcmatrix { + + template<int M> typename reverse<M>::type& operator()(Int2Type<M> in) { + verify(in); +- return get(Type2Type<typename reverse<M>::type>()); ++ return this->get(Type2Type<typename reverse<M>::type>()); + } + + template<int M> const typename reverse<M>::type& operator()(Int2Type<M> in) const { + verify(in); +- return get(Type2Type<typename reverse<M>::type>()); ++ return this->get(Type2Type<typename reverse<M>::type>()); + } + }; + +@@ -482,12 +482,12 @@ namespace libcmatrix { + bool iscomplex() const { return (this->type()==COMPLEX); } + bool isreal() const { return (this->type()==REAL); } + +- C& set_complex() { return set(Int2Type<COMPLEX>()); } +- R& set_real() { return set(Int2Type<REAL>()); } +- const C& get_complex() const { return get(Type2Type<C>()); } +- const R& get_real() const { return get(Type2Type<R>()); } +- C& get_complex() { return get(Type2Type<C>()); } +- R& get_real() { return get(Type2Type<R>()); } ++ C& set_complex() { return this->set(Int2Type<COMPLEX>()); } ++ R& set_real() { return this->set(Int2Type<REAL>()); } ++ const C& get_complex() const { return this->get(Type2Type<C>()); } ++ const R& get_real() const { return this->get(Type2Type<R>()); } ++ C& get_complex() { return this->get(Type2Type<C>()); } ++ R& get_real() { return this->get(Type2Type<R>()); } + }; + + } //namespace libcmatrix +diff --git a/include/basedefs.h b/include/basedefs.h +index 420b341..80d47e3 100755 +--- a/include/basedefs.h ++++ b/include/basedefs.h +@@ -13,6 +13,8 @@ + #include <functional> + #include <iterator> + #include <algorithm> ++#include <math.h> ++//#include "BlockedMatrix.h" + //#include <complex> + + // #ifdef LCM_DEBUG_ALLOCATOR +@@ -1703,6 +1705,16 @@ template<size_t N> struct Multiply_<N,N,0> { + } + }; + ++template<size_t,size_t,size_t> struct Mla_ { ++ template<class T1,class T2,class T3> static void func(T1&, const T2&, const T3&) { ++ LCM_STATIC_ERROR( mla_incompatible_dimensionalities ); ++ } ++}; ++ ++template<class T1,class T2,class T3> inline void mla(T1& d,const T2& a,const T3& b) { ++ Mla_<LCM_DIM(T1),LCM_DIM(T2),LCM_DIM(T3)>::func(d,a,b); ++} ++ + template<> struct Multiply_<2,2,2> { + template<class T1,class T2,class T3> static void func(T1& dest,const T2& a,const T3& b) + { +@@ -1875,12 +1887,6 @@ template<> struct Multiply_<0,0,0> { + Multiply_<LCM_DIM(T1),LCM_DIM(T2),LCM_DIM(T3)>::func(d,a,b); + } + +-template<size_t,size_t,size_t> struct Mla_ { +- template<class T1,class T2,class T3> static void func(T1&, const T2&, const T3&) { +- LCM_STATIC_ERROR( mla_incompatible_dimensionalities ); +- } +-}; +- + template<size_t N> struct Mla_<N,0,N> { + template<class T1,class T2,class T3> LCM_INLINE static void func(T1& d, const T2& a, const T3& b) { + if (d.empty()) +@@ -1940,10 +1946,6 @@ template<> struct Mla_<0,0,0> { + } + }; + +-template<class T1,class T2,class T3> inline void mla(T1& d,const T2& a,const T3& b) { +- Mla_<LCM_DIM(T1),LCM_DIM(T2),LCM_DIM(T3)>::func(d,a,b); +-} +- + template<class T,size_t N> struct Print_ { + static void print(const T& a,std::ostream& ostr) { + ostr << '['; +diff --git a/utils/Fork_controller.cc b/utils/Fork_controller.cc +index 5f6b913..08ec942 100755 +--- a/utils/Fork_controller.cc ++++ b/utils/Fork_controller.cc +@@ -3,6 +3,9 @@ + #include <sys/wait.h> + #include <time.h> + #include <cstdio> ++#include <sys/types.h> ++#include <unistd.h> ++ + + namespace libcmatrix { + +diff --git a/utils/ttyio.cc b/utils/ttyio.cc +index 17e4eb3..bbeac81 100755 +--- a/utils/ttyio.cc ++++ b/utils/ttyio.cc +@@ -17,6 +17,8 @@ + #include "args_iter.h" + #endif + ++#include <unistd.h> ++ + namespace libcmatrix { + + namespace { diff --git a/sci-libs/libcmatrix/libcmatrix-3.9.0.ebuild b/sci-libs/libcmatrix/libcmatrix-3.9.0.ebuild index af66637eb1e6..c86f94135834 100644 --- a/sci-libs/libcmatrix/libcmatrix-3.9.0.ebuild +++ b/sci-libs/libcmatrix/libcmatrix-3.9.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcmatrix/libcmatrix-3.9.0.ebuild,v 1.2 2012/05/04 09:03:48 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcmatrix/libcmatrix-3.9.0.ebuild,v 1.3 2012/06/24 07:43:11 jlec Exp $ EAPI="3" @@ -31,6 +31,7 @@ src_prepare() { "${FILESDIR}"/3.2.1-minuit2.patch \ "${FILESDIR}"/3.2.1-gcc4.4.patch \ "${FILESDIR}"/3.2.1-gcc4.6.patch \ + "${FILESDIR}"/3.2.1-gcc4.7.patch \ "${FILESDIR}"/${PV}-atlas.patch eautoreconf } |