|
|
0827c9 |
#
|
|
|
0827c9 |
# spec file for package fixmath
|
|
|
0827c9 |
#
|
|
|
55599f |
# Copyright (c) 2023 SUSE LLC
|
|
|
0827c9 |
#
|
|
|
0827c9 |
# All modifications and additions to the file contributed by third parties
|
|
|
0827c9 |
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
0827c9 |
# upon. The license for this file, and modifications and additions to the
|
|
|
0827c9 |
# file, is the same license as for the pristine package itself (unless the
|
|
|
0827c9 |
# license for the pristine package is not an Open Source License, in which
|
|
|
0827c9 |
# case the license is the MIT License). An "Open Source License" is a
|
|
|
0827c9 |
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
0827c9 |
# published by the Open Source Initiative.
|
|
|
0827c9 |
|
|
|
0827c9 |
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
0827c9 |
#
|
|
|
0827c9 |
|
|
|
0827c9 |
|
|
|
0827c9 |
Name: fixmath
|
|
|
0827c9 |
Version: 2022.07.20
|
|
|
0827c9 |
Release: 0
|
|
|
55599f |
Summary: Fixed-point math operations library
|
|
|
0827c9 |
License: MIT
|
|
|
0827c9 |
URL: https://github.com/PetteriAimonen/libfixmath
|
|
|
55599f |
Group: Development/Libraries/C and C++
|
|
|
0827c9 |
Source0: %{url}/archive/refs/heads/master.tar.gz#:/%{name}-%{version}.tar.gz
|
|
|
d78e01 |
# PATCH-FIX-SUSE build shared lib instead of static one
|
|
|
d78e01 |
Patch0: build-shared-library.patch
|
|
|
d78e01 |
# PATCH-FIX-SUSE use cmake for installation
|
|
|
d78e01 |
Patch1: cmake-install.patch
|
|
|
e890d0 |
BuildRequires: gcc-c++
|
|
|
0827c9 |
# Use cmake3 package on SLE12 because cmake is too old (version 3.5)
|
|
|
0827c9 |
%if !0%{?is_opensuse} && 0%{?sle_version} < 150000
|
|
|
e890d0 |
BuildRequires: cmake3-full >= 3.13
|
|
|
0827c9 |
# Requires C++17
|
|
|
0827c9 |
%else
|
|
|
e890d0 |
BuildRequires: cmake >= 3.13
|
|
|
0827c9 |
%endif
|
|
|
0827c9 |
|
|
|
0827c9 |
%description
|
|
|
55599f |
fixmath is a fixed-point math operations library written in C and
|
|
|
55599f |
implementing the Q16.16 format.
|
|
|
0827c9 |
|
|
|
0827c9 |
%package devel
|
|
|
55599f |
Summary: Header files for fixmath, a fixed-point math library
|
|
|
55599f |
Requires: %name = %version
|
|
|
55599f |
Conflicts: %name < %version-%release
|
|
|
57bd13 |
BuildArch: noarch
|
|
|
0827c9 |
|
|
|
0827c9 |
%description devel
|
|
|
55599f |
fixmath is a fixed-point math operations library written in C and
|
|
|
55599f |
implementing the Q16.16 format.
|
|
|
0827c9 |
|
|
|
55599f |
This package contains the headers.
|
|
|
0827c9 |
|
|
|
0827c9 |
%prep
|
|
|
d78e01 |
%autosetup -n lib%{name}-master -p1
|
|
|
0827c9 |
|
|
|
0827c9 |
%build
|
|
|
e890d0 |
# Fix lto-no-text-in-archive rpmlint error
|
|
|
57bd13 |
export CFLAGS="%{optflags} -ffat-lto-objects"
|
|
|
57bd13 |
export CXXFLAGS="%{optflags} -ffat-lto-objects"
|
|
|
0827c9 |
%if !0%{?is_opensuse} && 0%{?sle_version} < 150000
|
|
|
e890d0 |
# Remove -fsanitize=undefined opts in SLE-12-SP5
|
|
|
e890d0 |
sed -e '/set(sanitizer_opts/d' -i tests/tests.cmake
|
|
|
0827c9 |
%endif
|
|
|
55599f |
sv="$PWD/fixmath.sym"
|
|
|
55599f |
echo "FIXMATH_%version { global: *; };" >"$sv"
|
|
|
55599f |
%cmake -DCMAKE_SHARED_LINKER_FLAGS:STRING="-Wl,--version-script=$sv"
|
|
|
0827c9 |
%cmake_build
|
|
|
0827c9 |
|
|
|
0827c9 |
%install
|
|
|
d78e01 |
%cmake_install
|
|
|
0827c9 |
|
|
|
55599f |
%post -p /sbin/ldconfig
|
|
|
55599f |
%postun -p /sbin/ldconfig
|
|
|
55599f |
|
|
|
55599f |
%files
|
|
|
55599f |
%{_libdir}/lib%{name}.so
|
|
|
55599f |
|
|
|
0827c9 |
%files devel
|
|
|
0827c9 |
%doc README.md
|
|
|
0827c9 |
%license LICENSE
|
|
|
0827c9 |
%{_includedir}/libfixmath
|
|
|
0827c9 |
|
|
|
0827c9 |
%changelog
|