Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > ced4bedaa784c5802cdcdaf2b4cbc623 > files > 3

imath-3.1.6-3.mga9.src.rpm

%define api	3_1
%define major	29
%define libname	%mklibname imath %{api} %{major}
%define devname	%mklibname imath -d

%bcond_without python3
%bcond_without docs

Name:		imath
Version:	3.1.6
Release:	%mkrel 3
Summary:	Library of 2D and 3D vector, matrix, and math operations for computer graphics
Group:		System/Libraries
License:	BSD
URL:		https://github.com/AcademySoftwareFoundation/Imath
Source0:	https://github.com/AcademySoftwareFoundation/Imath/archive/v%{version}/Imath-%{version}.tar.gz
Patch0:		imath-python-test.patch
BuildRequires:	cmake
BuildRequires:	gcc gcc-c++
BuildRequires:	make
%if %{with python3}
BuildRequires:	boost-devel
BuildRequires:	python3-devel
BuildRequires:	python3-numpy-devel
%endif
%if %{with docs}
# For documentation generation
BuildRequires:	doxygen
BuildRequires:	python3-sphinx
BuildRequires:	python3-breathe
%endif

%description
Imath is a basic, light-weight, and efficient C++ representation of 2D and 3D
vectors and matrices and other simple but useful mathematical objects,
functions, and data types common in computer graphics applications, including
the “half” 16-bit floating-point type.

%package -n python3-%{name}
Summary:	PyImath Python bindings for Imath
Group:		Development/Python

%description -n python3-%{name}
PyImath Python bindings for Imath.

%package -n %{libname}
Summary:	Development files for Imath
Group:		System/Libraries

%description -n %{libname}
Imath is a basic, light-weight, and efficient C++ representation of 2D and 3D
vectors and matrices and other simple but useful mathematical objects,
functions, and data types common in computer graphics applications, including
the “half” 16-bit floating-point type.

%package -n %{devname}
Summary:	Development files for Imath
Group:		Development/Other
Requires:	%{libname} = %{version}-%{release}
%if %{with python3}
Requires:	python3-%{name} = %{version}-%{release}
%endif
Provides:	%{name}-devel = %{version}-%{release}

%description -n %{devname}
This package contains the development libraries and headers for Imath.

%prep
%autosetup -n Imath-%{version} -p1

%build
%ifarch %ix86
# https://github.com/AcademySoftwareFoundation/Imath/issues/151
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=909865#14
export CXXFLAGS="%{build_cxxflags} -ffloat-store"
%endif
%cmake \
  -DPYTHON:BOOL=%{?with_python3:ON}%{!?with_python3:OFF} \
  -DDOCS:BOOL=%{?with_docs:ON}%{!?with_docs:OFF} \
  -DINSTALL_DOCS:BOOL=ON
%cmake_build

%install
%cmake_install

%if %{with docs}
# Fixup documentation so it can get installed correctly in imath-devel
rm -rf %{buildroot}%{_datadir}/doc/Imath/sphinx/.{doctrees,buildinfo}
mv %{buildroot}%{_datadir}/doc/Imath/sphinx/ %{buildroot}%{_datadir}/doc/Imath/html/
%endif

%check
%ctest

%files -n %{libname}
%license LICENSE.md
%doc CHANGES.md CODE_OF_CONDUCT.md CONTRIBUTING.md
%doc CONTRIBUTORS.md README.md SECURITY.md
%{_libdir}/libImath-%{api}.so.%{major}{,.*}

%if %{with python3}
%files -n python3-%{name}
%{_libdir}/libPyImath_Python%(tr '.' '_' <<< %{python3_version})-%{api}.so.%{major}{,.*}
%{python3_sitearch}/imath.so
%{python3_sitearch}/imathnumpy.so
%endif

%files -n %{devname}
%if %{with docs}
%docdir %{_datadir}/doc/Imath/
%doc %{_datadir}/doc/Imath/
%endif
%{_includedir}/Imath/
%{_libdir}/pkgconfig/Imath.pc
%if %{with python3}
%{_libdir}/pkgconfig/PyImath.pc
%{_libdir}/libPyImath_Python%(tr '.' '_' <<< %{python3_version})-%{api}.so
%endif
%{_libdir}/cmake/Imath/
%{_libdir}/libImath.so
%{_libdir}/libImath-%{api}.so


%changelog
* Mon Apr 17 2023 daviddavid <daviddavid> 3.1.6-3.mga9
+ Revision: 1953417
- rebuild to fix libdir path in PyImath.pc file

* Sat Dec 24 2022 wally <wally> 3.1.6-2.mga9
+ Revision: 1926481
- rebuild for boost 1.81.0

* Sun Dec 04 2022 wally <wally> 3.1.6-1.mga9
+ Revision: 1917696
- new version 3.1.6

* Sun Jul 03 2022 wally <wally> 3.1.5-2.mga9
+ Revision: 1867260
- rebuild for boost 1.79.0

* Sat Apr 23 2022 wally <wally> 3.1.5-1.mga9
+ Revision: 1852820
- new version 3.1.5

* Tue Mar 29 2022 umeabot <umeabot> 3.1.3-4.mga9
+ Revision: 1833216
- Mageia 9 Mass Rebuild

* Sun Feb 13 2022 wally <wally> 3.1.3-3.mga9
+ Revision: 1774142
- rebuild for python3.10
- install docs to upstream default location
+ tv <tv>
- Rebuild for python-3.10

* Sat Dec 25 2021 wally <wally> 3.1.3-1.mga9
+ Revision: 1763663
- add provides to devel pkg
- Import based on .spec from Fedora