Compare commits

...

3 Commits
rawhide ... f38

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek f31bf05cf4 Drop bundled FindBLAS.cmake that doesn't know about FlexiBLAS
In the end, this doesn't seem to have any effect, but at least the previous
version was detecting openblas.so, which is certaily wrong. IIUC, blas is
only used in combination for some optional features which are disabled ATM.

[skip changelog]

(cherry picked from commit 211e11e642)
2023-05-28 18:10:30 +02:00
Zbigniew Jędrzejewski-Szmek 4858c9119d Initialize contents of dolfin.pc correctly
(rhbz#2118536)

(cherry picked from commit 73799202b0)
2023-05-28 18:10:30 +02:00
Zbigniew Jędrzejewski-Szmek 79ea9fe6fb Various small cleanups
[skip changelog]

(cherry picked from commit a70b88ec67)
2023-05-28 18:10:30 +02:00
1 changed files with 27 additions and 10 deletions

View File

@ -29,6 +29,7 @@ ExcludeArch: %{ix86}
BuildRequires: gcc-c++
BuildRequires: gnupg2
BuildRequires: cmake
BuildRequires: pkgconf
BuildRequires: boost-devel
BuildRequires: eigen3-devel
BuildRequires: petsc-devel
@ -66,6 +67,9 @@ FEniCS Problem Solving Environment.}
%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}.
@ -93,6 +97,9 @@ BuildArch: noarch
# 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 <<EOF
set(CMAKE_CXX_FLAGS "\${CMAKE_CXX_FLAGS} -I$PWD")
EOF
@ -111,9 +118,19 @@ sed -r -i 's|boost/detail/endian.hpp|boost/endian/arithmetic.hpp|' \
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
-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
@ -128,9 +145,9 @@ 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}/usr/bin/dolfin-order \
%{buildroot}/usr/bin/dolfin-plot \
%{buildroot}/usr/bin/dolfin-convert
%{buildroot}%{_bindir}/dolfin-order \
%{buildroot}%{_bindir}/dolfin-plot \
%{buildroot}%{_bindir}/dolfin-convert
# this file is just pointless
rm %{buildroot}/usr/share/dolfin/dolfin.conf
@ -145,8 +162,8 @@ ctest -V %{?_smp_mflags}
%files
%license COPYING COPYING.LESSER AUTHORS
%doc README.rst
/usr/bin/dolfin-version
/usr/bin/fenics-version
%{_bindir}/dolfin-version
%{_bindir}/fenics-version
%{_libdir}/libdolfin.so.%{fenics_version}
%{_libdir}/libdolfin.so.%{fenics_version}.*
%dir /usr/share/dolfin
@ -161,13 +178,13 @@ ctest -V %{?_smp_mflags}
/usr/share/dolfin/cmake/
%files doc
/usr/bin/dolfin-get-demos
%{_bindir}/dolfin-get-demos
/usr/share/dolfin/demo/
%files -n python3-dolfin
/usr/bin/dolfin-convert
/usr/bin/dolfin-order
/usr/bin/dolfin-plot
%{_bindir}/dolfin-convert
%{_bindir}/dolfin-order
%{_bindir}/dolfin-plot
%{python3_sitearch}/dolfin/
%{python3_sitearch}/dolfin_utils/
%{python3_sitearch}/fenics/