summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-08-29 14:30:12 +0200
committerDavid Seifert <soap@gentoo.org>2020-08-29 14:30:12 +0200
commit2269ed9e170b9e0f41d899fc20d777ad65a490d5 (patch)
tree0ca2e414057186046a31766be6da02eaa1b113a2 /sci-chemistry
parentsci-chemistry/chemtool: Port to EAPI 7 (diff)
downloadgentoo-2269ed9e170b9e0f41d899fc20d777ad65a490d5.tar.gz
gentoo-2269ed9e170b9e0f41d899fc20d777ad65a490d5.tar.bz2
gentoo-2269ed9e170b9e0f41d899fc20d777ad65a490d5.zip
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@gentoo.org>
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/psi/files/3.4.0-ldflags.patch4
-rw-r--r--sci-chemistry/psi/files/3.4.0-man_paths.patch8
-rw-r--r--sci-chemistry/psi/files/3.4.0-parallel_fix.patch32
-rw-r--r--sci-chemistry/psi/files/psi-3.4.0-perl-File-Temp.patch14
-rw-r--r--sci-chemistry/psi/psi-3.4.0-r2.ebuild45
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 9d7f2767e8ec..41f6bb651120 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 02cced160847..51917c4decda 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 65234fb40dcb..8c8d8c35121a 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 000000000000..691567ae0cc1
--- /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 f40a13060173..2b73d442b470 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
}