%bcond_without openmpi %global ospray_cmake_options \\\ -DOSPRAY_ZIP_MODE=OFF \\\ -DOSPRAY_ENABLE_MODULES=ON \\\ -DOSPRAY_ENABLE_APPS_BENCHMARK=OFF \\\ -DOSPRAY_ENABLE_APPS_EXAMPLES=OFF \\\ -DOSPRAY_ENABLE_APPS_TESTING=OFF \\\ -DOSPRAY_ENABLE_APPS_TUTORIALS=OFF \\\ -DOSPRAY_ENABLE_VOLUMES=ON \\\ %ifarch x86_64 \ -DOSPRAY_MODULE_DENOISER=ON \\\ %else \ -DOSPRAY_MODULE_DENOISER=OFF \\\ %endif \ Name: ospray Version: 3.2.0 Release: %autorelease Summary: Ray tracing based rendering engine for high-fidelity visualization License: Apache-2.0 URL: https://www.ospray.org Source: https://github.com/RenderKit/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: cmake >= 3.1 BuildRequires: cmake(embree) BuildRequires: cmake(openvkl) BuildRequires: cmake(ispcrt) %ifarch x86_64 BuildRequires: cmake(OpenImageDenoise) %endif BuildRequires: cmake(rkcommon) BuildRequires: cmake(Snappy) BuildRequires: cmake(tbb) BuildRequires: gcc-c++ BuildRequires: glfw-devel BuildRequires: libglvnd-devel # Upstream supports only aarch64 and x86_64 CPU Architectures ExclusiveArch: aarch64 x86_64 %description Intel OSPRay is an open source, scalable, and portable ray tracing engine for high-performance, high-fidelity visualization on Intel CPUs, Intel Xe GPUs, and Aarch64/ARM64 CPUs. The purpose of OSPRay is to provide an open, powerful, and easy-to-use rendering library that allows one to easily build applications that use ray tracing based rendering for interactive applications (including both surface- and volume-based visualizations). OSPRay runs on anything from laptops, to workstations, to compute nodes in HPC systems. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for applications that use %{name}. %if %{with openmpi} %package openmpi Summary: %{name} OpenMPI BuildRequires: chrpath BuildRequires: openmpi-devel Requires: openmpi%{?_isa} %description openmpi %{name} OpenMPI version. %package openmpi-devel Summary: The OpenMPI %{name} headers and development-related files Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} Requires: openmpi-devel%{?_isa} %description openmpi-devel The %{name}-openmpi-devel package contains libraries and header files for applications that use %{name} OpenMPI. %endif %prep %setup -qc sed -i 's/1.14.0/1.14.2/g' %{name}-%{version}/cmake/ospray_options.cmake %if %{with openmpi} cp -a %{name}-%{version} %{name}-%{version}-openmpi %endif %build pushd %{name}-%{version} %cmake %{ospray_cmake_options} %cmake_build popd %if %{with openmpi} pushd %{name}-%{version}-openmpi %{_openmpi_load} # MPI vars export CC=mpicc export CXX=mpicxx %cmake \ %{ospray_cmake_options} -DCMAKE_INSTALL_BINDIR=${MPI_BIN} \ -DCMAKE_INSTALL_LIBDIR=${MPI_LIB} \ -DCMAKE_INSTALL_INCLUDEDIR=${MPI_INCLUDE} \ -DOSPRAY_MODULE_MPI=ON %cmake_build %{_openmpi_unload} popd %endif %install pushd %{name}-%{version} %cmake_install popd %if %{with openmpi} pushd %{name}-%{version}-openmpi %{_openmpi_load} %cmake_install %{_openmpi_unload} popd %endif # Remove docs rm %{buildroot}%{_docdir}/OSPRay-%{version}/* %if %{with openmpi} # Remove rpath chrpath --delete %{buildroot}%{_libdir}/openmpi/bin/ospray_mpi_worker chrpath --delete %{buildroot}%{_libdir}/openmpi/lib/lib%{name}.so.%{version} chrpath --delete %{buildroot}%{_libdir}/openmpi/lib/lib%{name}_module_cpu.so.%{version} %ifarch x86_64 chrpath --delete %{buildroot}%{_libdir}/openmpi/lib/lib%{name}_module_denoiser.so.%{version} %endif chrpath --delete %{buildroot}%{_libdir}/openmpi/lib/lib%{name}_mpi_common.so.%{version} chrpath --delete %{buildroot}%{_libdir}/openmpi/lib/lib%{name}_module_mpi_offload.so.%{version} chrpath --delete %{buildroot}%{_libdir}/openmpi/lib/lib%{name}_module_mpi_distributed_cpu.so.%{version} %endif %files %license %{name}-%{version}/LICENSE.txt %{name}-%{version}/third-party-programs*.txt %doc %{name}-%{version}/CHANGELOG.md %{name}-%{version}/README.md %{_libdir}/lib%{name}.so.3 %{_libdir}/lib%{name}.so.%{version} %{_libdir}/lib%{name}_module_cpu.so.3 %{_libdir}/lib%{name}_module_cpu.so.%{version} %ifarch x86_64 %{_libdir}/lib%{name}_module_denoiser.so.3 %{_libdir}/lib%{name}_module_denoiser.so.%{version} %endif %files devel %{_includedir}/%{name} %{_libdir}/lib%{name}.so %{_libdir}/cmake/%{name}-%{version} # MPI versions %if %{with openmpi} %files openmpi %license %{name}-%{version}/LICENSE.txt %{name}-%{version}/third-party-programs*.txt %doc %{name}-%{version}/CHANGELOG.md %{name}-%{version}/README.md %{_libdir}/openmpi/bin/%{name}_mpi_worker %{_libdir}/openmpi/lib/lib%{name}.so.3 %{_libdir}/openmpi/lib/lib%{name}.so.%{version} %{_libdir}/openmpi/lib/lib%{name}_mpi_common.so.3 %{_libdir}/openmpi/lib/lib%{name}_mpi_common.so.%{version} %{_libdir}/openmpi/lib/lib%{name}_module_cpu.so.3 %{_libdir}/openmpi/lib/lib%{name}_module_cpu.so.%{version} %ifarch x86_64 %{_libdir}/openmpi/lib/lib%{name}_module_denoiser.so.3 %{_libdir}/openmpi/lib/lib%{name}_module_denoiser.so.%{version} %endif %{_libdir}/openmpi/lib/lib%{name}_module_mpi_distributed_cpu.so.3 %{_libdir}/openmpi/lib/lib%{name}_module_mpi_distributed_cpu.so.%{version} %{_libdir}/openmpi/lib/lib%{name}_module_mpi_offload.so.3 %{_libdir}/openmpi/lib/lib%{name}_module_mpi_offload.so.%{version} %files openmpi-devel %{_includedir}/openmpi-%{_arch}/%{name}/ %{_libdir}/openmpi/lib/lib%{name}.so %{_libdir}/openmpi/lib/cmake/%{name}-%{version} %endif %changelog %autochangelog