Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-chemistry/psi/files/, sci-chemistry/psi/
Date: Sat, 29 Aug 2020 12:30:39
Message-Id: 1598704212.2269ed9e170b9e0f41d899fc20d777ad65a490d5.soap@gentoo
1 commit: 2269ed9e170b9e0f41d899fc20d777ad65a490d5
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 29 12:30:12 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 29 12:30:12 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2269ed9e
7
8 sci-chemistry/psi: Port to EAPI 7
9
10 Closes: https://bugs.gentoo.org/682820
11 Package-Manager: Portage-3.0.4, Repoman-3.0.1
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 sci-chemistry/psi/files/3.4.0-ldflags.patch | 4 +-
15 sci-chemistry/psi/files/3.4.0-man_paths.patch | 8 ++--
16 sci-chemistry/psi/files/3.4.0-parallel_fix.patch | 32 +++++++--------
17 .../psi/files/psi-3.4.0-perl-File-Temp.patch | 14 +++++++
18 sci-chemistry/psi/psi-3.4.0-r2.ebuild | 45 ++++++++++++----------
19 5 files changed, 60 insertions(+), 43 deletions(-)
20
21 diff --git a/sci-chemistry/psi/files/3.4.0-ldflags.patch b/sci-chemistry/psi/files/3.4.0-ldflags.patch
22 index 9d7f2767e8e..41f6bb65112 100644
23 --- a/sci-chemistry/psi/files/3.4.0-ldflags.patch
24 +++ b/sci-chemistry/psi/files/3.4.0-ldflags.patch
25 @@ -1,7 +1,7 @@
26 Respect LDFLAGS
27
28 ---- configure.ac
29 -+++ configure.ac
30 +--- a/configure.ac
31 ++++ b/configure.ac
32 @@ -288,15 +288,13 @@
33 )
34 AC_SUBST(LDLIBS)
35
36 diff --git a/sci-chemistry/psi/files/3.4.0-man_paths.patch b/sci-chemistry/psi/files/3.4.0-man_paths.patch
37 index 02cced16084..51917c4decd 100644
38 --- a/sci-chemistry/psi/files/3.4.0-man_paths.patch
39 +++ b/sci-chemistry/psi/files/3.4.0-man_paths.patch
40 @@ -2,8 +2,8 @@ Fix man paths
41
42 http://bugs.gentoo.org/show_bug.cgi?id=326185
43
44 ---- src/bin/nonbonded/Makefile.in
45 -+++ src/bin/nonbonded/Makefile.in
46 +--- a/src/bin/nonbonded/Makefile.in
47 ++++ b/src/bin/nonbonded/Makefile.in
48 @@ -19,5 +19,5 @@
49 endif
50
51 @@ -12,8 +12,8 @@ http://bugs.gentoo.org/show_bug.cgi?id=326185
52 - $(INSTALL_INCLUDE) $^ $(mandir)/man1
53 + $(MKDIRS) $(DESTDIR)$(mandir)/man1
54 + $(INSTALL_INCLUDE) $^ $(DESTDIR)$(mandir)/man1
55 ---- src/bin/intder/Makefile.in
56 -+++ src/bin/intder/Makefile.in
57 +--- a/src/bin/intder/Makefile.in
58 ++++ b/src/bin/intder/Makefile.in
59 @@ -21,6 +21,6 @@
60 endif
61
62
63 diff --git a/sci-chemistry/psi/files/3.4.0-parallel_fix.patch b/sci-chemistry/psi/files/3.4.0-parallel_fix.patch
64 index 65234fb40dc..8c8d8c35121 100644
65 --- a/sci-chemistry/psi/files/3.4.0-parallel_fix.patch
66 +++ b/sci-chemistry/psi/files/3.4.0-parallel_fix.patch
67 @@ -1,5 +1,5 @@
68 ---- Makefile.in
69 -+++ Makefile.in
70 +--- a/Makefile.in
71 ++++ b/Makefile.in
72 @@ -17,62 +17,19 @@
73 INSTALL = @INSTALL@
74 INSTALL_PROGRAM = @INSTALL_PROGRAM@
75 @@ -70,8 +70,8 @@
76
77 $(top_srcdir)/configure: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
78 cd $(top_srcdir) && autoconf
79 ---- lib/Makefile.in
80 -+++ lib/Makefile.in
81 +--- a/lib/Makefile.in
82 ++++ b/lib/Makefile.in
83 @@ -31,7 +31,7 @@
84 $(INSTALL_DATA) $(srcdir)/psi.dat $(DESTDIR)$(pkgdatadir)
85 for dir in $(subdirs); \
86 @@ -81,8 +81,8 @@
87 done
88
89 install_man: macro.psi
90 ---- src/Makefile.in
91 -+++ src/Makefile.in
92 +--- a/src/Makefile.in
93 ++++ b/src/Makefile.in
94 @@ -6,53 +6,10 @@
95
96 default: all
97 @@ -141,8 +141,8 @@
98
99 top_srcdir = @top_srcdir@
100 srcdir = @srcdir@
101 ---- src/lib/Makefile.in
102 -+++ src/lib/Makefile.in
103 +--- a/src/lib/Makefile.in
104 ++++ b/src/lib/Makefile.in
105 @@ -4,56 +4,10 @@
106 subdirs = libipv1 libciomr libchkpt libqt libpsio libiwl libdpd libutil \
107 liboptions libmoinfo libbasis libmints
108 @@ -204,8 +204,8 @@
109
110 #
111 # keep the configuration information and makefile up-to-date
112 ---- src/bin/Makefile.in
113 -+++ src/bin/Makefile.in
114 +--- a/src/bin/Makefile.in
115 ++++ b/src/bin/Makefile.in
116 @@ -13,55 +13,10 @@
117 subdirs += psirb
118 endif
119 @@ -266,8 +266,8 @@
120
121 top_srcdir = @top_srcdir@
122 srcdir = @srcdir@
123 ---- src/samples/Makefile.in
124 -+++ src/samples/Makefile.in
125 +--- a/src/samples/Makefile.in
126 ++++ b/src/samples/Makefile.in
127 @@ -5,55 +5,10 @@
128
129 subdirs = mints
130 @@ -328,8 +328,8 @@
131
132 top_srcdir = @top_srcdir@
133 srcdir = @srcdir@
134 ---- src/util/Makefile.in
135 -+++ src/util/Makefile.in
136 +--- a/src/util/Makefile.in
137 ++++ b/src/util/Makefile.in
138 @@ -3,55 +3,10 @@
139
140 subdirs = tocprint psi2molden
141 @@ -390,8 +390,8 @@
142
143 top_srcdir = @top_srcdir@
144 srcdir = @srcdir@
145 ---- src/lib/libipv1/Makefile.in
146 -+++ src/lib/libipv1/Makefile.in
147 +--- a/src/lib/libipv1/Makefile.in
148 ++++ b/src/lib/libipv1/Makefile.in
149 @@ -58,4 +58,4 @@
150 # in case DODEPEND is no
151 #
152
153 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
154 new file mode 100644
155 index 00000000000..691567ae0cc
156 --- /dev/null
157 +++ b/sci-chemistry/psi/files/psi-3.4.0-perl-File-Temp.patch
158 @@ -0,0 +1,14 @@
159 +--- a/tests/psitest.pl
160 ++++ b/tests/psitest.pl
161 +@@ -2793,9 +2793,9 @@
162 + {
163 + # It's better to use File::Temp but it doesn't seem to be installed by default
164 + # use File::Temp;
165 +- use POSIX qw(tmpnam);
166 ++ use File::Temp ();
167 +
168 +- my $tempfile = tmpnam();
169 ++ my $tempfile = File::Temp->new();
170 + my $psicmd = build_psi_cmd("psi3 -c", 0, $SRC_PATH, $PSITEST_EXEC_PATH, " 1>$tempfile 2>/dev/null");
171 + my $psi_fail = system($psicmd);
172 + open(RE, "$tempfile") || die "cannot open $tempfile $!";
173
174 diff --git a/sci-chemistry/psi/psi-3.4.0-r2.ebuild b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
175 index f40a1306017..2b73d442b47 100644
176 --- a/sci-chemistry/psi/psi-3.4.0-r2.ebuild
177 +++ b/sci-chemistry/psi/psi-3.4.0-r2.ebuild
178 @@ -1,9 +1,9 @@
179 -# Copyright 1999-2019 Gentoo Authors
180 +# Copyright 1999-2020 Gentoo Authors
181 # Distributed under the terms of the GNU General Public License v2
182
183 -EAPI=4
184 +EAPI=7
185
186 -inherit autotools-utils fortran-2 multilib toolchain-funcs
187 +inherit autotools fortran-2 toolchain-funcs
188
189 DESCRIPTION="Suite for ab initio quantum chemistry computing various molecular properties"
190 HOMEPAGE="http://www.psicode.org/"
191 @@ -12,17 +12,19 @@ SRC_URI="mirror://sourceforge/psicode/${P}.tar.gz"
192 LICENSE="GPL-2"
193 SLOT="0"
194 KEYWORDS="amd64 x86"
195 -IUSE="static-libs test"
196 -RESTRICT="!test? ( test )"
197 +IUSE="test"
198 +# psi3/psiclean segfault because tests were never run before
199 +RESTRICT="test"
200
201 RDEPEND="
202 !sci-visualization/extrema
203 virtual/blas
204 virtual/lapack
205 >=sci-libs/libint-1.1.4:1"
206 -DEPEND="${RDEPEND}
207 - virtual/pkgconfig
208 +DEPEND="${RDEPEND}"
209 +BDEPEND="
210 dev-util/byacc
211 + virtual/pkgconfig
212 test? ( dev-lang/perl )"
213
214 S="${WORKDIR}/${PN}${PV:0:1}"
215 @@ -38,19 +40,21 @@ PATCHES=(
216 "${FILESDIR}"/${PV}-parallel_fix.patch
217 "${FILESDIR}"/${PV}-fortify.patch
218 "${FILESDIR}"/${P}-format-security.patch
219 - )
220 + "${FILESDIR}"/${P}-perl-File-Temp.patch
221 +)
222
223 src_prepare() {
224 - autotools-utils_src_prepare
225 + default
226 +
227 # Broken test
228 sed \
229 -e 's:scf-mvd-opt ::g' \
230 -e 's:scf-mvd-opt-puream ::g' \
231 -i tests/Makefile.in || die
232 -
233 sed \
234 -e "/LIBPATTERNS/d" \
235 -i src/{bin,util,samples}/MakeVars.in || die
236 +
237 eautoreconf
238 }
239
240 @@ -58,17 +62,15 @@ src_configure() {
241 # This variable gets set sometimes to /usr/lib/src and breaks stuff
242 unset CLIBS
243
244 - local myeconfargs=(
245 - --with-opt="${CXXFLAGS}"
246 - --datadir="${EPREFIX}"/usr/share/${PN}
247 - --with-blas="$($(tc-getPKG_CONFIG) blas --libs)"
248 + econf \
249 + --with-opt="${CXXFLAGS}" \
250 + --datadir="${EPREFIX}"/usr/share/${PN} \
251 + --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
252 --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
253 - )
254 - autotools-utils_src_configure
255 }
256
257 src_compile() {
258 - autotools-utils_src_compile \
259 + emake \
260 SCRATCH="${WORKDIR}/libint" \
261 DODEPEND="no" \
262 YACC=byacc
263 @@ -79,8 +81,9 @@ src_test() {
264 }
265
266 src_install() {
267 - autotools-utils_src_install DODEPEND="no"
268 - if ! use static-libs; then
269 - rm -f "${ED}"/usr/$(get_libdir)/*.a || die
270 - fi
271 + emake DESTDIR="${D}" DODEPEND="no" install
272 + einstalldocs
273 +
274 + # convenience libraries
275 + rm "${ED}"/usr/$(get_libdir)/*.a || die
276 }