diff --git a/usd.spec b/usd.spec index 7e6a0f7..6f37d4d 100644 --- a/usd.spec +++ b/usd.spec @@ -35,8 +35,10 @@ Version: 23.08 Release: %autorelease Summary: 3D VFX pipeline interchange file format -# The entire source is Apache-2.0 except: +# The entire source is Pixar except: # +# Apache-2.0: +# - pxr/imaging/hgiVulkan/spirv_reflect.{cpp,h} # BSD-3-Clause: # - pxr/base/gf/ilmbase_* # - pxr/base/js/rapidjson/msinttypes/ @@ -57,14 +59,32 @@ Summary: 3D VFX pipeline interchange file format # - third_party/renderman-24/plugin/rmanArgsParser/pugixml/ # MIT OR Unlicense: # - pxr/imaging/hio/stb/ -# Apache-2.0 AND GPL-3.0-or-later WITH Bison-exception-2.2: +# Pixar AND GPL-3.0-or-later WITH Bison-exception-2.2: # - pxr/usd/sdf/path.tab.{cpp,h} # - pxr/usd/sdf/textFileFormat.tab.{cpp,h} # - third_party/renderman-24/plugin/hdPrman/virtualStructConditionalGrammar.tab.{cpp,h} # +# Additionally, the following would be listed above but are removed in %%prep: +# +# Apache-2.0: +# - pxr/usdImaging/usdviewq/fonts/Roboto_Mono/ +# - pxr/usdImaging/usdviewq/fonts/Roboto/ +# MIT: +# - docs/doxygen/doxygen-awesome-css/ (except doxygen-awesome-darkmode-toggle.js) +# MIT AND Apache-2.0: +# - docs/doxygen/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js +# # (Certain build system files are also under licenses other than Apache-2.0, but # do not contribute their license terms to the built RPMs.) -License: Apache-2.0 AND BSD-3-Clause AND BSD-2-Clause AND MIT AND (MIT OR Unlicense) AND (Apache-2.0 AND GPL-3.0-or-later WITH Bison-exception-2.2) +License: %{shrink: + Pixar AND + Apache-2.0 AND + BSD-3-Clause AND + BSD-2-Clause AND + MIT AND + (MIT OR Unlicense) AND + (Pixar AND GPL-3.0-or-later WITH Bison-exception-2.2) + } URL: http://www.openusd.org/ %global forgeurl https://github.com/PixarAnimationStudios/OpenUSD Source0: %{forgeurl}/archive/v%{version}/OpenUSD-%{version}.tar.gz @@ -161,7 +181,7 @@ BuildRequires: openvdb-devel %endif %if %{with ptex} -BuildRequires: pkgconfig(Ptex) +BuildRequires: pkgconfig(ptex) %endif @@ -319,10 +339,10 @@ ln -s %{_datadir}/fonts/google-roboto-mono \ # Unbundle stb_image, stb_image_write, stb_image_resize: pushd pxr/imaging/hio/stb -cp -p %{_includedir}/stb_image.h . +cp -p %{_usr}/include/stb_image.h . patch -p1 < '%{SOURCE2}' -ln -svf %{_includedir}/stb_image_resize.h \ - %{_includedir}/stb_image_write.h ./ +ln -svf %{_usr}/include/stb_image_resize.h \ + %{_usr}/include/stb_image_write.h ./ popd # Remove bundled doxygen-awesome-css (CSS and JS files) since we are not @@ -334,16 +354,24 @@ sed -i 's|set(CMAKE_CXX_STANDARD 14)|set(CMAKE_CXX_STANDARD 17)|g' \ cmake/defaults/CXXDefaults.cmake # Fix libdir installation -sed -i 's|lib/usd|%{_libdir}/usd|g' cmake/macros/Private.cmake -sed -i 's|"lib"|%{_libdir}|g' cmake/macros/Private.cmake +sed -i 's|lib/usd|%{_libdir}/usd|g' \ + cmake/macros/{Private,Public}.cmake sed -i 's|plugin/usd|%{_libdir}/usd/plugin|g' \ - cmake/macros/Private.cmake + cmake/macros/{Private,Public}.cmake +sed -i 's|"lib"|%{_libdir}|g' \ + cmake/macros/{Private,Public}.cmake sed -i 's|/python|/python%{python3_version}/site-packages|g' \ - cmake/macros/Private.cmake -sed -i 's|lib/usd|%{_libdir}/usd|g' cmake/macros/Public.cmake -sed -i 's|"lib"|%{_libdir}|g' cmake/macros/Public.cmake -sed -i 's|plugin/usd|%{_libdir}/usd/plugin|g' \ - cmake/macros/Public.cmake + cmake/macros/{Private,Public}.cmake pxr/usdImaging/usdviewq/CMakeLists.txt +sed -i 's|/pxrConfig.cmake|%{_libdir}/cmake/pxr/pxrConfig.cmake|g' \ + pxr/CMakeLists.txt +sed -i 's|"cmake"|"%{_libdir}/cmake/pxr"|g' \ + pxr/CMakeLists.txt +sed -i 's|${PXR_CMAKE_DIR}/cmake|${PXR_CMAKE_DIR}|g' \ + pxr/pxrConfig.cmake.in +sed -i 's|${PXR_CMAKE_DIR}/include|/usr/include|g' \ + pxr/pxrConfig.cmake.in +sed -i 's|EXACT COMPONENTS|COMPONENTS|g' \ + pxr/pxrConfig.cmake.in # Fix cmake directory destination sed -i 's|"${CMAKE_INSTALL_PREFIX}"|%{_libdir}/cmake/pxr|g' pxr/CMakeLists.txt @@ -440,20 +468,6 @@ desktop-file-install \ # -DPXR_BUILD_EXAMPLES=OFF. rm -vrf '%{buildroot}%{_datadir}/usd/examples' -# Fix installation path for some files -mv %{buildroot}%{_prefix}/lib/python/pxr/*.* \ - %{buildroot}%{python3_sitearch}/pxr/ -%if %{with usdview} -mv %{buildroot}%{_prefix}/lib/python/pxr/Usdviewq/* \ - %{buildroot}%{python3_sitearch}/pxr/Usdviewq/ -%endif - -# TODO: Can we figure out how to fix the installation path for -# pxrTargets{,-release}.cmake, instead of moving them after the fact? We choose -# to put them in the same directory as pxrConfig.cmake. -find %{buildroot}%{_prefix}/cmake -mindepth 1 -maxdepth 1 -type f \ - -exec mv -v '{}' '%{buildroot}%{_libdir}/cmake/pxr' ';' - # Generate and install man pages. While generating the man pages might more # properly go in %%build, it is generally much easier to do this here in a # single step, using the entry points installed into the buildroot. This is