imath-vl.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. %bcond_with python3
  2. %bcond_with doc
  3. %global srcname Imath
  4. %global sover 29
  5. %global pyver_under %(%{python3} -Esc "import sys; sys.stdout.write('{0.major}_{0.minor}'.format(sys.version_info))")
  6. Name: imath
  7. Summary: Library of 2D and 3D vector, matrix, and math operations for computer graphics
  8. Version: 3.1.4
  9. Release: 1%{?_dist_release}
  10. Group: system
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. License: BSD
  14. URL: https://github.com/AcademySoftwareFoundation/Imath
  15. Source0: https://github.com/AcademySoftwareFoundation/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
  16. Patch0: imath-python-test.patch
  17. BuildRequires: cmake
  18. BuildRequires: gcc gcc-c++
  19. BuildRequires: make
  20. BuildRequires: libboost-devel
  21. %if %{with python3}
  22. BuildRequires: libboost-python3-devel
  23. BuildRequires: python3-devel
  24. BuildRequires: python3-rpm-macros
  25. BuildRequires: python3-numpy
  26. %endif
  27. %if %{with doc}
  28. # For documentation generation
  29. BuildRequires: doxygen
  30. BuildRequires: python3-sphinx
  31. BuildRequires: python3-breathe
  32. %endif
  33. %description
  34. Imath is a basic, light-weight, and efficient C++ representation of 2D and 3D
  35. vectors and matrices and other simple but useful mathematical objects,
  36. functions, and data types common in computer graphics applications, including
  37. the “half” 16-bit floating-point type.
  38. %if %{with python3}
  39. %package -n python3-%{name}
  40. Summary: Python module for Imath
  41. Group: programming
  42. Requires: %{name}%{?_isa} = %{version}-%{release}
  43. %description -n python3-%{name}
  44. %{summary}.
  45. %endif
  46. %package devel
  47. Summary: Development files for Imath
  48. Group: programming
  49. Requires: %{name}%{?_isa} = %{version}-%{release}
  50. Requires: libboost-devel
  51. %if %{with python3}
  52. Requires: libboost-python3-devel
  53. Requires: python3-%{name}%{?_isa} = %{version}-%{release}
  54. Requires: python3-devel
  55. %endif
  56. %description devel
  57. %{summary}.
  58. %debug_package
  59. %prep
  60. %autosetup -n %{srcname}-%{version} -p1
  61. %build
  62. %cmake \
  63. -DCMAKE_INSTALL_PREFIX=%{_usr} \
  64. %if %{with python3}
  65. -DPYTHON=ON \
  66. %endif
  67. %{nil}
  68. %cmake_build
  69. %if %{with doc}
  70. # Generate man docs
  71. cd docs
  72. # https://github.com/AcademySoftwareFoundation/Imath/issues/196#issuecomment-896433898
  73. rm classes/half.rst
  74. doxygen
  75. cd ..
  76. PYTHONPATH=${PWD} sphinx-build-3 docs/ html
  77. # Remove the sphinx-build leftovers
  78. rm -rf html/.{doctrees,buildinfo}
  79. %endif
  80. %install
  81. %cmake_install
  82. %check
  83. # https://github.com/AcademySoftwareFoundation/Imath/issues/151
  84. %ifnarch i686
  85. %ctest
  86. %endif
  87. %files
  88. %license LICENSE.md
  89. %doc CHANGES.md CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTORS.md README.md SECURITY.md
  90. %{_libdir}/libImath-3_1.so.%{sover}*
  91. %if %{with python3}
  92. %files -n python3-%{name}
  93. %{_libdir}/libPyImath_Python%{pyver_under}-3_1.so.%{sover}*
  94. %{python3_sitearch}/imath.so
  95. %{python3_sitearch}/imathnumpy.so
  96. %endif
  97. %files devel
  98. %if %{with doc}
  99. %doc html/
  100. %endif
  101. %{_includedir}/Imath/
  102. %{_libdir}/pkgconfig/Imath.pc
  103. %{_libdir}/cmake/Imath/
  104. %{_libdir}/libImath.so
  105. %{_libdir}/libImath-3_1.so
  106. %if %{with python3}
  107. %{_libdir}/pkgconfig/PyImath.pc
  108. %{_libdir}/libPyImath_Python%{pyver_under}-3_1.so
  109. %endif
  110. %changelog
  111. * Thu Jan 27 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.4-1
  112. - new upstream release.
  113. * Thu Jan 13 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.3-1
  114. - new upstream release.
  115. * Wed Sep 01 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.2-1
  116. - initial build for Vine Linux.
  117. * Wed Aug 11 2021 Josef Ridky <jridky@redhat.com> - 3.1.2-1
  118. - New upstream release 3.1.2
  119. * Fri Aug 06 2021 Jonathan Wakely <jwakely@redhat.com> - 3.0.2-6
  120. - Rebuilt for Boost 1.76
  121. * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-5
  122. - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
  123. * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.0.2-4
  124. - Rebuilt for Python 3.10
  125. * Thu May 27 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.2-3
  126. - Add main package as dependency to python package.
  127. * Tue May 25 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.2-2
  128. - Update spec per reviewer comments.
  129. * Thu May 20 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.2-1
  130. - Update to 3.0.2.
  131. * Wed Apr 07 2021 Richard Shaw <hobbes1069@gmail.com> - 3.0.1-1
  132. - Initial packaging.