public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/psi/files/, sci-chemistry/psi/
@ 2016-02-09 12:19 Justin Lecher
  0 siblings, 0 replies; 2+ messages in thread
From: Justin Lecher @ 2016-02-09 12:19 UTC (permalink / raw
  To: gentoo-commits

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() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/psi/files/, sci-chemistry/psi/
@ 2020-08-29 12:30 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2020-08-29 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     2269ed9e170b9e0f41d899fc20d777ad65a490d5
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 29 12:30:12 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Aug 29 12:30:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2269ed9e

sci-chemistry/psi: Port to EAPI 7

Closes: https://bugs.gentoo.org/682820
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sci-chemistry/psi/files/3.4.0-ldflags.patch        |  4 +-
 sci-chemistry/psi/files/3.4.0-man_paths.patch      |  8 ++--
 sci-chemistry/psi/files/3.4.0-parallel_fix.patch   | 32 +++++++--------
 .../psi/files/psi-3.4.0-perl-File-Temp.patch       | 14 +++++++
 sci-chemistry/psi/psi-3.4.0-r2.ebuild              | 45 ++++++++++++----------
 5 files changed, 60 insertions(+), 43 deletions(-)

diff --git a/sci-chemistry/psi/files/3.4.0-ldflags.patch b/sci-chemistry/psi/files/3.4.0-ldflags.patch
index 9d7f2767e8e..41f6bb65112 100644
--- a/sci-chemistry/psi/files/3.4.0-ldflags.patch
+++ b/sci-chemistry/psi/files/3.4.0-ldflags.patch
@@ -1,7 +1,7 @@
 Respect LDFLAGS
 
---- configure.ac
-+++ configure.ac
+--- a/configure.ac
++++ b/configure.ac
 @@ -288,15 +288,13 @@
  )
  AC_SUBST(LDLIBS)

diff --git a/sci-chemistry/psi/files/3.4.0-man_paths.patch b/sci-chemistry/psi/files/3.4.0-man_paths.patch
index 02cced16084..51917c4decd 100644
--- a/sci-chemistry/psi/files/3.4.0-man_paths.patch
+++ b/sci-chemistry/psi/files/3.4.0-man_paths.patch
@@ -2,8 +2,8 @@ Fix man paths
 
 http://bugs.gentoo.org/show_bug.cgi?id=326185
 
---- src/bin/nonbonded/Makefile.in
-+++ src/bin/nonbonded/Makefile.in
+--- a/src/bin/nonbonded/Makefile.in
++++ b/src/bin/nonbonded/Makefile.in
 @@ -19,5 +19,5 @@
  endif
  
@@ -12,8 +12,8 @@ http://bugs.gentoo.org/show_bug.cgi?id=326185
 -	$(INSTALL_INCLUDE) $^ $(mandir)/man1
 +	$(MKDIRS) $(DESTDIR)$(mandir)/man1
 +	$(INSTALL_INCLUDE) $^ $(DESTDIR)$(mandir)/man1
---- src/bin/intder/Makefile.in
-+++ src/bin/intder/Makefile.in
+--- a/src/bin/intder/Makefile.in
++++ b/src/bin/intder/Makefile.in
 @@ -21,6 +21,6 @@
  endif
  

diff --git a/sci-chemistry/psi/files/3.4.0-parallel_fix.patch b/sci-chemistry/psi/files/3.4.0-parallel_fix.patch
index 65234fb40dc..8c8d8c35121 100644
--- a/sci-chemistry/psi/files/3.4.0-parallel_fix.patch
+++ b/sci-chemistry/psi/files/3.4.0-parallel_fix.patch
@@ -1,5 +1,5 @@
---- Makefile.in
-+++ Makefile.in
+--- a/Makefile.in
++++ b/Makefile.in
 @@ -17,62 +17,19 @@
  INSTALL = @INSTALL@
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -70,8 +70,8 @@
  
  $(top_srcdir)/configure: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
  	cd $(top_srcdir) && autoconf
---- lib/Makefile.in
-+++ lib/Makefile.in
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
 @@ -31,7 +31,7 @@
  	$(INSTALL_DATA) $(srcdir)/psi.dat $(DESTDIR)$(pkgdatadir)
  	for dir in $(subdirs); \
@@ -81,8 +81,8 @@
            done
  
  install_man: macro.psi
---- src/Makefile.in
-+++ src/Makefile.in
+--- a/src/Makefile.in
++++ b/src/Makefile.in
 @@ -6,53 +6,10 @@
  
  default: all
@@ -141,8 +141,8 @@
  
  top_srcdir = @top_srcdir@
  srcdir = @srcdir@
---- src/lib/Makefile.in
-+++ src/lib/Makefile.in
+--- a/src/lib/Makefile.in
++++ b/src/lib/Makefile.in
 @@ -4,56 +4,10 @@
  subdirs = libipv1 libciomr libchkpt libqt libpsio libiwl libdpd libutil \
            liboptions libmoinfo libbasis libmints
@@ -204,8 +204,8 @@
  
  #
  # keep the configuration information and makefile up-to-date
---- src/bin/Makefile.in
-+++ src/bin/Makefile.in
+--- a/src/bin/Makefile.in
++++ b/src/bin/Makefile.in
 @@ -13,55 +13,10 @@
  subdirs += psirb
  endif
@@ -266,8 +266,8 @@
  
  top_srcdir = @top_srcdir@
  srcdir = @srcdir@
---- src/samples/Makefile.in
-+++ src/samples/Makefile.in
+--- a/src/samples/Makefile.in
++++ b/src/samples/Makefile.in
 @@ -5,55 +5,10 @@
  
  subdirs = mints
@@ -328,8 +328,8 @@
  
  top_srcdir = @top_srcdir@
  srcdir = @srcdir@
---- src/util/Makefile.in
-+++ src/util/Makefile.in
+--- a/src/util/Makefile.in
++++ b/src/util/Makefile.in
 @@ -3,55 +3,10 @@
  
  subdirs = tocprint psi2molden
@@ -390,8 +390,8 @@
  
  top_srcdir = @top_srcdir@
  srcdir = @srcdir@
---- src/lib/libipv1/Makefile.in
-+++ src/lib/libipv1/Makefile.in
+--- a/src/lib/libipv1/Makefile.in
++++ b/src/lib/libipv1/Makefile.in
 @@ -58,4 +58,4 @@
  # in case DODEPEND is no
  #

diff --git a/sci-chemistry/psi/files/psi-3.4.0-perl-File-Temp.patch b/sci-chemistry/psi/files/psi-3.4.0-perl-File-Temp.patch
new file mode 100644
index 00000000000..691567ae0cc
--- /dev/null
+++ b/sci-chemistry/psi/files/psi-3.4.0-perl-File-Temp.patch
@@ -0,0 +1,14 @@
+--- a/tests/psitest.pl
++++ b/tests/psitest.pl
+@@ -2793,9 +2793,9 @@
+ {
+   # It's better to use File::Temp but it doesn't seem to be installed by default
+   # use File::Temp;
+-  use POSIX qw(tmpnam);
++  use File::Temp ();
+ 
+-  my $tempfile = tmpnam();
++  my $tempfile = File::Temp->new();
+   my $psicmd = build_psi_cmd("psi3 -c", 0, $SRC_PATH,  $PSITEST_EXEC_PATH, " 1>$tempfile 2>/dev/null");
+   my $psi_fail = system($psicmd);
+   open(RE, "$tempfile") || die "cannot open $tempfile $!";

diff --git a/sci-chemistry/psi/psi-3.4.0-r2.ebuild b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
index f40a1306017..2b73d442b47 100644
--- a/sci-chemistry/psi/psi-3.4.0-r2.ebuild
+++ b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
+EAPI=7
 
-inherit autotools-utils fortran-2 multilib toolchain-funcs
+inherit autotools fortran-2 toolchain-funcs
 
 DESCRIPTION="Suite for ab initio quantum chemistry computing various molecular properties"
 HOMEPAGE="http://www.psicode.org/"
@@ -12,17 +12,19 @@ SRC_URI="mirror://sourceforge/psicode/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 x86"
-IUSE="static-libs test"
-RESTRICT="!test? ( test )"
+IUSE="test"
+# psi3/psiclean segfault because tests were never run before
+RESTRICT="test"
 
 RDEPEND="
 	!sci-visualization/extrema
 	virtual/blas
 	virtual/lapack
 	>=sci-libs/libint-1.1.4:1"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
+DEPEND="${RDEPEND}"
+BDEPEND="
 	dev-util/byacc
+	virtual/pkgconfig
 	test? ( dev-lang/perl )"
 
 S="${WORKDIR}/${PN}${PV:0:1}"
@@ -38,19 +40,21 @@ PATCHES=(
 	"${FILESDIR}"/${PV}-parallel_fix.patch
 	"${FILESDIR}"/${PV}-fortify.patch
 	"${FILESDIR}"/${P}-format-security.patch
-	)
+	"${FILESDIR}"/${P}-perl-File-Temp.patch
+)
 
 src_prepare() {
-	autotools-utils_src_prepare
+	default
+
 	# 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
 }
 
@@ -58,17 +62,15 @@ 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)"
+	econf \
+		--with-opt="${CXXFLAGS}" \
+		--datadir="${EPREFIX}"/usr/share/${PN} \
+		--with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
 		--with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
-		)
-	autotools-utils_src_configure
 }
 
 src_compile() {
-	autotools-utils_src_compile \
+	emake \
 		SCRATCH="${WORKDIR}/libint" \
 		DODEPEND="no" \
 		YACC=byacc
@@ -79,8 +81,9 @@ src_test() {
 }
 
 src_install() {
-	autotools-utils_src_install DODEPEND="no"
-	if ! use static-libs; then
-		rm -f "${ED}"/usr/$(get_libdir)/*.a || die
-	fi
+	emake DESTDIR="${D}" DODEPEND="no" install
+	einstalldocs
+
+	# convenience libraries
+	rm "${ED}"/usr/$(get_libdir)/*.a || die
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-29 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-29 12:30 [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/psi/files/, sci-chemistry/psi/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2016-02-09 12:19 Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox