summaryrefslogtreecommitdiff
path: root/sci-chemistry/mpqc
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-chemistry/mpqc
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-chemistry/mpqc')
-rw-r--r--sci-chemistry/mpqc/Manifest13
-rw-r--r--sci-chemistry/mpqc/files/mpqc-2.3.1-as-needed.patch163
-rw-r--r--sci-chemistry/mpqc/files/mpqc-2.3.1-blas.patch55
-rw-r--r--sci-chemistry/mpqc/files/mpqc-2.3.1-respect-ldflags.patch25
-rw-r--r--sci-chemistry/mpqc/files/mpqc-2.3.1-test-failure-hack.patch11
-rw-r--r--sci-chemistry/mpqc/files/mpqc-2.3.1-wformat-security.patch71
-rw-r--r--sci-chemistry/mpqc/metadata.xml11
-rw-r--r--sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild92
-rw-r--r--sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild102
-rw-r--r--sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild106
-rw-r--r--sci-chemistry/mpqc/mpqc-2.3.1-r4.ebuild105
11 files changed, 754 insertions, 0 deletions
diff --git a/sci-chemistry/mpqc/Manifest b/sci-chemistry/mpqc/Manifest
new file mode 100644
index 000000000000..9b9a19f04580
--- /dev/null
+++ b/sci-chemistry/mpqc/Manifest
@@ -0,0 +1,13 @@
+AUX mpqc-2.3.1-as-needed.patch 6101 SHA256 5ed64fad86561612bf03678f6f3e780099f5bd393f0b5c20622fa7789ac23845 SHA512 b5e0398ebd3528059eff4c477a39cb8f76933cb0ab3ed3a4a054ab595d8fb171f9962e49601588eb880c4b418b0e91bfd25341a075f6e36328277a9ca9a68142 WHIRLPOOL fbb6a0264edfeb8828b4b37ae9bd4584a3bc183da10c6f71f72f33d0c79154d4a236189f061c28eaf4fe599d37ce49b66a6902909500dbb72eea32b7ea8641d6
+AUX mpqc-2.3.1-blas.patch 1917 SHA256 aa378d4baf693fa28260ade19a0ec6b583692b9735ac43f4357168a2c9f18c52 SHA512 33000fbd0d9ea2ddbfcfee997f27e71c43fb4128c5e9f5ae79cb7c5fc9ed3bd787a86b0e9efbb1842d6f962b643deadb8fa8498b870bef6268cddc5455d8fb07 WHIRLPOOL dac2f253a6742f0ddddac32fc0478229f7e6e43a916373823499b22d0d830315992dd2ed1a16bd664b4ba90f2c37bf28015e44ae7db60af766b37a928eef9438
+AUX mpqc-2.3.1-respect-ldflags.patch 666 SHA256 3f50b2e3a0038b7d4fc8f98eb375f794f37164a69edf6d7a767b0146e20481ca SHA512 84618392ab07884a09ec197a86c6ca26c298bb73d9c5a8a4f641a875d61f77a7d05494a7d0f4c8eef8cac742e5e4f1ebef99c333066a2fe8bd23e467f7918b56 WHIRLPOOL 4eb8cbbee7f77d438c0fe411030d04fbf55b266619154c3028810bd4daa27389f84a535a1ec0eeffeb8f7bc826b6e7346a899c561c2f42092b266764a3f2d613
+AUX mpqc-2.3.1-test-failure-hack.patch 543 SHA256 af5ae5f76916cbfe1a94981f94a30b373188de60ea19cc3d677d82c71412e503 SHA512 ae626fd6b723f6089b4cf6c2866863ab622aded5636735475cc2d85450b3753bc1cd3168ae1dcb49a579c4a15103cc64256c96eb12b52fcf0599e12bbdacfbc9 WHIRLPOOL 805f603220dd5a1fb8b2a59fe3fe543bbee028503e218e9be031b06657825e103ec19514681803e2a9945547190b4903d8fb6b683fa79858ec93bb751a51dae7
+AUX mpqc-2.3.1-wformat-security.patch 2284 SHA256 06bd711b6826a7005f35413b8686692d163fdaa16d4d93105e178ca7cdde61cb SHA512 22b30cc10f64ff96d027d2727643a3f3bfb08315f33996dfd8b9a28e0dcb9bee2d07cf1d8eead0df22be3117206737a52e350e7dfcfa07d381086610a6b94595 WHIRLPOOL 3d5f5349c16fb41ece48d4f308d9b8b9256276004296539c536ac20eb098c85063284c53626dcd6c94db18038b976020779b8439080a12c4e91f46ceb0b58b67
+DIST mpqc-2.3.1.tar.bz2 2521392 SHA256 18f162ca9cb8b3b05372b0ec3d02b4b8a4a7aabfc7b2abead350ddef8f048ecc SHA512 34f24f72c6c0024e72d47c7fd17927ca2a88020b30d22a791954fbc933f67ed6dd6741ee8a80ddd4fdb007f1a357b5f5ea7fc284cab85474bf60e9f29aaaa747 WHIRLPOOL 504e5be36673b85494866b8a09588964dd9b352208c4d08a1365cbc06b39dfe91dc6050a0e16cbd713b43b3e92d86cbe40f53a44a644f224e84340dd065e54ab
+EBUILD mpqc-2.3.1-r1.ebuild 2267 SHA256 6506dbdef23964ea9f24a2e156164e85298c1874f987b8e246a39a535e5d071f SHA512 4b191021570bd3f29e58e76fdd63a0c25a6eed87160df189d8fbe202b4fb1f0dc4c63aba0c5500e87ab39c8a018eefda25252560bf6e1acd4ad29fe3a2c504e1 WHIRLPOOL 0cc3689c01ed2b3cbaeeb4ae84ce89f5ee89fdd71b3e9ff28cbedf346621ed04f1e5fbfb9ab4cc32b970ed1795e0e5a2c24eaf9051d95bb97e58e21838e73528
+EBUILD mpqc-2.3.1-r2.ebuild 2471 SHA256 efff831c662c454a9636fe0d5f78c0d170432095d3596ce7f07deb278bbf4ed6 SHA512 c87973d00b02822c0966151fc61c113430ed51ce4f9c048173163b77928fbc4ca4f664ad46d48455c33c7307835173ce1609197286441d4ff329dcdbacab4f16 WHIRLPOOL 8013ec8e71cc02106de3d0a208a675fc7b92dc08a8d8751f846d9c1ba5baf3f335238f3c2b661c55a429b5b7eb310111ffa58f681f07c2adb062924117311d41
+EBUILD mpqc-2.3.1-r3.ebuild 2481 SHA256 2497afa68929a74fdca3a52072160aa5a3a9aa5fb809776ffb3875f948dc8589 SHA512 e169bc991e917b036ae715d2a08c8ee013c585a4607f16c70edaf8910ff577a3b8325b10d8ae0d59bf653ecee2a1c897364338c7da925683c1b30f8e50b87826 WHIRLPOOL c86a28ed32255564a2358b7b2b2cb45baecd407a71b3ae7bba504417f6548e3438d3f90b0c4767c75e611de48bdb4c7ec6210ebf1d7e89bae90723358984f19a
+EBUILD mpqc-2.3.1-r4.ebuild 2418 SHA256 8cd6442e69e1cd62f72a4a0a972fd8a58b0e838d4426a93583472861a075b4b4 SHA512 41e91bcdc68613f53a712cb9235c3b0783f3d841395594c8f7bc90211cb80d30981b9d0c4290906cee52269e3486560576b5f09a836ccf5ccb96cc2bae7db512 WHIRLPOOL db015cca4a425cec85a4d2540be31651ab6b8815dd3f2093f442e44ba244624726c2e756b06027c4345c4de19628fa524e23805a945a00c8487cee5c180a6488
+MISC ChangeLog 2952 SHA256 6e66605b423223a440402845c8147aa2ebaad03e0193d8738ce1f074c88d79ec SHA512 5c6de88602f63c761449d183287e438da3de499b385f911605f64016e89be03b3ec1f063b164876b3c70deacfa8ac16f49e0bb39d091f28cf6f4b1d3e85f23ea WHIRLPOOL 50fa63b4ebdd65317cef8dd13dbb114fe812cad88ffcece584a69dfbd03311de99bb0788e255178906eb9e866320a8b2891fc18ce4c83caca82ef990c57188e2
+MISC ChangeLog-2015 6335 SHA256 9fe0fb0fad3594ee2b41da0110f535bb393eb2e0f129d81782dfe8b3e6dead46 SHA512 e149639826e0ff880451cb491a32bab0658e7533ba87d7a741129387fc9acb4ba1e29293a30c4422543682ad9fc36b54154d74ac8b19d137cc10f781ba268e1a WHIRLPOOL 7fac8b7a397bf67bc89cf9bcae07e9c298445b28acc2c476142dab596217528d4d07dee502a6ea602faf4e336b8c41bd3ad3c7612711c515a67d0763d5dd2ba4
+MISC metadata.xml 349 SHA256 90739186c623452754368d506945352b925a4caa6b847262d074fe0d1ab61358 SHA512 4cdfca1b779b107326bdc77fd120008a4daa7da9b93ed3f783e95637796545b95c04477786633856f3d3e1656339db042953d3b2644a18cc25a2b1dc91dc80c6 WHIRLPOOL af33ef21a05f9d9e120fd32b7108a17f70378cde85f4eceb476112681bebb0578fd12896329408207974904f7342bc4ea30da3aabdee0e17ba289a4f4ed1dd84
diff --git a/sci-chemistry/mpqc/files/mpqc-2.3.1-as-needed.patch b/sci-chemistry/mpqc/files/mpqc-2.3.1-as-needed.patch
new file mode 100644
index 000000000000..a917c0aaff70
--- /dev/null
+++ b/sci-chemistry/mpqc/files/mpqc-2.3.1-as-needed.patch
@@ -0,0 +1,163 @@
+--- mpqc-2.3.1.orig/src/lib/chemistry/molecule/Makefile 2005-05-26 08:00:29.000000000 +0200
++++ mpqc-2.3.1/src/lib/chemistry/molecule/Makefile 2010-02-13 14:28:46.514285918 +0100
+@@ -66,6 +66,12 @@
+ interface:: $(DEPENDINCLUDE)
+
+ LIBS = $(shell $(LISTLIBS) $(INCLUDE) $(SRCDIR)/LIBS.h)
++LIBADD = $(SRCDIR)/$(TOPDIR)/lib/libSCcontainer.la \
++ $(SRCDIR)/$(TOPDIR)/lib/libSCclass.la \
++ $(SRCDIR)/$(TOPDIR)/lib/libSCkeyval.la \
++ $(SRCDIR)/$(TOPDIR)/lib/libSCoptimize.la \
++ $(SRCDIR)/$(TOPDIR)/lib/libSCscmat.la \
++ $(SRCDIR)/$(TOPDIR)/lib/libSCsymmetry.la
+
+ LD = $(CXX)
+
+--- mpqc-2.3.1.orig/src/lib/chemistry/qc/wfn/Makefile 2004-06-12 06:50:35.000000000 +0200
++++ mpqc-2.3.1/src/lib/chemistry/qc/wfn/Makefile 2010-02-13 14:20:06.911896080 +0100
+@@ -48,6 +48,12 @@
+
+ LIBS = $(shell $(LISTLIBS) $(INCLUDE) $(SRCDIR)/../dft/LIBS.h)
+
++LIBADD = $(SRCDIR)/$(TOPDIR)/lib/libSCisosurf.la \
++ $(SRCDIR)/$(TOPDIR)/lib/libSCsolvent.la \
++ $(SRCDIR)/$(TOPDIR)/lib/libSCbasis.la \
++ $(SRCDIR)/$(TOPDIR)/lib/libSCdft.la \
++ $(SRCDIR)/$(TOPDIR)/lib/libSCintv3.la
++
+ wfntest:: wfntest.$(OBJSUF) $(LIBS)
+ $(LTLINK) $(CXX) $(LDFLAGS) -o wfntest $^ $(SYSLIBS) $(LTLINKBINOPTS)
+
+--- mpqc-2.3.1.orig/src/lib/chemistry/qc/intv3/Makefile 2002-04-04 01:08:04.000000000 +0200
++++ mpqc-2.3.1/src/lib/chemistry/qc/intv3/Makefile 2010-02-13 14:04:15.393432311 +0100
+@@ -52,6 +52,8 @@
+ LIBOBJ = $(LIBSRC:%.c=%.$(OBJSUF))
+ LIBOBJ := $(LIBOBJ:%.cc=%.$(OBJSUF))
+
++LIBADD = $(SRCDIR)/$(TOPDIR)/lib/libSCoint3.la
++
+ DISTFILES = $(TESTCSRC) $(INC) atoms.sgen Makefile LIBS.h
+
+ DEPENDINCLUDE = $(INC) $(GENINC) $(SGENINC)
+--- mpqc-2.3.1.orig/src/lib/chemistry/qc/mbpt/Makefile 2005-07-07 17:54:05.000000000 +0200
++++ mpqc-2.3.1/src/lib/chemistry/qc/mbpt/Makefile 2010-02-13 14:12:38.975370147 +0100
+@@ -44,6 +44,7 @@
+ CSRCS = bzerofast.c
+
+ LIBOBJ= $(CXXSRCS:%.cc=%.$(OBJSUF)) $(CSRCS:%.c=%.$(OBJSUF))
++LIBADD= $(SRCDIR)/$(TOPDIR)/lib/libSCsymmetry.la
+
+ default:: $(DEPENDINCLUDE)
+
+--- mpqc-2.3.1.orig/src/lib/chemistry/qc/basis/Makefile 2004-02-11 01:24:43.000000000 +0100
++++ mpqc-2.3.1/src/lib/chemistry/qc/basis/Makefile 2010-02-13 14:04:15.395432868 +0100
+@@ -59,6 +59,7 @@
+ DISTFILES = $(CXXSRC) $(INC) Makefile $(TESTSRC) $(TESTFILES)
+
+ LIBOBJ= $(CXXSRC:%.cc=%.$(OBJSUF))
++LIBADD = $(SYSLIBS)
+
+ default:: $(DEPENDINCLUDE)
+
+--- mpqc-2.3.1.orig/src/lib/math/scmat/Makefile 2003-09-16 17:07:03.000000000 +0200
++++ mpqc-2.3.1/src/lib/math/scmat/Makefile 2010-02-13 14:27:36.028370446 +0100
+@@ -75,6 +75,8 @@
+ DISTFILES = $(CXXSRC) $(INC) scmat.h $(WEBSRC) Makefile LIBS.h \
+ $(TESTSRC) $(TESTFILES)
+
++LIBADD = $(SRCDIR)/$(TOPDIR)/lib/libSCgroup.la $(SYSLIBS)
++
+ LIBS = $(shell $(LISTLIBS) $(INCLUDE) $(SRCDIR)/LIBS.h)
+
+ matrixtest:
+--- mpqc-2.3.1.orig/src/lib/util/class/Makefile 2005-05-26 08:00:49.000000000 +0200
++++ mpqc-2.3.1/src/lib/util/class/Makefile 2010-02-13 14:04:15.396433004 +0100
+@@ -41,6 +41,7 @@
+
+ BIN_OR_LIB = LIB
+ TARGET_TO_MAKE = libSCclass
++LIBADD = $(SYSLIBS)
+
+ TESTCXXSRC = classtest.cc scextest.cc
+ DISTFILES = $(CXXSRC) $(INC) Makefile LIBS.h $(TESTCXXSRC)
+--- mpqc-2.3.1.orig/src/lib/util/state/Makefile 2005-05-26 08:00:51.000000000 +0200
++++ mpqc-2.3.1/src/lib/util/state/Makefile 2010-02-13 14:22:06.302369965 +0100
+@@ -50,6 +50,7 @@
+
+ BIN_OR_LIB = LIB
+ TARGET_TO_MAKE = libSCstate
++LIBADD = $(SRCDIR)/$(TOPDIR)/lib/libSCkeyval.la
+
+ default:: $(DEPENDINCLUDE)
+
+--- mpqc-2.3.1.orig/src/lib/util/group/Makefile 2005-07-30 02:30:18.000000000 +0200
++++ mpqc-2.3.1/src/lib/util/group/Makefile 2010-02-13 14:21:38.582370124 +0100
+@@ -61,6 +61,7 @@
+
+ BIN_OR_LIB = LIB
+ TARGET_TO_MAKE = libSCgroup
++LIBADD = $(SRCDIR)/$(TOPDIR)/lib/libSCkeyval.la
+
+ TESTCXXSRC = pooltest.cc messtest.cc rnglocktest.cc thrtest.cc prttest.cc
+ DISTFILES = $(REQUIREDCXXSRC) $(OPTIONALCXXSRC) $(INC) \
+--- mpqc-2.3.1.orig/src/lib/util/Makefile 2001-08-07 00:29:56.000000000 +0200
++++ mpqc-2.3.1/src/lib/util/Makefile 2010-02-13 14:40:23.611369920 +0100
+@@ -5,7 +5,7 @@
+
+ include $(SRCDIR)/$(TOPDIR)/lib/GlobalMakefile
+
+-SUBDIRS = options ref container class state misc keyval group render
++SUBDIRS = options keyval ref container class state misc group render
+
+ include $(SRCDIR)/$(TOPDIR)/lib/GlobalSubDirs
+
+--- mpqc-2.3.1.orig/lib/GlobalRules 2010-02-13 19:47:19.019432588 +0100
++++ mpqc-2.3.1/lib/GlobalRules 2010-02-13 19:47:57.760370198 +0100
+@@ -75,7 +75,7 @@
+ $(RANLIB) $@
+
+ $(TOPDIR)/lib/$(TARGET_TO_MAKE).la: $(LIBOBJ)
+- $(LTLINK) $(CXX) -o $@ $^ $(wildcard $(TMPLREPO)/*.o) $(LTLINKLIBOPTS)
++ $(LTLINK) $(CXX) $(LDFLAGS) -o $@ $^ $(wildcard $(TMPLREPO)/*.o) $(LTLINKLIBOPTS) $(LIBADD)
+
+ else
+
+@@ -104,7 +104,7 @@
+ endif
+
+ $(TOPDIR)/lib/$(TARGET_TO_MAKE).la: $(LIBOBJ)
+- $(LTLINK) $(CXX) -o $@ $^ $(LTLINKLIBOPTS)
++ $(LTLINK) $(CXX) $(LDFLAGS) -o $@ $^ $(LTLINKLIBOPTS) $(LIBADD)
+
+ endif
+
+--- mpqc-2.3.1.orig/doc/devsamp/Makefile 2004-04-28 22:45:14.000000000 +0200
++++ mpqc-2.3.1/doc/devsamp/Makefile 2010-02-13 19:58:56.958452043 +0100
+@@ -9,4 +9,4 @@
+ LTLINKBINOPTS := $(shell $(SCCONFIG) --ltlinkbinopts)
+
+ mp2: mp2.o
+- $(LTLINK) $(CXX) $(CXXFLAGS) -o $@ $^ -L$(LIBDIR) -lmpqc $(LIBS) $(LTLINKBINOPTS)
++ $(LTLINK) $(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ $^ -L$(LIBDIR) -lmpqc $(LIBS) $(LTLINKBINOPTS)
+--- mpqc-2.3.1.orig/src/bin/mpqc/Makefile 2005-07-28 18:57:47.000000000 +0200
++++ mpqc-2.3.1/src/bin/mpqc/Makefile 2010-02-13 19:57:40.484216235 +0100
+@@ -82,7 +82,7 @@
+ $(RANLIB) $@
+
+ $(TOPDIR)/lib/libmpqc.la: $(BINOBJ)
+- $(LTLINK) $(CXX) -o $@ $^ $(LTLINKLIBOPTS)
++ $(LTLINK) $(CXX) $(LDFLAGS) -o $@ $^ $(LTLINKLIBOPTS)
+
+ install_devel:: $(TOPDIR)/lib/libmpqc.$(LIBSUF)
+ $(INSTALL) $(INSTALLDIROPT) $(installroot)$(libdir)
+--- mpqc-2.3.1.orig/src/lib/chemistry/qc/Makefile.orig 2010-06-18 18:09:58.192621760 +0000
++++ mpqc-2.3.1/src/lib/chemistry/qc/Makefile 2010-06-18 18:10:10.350261767 +0000
+@@ -33,7 +33,7 @@
+ include $(SRCDIR)/$(TOPDIR)/lib/GlobalMakefile
+ include $(TOPDIR)/lib/Makedirlist
+
+-SUBDIRS = basis oint3 intv3 wfn scf dft mbpt
++SUBDIRS = basis oint3 intv3 dft wfn scf mbpt
+ ifeq ($(HAVE_SC_SRC_LIB_CHEMISTRY_QC_PSI),yes)
+ SUBDIRS := $(SUBDIRS) psi
+ endif
diff --git a/sci-chemistry/mpqc/files/mpqc-2.3.1-blas.patch b/sci-chemistry/mpqc/files/mpqc-2.3.1-blas.patch
new file mode 100644
index 000000000000..b99c82fb71da
--- /dev/null
+++ b/sci-chemistry/mpqc/files/mpqc-2.3.1-blas.patch
@@ -0,0 +1,55 @@
+ configure.in | 36 +++---------------------------------
+ 1 files changed, 3 insertions(+), 33 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index ee82977..caae1f9 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1487,44 +1487,14 @@ AC_LANG_CPLUSPLUS
+ LIBSSAV="$LIBS"
+ LIBS="$LIBSSAV $FLIBS"
+
+-LIBBLAS=""
+-F77_DGEMM=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DAXPY`
+-AC_CHECK_FUNC($F77_DGEMM,HAVE_BLAS=yes,[
+- AC_CHECK_LIB(essl,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lessl"],
+- AC_CHECK_LIB(blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lblas"])
+- )]
+-)
+-if test X$HAVE_BLAS != Xyes; then
+- LIBSSAV2="$LIBS"
+- LIBS="-latlas $LIBS"
+- AC_CHECK_LIB(f77blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lf77blas -latlas"],
+- LIBS="$LIBSSAV2")
+-fi
+-AC_SUBST(HAVE_BLAS)
+-if test X$HAVE_BLAS != Xyes; then
+- echo "WARNING: Could not link to the BLAS library. It can be obtained at"
+- echo "http://www.netlib.org/blas. Use --with-libdirs and/or --with-libs"
+- echo "to specify the name of the library."
+- AC_MSG_ERROR([BLAS is required to complete the build])
+-fi
++PKG_CHECK_MODULES([BLAS], [blas], [LIBBLAS="${BLAS_LIBS}"])
+
+ LIBS="$LIBSSAV $LIBBLAS $FLIBS"
+
+-LIBLAPACK=""
+-F77_DGESVD=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DGESVD`
+-AC_CHECK_FUNC($F77_DGESVD,HAVE_LAPACK=yes,[
+- AC_CHECK_LIB(lapack,$F77_DGESVD,[HAVE_LAPACK=yes;LIBLAPACK="-llapack"]
+- )]
+-)
+-AC_SUBST(HAVE_LAPACK)
+-if test X$HAVE_LAPACK != Xyes; then
+- echo "Could not link to the LAPACK library. It can be obtained at"
+- echo "http://www.netlib.org/lapack. Use --with-libdirs and/or --with-libs"
+- echo "to specify the name of the library."
+- AC_MSG_ERROR([LAPACK is required to complete the build])
+-fi
++PKG_CHECK_MODULES([LAPACK], [lapack], [LIBLAPACK="${LAPACK_LIBS}"])
+
+ FLIBS="$LIBLAPACK $LIBBLAS $FLIBS"
++
+ AC_LANG_RESTORE
+
+ dnl ----------- check for Scalable BLAS library --------------
diff --git a/sci-chemistry/mpqc/files/mpqc-2.3.1-respect-ldflags.patch b/sci-chemistry/mpqc/files/mpqc-2.3.1-respect-ldflags.patch
new file mode 100644
index 000000000000..c38c9579ddde
--- /dev/null
+++ b/sci-chemistry/mpqc/files/mpqc-2.3.1-respect-ldflags.patch
@@ -0,0 +1,25 @@
+--- mpqc-2.3.1.orig/configure.in 2006-03-22 19:04:54.000000000 +0100
++++ mpqc-2.3.1/configure.in 2010-02-13 17:46:19.545557872 +0100
+@@ -10,6 +10,8 @@
+ AC_CONFIG_HEADER(src/lib/scconfig.h)
+ AC_CONFIG_AUX_DIR(bin)
+
++m4_include([lib/autoconf/cca.m4])
++m4_include([lib/autoconf/acinclude.m4])
+ AC_CANONICAL_SYSTEM
+
+ AC_DEFINE_UNQUOTED(HOST_ARCH, "$host")
+@@ -473,12 +473,10 @@
+ echo Using FORTRAN runtime libraries: $withval
+ )
+
+-LDFLAGS=
+-LIBDIRS=
+ AC_ARG_WITH(libdirs,
+ [ --with-libdirs Specifies library directories (-Ldir1 -Ldir2).],
+ LIBDIRS=$withval
+-LDFLAGS=$withval
++LDFLAGS="$LDFLAGS $withval"
+ echo Using extra library directories: $withval
+ )
+
diff --git a/sci-chemistry/mpqc/files/mpqc-2.3.1-test-failure-hack.patch b/sci-chemistry/mpqc/files/mpqc-2.3.1-test-failure-hack.patch
new file mode 100644
index 000000000000..91fcc30d0d90
--- /dev/null
+++ b/sci-chemistry/mpqc/files/mpqc-2.3.1-test-failure-hack.patch
@@ -0,0 +1,11 @@
+--- mpqc-2.3.1.orig/src/bin/mpqc/validate/Makefile 2006-03-22 19:03:51.000000000 +0100
++++ mpqc-2.3.1/src/bin/mpqc/validate/Makefile 2010-02-13 20:26:12.496370219 +0100
+@@ -52,7 +52,7 @@
+ # Also need to see if --mpqc was specified. If not, then add
+ # --mpqc ../../mpqc.
+ ifeq ($(filter --mpqc%, $(ALL_MPQCRUN_ARGS)),)
+-ALL_MPQCRUN_ARGS:=--mpqc ../../mpqc $(ALL_MPQCRUN_ARGS)
++ALL_MPQCRUN_ARGS:=--mpqc "LD_LIBRARY_PATH=\"../../../../../lib/.libs/\" ../../mpqc" $(ALL_MPQCRUN_ARGS)
+ endif
+
+ ifeq ($(HAVE_SC_SRC_LIB_CHEMISTRY_QC_MBPTR12),yes)
diff --git a/sci-chemistry/mpqc/files/mpqc-2.3.1-wformat-security.patch b/sci-chemistry/mpqc/files/mpqc-2.3.1-wformat-security.patch
new file mode 100644
index 000000000000..7f25a92ad891
--- /dev/null
+++ b/sci-chemistry/mpqc/files/mpqc-2.3.1-wformat-security.patch
@@ -0,0 +1,71 @@
+Fix -Werror=format-security errors
+https://bugs.gentoo.org/show_bug.cgi?id=542278
+
+--- mpqc-2.3.1/src/lib/chemistry/molecule/atominfo.cc
++++ mpqc-2.3.1/src/lib/chemistry/molecule/atominfo.cc
+@@ -493,7 +493,7 @@
+ if (iname != symbol_to_Z_.end()) return iname->second;
+
+ if (allow_exceptions) {
+- ExEnv::err0() << sprintf("AtomInfo: invalid name: %s\n",name.c_str());
++ ExEnv::err0() << fprintf(stderr, "AtomInfo: invalid name: %s\n",name.c_str());
+ throw std::runtime_error("invalid atom name");
+ }
+
+--- mpqc-2.3.1/src/lib/chemistry/molecule/atominfo.h
++++ mpqc-2.3.1/src/lib/chemistry/molecule/atominfo.h
+@@ -49,8 +49,8 @@
+ struct atom
+ {
+ int Z;
+- char *name;
+- char *symbol;
++ const char *name;
++ const char *symbol;
+ };
+
+ static struct atom elements_[Nelement];
+--- mpqc-2.3.1/src/lib/chemistry/molecule/simple.cc
++++ mpqc-2.3.1/src/lib/chemistry/molecule/simple.cc
+@@ -214,7 +214,7 @@
+ os << scprintf(" %4d", atoms[i]);
+
+ if (mol.nonnull()) {
+- char *separator = " ";
++ const char *separator = " ";
+ os << " ";
+ for (i=0; i<(4-natoms()); i++) {
+ os << " ";
+--- mpqc-2.3.1/src/lib/chemistry/qc/psi/psiexenv.cc
++++ mpqc-2.3.1/src/lib/chemistry/qc/psi/psiexenv.cc
+@@ -147,7 +147,7 @@
+ return 0;
+ }
+
+-int PsiExEnv::run_psi_module(char *module)
++int PsiExEnv::run_psi_module(const char *module)
+ {
+ int errcod;
+ char *module_cmd = new char[2*cwd_.size()+strlen(module)+psiprefix_.size()+fileprefix_.size()+stdout_.size()+stderr_.size()+40];
+--- mpqc-2.3.1/src/lib/chemistry/qc/psi/psiexenv.h
++++ mpqc-2.3.1/src/lib/chemistry/qc/psi/psiexenv.h
+@@ -57,7 +57,7 @@
+ /// Executes Psi input+driver
+ int run_psi();
+ /// Executes a Psi module
+- int run_psi_module(char *);
++ int run_psi_module(const char *);
+
+ /// Returns current working directory
+ string get_cwd() const { return cwd_;};
+--- mpqc-2.3.1/src/lib/chemistry/qc/psi/psiwfn.cc
++++ mpqc-2.3.1/src/lib/chemistry/qc/psi/psiwfn.cc
+@@ -44,7 +44,7 @@
+ bytes = 2000000;
+ int bytes_str_len = (int)ceil(log10((long double)bytes));
+ memory_ = new char[bytes_str_len+5];
+- sprintf(memory_,"(%ld B)",bytes);
++ sprintf(memory_,"(%d B)",bytes);
+ }
+
+ PsiWavefunction::~PsiWavefunction()
diff --git a/sci-chemistry/mpqc/metadata.xml b/sci-chemistry/mpqc/metadata.xml
new file mode 100644
index 000000000000..2a8e4866597f
--- /dev/null
+++ b/sci-chemistry/mpqc/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-chemistry@gentoo.org</email>
+ <name>Gentoo Chemistry Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mpqc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild b/sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild
new file mode 100644
index 000000000000..794008aa31d9
--- /dev/null
+++ b/sci-chemistry/mpqc/mpqc-2.3.1-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="The Massively Parallel Quantum Chemistry Program"
+HOMEPAGE="http://www.mpqc.org/"
+SRC_URI="mirror://sourceforge/mpqc/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="doc threads tk"
+
+RDEPEND="
+ virtual/blas
+ virtual/lapack
+ tk? ( dev-lang/tk )"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ sys-devel/flex
+ sys-apps/sed
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # do not install tkmolrender if not requested
+ if ! use tk; then
+ sed \
+ -e "s:.*/bin/molrender/tkmolrender.*::" \
+ -e "s:.*\$(INSTALLBINOPT) tkmolrender.*::" \
+ -e "s:/bin/rm -f tkmolrender::" \
+ -i "./src/bin/molrender/Makefile" \
+ || die "failed to disable tkmolrender"
+ fi
+}
+
+src_compile() {
+ # Only shared will work on ppc64 - bug #62124
+ # But we always want shared libraries
+ econf \
+ $(use_enable threads) \
+ --enable-shared \
+ ${myconf}
+
+ sed \
+ -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \
+ -e "s:^FFLAGS =.*$:FFLAGS=${FFLAGS:- -O2}:" \
+ -e "s:^CXXFLAGS =.*$:CXXFLAGS=${CXXFLAGS}:" \
+ lib/LocalMakefile
+ emake || die "emake failed"
+}
+
+src_test() {
+ cd "${S}"/src/bin/mpqc/validate
+
+ # we'll only run the small test set, since the
+ # medium and large ones take >10h and >24h on my
+ # 1.8Ghz P4M
+ emake -j1 check0 || die "failed in test routines"
+}
+
+src_install() {
+ emake -j1 installroot="${D}" install install_devel install_inc \
+ || die "install failed"
+
+ dodoc CHANGES CITATION README || die "failed to install docs"
+
+ # make extended docs
+ if use doc; then
+ cd "${S}"/doc
+ emake -j1 all || die "failed to generate documentation"
+ doman man/man1/* man/man3/* || \
+ die "failed to install man pages"
+ dohtml -r html/
+ fi
+}
+
+pkg_postinst() {
+ echo
+ einfo "MPQC can be picky with regard to compilation flags."
+ einfo "If during mpqc runs you have trouble converging or "
+ einfo "experience oscillations during SCF interations, "
+ einfo "consider recompiling with less aggressive CFLAGS/CXXFLAGS."
+ einfo "Particularly, replacing -march=pentium4 by -march=pentium3"
+ einfo "might help if you encounter problems with correlation "
+ einfo "consistent basis sets."
+ echo
+}
diff --git a/sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild b/sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild
new file mode 100644
index 000000000000..c2776b711a1d
--- /dev/null
+++ b/sci-chemistry/mpqc/mpqc-2.3.1-r2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="The Massively Parallel Quantum Chemistry Program"
+HOMEPAGE="http://www.mpqc.org/"
+SRC_URI="mirror://sourceforge/mpqc/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 x86"
+IUSE="doc mpi threads tk"
+
+RDEPEND="
+ virtual/blas
+ virtual/lapack
+ mpi? ( virtual/mpi[cxx] )
+ tk? ( dev-lang/tk )"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ sys-devel/flex
+ sys-apps/sed
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-as-needed.patch \
+ "${FILESDIR}"/${P}-respect-ldflags.patch \
+ "${FILESDIR}"/${P}-test-failure-hack.patch
+ # do not install tkmolrender if not requested
+ if ! use tk; then
+ sed \
+ -e "s:.*/bin/molrender/tkmolrender.*::" \
+ -e "s:.*\$(INSTALLBINOPT) tkmolrender.*::" \
+ -e "s:/bin/rm -f tkmolrender::" \
+ -i "./src/bin/molrender/Makefile" \
+ || die "failed to disable tkmolrender"
+ fi
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC CXX
+ if use mpi; then
+ export CC=mpicc
+ export CXX=mpicxx
+ fi
+ econf \
+ $(use_enable threads) \
+ $(use_enable mpi parallel) \
+ --enable-shared \
+ ${myconf}
+
+ sed \
+ -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \
+ -e "s:^FFLAGS =.*$:FFLAGS=${FFLAGS:- -O2}:" \
+ -e "s:^CXXFLAGS =.*$:CXXFLAGS=${CXXFLAGS}:" \
+ lib/LocalMakefile
+}
+
+src_test() {
+ cd "${S}"/src/bin/mpqc/validate
+
+ # we'll only run the small test set, since the
+ # medium and large ones take >10h and >24h on my
+ # 1.8Ghz P4M
+ emake -j1 check0 || die "failed in test routines"
+}
+
+src_install() {
+ emake installroot="${D}" install install_devel install_inc \
+ || die "install failed"
+
+ dodoc CHANGES CITATION README || die "failed to install docs"
+
+ # make extended docs
+ if use doc; then
+ cd "${S}"/doc
+ emake -j1 all || die "failed to generate documentation"
+ doman man/man1/* man/man3/* || \
+ die "failed to install man pages"
+ dohtml -r html/
+ fi
+}
+
+pkg_postinst() {
+ echo
+ einfo "MPQC can be picky with regard to compilation flags."
+ einfo "If during mpqc runs you have trouble converging or "
+ einfo "experience oscillations during SCF interations, "
+ einfo "consider recompiling with less aggressive CFLAGS/CXXFLAGS."
+ einfo "Particularly, replacing -march=pentium4 by -march=pentium3"
+ einfo "might help if you encounter problems with correlation "
+ einfo "consistent basis sets."
+ echo
+}
diff --git a/sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild b/sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild
new file mode 100644
index 000000000000..b53abbdc26cb
--- /dev/null
+++ b/sci-chemistry/mpqc/mpqc-2.3.1-r3.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=yes
+
+inherit autotools-utils toolchain-funcs
+
+DESCRIPTION="The Massively Parallel Quantum Chemistry Program"
+HOMEPAGE="http://www.mpqc.org/"
+SRC_URI="mirror://sourceforge/mpqc/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="doc mpi threads static-libs tk"
+
+RDEPEND="
+ virtual/blas
+ virtual/lapack
+ mpi? ( virtual/mpi[cxx] )
+ tk? ( dev-lang/tk )"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ sys-devel/flex
+ sys-apps/sed
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-as-needed.patch
+ "${FILESDIR}"/${P}-respect-ldflags.patch
+ "${FILESDIR}"/${P}-test-failure-hack.patch
+ "${FILESDIR}"/${P}-blas.patch
+ )
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+DOCS=(CHANGES CITATION README)
+
+src_prepare() {
+ # do not install tkmolrender if not requested
+ if ! use tk; then
+ sed \
+ -e "s:.*/bin/molrender/tkmolrender.*::" \
+ -e "s:.*\$(INSTALLBINOPT) tkmolrender.*::" \
+ -e "s:/bin/rm -f tkmolrender::" \
+ -i "./src/bin/molrender/Makefile" \
+ || die "failed to disable tkmolrender"
+ fi
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ tc-export CC CXX
+ if use mpi; then
+ export CC=mpicc
+ export CXX=mpicxx
+ fi
+ local myeconfargs=(
+ $(use_enable threads)
+ $(use_enable mpi parallel) )
+
+ autotools-utils_src_configure
+ sed \
+ -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \
+ -e "s:^FFLAGS =.*$:FFLAGS=${FFLAGS:- -O2}:" \
+ -e "s:^CXXFLAGS =.*$:CXXFLAGS=${CXXFLAGS}:" \
+ -i lib/LocalMakefile || die
+}
+
+src_test() {
+ cd "${AUTOTOOLS_BUILD_DIR}"/src/bin/mpqc/validate
+
+ # we'll only run the small test set, since the
+ # medium and large ones take >10h and >24h on my
+ # 1.8Ghz P4M
+ emake -j1 check1
+}
+
+src_install() {
+ autotools-utils_src_install installroot="${D}" install install_devel install_inc
+
+ # make extended docs
+ if use doc; then
+ cd "${AUTOTOOLS_BUILD_DIR}"/doc
+ emake -j1 all
+ doman man/man1/* man/man3/*
+ dohtml -r html
+ fi
+}
+
+pkg_postinst() {
+ echo
+ einfo "MPQC can be picky with regard to compilation flags."
+ einfo "If during mpqc runs you have trouble converging or "
+ einfo "experience oscillations during SCF interations, "
+ einfo "consider recompiling with less aggressive CFLAGS/CXXFLAGS."
+ einfo "Particularly, replacing -march=pentium4 by -march=pentium3"
+ einfo "might help if you encounter problems with correlation "
+ einfo "consistent basis sets."
+ echo
+}
diff --git a/sci-chemistry/mpqc/mpqc-2.3.1-r4.ebuild b/sci-chemistry/mpqc/mpqc-2.3.1-r4.ebuild
new file mode 100644
index 000000000000..bdf7bcdcce0a
--- /dev/null
+++ b/sci-chemistry/mpqc/mpqc-2.3.1-r4.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="The Massively Parallel Quantum Chemistry Program"
+HOMEPAGE="http://www.mpqc.org/"
+SRC_URI="mirror://sourceforge/mpqc/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc mpi threads static-libs tk"
+
+RDEPEND="
+ virtual/blas
+ virtual/lapack
+ mpi? ( virtual/mpi[cxx] )
+ tk? ( dev-lang/tk:0 )"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ sys-devel/flex
+ sys-apps/sed
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-as-needed.patch"
+ "${FILESDIR}/${P}-respect-ldflags.patch"
+ "${FILESDIR}/${P}-test-failure-hack.patch"
+ "${FILESDIR}/${P}-blas.patch"
+ "${FILESDIR}/${P}-wformat-security.patch"
+)
+DOCS=(CHANGES CITATION README)
+
+src_prepare() {
+ # do not install tkmolrender if not requested
+ if ! use tk; then
+ sed \
+ -e "s:.*/bin/molrender/tkmolrender.*::" \
+ -e "s:.*\$(INSTALLBINOPT) tkmolrender.*::" \
+ -e "s:/bin/rm -f tkmolrender::" \
+ -i "./src/bin/molrender/Makefile" \
+ || die "failed to disable tkmolrender"
+ fi
+ default
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC CXX
+ if use mpi; then
+ export CC=mpicc
+ export CXX=mpicxx
+ fi
+
+ econf \
+ $(use_enable threads) \
+ $(use_enable mpi parallel) \
+ $(use_enable static-libs static)
+
+ sed \
+ -e "s:^CFLAGS =.*$:CFLAGS=${CFLAGS}:" \
+ -e "s:^FFLAGS =.*$:FFLAGS=${FFLAGS:- -O2}:" \
+ -e "s:^CXXFLAGS =.*$:CXXFLAGS=${CXXFLAGS}:" \
+ -i lib/LocalMakefile || die
+}
+
+src_test() {
+ cd src/bin/mpqc/validate || die
+
+ # we'll only run the small test set, since the
+ # medium and large ones take >10h and >24h on my
+ # 1.8Ghz P4M
+ emake -j1 check1
+}
+
+src_install() {
+ emake installroot="${D}" install install_devel install_inc
+
+ # make extended docs
+ if use doc; then
+ cd doc || die
+ emake all
+ doman man/man1/* man/man3/*
+ dodoc -r html/
+ fi
+}
+
+pkg_postinst() {
+ echo
+ einfo "MPQC can be picky with regard to compilation flags."
+ einfo "If during mpqc runs you have trouble converging or "
+ einfo "experience oscillations during SCF interations, "
+ einfo "consider recompiling with less aggressive CFLAGS/CXXFLAGS."
+ einfo "Particularly, replacing -march=pentium4 by -march=pentium3"
+ einfo "might help if you encounter problems with correlation "
+ einfo "consistent basis sets."
+ echo
+}