%bcond_without python # most of the tests failed, disabled for now # https://koji.fedoraproject.org/koji/taskinfo?taskID=100720047 %bcond_with check Name: f3d Version: 2.0.0 Release: %autorelease Summary: Fast and minimalist 3D viewer License: GPL-3.0-only URL: https://github.com/f3d-app/f3d Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Patch0: f3d-fix-cmake-config.patch # build error on i386 # https://src.fedoraproject.org/rpms/assimp/pull-request/6 # https://bugzilla.redhat.com/show_bug.cgi?id=1943862#c6 ExcludeArch: i386 BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: vtk-devel BuildRequires: lapack-devel # generate manpage BuildRequires: help2man BuildRequires: chrpath # optional dependencies BuildRequires: assimp-devel BuildRequires: draco-devel BuildRequires: alembic-devel BuildRequires: opencascade-devel BuildRequires: imath-devel %description F3D (pronounced `/fɛd/`) is a fast and minimalist 3D viewer. It supports many file formats, from digital content to scientific datasets (including glTF, STL, STEP, PLY, OBJ, FBX, Alembic), can show animations and support thumbnails and many rendering and texturing options including real time physically based rendering and raytracing. It is fully controllable from the command line and support configuration files. It can provide thumbnails, support interactive hotkeys, drag&drop and integration into file managers. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %if %{with python} %package python3-%{name} Summary: Python 3 bindings for the %{name} BuildRequires: python3-devel BuildRequires: python3-pybind11 Requires: %{name}%{?_isa} = %{version}-%{release} Provides: %{name}-python3 = %{version}-%{release} %description python3-%{name} The python3-%{name} package contains Python bindings for %{name}. %endif %prep %autosetup -p1 %build %cmake \ -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DF3D_LINUX_INSTALL_DEFAULT_CONFIGURATION_FILE_IN_PREFIX=ON \ -DF3D_LINUX_GENERATE_MAN=ON \ -DF3D_MODULE_RAYTRACING=OFF \ -DF3D_MODULE_EXTERNAL_RENDERING=OFF \ -DF3D_PLUGINS_STATIC_BUILD=OFF \ -DF3D_PLUGIN_BUILD_ALEMBIC=ON \ -DF3D_PLUGIN_BUILD_ASSIMP=ON \ -DF3D_PLUGIN_BUILD_DRACO=OFF \ -DF3D_PLUGIN_BUILD_EXODUS=ON \ -DF3D_PLUGIN_BUILD_OCCT=ON \ %if %{with python} -DF3D_BINDINGS_PYTHON=ON \ %endif %if %{with check} -DBUILD_TESTING=ON \ %endif %cmake_build %install %cmake_install %cmake_install --component mimetypes %cmake_install --component sdk %cmake_install --component configuration rm -r %{buildroot}%{_datadir}/doc/F3D rm %{buildroot}%{_libdir}/libVTKExtensions*.a # Binaries are not allowed to contain rpaths chrpath --delete %{buildroot}%{_libdir}/libf3d.so chrpath --delete %{buildroot}%{_libdir}/libf3d-plugin-*.so chrpath --delete %{buildroot}%{python3_sitearch}/f3d.cpython-*.so %if %{with check} %check %ctest %endif %files %license LICENSE.md %doc README.md %{_bindir}/f3d %{bash_completions_dir}/f3d %{zsh_completions_dir}/_f3d %{fish_completions_dir}/f3d.fish %{_datadir}/icons/hicolor/*/apps/f3d.png %{_datadir}/icons/hicolor/scalable/apps/f3d.svg %{_datadir}/applications/f3d-plugin-*.desktop %{_datadir}/applications/f3d.desktop %{_datadir}/mime/packages/f3d-*.xml %{_datadir}/f3d/ %{_datadir}/thumbnailers/ %{_mandir}/man1/f3d.1.gz %{_metainfodir}/app.f3d.F3D.metainfo.xml %{_libdir}/libf3d.so %{_libdir}/libf3d-plugin-*.so %files devel %{_includedir}/f3d/ %{_libdir}/cmake/f3d/ %if %{with python} %files python3-%{name} %{python3_sitearch}/f3d.cpython-*.so %endif %changelog %autochangelog