summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2011-04-25 15:49:30 +0000
committerJustin Lecher <jlec@gentoo.org>2011-04-25 15:49:30 +0000
commit4f576c86f5742cd2f122f6472713d6ab056fa71f (patch)
tree5efd10605ff2431aab898b51067cd63b5ae38882 /sci-chemistry/psi
parentNew addition, thanks Jiri Tyr for first ebuild, #242208 (diff)
downloadgentoo-2-4f576c86f5742cd2f122f6472713d6ab056fa71f.tar.gz
gentoo-2-4f576c86f5742cd2f122f6472713d6ab056fa71f.tar.bz2
gentoo-2-4f576c86f5742cd2f122f6472713d6ab056fa71f.zip
_FORTIFY_SOURCE indicates presence of overflow Fix, #341715
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/psi')
-rw-r--r--sci-chemistry/psi/ChangeLog10
-rw-r--r--sci-chemistry/psi/files/3.4.0-fortify.patch58
-rw-r--r--sci-chemistry/psi/psi-3.4.0-r2.ebuild72
3 files changed, 138 insertions, 2 deletions
diff --git a/sci-chemistry/psi/ChangeLog b/sci-chemistry/psi/ChangeLog
index 23732f018d8b..7f4f5b491625 100644
--- a/sci-chemistry/psi/ChangeLog
+++ b/sci-chemistry/psi/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-chemistry/psi
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/psi/ChangeLog,v 1.13 2010/07/06 11:36:22 jlec Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/psi/ChangeLog,v 1.14 2011/04/25 15:49:30 jlec Exp $
+
+*psi-3.4.0-r2 (25 Apr 2011)
+
+ 25 Apr 2011; Justin Lecher <jlec@gentoo.org> +files/3.4.0-fortify.patch,
+ +psi-3.4.0-r2.ebuild:
+ _FORTIFY_SOURCE indicates presence of overflow Fix, #341715
*psi-3.4.0-r1 (06 Jul 2010)
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/psi-3.4.0-r2.ebuild b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
new file mode 100644
index 000000000000..fde0d32b314b
--- /dev/null
+++ b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/psi/psi-3.4.0-r2.ebuild,v 1.1 2011/04/25 15:49:30 jlec Exp $
+
+EAPI="3"
+
+inherit autotools eutils
+
+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="test"
+
+# File collision, see bug #249423
+RDEPEND="
+ !sci-visualization/extrema
+ virtual/blas
+ virtual/lapack
+ >=sci-libs/libint-1.1.4"
+DEPEND="${RDEPEND}
+ test? ( dev-lang/perl )"
+
+S="${WORKDIR}/${PN}${PV:0:1}"
+
+src_prepare() {
+ epatch "${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
+
+ # 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
+
+ econf \
+ --with-opt="${CXXFLAGS}" \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --with-blas="$(pkg-config blas --libs)"
+}
+
+src_compile() {
+ emake SCRATCH="${WORKDIR}/libint" DODEPEND="no" || die
+}
+
+src_test() {
+ emake EXECDIR="${S}"/bin TESTFLAGS="" -j1 tests || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" DODEPEND="no" install || die
+}