summaryrefslogtreecommitdiff
path: root/sci-libs/libcmatrix
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/libcmatrix
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/libcmatrix')
-rw-r--r--sci-libs/libcmatrix/Manifest13
-rw-r--r--sci-libs/libcmatrix/files/libcmatrix-3.11.0-fix-c++14.patch40
-rw-r--r--sci-libs/libcmatrix/files/libcmatrix-3.11.0-gcc5.2.patch16
-rw-r--r--sci-libs/libcmatrix/files/libcmatrix-3.11.0-shared.patch80
-rw-r--r--sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.4.patch12
-rw-r--r--sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.6.patch16
-rw-r--r--sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.7.patch227
-rw-r--r--sci-libs/libcmatrix/files/libcmatrix-3.2.1-minuit2.patch14
-rw-r--r--sci-libs/libcmatrix/files/libcmatrix-3.9.0-atlas.patch24
-rw-r--r--sci-libs/libcmatrix/libcmatrix-3.11.0-r1.ebuild59
-rw-r--r--sci-libs/libcmatrix/metadata.xml8
11 files changed, 509 insertions, 0 deletions
diff --git a/sci-libs/libcmatrix/Manifest b/sci-libs/libcmatrix/Manifest
new file mode 100644
index 000000000000..313703c1ce72
--- /dev/null
+++ b/sci-libs/libcmatrix/Manifest
@@ -0,0 +1,13 @@
+AUX libcmatrix-3.11.0-fix-c++14.patch 1488 SHA256 e4bbb081907f14227446396033f8f72527cea553525431ae86dd11b43db226a9 SHA512 df859444d88b54ad5b8ed19b375d2e77203979e9f979f8cccbc7d4c10d6b76e1852041e2172e3731dd0adb9dca0db49d14a455cd7b6d20766695bd8448839d4c WHIRLPOOL f50e1aa7623b9a997dfb9907f233dd9797f36eb6d7102c3dc30d7cfad63f15e59dad9c0f231da568ec7fb7ba193de99228ec363249f86d858dd42dcfda555cb0
+AUX libcmatrix-3.11.0-gcc5.2.patch 635 SHA256 58a1278a8f1323bd201979cdce8ecdc390ce8825f58a1d143264455d5bc0f80c SHA512 2a07ac76fb7e7e5b6be97ed2d779d2cc1f56c38a2896b586338ace23515e5ea7428264c61faa4457efcd9b8ecdc8d9239beec09b01a8fe989a68b996bf594452 WHIRLPOOL f4e96e888cbc9a55b83ef5b7e3ca4730e73cdba94d7b9d7fff62539f54d68e8b4f94db5c798290322866927f2a587aaa8cba595c0bf7e68bfd1884e1412e3bd8
+AUX libcmatrix-3.11.0-shared.patch 2711 SHA256 d688fd8d345a820fead80e1ba841f43829ee250fa07f132d86607a5a789b30d6 SHA512 64af0020890477ff0f0ebaa2f708bad76f6dfb8416984a1cfbb5efef3f8c8179541245026dcc2ae454dcc563c2887a0b01b4b38f3f91b63b3bb3ebcac5cc53fc WHIRLPOOL d450220a261536c8f95a69551331f316db01d50ead746e238272ce5f54266f52a24af13e67c9d78e85dddb1cf2666243b89c9a97a0c3d618b7bbe6af93ee19ef
+AUX libcmatrix-3.2.1-gcc4.4.patch 286 SHA256 e6eff8c9be0f9ac9026d1c00841e81a3f2e00127cbb70bd6e117de262e262fb3 SHA512 e1cc2c4d02fb6e2d802df9eb866f70cd90a55ff15f184b3f8b95c954a30a28e6bb251756ead429398417365a6a1e8a59a8e65ec6732fcc0f8cd9b54f103fe329 WHIRLPOOL 94f155cf54326854a5e0435fca9d5432f67c972a503880d058840e9d6ae0b640753be4723f0cf82ea5146b5c4bb92a5da140f0af8e1f4680437c6f277d6a94de
+AUX libcmatrix-3.2.1-gcc4.6.patch 616 SHA256 fa7a4db6b1899a7a85fa6cd87f0d97ea6330ffc33787039d02330440dbdc30cb SHA512 967ed45060c42f21f5191568f346630f0f25106d5469573f3c50a164d3efbd83a578f6ff3ef3f719c6dfa2c48d1867a6d89640567730be119fb5b252c4c3855d WHIRLPOOL c6b7228758b9720313f166a0ae59d6a81426503a355f66a2b099c199ea0d1094a2421fd9838fe5a8a660ded86645187ea6993410e825cf561786483ed680acd3
+AUX libcmatrix-3.2.1-gcc4.7.patch 7685 SHA256 bc4eec9967be3d9ad520d1750abb23f5b6732b8352c7ad61f54c78fb7c9d6312 SHA512 41060e3d67c4885b56cf6f6a8530a613f82a02b715d0c676cb5c2569ec723e273037ee40b294c640e710c911c5d181995e6c0c89b90492977558ea7a87131f91 WHIRLPOOL 4dc766aa0b3d2791901dc264ce82979151cfce2827502a5e32ee225dcfbd5677a673703cd3701c4dc106fa01d548e79ec4f63bcc54de74bfb355c5a438a3db28
+AUX libcmatrix-3.2.1-minuit2.patch 516 SHA256 3c0053686b8db20cf4e73ea1bc99a49b23d3215932efb47837828e52dd5693e8 SHA512 3675033dc2c1ca0224ead0c61159a4b27fffc1f9dee5612de7dc8e8b6e98a1211ab6c61aa219f30039540a5a9e1274900e3eb7a12ce264711587f45b98087a13 WHIRLPOOL b6222099d6cd663d2eb9de75963f105cd022cce7b798fc7df2656bc49aced1ff11a92318abc067a250d567f8affcb4a55c88e1b7f29dbea37598252b9e3abfb3
+AUX libcmatrix-3.9.0-atlas.patch 983 SHA256 99820fb2a3a29aab8a6f1e34bcbf93d99b3ae293065b007375ce29fbacb327e1 SHA512 7294e79c880c7b76ec020ba573db1b1f411f65157845447019e4562534298ce07a34d450b0e232a5ba707ce1860a1407bbff7ba61007ad7e66653715570c7543 WHIRLPOOL 8b7be4b46228201b84eeed44c98c9f03bfba42f73a3cebbf1186f681462fff60c1ae3e8d7616a358ee510d78531e4d089403b960cf187706375f8d0b03422b47
+DIST libcmatrix-3.11.0.tar.gz 1064634 SHA256 0cd4b1f921235ea64d7fbd8d814fbe639bf9ddb23e4a6d3182cf2788cc23f8b8 SHA512 b0f5d9382e0a7c6f8695488481c51e5cdc38d89c9371203870c31a91bf957956a85301cf3aa035b9214d581077581dc1f599f092dd2f077ee14e6b4fd06128c2 WHIRLPOOL 327d24b3aba2dc392523acbd07a91acbe00b3e901e279e45764dc723617a173c0301152a253b63054efa134e3527075f95b7354b6188ef649ffb1316fd37d035
+EBUILD libcmatrix-3.11.0-r1.ebuild 1200 SHA256 be9aaf6c7ccd8a04a741651976898039c3c217b9d2bf678146685bbc02639375 SHA512 c930dc476b1ee980b8306c5c1ff62ddb13c812b04cacb39e2c31fb5dbfa93db246005e2901154315bbcdcc1970ca6abc18975a2e52b702937b65a84304f0de59 WHIRLPOOL bd4b3b775cbdd79454afbbbd6e639e585c1666f708fdd688e09d3d27a8dd676246c5c2f51bbd7abcb2e956a446704f7a3a33860f98d97a9f83697cf2b4682f01
+MISC ChangeLog 3948 SHA256 7d4f7860466168a7753eeac5a521090fdfae9ee86739ca201c0c36551e198433 SHA512 f5294bd2e72e65128887a20da74971590d5d2f06a45ad6559979638e49d6eae3d64936642eca4f3d82185905edf7010ca4c0b004121ddbcbef5ef11533307298 WHIRLPOOL 5e94a8cf3f742c3421c5c9cbe7d32fadfe7f4399b727fc3f2d5f25d5dc393298e449dec37bcea5d2e040a68ab13617f92cf522d544752efbde6dbfb843544364
+MISC ChangeLog-2015 2562 SHA256 5a3430107a0a1930be3c7295f52baf2b0408b8b8e0d0cabc3fefcf15c7a8a5bb SHA512 258107a4104e635dfed9e485a0e28c1501a1b370fe8d79de4a9918a19beb17feef20a538b17cd0d9798827497259a5ae812cfc353ded5ae3b1ce27684dba85c4 WHIRLPOOL 0f7dc2eb98a98f1ce6d8ac7cccbe5de8a45121e347ae43ba115bb86eb44afe4b6f202c2758995debfc1a806de46989af40981494e3ab78a3fa58b686450f5f9a
+MISC metadata.xml 259 SHA256 bbfbeb80ffccffa8e7f837d2c93e994bbe024d565ae3a31d30c6646e80a684c8 SHA512 19fb78cf4029c154954a40df40e28fc8d98a8b7e6b42f97259f664d44c29b284feffb9d073cadc7f90b5654a64b2466e186cb677d3a11830206f173eb9057706 WHIRLPOOL 75b8dd1a97dde63f9cc9f73b5951eaf54579460763ef7cbe6f3a9a0739070601d762152ea00df8b476b80e92e5c29b611a494bac5ab747298942530cabe0ee84
diff --git a/sci-libs/libcmatrix/files/libcmatrix-3.11.0-fix-c++14.patch b/sci-libs/libcmatrix/files/libcmatrix-3.11.0-fix-c++14.patch
new file mode 100644
index 000000000000..74e49285dd04
--- /dev/null
+++ b/sci-libs/libcmatrix/files/libcmatrix-3.11.0-fix-c++14.patch
@@ -0,0 +1,40 @@
+Fix building with C++14, which errors out due -Wnarrowing conversions.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594680
+
+--- a/include/lcm_ssecomplex.h
++++ b/include/lcm_ssecomplex.h
+@@ -151,7 +151,7 @@
+ {
+ static const union {
+ int i[4]; ssecomplex_t v;
+- } signbithigh = {{0,0,0,0x80000000}};
++ } signbithigh = {{0,0,0,(int)0x80000000}};
+ ssecomplex_t b_im = _mm_shuffle_pd(b,b,3); // Imag. part of b in both
+ const ssecomplex_t b_re = _mm_shuffle_pd(b,b,0); // Real part of b in both
+ const ssecomplex_t tmp=_mm_mul_pd(a,b_re);
+@@ -166,7 +166,7 @@
+ ssecomplex_t b_re = _mm_set1_pd(b);
+ static const union {
+ int i[4]; ssecomplex_t v;
+- } signbithigh = {{0,0,0,0x80000000}};
++ } signbithigh = {{0,0,0,(int)0x80000000}};
+ b_re = _mm_xor_pd(b_re, signbithigh.v); // Change sign of high
+ return complex(_mm_mul_pd(a.z_, b_re));
+ }
+@@ -184,14 +184,14 @@
+ inline complex operator- (const complex& a) {
+ static const union { // (signbit,signbit)
+ int i[4]; ssecomplex_t v;
+- } signbits = {{0,0x80000000,0,0x80000000}};
++ } signbits = {{0,(int)0x80000000,0,(int)0x80000000}};
+ return complex(_mm_xor_pd(a, signbits.v)); // Change sign of both elements
+ }
+
+ inline complex conj(const complex& a) {
+ static const union { // (signbit,signbit)
+ int i[4]; ssecomplex_t v;
+- } signbithigh = {{0,0,0,0x80000000}};
++ } signbithigh = {{0,0,0,(int)0x80000000}};
+ return complex(_mm_xor_pd(a.z_, signbithigh.v)); // Change sign of imag. part
+ }
+
diff --git a/sci-libs/libcmatrix/files/libcmatrix-3.11.0-gcc5.2.patch b/sci-libs/libcmatrix/files/libcmatrix-3.11.0-gcc5.2.patch
new file mode 100644
index 000000000000..d5d40246a2f8
--- /dev/null
+++ b/sci-libs/libcmatrix/files/libcmatrix-3.11.0-gcc5.2.patch
@@ -0,0 +1,16 @@
+ include/MultiMatrix.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/MultiMatrix.h b/include/MultiMatrix.h
+index 2d54db5..e95ce4c 100755
+--- a/include/MultiMatrix.h
++++ b/include/MultiMatrix.h
+@@ -1225,7 +1225,7 @@ template<class T,size_t N> struct new_trait_<T,N,N> { typedef MultiMatrix<T,N> v
+ #endif
+ //LCM_SUPPRESS_VIEWS
+
+- template<size_t N, template<size_t> class CheckClass =LCM_CheckBoundsDefault>
++ template<size_t N, template<size_t> class CheckClass>
+ class Indexer<N,CheckClass>::permuted_iterator : public ::std::iterator< ::std::bidirectional_iterator_tag,size_t>
+ {
+ private:
diff --git a/sci-libs/libcmatrix/files/libcmatrix-3.11.0-shared.patch b/sci-libs/libcmatrix/files/libcmatrix-3.11.0-shared.patch
new file mode 100644
index 000000000000..6c5c3167619e
--- /dev/null
+++ b/sci-libs/libcmatrix/files/libcmatrix-3.11.0-shared.patch
@@ -0,0 +1,80 @@
+diff --git a/Makefile.in b/Makefile.in
+index 1361371..1448e76 100755
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -13,8 +13,8 @@ AR=@AR@
+
+ # You shouldn't need to alter anything below here
+
+-COMPILE=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c
+-ALLOPTFLAGS=$(OPTFLAGS) -DNDEBUG
++COMPILE=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -c
++#ALLOPTFLAGS=$(OPTFLAGS) -DNDEBUG
+
+ LOCALOBJS= local/CrystalSystem.o local/CrystalGeneric.o local/MoleculeStructure.o
+ COREOBJS= coredefs/complex.o coredefs/common.o coredefs/diagonal.o coredefs/diagonalise.o coredefs/power.o coredefs/invert.o coredefs/transforms.o coredefs/blocking.o coredefs/mixed.o coredefs/realtransforms.o coredefs/Chebyshev.o
+@@ -36,7 +36,7 @@ ALLTHROBJS=$(UNSAFEOBJS:.o=_r.o) $(ALLSAFEOBJS)
+
+ ROOT=..
+
+-first: lib/libcmatrix.a
++first: lib/libcmatrix.so.3.11.0
+
+ #%.o: %.f
+ # @F77@ @FFLAGS@ -c -o $@ $<
+@@ -68,25 +68,25 @@ tempclean:
+ # -cd optim; @CLEAN@
+ # -cd local; @CLEAN@
+
+-lib/libcmatrix.a: $(ALLNORMOBJS)
+- $(AR) $@ $(ALLNORMOBJS)
+- chmod a+rx $@
+- $(RANLIB) $@
+-
+-lib/libcmatrix_p.a: $(ALLPROFOBJS)
+- $(AR) $@ $(ALLPROFOBJS)
+- chmod a+rx $@
+- $(RANLIB) $@
+-
+-lib/libcmatrix-g.a: $(ALLGOBJS)
+- $(AR) $@ $(ALLGOBJS)
+- chmod a+rx $@
+- $(RANLIB) $@
+-
+-lib/libcmatrix_r.a: $(ALLTHROBJS)
+- $(AR) @MTFLAGS@ $@ $(ALLTHROBJS)
+- chmod a+rx $@
+- $(RANLIB) $@
++lib/libcmatrix.so.3.11.0: $(ALLNORMOBJS)
++ $(CXX) $(LDFLAGS) -fPIC -shared -Wl,--soname,libcmatrix.so.3 -o $@ $(ALLNORMOBJS) -lrt @ATLAS_LIBS@
++ ln -sf libcmatrix.so.3.11.0 lib/libcmatrix.so.3
++ ln -sf libcmatrix.so.3.11.0 lib/libcmatrix.so
++
++lib/libcmatrix_p.so.3.11.0: $(ALLPROFOBJS)
++ $(CXX) $(LDFLAGS) -fPIC -shared -Wl,--soname,libcmatrix.so.3 -o $@ $(ALLPROFOBJS) -lrt @ATLAS_LIBS@
++ ln -sf libcmatrix_p.so.3.11.0 lib/libcmatrix_p.so.3
++ ln -sf libcmatrix_p.so.3.11.0 lib/libcmatrix_p.so
++
++lib/libcmatrix-g.so.3.11.0: $(ALLGOBJS)
++ $(CXX) $(LDFLAGS) -fPIC -shared -Wl,--soname,libcmatrix.so.3 -o $@ $(ALLGOBJS) -lrt @ATLAS_LIBS@
++ ln -sf libcmatrix-g.so.3.11.0 lib/libcmatrix-g.so.3
++ ln -sf libcmatrix-g.so.3.11.0 lib/libcmatrix-g.so
++
++lib/libcmatrix.so_r.3.11.0: $(ALLTHROBJS)
++ $(CXX) $(LDFLAGS) -fPIC -shared -Wl,--soname,libcmatrix.so.3 -o $@ $(ALLTHROBJS) -lrt @ATLAS_LIBS@
++ ln -sf libcmatrix_r.so.3.11.0 lib/libcmatrix_r.so.3
++ ln -sf libcmatrix_r.so.3.11.0 lib/libcmatrix_r.so
+
+ @CONFIGLEAF@.tar.gz:
+ cd $(ROOT) ; tar --exclude lib/* --exclude *.o --exclude=*~ --exclude=Makefile --exclude=include/config.h --exclude=config.status -cvf @CONFIGLEAF@.tar @CONFIGLEAF@
+diff --git a/configure.ac b/configure.ac
+index c0ae0e1..50dcd5a 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,5 +1,6 @@
+ AC_INIT(configure.ac)
+ AC_CONFIG_HEADER(include/config.h)
++LT_INIT
+
+ DEFAR="ar ru"
+ MAKEEXTRA=
diff --git a/sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.4.patch b/sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.4.patch
new file mode 100644
index 000000000000..24c1a89b48d0
--- /dev/null
+++ b/sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.4.patch
@@ -0,0 +1,12 @@
+diff --git a/include/DynamicList.h b/include/DynamicList.h
+index f8c1346..05a7b10 100755
+--- a/include/DynamicList.h
++++ b/include/DynamicList.h
+@@ -4,6 +4,7 @@
+ #include "BaseList.h"
+ #include "lcm_basethreads.h"
+ #include "Warnings.h"
++#include <cstdio>
+
+ namespace libcmatrix {
+
diff --git a/sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.6.patch b/sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.6.patch
new file mode 100644
index 000000000000..b3d8c8d19996
--- /dev/null
+++ b/sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.6.patch
@@ -0,0 +1,16 @@
+ NMR/MetaPropagation.cc | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/NMR/MetaPropagation.cc b/NMR/MetaPropagation.cc
+index b7ed98b..ce8c16f 100755
+--- a/NMR/MetaPropagation.cc
++++ b/NMR/MetaPropagation.cc
+@@ -2136,7 +2136,7 @@ SpinOpGenerator::add_A0(T& dest,F func, double coup, size_t j, size_t sk, Type2T
+ { ref_.clear(0); }
+ const space_T& operator()() const { return ref_; }
+ ~fudge_isotropic_() { ref_.ensure_rank(0); }
+- mutable space_T& ref_;
++ space_T& ref_;
+ };
+ template<> struct fudge_isotropic_<double> {
+ fudge_isotropic_(double v) : v_(v) {};
diff --git a/sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.7.patch b/sci-libs/libcmatrix/files/libcmatrix-3.2.1-gcc4.7.patch
new file mode 100644
index 000000000000..633c9d50cf94
--- /dev/null
+++ b/sci-libs/libcmatrix/files/libcmatrix-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/files/libcmatrix-3.2.1-minuit2.patch b/sci-libs/libcmatrix/files/libcmatrix-3.2.1-minuit2.patch
new file mode 100644
index 000000000000..e7a6cec644bf
--- /dev/null
+++ b/sci-libs/libcmatrix/files/libcmatrix-3.2.1-minuit2.patch
@@ -0,0 +1,14 @@
+--- a/configure-libraries.ac
++++ b/configure-libraries.ac
+@@ -14,8 +14,8 @@
+ fi
+ if test x$FOUNDMINUIT = xyes; then
+ AC_CHECK_LIB(lcg_Minuit,main,,
+- AC_CHECK_LIB(Minuit,main,,FOUNDMINUIT=no
+- AC_MSG_WARN([Minuit library (liblcg_Minuit or libMinuit) not found
++ AC_CHECK_LIB(Minuit2,main,,FOUNDMINUIT=no
++ AC_MSG_WARN([Minuit library (liblcg_Minuit or libMinuit2) not found
+ Is LDFLAGS is defined to include relevant directory?])))
+ if test x$FOUNDMINUIT = xyes; then
+ AC_DEFINE(HAVE_LIBMINUIT)
+
diff --git a/sci-libs/libcmatrix/files/libcmatrix-3.9.0-atlas.patch b/sci-libs/libcmatrix/files/libcmatrix-3.9.0-atlas.patch
new file mode 100644
index 000000000000..329e794645eb
--- /dev/null
+++ b/sci-libs/libcmatrix/files/libcmatrix-3.9.0-atlas.patch
@@ -0,0 +1,24 @@
+ configure-libraries.ac | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/configure-libraries.ac b/configure-libraries.ac
+index 6e9579d..a919398 100755
+--- a/configure-libraries.ac
++++ b/configure-libraries.ac
+@@ -33,6 +33,7 @@ AC_ARG_WITH(atlas,
+ AS_HELP_STRING([--with-atlas],[use the ATLAS BLAS library (default-use if found)]),,with_atlas=check)
+ if test x$with_atlas != xno; then
+ FOUNDATLAS=yes
++ PKG_CHECK_MODULES([ATLAS], [cblas])
+ AC_CHECK_HEADERS(cblas.h,,FOUNDATLAS=no
+ AC_MSG_WARN([ATLAS header files (cblas.h) not found
+ Is CPPFLAGS is defined to include relevant directory?]))
+@@ -40,7 +41,7 @@ Is CPPFLAGS is defined to include relevant directory?]))
+ AC_MSG_WARN([ATLAS library (libatlas.a) not found
+ Is LDFLAGS is defined to include relevant directory?]))
+ if test x$FOUNDATLAS = xyes; then
+- LIBS="-lcblas $LIBS"
++ LIBS="$ATLAS_LIBS $LIBS"
+ CXXFLAGS="$CXXFLAGS -DLCM_USE_EXTERNAL"
+ else
+ if test x$with_atlas = xyes; then
diff --git a/sci-libs/libcmatrix/libcmatrix-3.11.0-r1.ebuild b/sci-libs/libcmatrix/libcmatrix-3.11.0-r1.ebuild
new file mode 100644
index 000000000000..8596928ef6a1
--- /dev/null
+++ b/sci-libs/libcmatrix/libcmatrix-3.11.0-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+MY_P="${PN}${PV}_lite"
+
+DESCRIPTION="lite version of pNMRsim"
+HOMEPAGE="http://www.dur.ac.uk/paul.hodgkinson/pNMRsim/"
+SRC_URI="https://dev.gentoo.org/~jlec/distfiles/${P}.tar.gz"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cpu_flags_x86_sse threads"
+
+RDEPEND="sci-libs/minuit"
+DEPEND="${RDEPEND}"
+
+RESTRICT=mirror
+
+S="${WORKDIR}/${PN}R3"
+
+DOCS=( CHANGES docs/cmatrix.pdf )
+PATCHES=(
+ "${FILESDIR}/${PN}-3.11.0-shared.patch"
+ "${FILESDIR}/${PN}-3.2.1-minuit2.patch"
+ "${FILESDIR}/${PN}-3.2.1-gcc4.4.patch"
+ "${FILESDIR}/${PN}-3.2.1-gcc4.6.patch"
+ "${FILESDIR}/${PN}-3.2.1-gcc4.7.patch"
+ "${FILESDIR}/${PN}-3.9.0-atlas.patch"
+ "${FILESDIR}/${PN}-3.11.0-gcc5.2.patch"
+ "${FILESDIR}/${PN}-3.11.0-fix-c++14.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-minuit \
+ --without-atlas \
+ --with-sysroot="${EROOT}" \
+ $(use_with cpu_flags_x86_sse sse) \
+ $(use_with threads)
+}
+
+src_install() {
+ dolib.so lib/*.so*
+
+ insinto /usr/include/${PN}R3
+ doins -r include/.
+
+ einstalldocs
+}
diff --git a/sci-libs/libcmatrix/metadata.xml b/sci-libs/libcmatrix/metadata.xml
new file mode 100644
index 000000000000..8425c0d53cb0
--- /dev/null
+++ b/sci-libs/libcmatrix/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+</pkgmetadata>