commit:     6afbe34a08a1c7be8b59de72c629b8326b9f6609
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  9 12:18:10 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 12:19:21 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6afbe34a

sci-chemistry/psi: Fix multiple build failures

* Use byacc instead of bison
* Depend on correct SLOT of libint
* Fix format-security problems

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=430588
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=574068

Package-Manager: portage-2.2.27
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 .../psi/files/psi-3.4.0-format-security.patch      | 33 ++++++++++++++++++++++
 sci-chemistry/psi/psi-3.4.0-r2.ebuild              | 11 ++++++--
 2 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/sci-chemistry/psi/files/psi-3.4.0-format-security.patch 
b/sci-chemistry/psi/files/psi-3.4.0-format-security.patch
new file mode 100644
index 0000000..10efa81
--- /dev/null
+++ b/sci-chemistry/psi/files/psi-3.4.0-format-security.patch
@@ -0,0 +1,33 @@
+ src/lib/libmints/matrix.cc | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/src/lib/libmints/matrix.cc b/src/lib/libmints/matrix.cc
+index 2ce5ede..2c7b5de 100644
+--- a/src/lib/libmints/matrix.cc
++++ b/src/lib/libmints/matrix.cc
+@@ -549,10 +549,9 @@ void Matrix::save(const char *filename, bool append, bool 
saveLowerTriangle, boo
+     } else {
+         out = fopen(filename, "w");
+     }
+-    
+-    fprintf(out, name_.c_str());
+-    fprintf(out, "\n");
+-    
++
++    fprintf(out, "%s\n", name_.c_str());
++
+     if (saveSubBlocks == false) {
+         // Convert the matrix to a full matrix
+         double **fullblock = to_block_matrix();
+@@ -1083,9 +1082,8 @@ void SimpleMatrix::save(const char *filename, bool 
append, bool saveLowerTriangl
+     } else {
+         out = fopen(filename, "w");
+     }
+-    
+-    fprintf(out, name_.c_str());
+-    fprintf(out, "\n");
++
++    fprintf(out, "%s\n", name_.c_str());
+ 
+     if (saveLowerTriangle) {
+         // Count the number of non-zero element

diff --git a/sci-chemistry/psi/psi-3.4.0-r2.ebuild 
b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
index 9a42b87..90b125c 100644
--- a/sci-chemistry/psi/psi-3.4.0-r2.ebuild
+++ b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -19,9 +19,10 @@ RDEPEND="
        !sci-visualization/extrema
        virtual/blas
        virtual/lapack
-       >=sci-libs/libint-1.1.4"
+       >=sci-libs/libint-1.1.4:1"
 DEPEND="${RDEPEND}
        virtual/pkgconfig
+       dev-util/byacc
        test? ( dev-lang/perl )"
 
 S="${WORKDIR}/${PN}${PV:0:1}"
@@ -36,6 +37,7 @@ PATCHES=(
        "${FILESDIR}"/${PV}-ldflags.patch
        "${FILESDIR}"/${PV}-parallel_fix.patch
        "${FILESDIR}"/${PV}-fortify.patch
+       "${FILESDIR}"/${P}-format-security.patch
        )
 
 src_prepare() {
@@ -66,7 +68,10 @@ src_configure() {
 }
 
 src_compile() {
-       autotools-utils_src_compile SCRATCH="${WORKDIR}/libint" DODEPEND="no"
+       autotools-utils_src_compile \
+               SCRATCH="${WORKDIR}/libint" \
+               DODEPEND="no" \
+               YACC=byacc
 }
 
 src_test() {

Reply via email to