%global forgeurl https://github.com/dreamworksanimation %global cmodver 1.0.0.5 %global commit d359fcfff3d2101e4d592400d0deba9e229d5d87 %bcond tests 1 Name: moonray_sdr_plugins Version: 5.36.0.0 Release: 1%{?dist} Summary: Support for using MoonRay shaders with Hydra License: Apache-2.0 URL: https://openmoonray.org/ Source0: %{forgeurl}/%{name}/archive/%{commit}.tar.gz Source1: %{forgeurl}/cmake_modules/archive/refs/tags/cmake_modules-%{cmodver}.tar.gz Patch0: %{name}-usd-monolithic.patch Patch1: %{name}-env.patch BuildRequires: cmake >= 3.23.1 BuildRequires: gcc-c++ BuildRequires: boost-devel Requires: usd BuildRequires: usd-devel BuildRequires: imath-devel BuildRequires: python3-devel Provides: MoonraySdrPlugins = %{version} %description These plugins add descriptions of the moonray shader DSOs to the Pixar shader registry (Sdr), which is required to use them as shader nodes in USD/Hydra. %prep %autosetup -p1 -n %{name}-%{commit} %setup -q -T -D -a 1 -n %{name}-%{commit} mv cmake_modules-cmake_modules-%{cmodver} cmake_modules sed -i 's|plugin/usd|%{_libdir}/usd/plugin|g' \ {moonrayShaderDiscovery,moonrayShaderParser}/CMakeLists.txt sed -i '71s/$/\/resources/' \ {moonrayShaderDiscovery,moonrayShaderParser}/CMakeLists.txt sed -i 's|DESTINATION plugin|DESTINATION %{_libdir}/usd/plugin|g' \ {moonrayShaderDiscovery,moonrayShaderParser}/CMakeLists.txt %build ARRAS_SESSION_PATH=%{_libdir}/openmoonray/sessions \ %cmake \ -DCMAKE_MODULE_PATH=%{_builddir}/%{buildsubdir}/cmake_modules/cmake \ -DBUILD_TESTING=%{expr:%{with tests}?"ON":"OFF"} \ -DPython3_INCLUDE_DIR=%{_includedir}/python%{python3_version} \ -DMOONRAY_USE_OPTIX=OFF %cmake_build %install %cmake_install %files %license LICENSE %{_libdir}/usd/plugin/moonrayShaderDiscovery %{_libdir}/usd/plugin/moonrayShaderParser %{_libdir}/usd/plugin/moonrayShaderDiscovery.so %{_libdir}/usd/plugin/moonrayShaderParser.so %changelog %autochangelog