* Fix some incorrect/unnecessary hashbangs. * Use fdupes to link duplicate files. * Add patches, taken from upstream commits and rebased, to fix builds against GCC 15: blis-gcc15-disable-slp-tree-vectorization.patch (gh#flame/blis#874); blis-gcc15-unnecessary-openmp-include.patch (gh#flame/blis#875). OBS-URL: https://build.opensuse.org/package/show/science/blis?expand=0&rev=8
135 lines
4.6 KiB
RPMSpec
135 lines
4.6 KiB
RPMSpec
#
|
|
# spec file for package blis
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
# Config to build blis with
|
|
%ifarch x86_64
|
|
%define blis_config x86_64
|
|
%else
|
|
%ifarch %{arm64}
|
|
%define blis_config arm64
|
|
# Error when building with LTO on arm64
|
|
%define _lto_cflags %{nil}
|
|
%else
|
|
%define blis_config generic
|
|
%endif
|
|
%endif
|
|
%define sover 4
|
|
%define shlib lib%{name}%{sover}
|
|
Name: blis
|
|
Version: 2.0
|
|
Release: 0
|
|
Summary: BLAS-like Library Instantiation Software Framework
|
|
License: BSD-3-Clause
|
|
URL: https://github.com/flame/blis
|
|
Source: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
# PATCH-FIX-UPSTREAM blis-gcc15-disable-slp-tree-vectorization.patch gh#flame/blis#874 badshah400@gmail.com -- As a temporary fix for building with GCC 15, disable slp-tree-vectorization in affected files; rebased from upstream commit
|
|
Patch0: blis-gcc15-disable-slp-tree-vectorization.patch
|
|
# PATCH-FIX-UPSTREAM blis-gcc15-unnecessary-openmp-include.patch gh#flame/blis#875 badshah400@gmail.com -- Remove unnecessary OpenMP include; rebased from upstream commit
|
|
Patch1: blis-gcc15-unnecessary-openmp-include.patch
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gcc-fortran
|
|
BuildRequires: make
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: python3
|
|
|
|
%description
|
|
BLIS is a portable software framework for instantiating high-performance
|
|
BLAS-like dense linear algebra libraries. The framework was designed to isolate
|
|
essential kernels of computation that, when optimized, immediately enable
|
|
optimized implementations of most of its commonly used and computationally
|
|
intensive operations. BLIS is written in ISO C99.
|
|
|
|
%package -n %{shlib}
|
|
Summary: Shared library for blis
|
|
|
|
%description -n %{shlib}
|
|
BLIS is a portable software framework for instantiating high-performance
|
|
BLAS-like dense linear algebra libraries. The framework was designed to isolate
|
|
essential kernels of computation that, when optimized, immediately enable
|
|
optimized implementations of most of its commonly used and computationally
|
|
intensive operations. BLIS is written in ISO C99.
|
|
|
|
This package provides the shared library for blis.
|
|
|
|
%package devel
|
|
Summary: Headers and devel files for blis
|
|
Requires: %{shlib} = %{version}
|
|
# Both cblas-devel and blis-devel provide a %%{_includedir}/cblas.h header file
|
|
# and the latter is a drop-in replacement for the former
|
|
Conflicts: cblas-devel
|
|
|
|
%description devel
|
|
BLIS is a portable software framework for instantiating high-performance
|
|
BLAS-like dense linear algebra libraries. The framework was designed to isolate
|
|
essential kernels of computation that, when optimized, immediately enable
|
|
optimized implementations of most of its commonly used and computationally
|
|
intensive operations. BLIS is written in ISO C99.
|
|
|
|
This package provides the headers and devel files for %{name}.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
sed -Ei '1{\@#!/usr/bin/env python@d}' build/flatten-headers.py
|
|
|
|
%build
|
|
export CFLAGS="%{optflags}"
|
|
# Not an autotools configure script
|
|
./configure \
|
|
--disable-rpath \
|
|
--disable-static \
|
|
--enable-verbose-make \
|
|
--enable-cblas \
|
|
--enable-debug=opt \
|
|
--prefix=%{_prefix} \
|
|
--libdir=%{_libdir} \
|
|
--enable-threading=openmp,pthreads \
|
|
%{blis_config}
|
|
%make_build
|
|
%make_build -C testsuite
|
|
|
|
%install
|
|
%make_install
|
|
sed -Ei '1{s@/usr/bin/env bash@%{_bindir}/bash@}' %{buildroot}%{_datadir}/blis/configure-plugin
|
|
|
|
# Manually remove rpath from pkgconfig file
|
|
sed -i "s/\-Wl,\-rpath.* //g" %{buildroot}%{_datadir}/pkgconfig/blis.pc
|
|
|
|
%fdupes %{buildroot}%{_datadir}/blis/
|
|
|
|
%check
|
|
pushd testsuite
|
|
./test_libblis.x
|
|
|
|
%ldconfig_scriptlets -n %{shlib}
|
|
|
|
%files -n %{shlib}
|
|
%{_libdir}/lib%{name}.so.*
|
|
|
|
%files devel
|
|
%license LICENSE
|
|
%doc CHANGELOG README.md docs/ReleaseNotes.md
|
|
%{_includedir}/*.h
|
|
%{_includedir}/%{name}/
|
|
%{_libdir}/lib%{name}.so
|
|
%{_datadir}/%{name}/
|
|
%{_datadir}/pkgconfig/%{name}.pc
|
|
|
|
%changelog
|