## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 52; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global __cmake_in_source_build 1 Name: dolfin Version: 2019.1.0.post0 %global fenics_version 2019.1 Release: %autorelease Summary: FEniCS computational backend and problem solving environment License: LGPL-3.0-or-later URL: https://fenicsproject.org/ Source0: https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-%{version}.tar.gz Source1: https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-%{version}.tar.gz.asc Source2: 3083BE4C722232E28AD0828CBED06106DD22BAB3.gpg Patch: 0001-pkgconfig-drop-irrelevant-part-from-Libs-and-Cflags.patch Patch: 0001-Add-missing-include-for-compatiblity-with-gcc-13.patch %if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 %global blaslib flexiblas %global cmake_blas_flags -DBLA_VENDOR=FlexiBLAS %else %global blaslib openblas %global blasvar o %global cmake_blas_flags -DBLAS_LIBRARIES=%{_libdir}/lib%{blaslib}%{blasvar}.so %endif # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: gcc-c++ BuildRequires: gnupg2 BuildRequires: cmake BuildRequires: pkgconf BuildRequires: boost-devel BuildRequires: eigen3-devel BuildRequires: petsc-devel BuildRequires: sundials-devel BuildRequires: scotch-devel # ptscotch-mpich-devel? BuildRequires: %{blaslib}-devel BuildRequires: hdf5-devel # hdf5-mpich-devel? BuildRequires: zlib-devel BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: pybind11-devel BuildRequires: python3dist(numpy) BuildRequires: python3dist(fenics-ffc) >= %{fenics_version} BuildRequires: python3dist(fenics-ufl) >= %{fenics_version} BuildRequires: python3dist(fenics-dijitso) >= %{fenics_version} # go cmake go BuildRequires: chrpath BuildRequires: make # check-buildroot flags the python .so, but it should be fine after rpath removal. # It seems that the original path to the library is stored in some comment. %global __arch_install_post /usr/lib/rpm/check-buildroot || : #BuildRequires: mpich-devel #BuildRequires: openmpi-devel %global _description %{expand: DOLFIN is the computational backend of FEniCS and implements the FEniCS Problem Solving Environment.} %description %_description %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release}%{?isa} # dolfin headers include headers from other projects Requires: boost-devel Requires: eigen3-devel %description devel %{summary}. %package -n python3-dolfin Summary: Python wrapper for the FEniCS dolfin environment # The jit compiles and links to the dolfin library Requires: %{name}-devel = %{version}-%{release}%{?isa} %{?python_provide:%python_provide python3-dolfin} %description -n python3-dolfin %_description %package doc Summary: Documentation and demos for %{name} BuildArch: noarch %description doc %{summary}. %prep %{?gpgverify:%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'} %autosetup -p1 # Let's just specify an exact version of a dependency, yay! sed -i -r 's|pybind11==|pybind11>=|' python/setup.py # Drop obsolete bundled crap that doesn't support FlexiBLAS rm cmake/modules/FindBLAS.cmake cat >>python/CMakeLists.txt <\n\0/' \ dolfin/geometry/IntersectionConstruction.cpp \ dolfin/mesh/MeshFunction.h sed -r -i 's|boost/detail/endian.hpp|boost/endian/arithmetic.hpp|' \ dolfin/io/VTKFile.cpp \ dolfin/io/VTKWriter.cpp %build # %%_mpich_load mkdir -p build && cd build CFLAGS="%{optflags} -Wno-unused-variable -DH5_USE_110_API" CXXFLAGS="%{optflags} -DH5_USE_110_API" %cmake .. \ %{cmake_blas_flags} \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=off \ -Wno-dev %make_build # The flags defined in the pkg-config file are used at runtime. # For some reason, the contents are not injected properly. # https://fenicsproject.discourse.group/t/cant-define-expression-through-c-returns-fatal-error-ufc-h-no-such-file-or-directory/5472/19 # https://bugzilla.redhat.com/show_bug.cgi?id=2118536 ffc_path="$(python3 -c 'import ffc; print(ffc.get_include_path())')" eigen_options="$(pkgconf --cflags eigen3)" sed -r -i "s|Cflags:.*|\\0 -I${ffc_path} ${eigen_options}|" \ dolfin.pc # "temporary install" so the python build can find the stuff it needs %make_install cd ../python VERBOSE=1 CMAKE_PREFIX_PATH=%{buildroot}/usr/share/dolfin/cmake CMAKE_SKIP_INSTALL_RPATH=yes CMAKE_SKIP_RPATH=yes %py3_build %install cd build %make_install cd ../python VERBOSE=1 CMAKE_PREFIX_PATH=%{buildroot}/usr/share/dolfin/cmake CMAKE_SKIP_INSTALL_RPATH=yes CMAKE_SKIP_RPATH=yes %py3_install sed -r -i '1 {s|#!/usr/bin/env python.*|#!%{__python3}|}' \ %{buildroot}%{_bindir}/dolfin-order \ %{buildroot}%{_bindir}/dolfin-plot \ %{buildroot}%{_bindir}/dolfin-convert # this file is just pointless rm %{buildroot}/usr/share/dolfin/dolfin.conf # there's even an option for this, except it seems to have no effect chrpath %{buildroot}%{python3_sitearch}/dolfin/*.so chrpath --delete %{buildroot}%{python3_sitearch}/dolfin/*.so %check ctest -V %{?_smp_mflags} %files %license COPYING COPYING.LESSER AUTHORS %doc README.rst %{_bindir}/dolfin-version %{_bindir}/fenics-version %{_libdir}/libdolfin.so.%{fenics_version} %{_libdir}/libdolfin.so.%{fenics_version}.* %dir /usr/share/dolfin %dir /usr/share/dolfin/data /usr/share/dolfin/data/README %files devel /usr/include/dolfin.h /usr/include/dolfin/ %{_libdir}/libdolfin.so %{_libdir}/pkgconfig/dolfin.pc /usr/share/dolfin/cmake/ %files doc %{_bindir}/dolfin-get-demos /usr/share/dolfin/demo/ %files -n python3-dolfin %{_bindir}/dolfin-convert %{_bindir}/dolfin-order %{_bindir}/dolfin-plot %{python3_sitearch}/dolfin/ %{python3_sitearch}/dolfin_utils/ %{python3_sitearch}/fenics/ %{python3_sitearch}/fenics_dolfin-%{fenics_version}*-py%{python3_version}.egg-info/ %changelog ## START: Generated by rpmautospec * Wed Jul 17 2024 Fedora Release Engineering - 2019.1.0.post0-52 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Mon Jun 10 2024 Python Maint - 2019.1.0.post0-51 - Rebuilt for Python 3.13 * Wed Jan 24 2024 Fedora Release Engineering - 2019.1.0.post0-50 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 2019.1.0.post0-49 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Jan 17 2024 Jonathan Wakely - 2019.1.0.post0-48 - Rebuilt for Boost 1.83 * Mon Oct 16 2023 Antonio Trande - 2019.1.0.post0-47 - Rebuild for sundials-6.6.1 and petsc-3.20.0 * Sun Aug 13 2023 Antonio Trande - 2019.1.0.post0-46 - Rebuild for petsc-3.19.4 * Wed Jul 19 2023 Fedora Release Engineering - 2019.1.0.post0-45 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sun Jul 16 2023 Zbigniew Jędrzejewski-Szmek - 2019.1.0.post0-44 - Rebuild for updated python-fiat (rhbz#2220220) * Sun May 28 2023 Zbigniew Jędrzejewski-Szmek - 2019.1.0.post0-42 - Initialize contents of dolfin.pc correctly * Wed Apr 26 2023 Benjamin A. Beasley - 2019.1.0.post0-40 - Rebuild for PETSc-3.18.5 (close RHBZ#2189693) * Sun Mar 05 2023 Gwyn Ciesla - 2019.1.0.post0-39 - migrated to SPDX license * Mon Feb 20 2023 Jonathan Wakely - 2019.1.0.post0-38 - Rebuilt for Boost 1.81 * Fri Feb 03 2023 Benjamin A. Beasley - 2019.1.0.post0-37 - Leaf package: drop ix86 support * Thu Jan 19 2023 Fedora Release Engineering - 2019.1.0.post0-35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Jul 21 2022 Fedora Release Engineering - 2019.1.0.post0-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jun 17 2022 Python Maint - 2019.1.0.post0-33 - Rebuilt for Python 3.11 * Wed May 04 2022 Thomas Rodgers - 2019.1.0.post0-32 - Rebuilt for Boost 1.78 * Sat Apr 23 2022 Antonio Trande - 2019.1.0.post0-26 - Rebuild for PETSc-3.17.0 * Thu Jan 20 2022 Fedora Release Engineering - 2019.1.0.post0-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Nov 22 2021 Orion Poplawski - 2019.1.0.post0-24 - Rebuild for hdf5 1.12.1 * Wed Oct 20 2021 Antonio Trande - 2019.1.0.post0-23 - Rebuild for sundials-5.8.0 * Mon Oct 18 2021 Antonio Trande - 2019.1.0.post0-22 - Rebuild for PETSc-3.16.0 * Tue Aug 10 2021 Orion Poplawski - 2019.1.0.post0-21 - Rebuild for hdf5 1.10.7 * Fri Aug 06 2021 Jonathan Wakely - 2019.1.0.post0-20 - Rebuilt for Boost 1.76 * Wed Jul 21 2021 Fedora Release Engineering - 2019.1.0.post0-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jul 13 2021 Björn Esser - 2019.1.0.post0-18 - Properly set BLA_VENDOR to FlexiBLAS for cmake >= 3.19 * Fri Jun 04 2021 Python Maint - 2019.1.0.post0-17 - Rebuilt for Python 3.10 * Wed May 05 2021 Mamoru TASAKA - 2019.1.0.post0-16 - Rebuild (petsc) * Tue Jan 26 2021 Fedora Release Engineering - 2019.1.0.post0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Jan 22 2021 Jonathan Wakely - 2019.1.0.post0-14 - Rebuilt for Boost 1.75 * Wed Jan 06 2021 Orion Poplawski - 2019.1.0.post0-13 - Rebuild for sundials 5.6.1 * Sun Nov 22 2020 Orion Poplawski - 2019.1.0.post0-12 - Rebuild for sundials 5.5.0/petsc 3.14 * Mon Oct 5 07:22:07 CEST 2020 Zbigniew Jędrzejewski-Szmek - 2019.1.0.post0-11 - Rebuilt for sundials 5.4.0 * Thu Aug 27 2020 Iñaki Úcar - 2019.1.0.post0-10 - https://fedoraproject.org/wiki/Changes/FlexiBLAS_as_BLAS/LAPACK_manager * Tue Aug 04 2020 Gwyn Ciesla - 2019.1.0.post0-9 - Fix FTBFS. * Sat Aug 01 2020 Fedora Release Engineering - 2019.1.0.post0-8 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jul 27 2020 Fedora Release Engineering - 2019.1.0.post0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Jun 25 2020 Orion Poplawski - 2019.1.0.post0-6 - Rebuild for hdf5 1.10.6 * Tue Jun 23 2020 Gwyn Ciesla - 2019.1.0.post0-5 - Directly BR python3-setuptools. * Wed Jun 3 2020 Zbigniew Jędrzejewski-Szmek - 2019.1.0.post0-4 - Rebuilt for new boost (#1843103) * Tue May 26 2020 Miro Hrončok - 2019.1.0.post0-3 - Rebuilt for Python 3.9 * Tue Jan 28 2020 Fedora Release Engineering - 2019.1.0.post0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Wed Oct 9 2019 Zbigniew Jędrzejewski-Szmek - 2019.1.0-1 - Initial packaging ## END: Generated by rpmautospec