Accepting request 807404 from science

OBS-URL: https://build.opensuse.org/request/show/807404
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/diy?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2020-05-20 16:46:12 +00:00 committed by Git OBS Bridge
commit a09d5057d2
4 changed files with 39 additions and 33 deletions

View File

@ -1,4 +1,3 @@
<multibuild> <multibuild>
<package>serial</package>
<package>mpich</package> <package>mpich</package>
</multibuild> </multibuild>

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri May 15 13:33:42 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
- Drop the "serial" flavour and build the no-mpi package for
flavor = "".
- Fix build failures for openSUSE >= 1550 by not undefining
"suffix" any more.
- Pass wrapped_mpi=ON to cmake to tell the build scripts that the
MPI compiler wrapper requires no further MPI libraries; this
fixes failing tests in %check.
- Use %cmake macro to configure; export compiler and env variables
before calling cmake where possible instead of passing them as
cmake options.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 7 23:39:44 UTC 2019 - Atri Bhattacharya <badshah400@gmail.com> Thu Nov 7 23:39:44 UTC 2019 - Atri Bhattacharya <badshah400@gmail.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package diy # spec file for package diy
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -22,14 +22,6 @@
%define pname diy %define pname diy
%if "%{flavor}" == "" %if "%{flavor}" == ""
%define package_name %{pname}
ExclusiveArch: do_not_build
%else
ExclusiveArch: x86_64
%endif
%if "%{flavor}" == "serial"
%undefine suffix
%undefine mpi_flavor %undefine mpi_flavor
%endif %endif
@ -41,31 +33,29 @@ ExclusiveArch: x86_64
%{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}} %{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}}
%{?with_mpi:%{!?mpi_flavor:error "No MPI family specified!"}} %{?with_mpi:%{!?mpi_flavor:error "No MPI family specified!"}}
%if 0%{!?package_name:1} %if %{with mpi}
%define package_name %{pname}%{?my_suffix}
%endif
%if %{without mpi}
%define my_prefix %{_prefix}
%define my_bindir %{_bindir}
%define my_libdir %{_libdir}
%define my_incdir %{_includedir}
%else
%define my_prefix %{_libdir}/mpi/gcc/%{mpi_flavor}%{?mpi_ext} %define my_prefix %{_libdir}/mpi/gcc/%{mpi_flavor}%{?mpi_ext}
%define my_bindir %{my_prefix}/bin %define my_bindir %{my_prefix}/bin
%define my_libdir %{my_prefix}/%{_lib} %define my_libdir %{my_prefix}/%{_lib}
%define my_incdir %{my_prefix}/include %define my_incdir %{my_prefix}/include
%define my_suffix -%{mpi_flavor}%{?mpi_ext} %define my_suffix -%{mpi_flavor}%{?mpi_ext}
%else
%define my_prefix %{_prefix}
%define my_bindir %{_bindir}
%define my_libdir %{_libdir}
%define my_incdir %{_includedir}
%endif %endif
# /SECTION # /SECTION
%define package_name %{pname}%{?my_suffix}
Name: %{package_name} Name: %{package_name}
Version: 3.5.0 Version: 3.5.0
Release: 0 Release: 0
Summary: A block-parallel library Summary: A block-parallel library
License: BSD-3-Clause License: BSD-3-Clause
URL: https://github.com/diatomic/diy URL: https://github.com/diatomic/diy
Source: https://github.com/diatomic/diy/archive/%{version}.tar.gz Source: https://github.com/diatomic/diy/archive/%{version}.tar.gz#/%{pname}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM diy-disable-memory-heavy-tests.patch badshah400@gmail.com -- Disable a few tests requiring more than 10 GB memory # PATCH-FIX-UPSTREAM diy-disable-memory-heavy-tests.patch badshah400@gmail.com -- Disable a few tests requiring more than 10 GB memory
Patch0: diy-disable-memory-heavy-tests.patch Patch0: diy-disable-memory-heavy-tests.patch
BuildRequires: cmake >= 3.2 BuildRequires: cmake >= 3.2
@ -73,6 +63,7 @@ BuildRequires: gcc-c++
%if %{with mpi} %if %{with mpi}
BuildRequires: %{mpi_flavor}%{?mpi_ext}-devel BuildRequires: %{mpi_flavor}%{?mpi_ext}-devel
%endif %endif
ExclusiveArch: x86_64
%description %description
Diy is a block-parallel library for implementing scalable algorithms Diy is a block-parallel library for implementing scalable algorithms
@ -109,22 +100,24 @@ This package provides the header files for development with diy.
%autosetup -p1 -n %{pname}-%{version} %autosetup -p1 -n %{pname}-%{version}
%build %build
mkdir -p build
pushd build
# %%cmake can't be used directly because of custom INSTALL_PREFIX requirement
cmake .. \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX="%{my_prefix}" \
%if %{with mpi} %if %{with mpi}
-DCMAKE_C_COMPILER="%{my_bindir}/mpicc" \ source %{my_bindir}/mpivars.sh
-DCMAKE_CXX_COMPILER="%{my_bindir}/mpicxx" export CC=mpicc
export CXX=mpicxx
%else %else
-DCMAKE_C_COMPILER=gcc \ export CC=gcc
-DCMAKE_CXX_COMPILER=g++ \ export CXX=g++
-Dmpi=OFF
%endif %endif
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
%cmake \
-DCMAKE_INSTALL_PREFIX:PATH=%{my_prefix} \
-Dmpi:BOOL=%{?with_mpi:ON}%{!?with_mpi=OFF} \
-Dwrapped_mpi:BOOL=%{?with_mpi:ON}%{!?with_mpi=OFF}
%cmake_build %cmake_build
popd
%install %install
%cmake_install %cmake_install