f6d49b7
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
fcdfe22
%global blaslib flexiblas
56a0b9b
%global cmake_blas_flags -DBLAS_TYPE=FLEXIBLAS -DLAPACK_TYPE=FLEXIBLAS
fcdfe22
%else
fcdfe22
%global blaslib openblas
fcdfe22
%global blasvar o
f6d49b7
%global cmake_blas_flags -DBLAS_LIBRARIES=%{_libdir}/lib%{blaslib}%{blasvar}.so -DLAPACK_LIBRARIES=%{_libdir}/lib%{blaslib}%{blasvar}.so
fcdfe22
%endif
fcdfe22
ff0bf58
Name:           psi4
c24a225
Epoch:          1
54b9237
Version:        1.3.2
46734ed
Release:        15%{?dist}
ff0bf58
Summary:        An ab initio quantum chemistry package
f1759e7
License:        LGPLv3 and MIT
ff0bf58
URL:            http://www.psicode.org/
54b9237
Source0:        https://github.com/psi4/psi4/archive/v%{version}/psi4-%{version}.tar.gz
ff0bf58
fe868c3
# Use system packages
54b9237
Patch0:         psi4-1.3.2-fedora.patch
eec1795
# Use python3 not python in test runner
eec1795
Patch1:         psi4-1.3.2-python3.patch
eceb961
# Patch for libxc5 support
eceb961
Patch2:         psi4-1.3.2-libxc5.patch
dfb70cd
# Remove rpath
dfb70cd
Patch3:         psi4-1.3.2-rpath.patch
56a0b9b
# Add support for FlexiBLAS
56a0b9b
Patch4:         psi4-1.3.2-flexiblas.patch
5fe43a6
# Add missing includes
5fe43a6
Patch5:         psi4-1.3.2-include.patch
ff0bf58
215a15e
BuildRequires:  cmake
ff0bf58
BuildRequires:  bison-devel
ff0bf58
BuildRequires:  byacc
ff0bf58
BuildRequires:  flex
4197c23
BuildRequires:  gcc-c++
ff0bf58
BuildRequires:  gcc-gfortran
15a68bb
BuildRequires:  perl-devel
215a15e
BuildRequires:  gsl-devel
215a15e
BuildRequires:  hdf5-devel
215a15e
BuildRequires:  zlib-devel
ff0bf58
fcdfe22
BuildRequires:  %{blaslib}-devel
4197c23
BuildRequires:  CheMPS2-devel
4197c23
BuildRequires:  libint-devel >= 1.1.5-3
d65a2e9
BuildRequires:  libxc-devel
4197c23
BuildRequires:  pybind11-static
4be233a
BuildRequires:  gau2grid-devel
4be233a
BuildRequires:  libefp-devel
4197c23
5ae5109
BuildRequires:  python3-devel >= 2.7
4197c23
BuildRequires:  python3-numpy
a2b7453
BuildRequires:  python3-deepdiff
4197c23
BuildRequires:  python3-sphinx >= 1.1
54b9237
BuildRequires:  python3-pydantic
54b9237
BuildRequires:  python3-qcelemental
a439945
# These are required also at runtime
a439945
Requires:       python3-numpy
54b9237
Requires:       python3-pydantic
54b9237
Requires:       python3-qcelemental
9369484
Requires:       python3-deepdiff
4197c23
ff0bf58
# For the documentation
ff0bf58
BuildRequires:  tex(latex)
ff0bf58
BuildRequires:  tex-preview
ff0bf58
BuildRequires:  dvipng
ff0bf58
BuildRequires:  graphviz
ff0bf58
8ff1a6d
%if %{with tests}
15a68bb
# Needed for running tests
15a68bb
BuildRequires:  perl(Env)
8ff1a6d
%endif
15a68bb
b8ab233
Requires:  %{name}-data = %{epoch}:%{version}-%{release}
ff0bf58
# Libint can break the api between releases
6d49e45
Requires:  libint(api)%{?_isa} = %{_libint_apiversion}
ff0bf58
215a15e
# Don't have documentation in the cmake version yet.. 
215a15e
Obsoletes: psi4-doc < 1:0.3-1
215a15e
ff0bf58
%description
ff0bf58
PSI4 is an open-source suite of ab initio quantum chemistry programs
ff0bf58
designed for efficient, high-accuracy simulations of a variety of
ff0bf58
molecular properties. We can routinely perform computations with more
ff0bf58
than 2500 basis functions running serially or in parallel.
ff0bf58
ff0bf58
ff0bf58
%package data
ff0bf58
Summary:   Data files necessary for operation of PSI4
ff0bf58
BuildArch: noarch
ff0bf58
ff0bf58
%description data
ff0bf58
This package contains necessary data files for PSI4, e.g., basis sets
ff0bf58
and the quadrature grids.
ff0bf58
ff0bf58
ff0bf58
%package devel
ff0bf58
Summary:   Static libraries and development headers for psi
2e4c5d8
Requires:  %{name}%{?_isa} = %{epoch}:%{version}-%{release}
4197c23
# For dir ownership
4197c23
Requires:  cmake
ff0bf58
ff0bf58
%description devel
ff0bf58
This package contains static libraries and development headers for psi.
ff0bf58
ff0bf58
%prep
54b9237
%setup -q
4197c23
%patch0 -p1 -b .fedora
eec1795
%patch1 -p1 -b .python3
eceb961
%if 0%{?fedora} > 32
eceb961
%patch2 -p1 -b .libxc5
eceb961
%endif
dfb70cd
%patch3 -p1 -b .rpath
56a0b9b
%patch4 -p1 -b .flexiblas
5fe43a6
%patch5 -p1 -b .include
ff0bf58
ff0bf58
%build
215a15e
export F77=gfortran
215a15e
export FC=gfortran
ff0bf58
dfb70cd
# Massage the Python site directory for the installer
dfb70cd
export pymoddir=$(echo %{python3_sitearch} | sed "s|%{_libdir}||g")
dfb70cd
00a3308
%cmake \
5ae5109
       -DENABLE_OPENMP=ON -DENABLE_MPI=OFF -DENABLE_XHOST=OFF \
dfb70cd
       -DPYMOD_INSTALL_LIBDIR=${pymoddir} \
a7852fb
       %{cmake_blas_flags} -DENABLE_AUTO_LAPACK=ON \
215a15e
       -DCMAKE_Fortran_COMPILER=gfortran -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \
0943e74
       -DCUSTOM_C_FLAGS='%{optflags} -std=c11 -DNDEBUG' -DCUSTOM_CXX_FLAGS='%{optflags} -DNDEBUG' \
215a15e
       -DCUSTOM_Fortran_FLAGS='-I%{_libdir}/gfortran/modules %{optflags} -DNDEBUG' \
4be233a
       -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR="%{_lib}" \
9afc36c
       -DENABLE_CheMPS2=ON -DENABLE_libefp=OFF
9afc36c
#libefp turned off since it needs a separate Python wrapper
ff0bf58
ff0bf58
# Build program
00a3308
%cmake_build
ff0bf58
ff0bf58
%install
00a3308
%cmake_install
4197c23
4197c23
# Get rid of spurious files
4197c23
rm -rf %{buildroot}%{_builddir}
4197c23
rm -rf %{buildroot}%{_datadir}/TargetHDF5/
4197c23
rm -rf %{buildroot}%{_datadir}/TargetLAPACK/
4197c23
rm -rf %{buildroot}%{_datadir}/TargetHDF5/
4197c23
rm -rf %{buildroot}%{_datadir}/cmake/TargetHDF5/
4197c23
rm -rf %{buildroot}%{_datadir}/cmake/TargetLAPACK/
ff0bf58
ff0bf58
%check
3bfa32a
# Run quick tests to see the program works.
3bfa32a
# quicktests are too long, whole test suite way too long.
00a3308
cd %{_vpath_builddir}/tests
3bfa32a
ctest -L smoketests
ff0bf58
ff0bf58
%files
5ae5109
%license COPYING COPYING.LESSER
4197c23
%doc README.md
dfb70cd
%{python3_sitearch}/psi4/
ff0bf58
%{_bindir}/psi4
ff0bf58
ff0bf58
%files data
5ae5109
%license COPYING COPYING.LESSER
c24a225
%{_datadir}/psi4/
ff0bf58
ff0bf58
%files devel
5ae5109
%license COPYING COPYING.LESSER
4197c23
%{_datadir}/cmake/psi4/
ff0bf58
%{_includedir}/psi4/
ff0bf58
ff0bf58
%changelog
46734ed
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.2-15
46734ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
46734ed
8b229af
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.2-14
8b229af
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
8b229af
7c7fc38
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.2-13
7c7fc38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
7c7fc38
0bd6753
* Tue Jul 13 2021 Björn Esser <besser82@fedoraproject.org> - 1:1.3.2-12
56a0b9b
- Add a patch for native support of FlexiBLAS
a7852fb
- Explicitly turn ENABLE_AUTO_LAPACK on
0bd6753
a7146d9
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1:1.3.2-11
a7146d9
- Rebuilt for Python 3.10
a7146d9
dfb70cd
* Wed Mar 31 2021 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.3.2-10
dfb70cd
- Make the psi4 Python module importable.
dfb70cd
- Remove rpath.
dfb70cd
8a79244
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.2-9
8a79244
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
8a79244
0943e74
* Wed Aug 26 2020 Jeff Law <law@redhat.com> - 1:1.3.2-8
0943e74
- Do not force C++11 mode
0943e74
fcdfe22
* Sun Aug 16 2020 Iñaki Úcar <iucar@fedoraproject.org> - 1:1.3.2-7
fcdfe22
- https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager
fcdfe22
00a3308
* Wed Aug 05 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.3.2-6
00a3308
- Adapt to new CMake scripts.
00a3308
cc4d8bc
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.2-5
cc4d8bc
- Second attempt - Rebuilt for
cc4d8bc
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
cc4d8bc
3ccfdd1
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.2-4
3ccfdd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3ccfdd1
eceb961
* Tue May 05 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.3.2-3
2f68160
- Rebuild against libxc 5 in rawhide.
9369484
- Add missing deepdiff requires.
2f68160
f340373
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.3.2-2
f340373
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f340373
a2b7453
* Mon Jan 13 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.3.2-1
a2b7453
- Update to 1.3.2.
0d2d61c
54b9237
* Mon Mar 04 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.3.0-1
54b9237
- Update to 1.3.0.
8557a3d
62b23c3
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.2.1-5.b167f47
62b23c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
62b23c3
a439945
* Wed Jan 02 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.2.1-4.b167f473git
a439945
- Add deepdiff requires.
a439945
3652055
* Sun Dec 09 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.2.1-3.b167f47
3652055
- Require python3-numpy instead of python2-numpy
3652055
9afc36c
* Wed Sep 26 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.2.1-2.b167f473git
9afc36c
- Update to git snapshot to make code run with -D_GLIBCXX_ASSERTIONS.
9afc36c
d8baf32
* Sat Sep 22 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.2.1-1
4be233a
- Update to 1.2.1.
4be233a
Marcel Plch 7e1f7c4
* Fri Aug 10 2018 Marcel Plch <mplch@redhat.com> - 1:1.1-8.add49b9git
Marcel Plch 7e1f7c4
- Patch for pybind 2.2.3
Marcel Plch 7e1f7c4
177e486
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-7.add49b9git
177e486
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
177e486
3b28c28
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.1-6.add49b9git
3b28c28
- Rebuilt for Python 3.7
3b28c28
adb4910
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-5.add49b9git
adb4910
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
adb4910
5a520f1
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-4.add49b9git
5a520f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
5a520f1
0d4e785
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1-3.add49b9git
0d4e785
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0d4e785
2e4c5d8
* Fri May 19 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.1-2.add49b95git
2e4c5d8
- Epoch was missing from a requires.
2e4c5d8
5ae5109
* Wed May 17 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.1-1.add49b95git
f1759e7
- Update to version 1.1. License changes from GPLv2+ to LGPLv3.
5ae5109
- Make sure binary is linked to right atlas library.
5ae5109
1a68dae
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.0-3.2118f2fgit
1a68dae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
1a68dae
fe868c3
* Thu Mar 02 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.0-2.2118f2f5git
fe868c3
- Update to get patch that fixes build on rawhide.
fe868c3
4197c23
* Mon Feb 27 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.0-1.926879e2git
4197c23
- Update to newest git snapshot.
4197c23
f30f14d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.0-0.3.rc.15fc63cgit
f30f14d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
f30f14d
e4f9125
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 1:1.0-0.2.rc.15fc63cgit
e4f9125
- Rebuilt for Boost 1.63
e4f9125
b088efc
* Thu Jun 02 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:1.0-0.1.rc.15fc64cgit
b088efc
- Update to 1.0 release candidate.
b088efc
5e373c6
* Tue May 17 2016 Jonathan Wakely <jwakely@redhat.com> - 1:0.3-7.1881450git
5e373c6
- Rebuilt for linker errors in boost (#1331983)
5e373c6
bd9efad
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.3-6.1881450git
bd9efad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
bd9efad
f5b8812
* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 1:0.3-5.1881450git
f5b8812
- Rebuilt for Boost 1.60
f5b8812
e97febd
* Wed Sep 09 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:0.3-4.1881450fgit
e97febd
- Use narrowing patch from upstream instead of -Wno-narrowing.
e97febd
b8ab233
* Tue Sep 08 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:0.3-3.1881450fgit
b8ab233
- Add epoch to explicit requires.
b8ab233
993ec26
* Tue Sep 08 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:0.3-2.1881450fgit
993ec26
- Patch to fix broken linkage.
993ec26
215a15e
* Sun Sep 06 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1:0.3-1.1881450fgit
215a15e
- Update to newest release, switched to using github release tags.
b7c9666
e5ca990
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-0.21.c7deee9git.1
e5ca990
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
e5ca990
d0a0890
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 4.0-0.20.c7deee9git.1
d0a0890
- rebuild for Boost 1.58
d0a0890
01e50d3
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-0.19.c7deee9git.1
01e50d3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
01e50d3
a8a7f96
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 4.0-0.18.c7deee9git.1
a8a7f96
- Rebuilt for GCC 5 C++11 ABI change
a8a7f96
Petr Machata 38652ce
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 4.0-0.17.c7deee9git.1
Petr Machata 38652ce
- Rebuild for boost 1.57.0
Petr Machata 38652ce
4fa6316
* Thu Sep 11 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.16.c7deee99.1
4fa6316
- Forgot to tag buildroot override in previous build.
4fa6316
4fa6316
* Wed Sep 10 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.16.c7deee99
7352a25
- Update to newest snapshot.
6d49e45
- Requires libint(api).
6d49e45
ef95853
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-0.15.0c7ea92git.1
ef95853
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ef95853
29d93c6
* Wed Jul 02 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.14.0c7ea92git.1
29d93c6
- Rebuild due to rebuilt libint.
29d93c6
ee1a3d7
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-0.14.0c7ea92git
ee1a3d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ee1a3d7
Petr Machata 2344c06
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 4.0-0.13.0c7ea92git
Petr Machata 2344c06
- Rebuild for boost 1.55.0
Petr Machata 2344c06
15a68bb
* Tue May 13 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.12.0c7ea928git
8ff1a6d
- Add BR: perl(Env) for tests.
15a68bb
d687ee3
* Tue May 13 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.11.0c7ea928git
d687ee3
- Update to newest git snapshot.
d687ee3
- Remove BR: ruby-devel.
d687ee3
b26bfd9
* Mon Mar 10 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.10.b5
b26bfd9
- Rebuild against updated libint.
b26bfd9
86201c2
* Sat Jan 04 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.9.b5
86201c2
- Drop %%?_isa from virtual provide of -static package (BZ #951582).
86201c2
7e4d1ba
* Fri Dec 27 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.8.b5
7e4d1ba
- Versioned libint build dependency.
7e4d1ba
ff0bf58
* Tue Dec 24 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.7.b5
ff0bf58
- Added LICENSE and COPYING to -data as well.
ff0bf58
- Versioned libint dependency.
ff0bf58
ff0bf58
* Sat Dec 21 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.6.b5
ff0bf58
- Get rid of bundled madness.
ff0bf58
ff0bf58
* Thu Dec 19 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.5.b5
ff0bf58
- Added BR and R on numpy.
ff0bf58
- Use ATLAS after all.
ff0bf58
ff0bf58
* Fri Aug 16 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.4.b5
ff0bf58
- Use openblas on supported architectures.
ff0bf58
- Update to beta5.
ff0bf58
ff0bf58
* Thu May 02 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.3.b4
ff0bf58
- Added BR on graphviz and enabled dot in configure for documentation.
ff0bf58
ff0bf58
* Tue Apr 30 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.2.b4
ff0bf58
- Review fixes.
ff0bf58
ff0bf58
* Thu Apr 11 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 4.0-0.1.b4
ff0bf58
- First release.