|
|
d3afbd |
%global srcname Imath
|
|
|
d3afbd |
%global sover 29
|
|
|
d3afbd |
%global pyver_under %(%{python3} -Esc "import sys; sys.stdout.write('{0.major}_{0.minor}'.format(sys.version_info))")
|
|
|
d3afbd |
|
|
|
d3afbd |
Name: imath
|
|
|
d3afbd |
Version: 3.1.2
|
|
|
d3afbd |
Release: 1%{?dist}
|
|
|
d3afbd |
Summary: Library of 2D and 3D vector, matrix, and math operations for computer graphics
|
|
|
d3afbd |
|
|
|
d3afbd |
License: BSD
|
|
|
d3afbd |
URL: https://github.com/AcademySoftwareFoundation/Imath
|
|
|
d3afbd |
Source0: https://github.com/AcademySoftwareFoundation/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
|
|
|
d3afbd |
Patch1: imath-python-test.patch
|
|
|
d3afbd |
|
|
|
d3afbd |
BuildRequires: cmake
|
|
|
d3afbd |
BuildRequires: gcc gcc-c++
|
|
|
d3afbd |
BuildRequires: make
|
|
|
d3afbd |
BuildRequires: boost-devel
|
|
|
d3afbd |
BuildRequires: python3-devel
|
|
|
d3afbd |
# For documentation generation
|
|
|
d3afbd |
BuildRequires: doxygen
|
|
|
d3afbd |
BuildRequires: python3-sphinx
|
|
|
d3afbd |
BuildRequires: python3-breathe
|
|
|
d3afbd |
|
|
|
d3afbd |
%description
|
|
|
d3afbd |
Imath is a basic, light-weight, and efficient C++ representation of 2D and 3D
|
|
|
d3afbd |
vectors and matrices and other simple but useful mathematical objects,
|
|
|
d3afbd |
functions, and data types common in computer graphics applications, including
|
|
|
d3afbd |
the “half” 16-bit floating-point type.
|
|
|
d3afbd |
|
|
|
d3afbd |
|
|
|
d3afbd |
%package -n python3-%{name}
|
|
|
d3afbd |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
d3afbd |
Summary: Python module for Imath
|
|
|
d3afbd |
|
|
|
d3afbd |
%description -n python3-%{name}
|
|
|
d3afbd |
%{summary}.
|
|
|
d3afbd |
|
|
|
d3afbd |
|
|
|
d3afbd |
%package devel
|
|
|
d3afbd |
Summary: Development files for Imath
|
|
|
d3afbd |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
d3afbd |
Requires: python3-%{name}%{?_isa} = %{version}-%{release}
|
|
|
d3afbd |
Requires: boost-devel
|
|
|
d3afbd |
Requires: python3-devel
|
|
|
d3afbd |
|
|
|
d3afbd |
%description devel
|
|
|
d3afbd |
%{summary}.
|
|
|
d3afbd |
|
|
|
d3afbd |
|
|
|
d3afbd |
%prep
|
|
|
d3afbd |
%autosetup -n %{srcname}-%{version} -p1
|
|
|
d3afbd |
|
|
|
d3afbd |
|
|
|
d3afbd |
%build
|
|
|
d3afbd |
%cmake -DPYTHON=ON -DCMAKE_INSTALL_PREFIX=%{_usr}
|
|
|
d3afbd |
%cmake_build
|
|
|
d3afbd |
|
|
|
d3afbd |
# Generate man docs
|
|
|
d3afbd |
cd docs
|
|
|
d3afbd |
doxygen
|
|
|
d3afbd |
cd ..
|
|
|
d3afbd |
PYTHONPATH=${PWD} sphinx-build-3 docs/ html
|
|
|
d3afbd |
# Remove the sphinx-build leftovers
|
|
|
d3afbd |
rm -rf html/.{doctrees,buildinfo}
|
|
|
d3afbd |
|
|
|
d3afbd |
|
|
|
d3afbd |
%install
|
|
|
d3afbd |
DESTDIR=%{buildroot} %cmake_install
|
|
|
d3afbd |
|
|
|
d3afbd |
|
|
|
d3afbd |
%check
|
|
|
d3afbd |
# https://github.com/AcademySoftwareFoundation/Imath/issues/151
|
|
|
d3afbd |
%ifnarch i686
|
|
|
d3afbd |
%ctest
|
|
|
d3afbd |
%endif
|
|
|
d3afbd |
|
|
|
d3afbd |
|
|
|
d3afbd |
%files
|
|
|
d3afbd |
%license LICENSE.md
|
|
|
d3afbd |
%doc CHANGES.md CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTORS.md README.md SECURITY.md
|
|
|
d3afbd |
%{_libdir}/libImath-3_1.so.%{sover}*
|
|
|
d3afbd |
|
|
|
d3afbd |
%files -n python3-%{name}
|
|
|
d3afbd |
%{_libdir}/libPyImath_Python%{pyver_under}-3_1.so.%{sover}*
|
|
|
d3afbd |
%{python3_sitearch}/imath.so
|
|
|
d3afbd |
%{python3_sitearch}/imathnumpy.so
|
|
|
d3afbd |
|
|
|
d3afbd |
%files devel
|
|
|
d3afbd |
%doc html/
|
|
|
d3afbd |
%{_includedir}/Imath/
|
|
|
d3afbd |
%{_libdir}/pkgconfig/Imath.pc
|
|
|
d3afbd |
%{_libdir}/pkgconfig/PyImath.pc
|
|
|
d3afbd |
%{_libdir}/cmake/Imath/
|
|
|
d3afbd |
%{_libdir}/libImath.so
|
|
|
d3afbd |
%{_libdir}/libImath-3_1.so
|
|
|
d3afbd |
%{_libdir}/libPyImath_Python%{pyver_under}-3_1.so
|
|
|
d3afbd |
|
|
|
d3afbd |
|
|
|
d3afbd |
%changelog
|
|
|
d3afbd |
* Thu Aug 05 2021 Josef Ridky <jridky@redhat.com> - 3.1.2-1
|
|
|
d3afbd |
- New upstream release 3.1.2
|
|
|
d3afbd |
|
|
|
d3afbd |
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.0.2-4
|
|
|
d3afbd |
- Rebuilt for Python 3.10
|
|
|
d3afbd |
|
|
|
d3afbd |
* Thu May 27 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.2-3
|
|
|
d3afbd |
- Add main package as dependency to python package.
|
|
|
d3afbd |
|
|
|
d3afbd |
* Tue May 25 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.2-2
|
|
|
d3afbd |
- Update spec per reviewer comments.
|
|
|
d3afbd |
|
|
|
d3afbd |
* Thu May 20 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.2-1
|
|
|
d3afbd |
- Update to 3.0.2.
|
|
|
d3afbd |
|
|
|
d3afbd |
* Wed Apr 07 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.1-1
|
|
|
d3afbd |
- Initial packaging.
|