Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
|
65b62e0ac2 | |
|
66f572f8ca | |
|
390cfb579f |
37
dolfin.spec
37
dolfin.spec
|
@ -25,6 +25,7 @@ Patch: 0001-pkgconfig-drop-irrelevant-part-from-Libs-and-Cflags.patch
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gnupg2
|
BuildRequires: gnupg2
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
|
BuildRequires: pkgconf
|
||||||
BuildRequires: boost-devel
|
BuildRequires: boost-devel
|
||||||
BuildRequires: eigen3-devel
|
BuildRequires: eigen3-devel
|
||||||
BuildRequires: petsc-devel
|
BuildRequires: petsc-devel
|
||||||
|
@ -62,6 +63,9 @@ FEniCS Problem Solving Environment.}
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
Requires: %{name} = %{version}-%{release}%{?isa}
|
Requires: %{name} = %{version}-%{release}%{?isa}
|
||||||
|
# dolfin headers include headers from other projects
|
||||||
|
Requires: boost-devel
|
||||||
|
Requires: eigen3-devel
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
@ -89,6 +93,9 @@ BuildArch: noarch
|
||||||
# Let's just specify an exact version of a dependency, yay!
|
# Let's just specify an exact version of a dependency, yay!
|
||||||
sed -i -r 's|pybind11==|pybind11>=|' python/setup.py
|
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 <<EOF
|
cat >>python/CMakeLists.txt <<EOF
|
||||||
set(CMAKE_CXX_FLAGS "\${CMAKE_CXX_FLAGS} -I$PWD")
|
set(CMAKE_CXX_FLAGS "\${CMAKE_CXX_FLAGS} -I$PWD")
|
||||||
EOF
|
EOF
|
||||||
|
@ -107,9 +114,19 @@ sed -r -i 's|boost/detail/endian.hpp|boost/endian/arithmetic.hpp|' \
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
CFLAGS="%{optflags} -Wno-unused-variable -DH5_USE_110_API" CXXFLAGS="%{optflags} -DH5_USE_110_API" %cmake .. \
|
CFLAGS="%{optflags} -Wno-unused-variable -DH5_USE_110_API" CXXFLAGS="%{optflags} -DH5_USE_110_API" %cmake .. \
|
||||||
%{cmake_blas_flags} \
|
%{cmake_blas_flags} \
|
||||||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=off
|
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=off \
|
||||||
|
-Wno-dev
|
||||||
%make_build
|
%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
|
# "temporary install" so the python build can find the stuff it needs
|
||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
|
@ -124,9 +141,9 @@ cd ../python
|
||||||
VERBOSE=1 CMAKE_PREFIX_PATH=%{buildroot}/usr/share/dolfin/cmake CMAKE_SKIP_INSTALL_RPATH=yes CMAKE_SKIP_RPATH=yes %py3_install
|
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}|}' \
|
sed -r -i '1 {s|#!/usr/bin/env python.*|#!%{__python3}|}' \
|
||||||
%{buildroot}/usr/bin/dolfin-order \
|
%{buildroot}%{_bindir}/dolfin-order \
|
||||||
%{buildroot}/usr/bin/dolfin-plot \
|
%{buildroot}%{_bindir}/dolfin-plot \
|
||||||
%{buildroot}/usr/bin/dolfin-convert
|
%{buildroot}%{_bindir}/dolfin-convert
|
||||||
|
|
||||||
# this file is just pointless
|
# this file is just pointless
|
||||||
rm %{buildroot}/usr/share/dolfin/dolfin.conf
|
rm %{buildroot}/usr/share/dolfin/dolfin.conf
|
||||||
|
@ -141,8 +158,8 @@ ctest -V %{?_smp_mflags}
|
||||||
%files
|
%files
|
||||||
%license COPYING COPYING.LESSER AUTHORS
|
%license COPYING COPYING.LESSER AUTHORS
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
/usr/bin/dolfin-version
|
%{_bindir}/dolfin-version
|
||||||
/usr/bin/fenics-version
|
%{_bindir}/fenics-version
|
||||||
%{_libdir}/libdolfin.so.%{fenics_version}
|
%{_libdir}/libdolfin.so.%{fenics_version}
|
||||||
%{_libdir}/libdolfin.so.%{fenics_version}.*
|
%{_libdir}/libdolfin.so.%{fenics_version}.*
|
||||||
%dir /usr/share/dolfin
|
%dir /usr/share/dolfin
|
||||||
|
@ -157,13 +174,13 @@ ctest -V %{?_smp_mflags}
|
||||||
/usr/share/dolfin/cmake/
|
/usr/share/dolfin/cmake/
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
/usr/bin/dolfin-get-demos
|
%{_bindir}/dolfin-get-demos
|
||||||
/usr/share/dolfin/demo/
|
/usr/share/dolfin/demo/
|
||||||
|
|
||||||
%files -n python3-dolfin
|
%files -n python3-dolfin
|
||||||
/usr/bin/dolfin-convert
|
%{_bindir}/dolfin-convert
|
||||||
/usr/bin/dolfin-order
|
%{_bindir}/dolfin-order
|
||||||
/usr/bin/dolfin-plot
|
%{_bindir}/dolfin-plot
|
||||||
%{python3_sitearch}/dolfin/
|
%{python3_sitearch}/dolfin/
|
||||||
%{python3_sitearch}/dolfin_utils/
|
%{python3_sitearch}/dolfin_utils/
|
||||||
%{python3_sitearch}/fenics/
|
%{python3_sitearch}/fenics/
|
||||||
|
|
Loading…
Reference in New Issue