From ce23f6752db32b3ef8fad8e33c470c217fe11bff Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 30 Oct 2023 07:24:43 -0400 Subject: [PATCH 1/5] Break a long line in the spec file [skip changelog] --- usd.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usd.spec b/usd.spec index 7e6a0f7..ebc0050 100644 --- a/usd.spec +++ b/usd.spec @@ -64,7 +64,14 @@ Summary: 3D VFX pipeline interchange file format # # (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: + 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) + } URL: http://www.openusd.org/ %global forgeurl https://github.com/PixarAnimationStudios/OpenUSD Source0: %{forgeurl}/archive/v%{version}/OpenUSD-%{version}.tar.gz From 35dc5bf303daa4b5a89786fef05cc174a754dc05 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 10 Nov 2023 07:51:48 -0500 Subject: [PATCH 2/5] =?UTF-8?q?Correct=20license=20to=20Pixar=20AND=20?= =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The “Modified Apache 2.0” license is not really Apache 2.0. https://gitlab.com/fedora/legal/fedora-license-data/-/issues/304 https://github.com/spdx/license-list-XML/issues/2225 https://github.com/spdx/license-list-XML/pull/2247 --- usd.spec | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/usd.spec b/usd.spec index ebc0050..fb07265 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,20 +59,31 @@ 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: %{shrink: + Pixar AND 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) + (Pixar AND GPL-3.0-or-later WITH Bison-exception-2.2) } URL: http://www.openusd.org/ %global forgeurl https://github.com/PixarAnimationStudios/OpenUSD From 02b31cbc50540ac6f2a916b58ff1414aa511de08 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 15 Mar 2024 17:47:48 -0400 Subject: [PATCH 3/5] Fix flatpak build stb_image is a header-only library, so it remains buildroot only even in flatpak builds of usd. There is no pkgconfig either, so the /usr prefix must be hardcoded. --- usd.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usd.spec b/usd.spec index fb07265..c14e5be 100644 --- a/usd.spec +++ b/usd.spec @@ -339,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 From e88a70dc83677fb033722d7de977e01ba8423d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Cabello?= Date: Thu, 16 May 2024 08:21:12 +0000 Subject: [PATCH 4/5] Update usd.spec Fixes installation path before building. Necessary to work with some USD related projects. --- usd.spec | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/usd.spec b/usd.spec index c14e5be..8d21103 100644 --- a/usd.spec +++ b/usd.spec @@ -354,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 @@ -460,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 From 979290ad58e9db2ef3d5de70d006776d40d85696 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 24 Jun 2024 15:17:42 -0400 Subject: [PATCH 5/5] Correct pkgconfig(Ptex) to pkgconfig(ptex) for ptex-2.4.3 --- usd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usd.spec b/usd.spec index 8d21103..6f37d4d 100644 --- a/usd.spec +++ b/usd.spec @@ -181,7 +181,7 @@ BuildRequires: openvdb-devel %endif %if %{with ptex} -BuildRequires: pkgconfig(Ptex) +BuildRequires: pkgconfig(ptex) %endif