%global forgeurl https://github.com/dreamworksanimation %global cmodver 1.0.0.5 %global reponame hdMoonray # Core Dump Fix %global optflags %(echo '%optflags' | sed s/-Wp,-D_GLIBCXX_ASSERTIONS//) %bcond tests 1 Name: usd-hdMoonray Version: 5.36.0.0 Release: %autorelease Summary: Moonray Hydra plugin License: Apache-2.0 URL: https://openmoonray.org/ Source0: %{forgeurl}/%{reponame}/archive/refs/tags/%{reponame}-%{version}.tar.gz Source1: %{forgeurl}/cmake_modules/archive/refs/tags/cmake_modules-%{cmodver}.tar.gz Patch0: %{name}-tbb.patch Patch1: %{name}-usd-monolithic.patch Patch2: %{name}-usd2311-hdinstancertokens.patch BuildRequires: cmake >= 3.23.1 BuildRequires: gcc-c++ BuildRequires: pkgconfig(libjpeg) Requires: usd BuildRequires: usd-devel # Needed by USD BuildRequires: tbb-devel BuildRequires: cmake(Alembic) BuildRequires: hdf5-devel BuildRequires: draco-devel BuildRequires: openshadinglanguage BuildRequires: pkgconfig(oslexec) BuildRequires: cmake(OpenImageIO) BuildRequires: libX11-devel BuildRequires: libglvnd-devel BuildRequires: opensubdiv-devel BuildRequires: openvdb-devel BuildRequires: pkgconfig(ptex) BuildRequires: cmake(OpenColorIO) BuildRequires: embree-devel BuildRequires: double-conversion-devel BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(libavif) Requires: Moonray = 16.36.0.0 Requires: Moonshine = 13.36.0.0 Requires: McrtComputation = 14.36.0.0 Requires: ArrasCore = 4.10.3.10 Requires: McrtMessages = 13.6.0.0 Requires: McrtDataio = 14.22.0.0 Provides: HdMoonray = %{version} %description Communication protocol for Arras and MoonRay %package devel Summary: Development files for %{name} Requires: HdMoonray%{?_isa} = %{version}-%{release} BuildRequires: cmake(Moonray) = 16.36.0.0 BuildRequires: cmake(Moonshine) = 13.36.0.0 BuildRequires: cmake(McrtComputation) = 14.36.0.0 BuildRequires: cmake(ArrasCore) = 4.10.3.10 BuildRequires: cmake(McrtMessages) = 13.6.0.0 BuildRequires: cmake(McrtDataio) = 14.22.0.0 %description devel The %{name}-devel package contains libraries and header files of %{name}, required to build other parts of OpenMoonRay. %package tests Summary: Test files for %{reponame} Requires: %{name}%{?_isa} = %{version}-%{release} %description tests USD files to test Moonray. %prep %autosetup -p1 -n %{reponame}-%{reponame}-%{version} mkdir -p cmake_modules tar -xzf %{SOURCE1} --strip-components=1 -C $_ # Include minor releases sed -i "14s|'[^']*'|'%{version}'|" \ package.py # Not necessary unless building for Houdini sed -i '9d' plugin/CMakeLists.txt sed -i 's|DESTINATION .|DESTINATION ${CMAKE_INSTALL_LIBDIR}/openmoonray|g' \ sessions/CMakeLists.txt sed -i \ -e 's|DESTINATION plugin|DESTINATION %{_libdir}/usd/plugin|g' \ -e 's|pxr/${component}|${component}/resources|g' \ plugin/{adapters,hd_moonray,hd_moonray_debug}/CMakeLists.txt %build CMAKE_MODULES_ROOT=%{_builddir}/%{buildsubdir}/cmake_modules \ ARRAS_SESSION_PATH=%{_libdir}/openmoonray/sessions \ %cmake \ -DCMAKE_MODULE_PATH=${CMAKE_MODULES_ROOT}/cmake \ -DBUILD_TESTING=%{expr:%{with tests}?"ON":"OFF"} \ -DMOONRAY_USE_OPTIX=OFF \ -DCMAKE_POLICY_DEFAULT_CMP0012=NEW \ -DCMAKE_EXE_LINKER_FLAGS:STRING='-Wl,-O1,--sort-common,-z,relro,-z,now' %cmake_build %install %cmake_install rm -rf %{buildroot}/usr/plugin mkdir -p %{buildroot}%{_datadir}/openmoonray mv %{buildroot}/usr/testSuite $_/ %files %license LICENSE %{_bindir}/hd_render %{_bindir}/hd_usd2rdl %{_bindir}/usd_mipmap_images %{_libdir}/libhydramoonray.so %{_libdir}/openmoonray/sessions/hd_{multi,single}.sessiondef %{_libdir}/openmoonray/sessions/dwa/hd_{multi,single}.sessiondef %{_libdir}/usd/plugin/hd_{moonray,moonray_debug}/resources/plugInfo.json %{_libdir}/usd/plugin/hdMoonrayAdapters/resources/plugInfo.json %{_libdir}/usd/plugin/hd_{moonray,moonray_debug}.so %{_libdir}/usd/plugin/hdMoonrayAdapters.so %files devel %{_includedir}/hdMoonray %{_libdir}/cmake/HdMoonray-%{version} %files tests %{_datadir}/openmoonray/testSuite %changelog %autochangelog