From 605cb7cf3e85734846c07930cf5e484eb29c5804 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 1/6] 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 6420180..be7b44e 100644 --- a/usd.spec +++ b/usd.spec @@ -358,16 +358,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 @@ -464,20 +472,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 66f1af1ec47baa084be81174bdfcea663849dcf4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 24 Jun 2024 15:17:42 -0400 Subject: [PATCH 2/6] 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 be7b44e..9dc3bbd 100644 --- a/usd.spec +++ b/usd.spec @@ -185,7 +185,7 @@ BuildRequires: openvdb-devel %endif %if %{with ptex} -BuildRequires: pkgconfig(Ptex) +BuildRequires: pkgconfig(ptex) %endif From a74324986732d2840fd391c07cb7831e3d945505 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 30 Jul 2024 13:01:12 -0400 Subject: [PATCH 3/6] Update the reason for keeping usdview disabled - Without the right UI compiler, it is still broken on PySide6 --- usd.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usd.spec b/usd.spec index 9dc3bbd..b94ed7d 100644 --- a/usd.spec +++ b/usd.spec @@ -19,11 +19,11 @@ %bcond ocio 1 %bcond oiio 1 %bcond ptex 1 -# Not yet packaged +# In order to re-enable usdview with PySide6, we would need to re-generate the +# Python code from .ui files using pyside6-uic, which is not packaged +# (https://bugzilla.redhat.com/show_bug.cgi?id=2301717). This would require +# updating or replacing our uic-wrapper script (see the end of %%prep). %bcond pyside6 0 -# F39FailsToInstall: python3-pyside2, python3-shiboken2, -# python3-shiboken2-devel -# https://bugzilla.redhat.com/show_bug.cgi?id=2220452 %bcond usdview 0 # TODO: Figure out how to re-enable the tests. Currently these want to install # into /usr/tests and, and there are issues with the launchers finding the From b38057185ffa1a7938cf5e88293755f065a5a3e8 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 30 Jul 2024 13:02:00 -0400 Subject: [PATCH 4/6] Remove the pyside6 build conditional PySide2 is not coming back. --- usd.spec | 9 --------- 1 file changed, 9 deletions(-) diff --git a/usd.spec b/usd.spec index b94ed7d..0c66d7d 100644 --- a/usd.spec +++ b/usd.spec @@ -23,7 +23,6 @@ # Python code from .ui files using pyside6-uic, which is not packaged # (https://bugzilla.redhat.com/show_bug.cgi?id=2301717). This would require # updating or replacing our uic-wrapper script (see the end of %%prep). -%bcond pyside6 0 %bcond usdview 0 # TODO: Figure out how to re-enable the tests. Currently these want to install # into /usr/tests and, and there are issues with the launchers finding the @@ -292,11 +291,7 @@ BuildRequires: pkgconfig(Qt5) BuildRequires: python3dist(jinja2) %if %{with usdview} BuildRequires: desktop-file-utils -%if %{with pyside6} BuildRequires: python3dist(pyside6) -%else -BuildRequires: python3dist(pyside2) -%endif %endif BuildRequires: python3dist(pyopengl) Requires: font(roboto) @@ -305,11 +300,7 @@ Requires: font(robotolight) Requires: font(robotomono) Requires: python3dist(jinja2) %if %{with usdview} -%if %{with pyside6} Requires: python3dist(pyside6) -%else -Requires: python3dist(pyside2) -%endif %endif Requires: python3dist(pyopengl) From 0865cc4bfd1380fd96879909e8cd0928afa84c83 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 31 Jul 2024 18:16:04 -0400 Subject: [PATCH 5/6] Re-enable usdview with PySide6 (and pyside6-uic) --- usd.spec | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/usd.spec b/usd.spec index 0c66d7d..18ad7a3 100644 --- a/usd.spec +++ b/usd.spec @@ -19,11 +19,7 @@ %bcond ocio 1 %bcond oiio 1 %bcond ptex 1 -# In order to re-enable usdview with PySide6, we would need to re-generate the -# Python code from .ui files using pyside6-uic, which is not packaged -# (https://bugzilla.redhat.com/show_bug.cgi?id=2301717). This would require -# updating or replacing our uic-wrapper script (see the end of %%prep). -%bcond usdview 0 +%bcond usdview 1 # TODO: Figure out how to re-enable the tests. Currently these want to install # into /usr/tests and, and there are issues with the launchers finding the # command-line tools in the buildroot. @@ -287,11 +283,11 @@ you will need to install usd-devel. Summary: %{summary} BuildRequires: pkgconfig(python3) -BuildRequires: pkgconfig(Qt5) BuildRequires: python3dist(jinja2) %if %{with usdview} BuildRequires: desktop-file-utils BuildRequires: python3dist(pyside6) +BuildRequires: pyside6-tools %endif BuildRequires: python3dist(pyopengl) Requires: font(roboto) @@ -376,13 +372,6 @@ sed -i 's|"${CMAKE_INSTALL_PREFIX}"|%{_libdir}/cmake/pxr|g' pxr/CMakeLists.txt find . -type f -exec gawk '/embree3/ { print FILENAME }' '{}' '+' | xargs -r sed -r -i 's/(embree)3/\14/' -# Fix uic-qt5 use -cat > uic-wrapper <<'EOF' -#!/bin/sh -exec uic-qt5 -g python "$@" -EOF -chmod +x uic-wrapper - %build # The necessary include path for Imath is not set everywhere it’s needed. It’s @@ -440,7 +429,7 @@ extra_flags="${extra_flags-} -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1" \ -DPXR_VALIDATE_GENERATED_CODE=OFF \ \ - -DPYSIDEUICBINARY:PATH=${PWD}/uic-wrapper \ + -DPYSIDEUICBINARY:PATH=pyside6-uic \ -DPYSIDE_AVAILABLE=ON \ -DPYTHON_EXECUTABLE=%{python3} %cmake_build From f8a6a3caf5ba581213e5b1c515f2fe0280236026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Cabello?= Date: Sun, 8 Dec 2024 19:52:02 +0000 Subject: [PATCH 6/6] Correct dekstop file comment Change org.openusd.usdview.desktop comment since usdview does not open cbr/cbz files. --- org.openusd.usdview.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.openusd.usdview.desktop b/org.openusd.usdview.desktop index 71aa0d2..4be9905 100644 --- a/org.openusd.usdview.desktop +++ b/org.openusd.usdview.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Name=USD view GenericName=Universal Scene Description Viewer -Comment=Open .cbr & .cbz files +Comment=Visualize USD files Exec=usdview Icon=applications-graphics Terminal=false