summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-chemistry/psi
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-chemistry/psi')
-rw-r--r--sci-chemistry/psi/Manifest1
-rw-r--r--sci-chemistry/psi/files/3.4.0-destdir.patch41
-rw-r--r--sci-chemistry/psi/files/3.4.0-dont-build-libint.patch13
-rw-r--r--sci-chemistry/psi/files/3.4.0-fortify.patch58
-rw-r--r--sci-chemistry/psi/files/3.4.0-gcc-4.3.patch293
-rw-r--r--sci-chemistry/psi/files/3.4.0-ldflags.patch21
-rw-r--r--sci-chemistry/psi/files/3.4.0-man_paths.patch25
-rw-r--r--sci-chemistry/psi/files/3.4.0-parallel_fix.patch400
-rw-r--r--sci-chemistry/psi/files/psi-3.4.0-parallel-make.patch19
-rw-r--r--sci-chemistry/psi/files/use-external-libint.patch37
-rw-r--r--sci-chemistry/psi/metadata.xml8
-rw-r--r--sci-chemistry/psi/psi-3.4.0-r2.ebuild81
12 files changed, 997 insertions, 0 deletions
diff --git a/sci-chemistry/psi/Manifest b/sci-chemistry/psi/Manifest
new file mode 100644
index 000000000000..c7fb8a8d6271
--- /dev/null
+++ b/sci-chemistry/psi/Manifest
@@ -0,0 +1 @@
+DIST psi-3.4.0.tar.gz 7413072 SHA256 c87a7f63cb4e34bfd1a8b3731474eb417d9933338327143415a985bcedb619d4 SHA512 b13d2464502545cceec3a3b6048b505b918da26730c1614617b04ee6c1d637c9f799ef7fd92ad9554fa2db87617004aa810a6a81400a04df3c06787d51654ca6 WHIRLPOOL 9c0b9de2c9fbed298eaf958f0c135cadff16eac8754d4064dba0ac2275aabd36204bcad92f90236030bc62ef9917b967653ec608e40ad631e70a0ce1c16f2127
diff --git a/sci-chemistry/psi/files/3.4.0-destdir.patch b/sci-chemistry/psi/files/3.4.0-destdir.patch
new file mode 100644
index 000000000000..45db9529aa4d
--- /dev/null
+++ b/sci-chemistry/psi/files/3.4.0-destdir.patch
@@ -0,0 +1,41 @@
+diff --git a/Makefile.in b/Makefile.in
+index aca5a16..2e49f0a 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -8,6 +8,7 @@ subdirs = lib include src
+
+ top_srcdir = @top_srcdir@
+ srcdir = @srcdir@
++datarootdir = @datarootdir@
+ VPATH = @srcdir@
+ top_objdir = .
+
+diff --git a/lib/ruby/Makefile.in b/lib/ruby/Makefile.in
+index b31ce7f..e099e1b 100644
+--- a/lib/ruby/Makefile.in
++++ b/lib/ruby/Makefile.in
+@@ -29,10 +29,10 @@ ccenergy.rb cclambda.rb chkpt.rb color.rb deriv2.rb frequ
+ cceom.rb ccsort.rb cints.rb cphf.rb detci.rb input.rb optking.rb psi3.rb testcases.rb
+
+ install: $(RUBYSRC)
+- $(MKDIRS) $(rubydatadir)
++ $(MKDIRS) $(DESTDIR)/$(rubydatadir)
+ for rbfile in $(RUBYSRC); \
+ do \
+- ($(INSTALL_DATA) $(srcdir)/$${rbfile} $(rubydatadir)) || exit 1; \
++ ($(INSTALL_DATA) $(srcdir)/$${rbfile} $(DESTDIR)/$(rubydatadir)) || exit 1; \
+ done
+
+ install_man:
+diff --git a/src/bin/Makefile.in b/src/bin/Makefile.in
+index e1abb46..4eddf8d 100644
+--- a/src/bin/Makefile.in
++++ b/src/bin/Makefile.in
+@@ -65,6 +65,7 @@ targetclean:
+
+ top_srcdir = @top_srcdir@
+ srcdir = @srcdir@
++datarootdir = @datarootdir@
+ top_objdir = ../..
+
+ $(top_srcdir)/configure: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
diff --git a/sci-chemistry/psi/files/3.4.0-dont-build-libint.patch b/sci-chemistry/psi/files/3.4.0-dont-build-libint.patch
new file mode 100644
index 000000000000..0d65cee8a1a9
--- /dev/null
+++ b/sci-chemistry/psi/files/3.4.0-dont-build-libint.patch
@@ -0,0 +1,13 @@
+diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
+index 42e025d..b098a36 100644
+--- a/src/lib/Makefile.in
++++ b/src/lib/Makefile.in
+@@ -2,7 +2,7 @@
+ .PHONY: default all install depend clean dclean targetclean
+
+ subdirs = libipv1 libciomr libchkpt libqt libpsio libiwl libdpd libutil \
+- liboptions libmoinfo libint libderiv libr12 libbasis libmints
++ liboptions libmoinfo libbasis libmints
+
+ all: default
+
diff --git a/sci-chemistry/psi/files/3.4.0-fortify.patch b/sci-chemistry/psi/files/3.4.0-fortify.patch
new file mode 100644
index 000000000000..5f098399ad3f
--- /dev/null
+++ b/sci-chemistry/psi/files/3.4.0-fortify.patch
@@ -0,0 +1,58 @@
+ src/bin/ccenergy/get_params.cc | 2 +-
+ src/bin/cclambda/get_params.cc | 2 +-
+ src/bin/ccresponse/get_params.cc | 2 +-
+ src/bin/ccsort/get_params.cc | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/bin/ccenergy/get_params.cc b/src/bin/ccenergy/get_params.cc
+index 53f4c83..a2fa932 100644
+--- a/src/bin/ccenergy/get_params.cc
++++ b/src/bin/ccenergy/get_params.cc
+@@ -193,7 +193,7 @@ void get_params()
+ }
+ }
+ else if(params.local) {
+- local.weakp = (char *) malloc(4 * sizeof(char));
++ local.weakp = (char *) malloc(5 * sizeof(char));
+ sprintf(local.weakp, "%s", "NONE");
+ }
+
+diff --git a/src/bin/cclambda/get_params.cc b/src/bin/cclambda/get_params.cc
+index 4a9d2c8..8a2ae17 100644
+--- a/src/bin/cclambda/get_params.cc
++++ b/src/bin/cclambda/get_params.cc
+@@ -150,7 +150,7 @@ void get_params(void)
+ }
+ }
+ else if(params.local) {
+- local.weakp = (char *) malloc(4 * sizeof(char));
++ local.weakp = (char *) malloc(5 * sizeof(char));
+ sprintf(local.weakp, "%s", "NONE");
+ }
+
+diff --git a/src/bin/ccresponse/get_params.cc b/src/bin/ccresponse/get_params.cc
+index a96db13..5c40aa0 100644
+--- a/src/bin/ccresponse/get_params.cc
++++ b/src/bin/ccresponse/get_params.cc
+@@ -207,7 +207,7 @@ void get_params()
+ }
+ }
+ else if(params.local) {
+- local.weakp = (char *) malloc(4 * sizeof(char));
++ local.weakp = (char *) malloc(5 * sizeof(char));
+ sprintf(local.weakp, "%s", "NONE");
+ }
+
+diff --git a/src/bin/ccsort/get_params.cc b/src/bin/ccsort/get_params.cc
+index ad7f0c3..6ee1993 100644
+--- a/src/bin/ccsort/get_params.cc
++++ b/src/bin/ccsort/get_params.cc
+@@ -120,7 +120,7 @@ void get_params()
+ }
+ }
+ else if(params.local) {
+- local.weakp = (char *) malloc(4 * sizeof(char));
++ local.weakp = (char *) malloc(5 * sizeof(char));
+ sprintf(local.weakp, "%s", "NONE");
+ }
+
diff --git a/sci-chemistry/psi/files/3.4.0-gcc-4.3.patch b/sci-chemistry/psi/files/3.4.0-gcc-4.3.patch
new file mode 100644
index 000000000000..8283e6d8d8ea
--- /dev/null
+++ b/sci-chemistry/psi/files/3.4.0-gcc-4.3.patch
@@ -0,0 +1,293 @@
+diff --git a/src/bin/mcscf/block_matrix.cc b/src/bin/mcscf/block_matrix.cc
+index fe1e131..3ad0bcd 100644
+--- a/src/bin/mcscf/block_matrix.cc
++++ b/src/bin/mcscf/block_matrix.cc
+@@ -1,6 +1,7 @@
+ #include "block_matrix.h"
+ #include "matrix_base.h"
+ #include "memory_manager.h"
++#include <cstdio>
+
+ extern FILE* outfile;
+
+diff --git a/src/bin/mcscf/block_vector.cc b/src/bin/mcscf/block_vector.cc
+index fb383c7..36f55d4 100644
+--- a/src/bin/mcscf/block_vector.cc
++++ b/src/bin/mcscf/block_vector.cc
+@@ -1,6 +1,7 @@
+ #include "block_vector.h"
+ #include "vector_base.h"
+ #include "memory_manager.h"
++#include <cstdio>
+
+ extern FILE* outfile;
+
+diff --git a/src/bin/mcscf/sblock_matrix.cc b/src/bin/mcscf/sblock_matrix.cc
+index 61aa7cc..4da4263 100644
+--- a/src/bin/mcscf/sblock_matrix.cc
++++ b/src/bin/mcscf/sblock_matrix.cc
+@@ -1,4 +1,5 @@
+ #include <cstdlib>
++#include <cstdio>
+ #include <psifiles.h>
+ #include "sblock_matrix.h"
+
+@@ -103,4 +104,4 @@ void SBlockMatrix::check(const char* cstr)
+ }
+ }
+
+-}}
+\ No newline at end of file
++}}
+diff --git a/src/bin/mcscf/sblock_vector.cc b/src/bin/mcscf/sblock_vector.cc
+index 63c3926..f24fc5b 100644
+--- a/src/bin/mcscf/sblock_vector.cc
++++ b/src/bin/mcscf/sblock_vector.cc
+@@ -1,4 +1,5 @@
+ #include <cstdlib>
++#include <cstdio>
+ #include <psifiles.h>
+
+ #include "sblock_vector.h"
+@@ -58,4 +59,4 @@ void SBlockVector::check(const char* cstr)
+ }
+ }
+
+-}}
+\ No newline at end of file
++}}
+diff --git a/src/bin/mcscf/scf.cc b/src/bin/mcscf/scf.cc
+index 77318fd..7d1e17f 100644
+--- a/src/bin/mcscf/scf.cc
++++ b/src/bin/mcscf/scf.cc
+@@ -5,6 +5,7 @@
+
+ #include <iostream>
+ #include <cmath>
++#include <cstdio>
+
+ extern FILE* outfile;
+
+diff --git a/src/bin/mcscf/scf_Feff.cc b/src/bin/mcscf/scf_Feff.cc
+index 584aa83..8a99c3b 100644
+--- a/src/bin/mcscf/scf_Feff.cc
++++ b/src/bin/mcscf/scf_Feff.cc
+@@ -1,4 +1,5 @@
+ #include <liboptions/liboptions.h>
++#include <cstdio>
+
+ #include "scf.h"
+
+diff --git a/src/bin/mcscf/scf_canonicalize_MO.cc b/src/bin/mcscf/scf_canonicalize_MO.cc
+index a2b3915..96bb6cc 100644
+--- a/src/bin/mcscf/scf_canonicalize_MO.cc
++++ b/src/bin/mcscf/scf_canonicalize_MO.cc
+@@ -1,6 +1,7 @@
+ #include "scf.h"
+
+ #include <liboptions/liboptions.h>
++#include <cstdio>
+
+ namespace psi{ namespace mcscf{
+
+diff --git a/src/bin/mcscf/scf_check_orthonormality.cc b/src/bin/mcscf/scf_check_orthonormality.cc
+index 63fbbbb..a13436c 100644
+--- a/src/bin/mcscf/scf_check_orthonormality.cc
++++ b/src/bin/mcscf/scf_check_orthonormality.cc
+@@ -1,5 +1,6 @@
+ #include <iostream>
+ #include <cmath>
++#include <cstdio>
+
+ #include "scf.h"
+
+diff --git a/src/bin/mcscf/scf_compute_energy.cc b/src/bin/mcscf/scf_compute_energy.cc
+index fe7ee6d..20194eb 100644
+--- a/src/bin/mcscf/scf_compute_energy.cc
++++ b/src/bin/mcscf/scf_compute_energy.cc
+@@ -1,4 +1,5 @@
+ #include <iostream>
++#include <cstdio>
+
+ #include "scf.h"
+
+diff --git a/src/bin/mcscf/scf_diis.cc b/src/bin/mcscf/scf_diis.cc
+index 9bcde15..261492a 100644
+--- a/src/bin/mcscf/scf_diis.cc
++++ b/src/bin/mcscf/scf_diis.cc
+@@ -1,4 +1,5 @@
+ #include <iostream>
++#include <cstdio>
+
+ #include <liboptions/liboptions.h>
+
+diff --git a/src/bin/mcscf/scf_iterate_scf_equations.cc b/src/bin/mcscf/scf_iterate_scf_equations.cc
+index 9e96360..3a3acc3 100644
+--- a/src/bin/mcscf/scf_iterate_scf_equations.cc
++++ b/src/bin/mcscf/scf_iterate_scf_equations.cc
+@@ -1,6 +1,7 @@
+ #include <cstdlib>
+ #include <iostream>
+ #include <cmath>
++#include <cstdio>
+
+ #include <liboptions/liboptions.h>
+
+diff --git a/src/bin/mcscf/scf_pairs.cc b/src/bin/mcscf/scf_pairs.cc
+index b0a8c9d..af5fc35 100644
+--- a/src/bin/mcscf/scf_pairs.cc
++++ b/src/bin/mcscf/scf_pairs.cc
+@@ -1,4 +1,5 @@
+ #include <iostream>
++#include <cstdio>
+
+ #include <libmoinfo/libmoinfo.h>
+
+diff --git a/src/bin/mcscf/scf_print_eigenvectors_and_MO.cc b/src/bin/mcscf/scf_print_eigenvectors_and_MO.cc
+index 3aac92a..e28e9e3 100644
+--- a/src/bin/mcscf/scf_print_eigenvectors_and_MO.cc
++++ b/src/bin/mcscf/scf_print_eigenvectors_and_MO.cc
+@@ -3,6 +3,7 @@
+ #include <string>
+ #include <utility>
+ #include <algorithm>
++#include <cstdio>
+
+ #include <libmoinfo/libmoinfo.h>
+
+diff --git a/src/bin/psimrcc/blas_algorithms.cc b/src/bin/psimrcc/blas_algorithms.cc
+index bb36025..0a5a3e2 100644
+--- a/src/bin/psimrcc/blas_algorithms.cc
++++ b/src/bin/psimrcc/blas_algorithms.cc
+@@ -1,5 +1,6 @@
+ #include <libmoinfo/libmoinfo.h>
+ #include <libutil/libutil.h>
++#include <cstdio>
+
+ #include "blas.h"
+ #include "memory_manager.h"
+diff --git a/src/bin/psimrcc/blas_compatibile.cc b/src/bin/psimrcc/blas_compatibile.cc
+index 8de6d73..7caf4f3 100644
+--- a/src/bin/psimrcc/blas_compatibile.cc
++++ b/src/bin/psimrcc/blas_compatibile.cc
+@@ -1,6 +1,7 @@
+ #include "blas.h"
+ #include <libutil/libutil.h>
+ #include <cstdlib>
++#include <cstdio>
+
+ extern FILE *infile, *outfile;
+
+diff --git a/src/bin/psimrcc/blas_parser.cc b/src/bin/psimrcc/blas_parser.cc
+index d211a24..78fe60a 100644
+--- a/src/bin/psimrcc/blas_parser.cc
++++ b/src/bin/psimrcc/blas_parser.cc
+@@ -3,6 +3,7 @@
+ #include "debugging.h"
+ #include <libutil/libutil.h>
+ #include <algorithm>
++#include <cstdio>
+
+ namespace psi{ namespace psimrcc{
+
+diff --git a/src/bin/psimrcc/blas_solve.cc b/src/bin/psimrcc/blas_solve.cc
+index b138a5b..f5dcdfc 100644
+--- a/src/bin/psimrcc/blas_solve.cc
++++ b/src/bin/psimrcc/blas_solve.cc
+@@ -1,6 +1,7 @@
+ #include "blas.h"
+ #include "debugging.h"
+ #include <libmoinfo/libmoinfo.h>
++#include <cstdio>
+
+ namespace psi{ namespace psimrcc{
+
+diff --git a/src/bin/psimrcc/index.cc b/src/bin/psimrcc/index.cc
+index 3465d88..68c2b77 100644
+--- a/src/bin/psimrcc/index.cc
++++ b/src/bin/psimrcc/index.cc
+@@ -5,6 +5,7 @@
+ ***************************************************************************/
+ #include <iostream>
+ #include <algorithm>
++#include <cstdio>
+
+ #include <libmoinfo/libmoinfo.h>
+
+diff --git a/src/bin/psimrcc/operation.cc b/src/bin/psimrcc/operation.cc
+index edbaed5..f4e881f 100644
+--- a/src/bin/psimrcc/operation.cc
++++ b/src/bin/psimrcc/operation.cc
+@@ -7,6 +7,7 @@
+ #include "debugging.h"
+ #include "blas.h"
+ #include <libutil/libutil.h>
++#include <cstdio>
+
+ namespace psi{ namespace psimrcc{
+
+diff --git a/src/bin/psimrcc/operation_compute.cc b/src/bin/psimrcc/operation_compute.cc
+index 7d2553c..72a1b39 100644
+--- a/src/bin/psimrcc/operation_compute.cc
++++ b/src/bin/psimrcc/operation_compute.cc
+@@ -11,6 +11,7 @@
+ #include "algebra_interface.h"
+ #include <libmoinfo/libmoinfo.h>
+ #include <cstdlib>
++#include <cstdio>
+
+ extern FILE *infile, *outfile;
+
+diff --git a/src/bin/psimrcc/sort_out_of_core.cc b/src/bin/psimrcc/sort_out_of_core.cc
+index 3f255c9..8fa31a3 100644
+--- a/src/bin/psimrcc/sort_out_of_core.cc
++++ b/src/bin/psimrcc/sort_out_of_core.cc
+@@ -8,6 +8,7 @@
+ #include "sort.h"
+ #include "matrix.h"
+ #include <libmoinfo/libmoinfo.h>
++#include <cstdio>
+
+ extern FILE* outfile;
+
+diff --git a/src/lib/libmoinfo/moinfo_model_space.cc b/src/lib/libmoinfo/moinfo_model_space.cc
+index 3bf2030..0a63cde 100644
+--- a/src/lib/libmoinfo/moinfo_model_space.cc
++++ b/src/lib/libmoinfo/moinfo_model_space.cc
+@@ -1,6 +1,7 @@
+ #include <iostream>
+ #include <cmath>
+ #include <cstdlib>
++#include <cstdio>
+
+ #include <psifiles.h>
+ #include <liboptions/liboptions.h>
+@@ -322,4 +323,4 @@ vector<string> MOInfo::get_matrix_names(std::string str)
+ return(names);
+ }
+
+-}
+\ No newline at end of file
++}
+diff --git a/src/lib/libmoinfo/moinfo_slaterdeterminant.cc b/src/lib/libmoinfo/moinfo_slaterdeterminant.cc
+index 8831cd5..a046679 100644
+--- a/src/lib/libmoinfo/moinfo_slaterdeterminant.cc
++++ b/src/lib/libmoinfo/moinfo_slaterdeterminant.cc
+@@ -1,4 +1,5 @@
+ #include <iostream>
++#include <cstdio>
+ #include "moinfo.h"
+
+ extern FILE *infile, *outfile;
+diff --git a/src/lib/libutil/stl_string.cc b/src/lib/libutil/stl_string.cc
+index 0ec247d..f719dcd 100644
+--- a/src/lib/libutil/stl_string.cc
++++ b/src/lib/libutil/stl_string.cc
+@@ -2,6 +2,7 @@
+ #include <cmath>
+ #include <iomanip>
+ #include <algorithm>
++#include <cstdio>
+
+ #include "libutil.h"
+
diff --git a/sci-chemistry/psi/files/3.4.0-ldflags.patch b/sci-chemistry/psi/files/3.4.0-ldflags.patch
new file mode 100644
index 000000000000..9d7f2767e8ec
--- /dev/null
+++ b/sci-chemistry/psi/files/3.4.0-ldflags.patch
@@ -0,0 +1,21 @@
+Respect LDFLAGS
+
+--- configure.ac
++++ configure.ac
+@@ -288,15 +288,13 @@
+ )
+ AC_SUBST(LDLIBS)
+
+-LDFLAGS=
+ LIBDIRS=
+ AC_ARG_WITH(libdirs,
+ [ --with-libdirs Specifies library directories (-Ldir1 -Ldir2).],
+ LIBDIRS=$withval
+-LDFLAGS=$withval
+ AC_MSG_RESULT([Using extra library directories: $withval])
+ )
+-AC_SUBST(LDFLAGS)
++AC_SUBST(LIBDIRS)
+
+ AC_CHECK_PROGS(PERL,perl,perl) AC_SUBST(PERL)
+
diff --git a/sci-chemistry/psi/files/3.4.0-man_paths.patch b/sci-chemistry/psi/files/3.4.0-man_paths.patch
new file mode 100644
index 000000000000..02cced160847
--- /dev/null
+++ b/sci-chemistry/psi/files/3.4.0-man_paths.patch
@@ -0,0 +1,25 @@
+Fix man paths
+
+http://bugs.gentoo.org/show_bug.cgi?id=326185
+
+--- src/bin/nonbonded/Makefile.in
++++ src/bin/nonbonded/Makefile.in
+@@ -19,5 +19,5 @@
+ endif
+
+ install_man:: nonbonded.1
+- $(MKDIRS) $(mandir)/man1
+- $(INSTALL_INCLUDE) $^ $(mandir)/man1
++ $(MKDIRS) $(DESTDIR)$(mandir)/man1
++ $(INSTALL_INCLUDE) $^ $(DESTDIR)$(mandir)/man1
+--- src/bin/intder/Makefile.in
++++ src/bin/intder/Makefile.in
+@@ -21,6 +21,6 @@
+ endif
+
+ install_man:: intder.1
+- $(MKDIRS) $(mandir)/man1
+- $(INSTALL_INCLUDE) $^ $(mandir)/man1
++ $(MKDIRS) $(DESTDIR)$(mandir)/man1
++ $(INSTALL_INCLUDE) $^ $(DESTDIR)$(mandir)/man1
+
diff --git a/sci-chemistry/psi/files/3.4.0-parallel_fix.patch b/sci-chemistry/psi/files/3.4.0-parallel_fix.patch
new file mode 100644
index 000000000000..65234fb40dcb
--- /dev/null
+++ b/sci-chemistry/psi/files/3.4.0-parallel_fix.patch
@@ -0,0 +1,400 @@
+--- Makefile.in
++++ Makefile.in
+@@ -17,62 +17,19 @@
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+
+-all:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making in $${dir} && $(MAKE) all) || exit 1; \
+- done
+-
+-install: install_host
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making install in $${dir} && $(MAKE) install) || exit 1; \
+- done
+-
+-install_inc:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making install in $${dir} && $(MAKE) install_inc) || exit 1; \
+- done
+-
+-install_man:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making install in $${dir} && $(MAKE) install_man) || exit 1; \
+- done
+-
+-depend:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making depend in $${dir} && $(MAKE) depend) || exit 1; \
+- done
+-
+-clean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making clean in $${dir} && $(MAKE) clean) || exit 1; \
+- done
+-
+-dclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making dclean in $${dir} && $(MAKE) dclean) || exit 1; \
+- done
+-
+-targetclean:
+- for dir in $(subdirs) tests doc; \
+- do \
+- (cd $${dir} && echo Making clean in $${dir} && $(MAKE) targetclean) || exit 1; \
+- done
++all clean install install_inc install_man depend dclean targetclean:
++ for dir in $(subdirs); do \
++ $(MAKE) -C $$dir $@; \
++ done
+
+ tests:
+- (cd tests && echo Running test suite... && $(MAKE)) || exit 1;
++ $(MAKE) -C tests
+
+ testsclean:
+- (cd tests && echo Cleaning test suite... && $(MAKE) clean) || exit 1;
++ $(MAKE) -C tests clean
+
+ doc:
+- (cd doc && echo Building documentation... && $(MAKE)) || exit 1;
++ $(MAKE) -C doc
+
+ $(top_srcdir)/configure: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
+ cd $(top_srcdir) && autoconf
+--- lib/Makefile.in
++++ lib/Makefile.in
+@@ -31,7 +31,7 @@
+ $(INSTALL_DATA) $(srcdir)/psi.dat $(DESTDIR)$(pkgdatadir)
+ for dir in $(subdirs); \
+ do \
+- (cd $${dir}; echo Making in $${dir}; $(MAKE) install) || exit 1; \
++ $(MAKE) -C $$dir install; \
+ done
+
+ install_man: macro.psi
+--- src/Makefile.in
++++ src/Makefile.in
+@@ -6,53 +6,10 @@
+
+ default: all
+
+-all:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making in $${dir} && $(MAKE) all) || exit 1; \
+- done
+-
+-install:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making install in $${dir} && $(MAKE) install) || exit 1; \
+- done
+-
+-install_inc:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making install in $${dir} && $(MAKE) install_inc) || exit 1; \
+- done
+-
+-install_man:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making install in $${dir} && $(MAKE) install_man) || exit 1; \
+- done
+-
+-depend:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making depend in $${dir} && $(MAKE) depend) || exit 1; \
+- done
+-
+-clean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making clean in $${dir} && $(MAKE) clean) || exit 1; \
+- done
+-
+-dclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making dclean in $${dir} && $(MAKE) dclean) || exit 1; \
+- done
+-
+-targetclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo Making clean in $${dir} && $(MAKE) targetclean) || exit 1; \
+- done
++all clean install depend dclean targetclean:
++ for dir in $(subdirs); do \
++ $(MAKE) -C $$dir $@; \
++ done
+
+ top_srcdir = @top_srcdir@
+ srcdir = @srcdir@
+--- src/lib/Makefile.in
++++ src/lib/Makefile.in
+@@ -4,56 +4,10 @@
+ subdirs = libipv1 libciomr libchkpt libqt libpsio libiwl libdpd libutil \
+ liboptions libmoinfo libbasis libmints
+
+-all: default
+-
+-default:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making in $${dir} ... && $(MAKE) default) || exit 1; \
+- done
+-
+-install:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install) || exit 1; \
+- done
+-
+-install_inc:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install_inc) || exit 1; \
+- done
+-
+-install_man:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install_man) || exit 1; \
+- done
+-
+-depend:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making depend in $${dir} ... && $(MAKE) depend) || exit 1; \
+- done
+-
+-clean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making clean in $${dir} ... && $(MAKE) clean) || exit 1; \
+- done
+-
+-dclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making dclean in $${dir} ... && $(MAKE) dclean) || exit 1; \
+- done
+-
+-targetclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making clean in $${dir} ... && $(MAKE) targetclean) || exit 1; \
+- done
+-
++all clean install install_inc install_man depend dclean targetclean:
++ for dir in $(subdirs); do \
++ $(MAKE) -C $$dir $@; \
++ done
+
+ #
+ # keep the configuration information and makefile up-to-date
+--- src/bin/Makefile.in
++++ src/bin/Makefile.in
+@@ -13,55 +13,10 @@
+ subdirs += psirb
+ endif
+
+-all: default
+-
+-default:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making in $${dir} ... && $(MAKE) default) || exit 1; \
+- done
+-
+-install:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install) || exit 1; \
+- done
+-
+-install_inc:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install_inc) || exit 1; \
+- done
+-
+-install_man:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install_man) || exit 1; \
+- done
+-
+-depend:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making depend in $${dir} ... && $(MAKE) depend) || exit 1; \
+- done
+-
+-clean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making clean in $${dir} ... && $(MAKE) clean) || exit 1; \
+- done
+-
+-dclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making dclean in $${dir} ... && $(MAKE) dclean) || exit 1; \
+- done
+-
+-targetclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making clean in $${dir} ... && $(MAKE) targetclean) || exit 1; \
+- done
++all install depend clean dclean targetclean:
++ for dir in $(subdirs); do \
++ $(MAKE) -C $$dir $@; \
++ done
+
+ top_srcdir = @top_srcdir@
+ srcdir = @srcdir@
+--- src/samples/Makefile.in
++++ src/samples/Makefile.in
+@@ -5,55 +5,10 @@
+
+ subdirs = mints
+
+-all: default
+-
+-default:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making in $${dir} ... && $(MAKE) default) || exit 1; \
+- done
+-
+-install:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install) || exit 1; \
+- done
+-
+-install_inc:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install_inc) || exit 1; \
+- done
+-
+-install_man:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install_man) || exit 1; \
+- done
+-
+-depend:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making depend in $${dir} ... && $(MAKE) depend) || exit 1; \
+- done
+-
+-clean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making clean in $${dir} ... && $(MAKE) clean) || exit 1; \
+- done
+-
+-dclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making dclean in $${dir} ... && $(MAKE) dclean) || exit 1; \
+- done
+-
+-targetclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making clean in $${dir} ... && $(MAKE) targetclean) || exit 1; \
+- done
++all install depend clean dclean targetclean:
++ for dir in $(subdirs); do \
++ $(MAKE) -C $$dir $@; \
++ done
+
+ top_srcdir = @top_srcdir@
+ srcdir = @srcdir@
+--- src/util/Makefile.in
++++ src/util/Makefile.in
+@@ -3,55 +3,10 @@
+
+ subdirs = tocprint psi2molden
+
+-all: default
+-
+-default:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making in $${dir} ... && $(MAKE) default) || exit 1; \
+- done
+-
+-install:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install) || exit 1; \
+- done
+-
+-install_inc:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install_inc) || exit 1; \
+- done
+-
+-install_man:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making install in $${dir} ... && $(MAKE) install_man) || exit 1; \
+- done
+-
+-depend:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making depend in $${dir} ... && $(MAKE) depend) || exit 1; \
+- done
+-
+-clean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making clean in $${dir} ... && $(MAKE) clean) || exit 1; \
+- done
+-
+-dclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making dclean in $${dir} ... && $(MAKE) dclean) || exit 1; \
+- done
+-
+-targetclean:
+- for dir in $(subdirs); \
+- do \
+- (cd $${dir} && echo ... Making clean in $${dir} ... && $(MAKE) targetclean) || exit 1; \
+- done
++all install depend clean dclean targetclean:
++ for dir in $(subdirs); do \
++ $(MAKE) -C $$dir $@; \
++ done
+
+ top_srcdir = @top_srcdir@
+ srcdir = @srcdir@
+--- src/lib/libipv1/Makefile.in
++++ src/lib/libipv1/Makefile.in
+@@ -58,4 +58,4 @@
+ # in case DODEPEND is no
+ #
+
+-ip_read.o: y.tab.h
++ip_read.o: y.tab.c y.tab.h
diff --git a/sci-chemistry/psi/files/psi-3.4.0-parallel-make.patch b/sci-chemistry/psi/files/psi-3.4.0-parallel-make.patch
new file mode 100644
index 000000000000..2805cb195e24
--- /dev/null
+++ b/sci-chemistry/psi/files/psi-3.4.0-parallel-make.patch
@@ -0,0 +1,19 @@
+diff --git a/src/lib/libipv1/Makefile.in b/src/lib/libipv1/Makefile.in
+index eafe8e2..141bf3b 100644
+--- a/src/lib/libipv1/Makefile.in
++++ b/src/lib/libipv1/Makefile.in
+@@ -33,10 +33,12 @@ LIBOBJ = $(ALLCSRC:%.c=%.o) $(ALLCXXSRC:%.cc=%.o)
+
+ include ../MakeRules
+
+-y.tab.c y.tab.h: parse.y
++y.tab.h: y.tab.c
++
++y.tab.c: parse.y
+ $(YACC) -v -d $<
+
+-scan.c: scan.l
++scan.c: scan.l y.tab.h
+ $(LEX) -t $^ > scan.c
+
+ install_inc:: $(ALLINCLUDE)
diff --git a/sci-chemistry/psi/files/use-external-libint.patch b/sci-chemistry/psi/files/use-external-libint.patch
new file mode 100644
index 000000000000..1d9ce91e3111
--- /dev/null
+++ b/sci-chemistry/psi/files/use-external-libint.patch
@@ -0,0 +1,37 @@
+--- psi3.orig/src/bin/cints/Makefile.in 2003-11-14 08:15:19.000000000 -0800
++++ psi3/src/bin/cints/Makefile.in 2006-02-10 22:42:31.000000000 -0800
+@@ -51,25 +51,25 @@
+ # and form the list of the libraries. Remember that libderiv and libr12
+ # depend on libint, and hence need to come first for GNU ld to work.
+ #
+-INTLIBS := -lPSI_int
++INTLIBS := -lint
+ ifeq ($(findstring MP2R12,$(SUBDIRS)),MP2R12)
+- ifneq ($(findstring -lPSI_r12,$(INTLIBS)),-lPSI_r12)
+- INTLIBS := -lPSI_r12 $(INTLIBS)
++ ifneq ($(findstring -lr12,$(INTLIBS)),-lr12)
++ INTLIBS := -lr12 $(INTLIBS)
+ endif
+ endif
+ ifeq ($(findstring R12_Ints,$(SUBDIRS)),R12_Ints)
+- ifneq ($(findstring -lPSI_r12,$(INTLIBS)),-lPSI_r12)
+- INTLIBS := -lPSI_r12 $(INTLIBS)
++ ifneq ($(findstring -lr12,$(INTLIBS)),-lr12)
++ INTLIBS := -lr12 $(INTLIBS)
+ endif
+ endif
+ ifeq ($(findstring Default_Deriv1,$(SUBDIRS)),Default_Deriv1)
+- ifneq ($(findstring -lPSI_deriv,$(INTLIBS)),-lPSI_deriv)
+- INTLIBS := -lPSI_deriv $(INTLIBS)
++ ifneq ($(findstring -lderiv,$(INTLIBS)),-lderiv)
++ INTLIBS := -lderiv $(INTLIBS)
+ endif
+ endif
+ ifeq ($(findstring Default_Deriv2,$(SUBDIRS)),Default_Deriv2)
+- ifneq ($(findstring -lderiv,$(INTLIBS)),-lPSI_deriv)
+- INTLIBS := -lPSI_deriv $(INTLIBS)
++ ifneq ($(findstring -lderiv,$(INTLIBS)),-lderiv)
++ INTLIBS := -lderiv $(INTLIBS)
+ endif
+ endif
+
diff --git a/sci-chemistry/psi/metadata.xml b/sci-chemistry/psi/metadata.xml
new file mode 100644
index 000000000000..3774ad2a405f
--- /dev/null
+++ b/sci-chemistry/psi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <upstream>
+ <remote-id type="sourceforge">psicode</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-chemistry/psi/psi-3.4.0-r2.ebuild b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
new file mode 100644
index 000000000000..9a42b877dc16
--- /dev/null
+++ b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils fortran-2 multilib toolchain-funcs
+
+DESCRIPTION="Suite of ab initio quantum chemistry programs to compute various molecular properties"
+HOMEPAGE="http://www.psicode.org/"
+SRC_URI="mirror://sourceforge/psicode/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs test"
+
+RDEPEND="
+ !sci-visualization/extrema
+ virtual/blas
+ virtual/lapack
+ >=sci-libs/libint-1.1.4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-lang/perl )"
+
+S="${WORKDIR}/${PN}${PV:0:1}"
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-dont-build-libint.patch
+ "${FILESDIR}"/use-external-libint.patch
+ "${FILESDIR}"/${PV}-gcc-4.3.patch
+ "${FILESDIR}"/${PV}-destdir.patch
+ "${FILESDIR}"/${P}-parallel-make.patch
+ "${FILESDIR}"/${PV}-man_paths.patch
+ "${FILESDIR}"/${PV}-ldflags.patch
+ "${FILESDIR}"/${PV}-parallel_fix.patch
+ "${FILESDIR}"/${PV}-fortify.patch
+ )
+
+src_prepare() {
+ autotools-utils_src_prepare
+ # Broken test
+ sed \
+ -e 's:scf-mvd-opt ::g' \
+ -e 's:scf-mvd-opt-puream ::g' \
+ -i tests/Makefile.in || die
+
+ sed \
+ -e "/LIBPATTERNS/d" \
+ -i src/{bin,util,samples}/MakeVars.in || die
+ eautoreconf
+}
+
+src_configure() {
+ # This variable gets set sometimes to /usr/lib/src and breaks stuff
+ unset CLIBS
+
+ local myeconfargs=(
+ --with-opt="${CXXFLAGS}"
+ --datadir="${EPREFIX}"/usr/share/${PN}
+ --with-blas="$($(tc-getPKG_CONFIG) blas --libs)"
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile SCRATCH="${WORKDIR}/libint" DODEPEND="no"
+}
+
+src_test() {
+ emake EXECDIR="${S}"/bin TESTFLAGS="" -j1 tests
+}
+
+src_install() {
+ autotools-utils_src_install DODEPEND="no"
+ if ! use static-libs; then
+ rm -f "${ED}"/usr/$(get_libdir)/*.a || die
+ fi
+}