Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Adrià Cabello
f8a6a3caf5 Correct dekstop file comment
Change org.openusd.usdview.desktop comment since usdview does not open cbr/cbz files.
2024-12-09 11:11:19 -05:00
Benjamin A. Beasley
0865cc4bfd Re-enable usdview with PySide6 (and pyside6-uic) 2024-08-02 21:03:52 -04:00
Benjamin A. Beasley
b38057185f Remove the pyside6 build conditional
PySide2 is not coming back.
2024-07-31 13:51:49 -04:00
Benjamin A. Beasley
a743249867 Update the reason for keeping usdview disabled
- Without the right UI compiler, it is still broken on PySide6
2024-07-31 13:51:36 -04:00
Benjamin A. Beasley
66f1af1ec4 Correct pkgconfig(Ptex) to pkgconfig(ptex) for ptex-2.4.3 2024-06-25 15:52:19 -04:00
Adrià Cabello
605cb7cf3e Update usd.spec
Fixes installation path before building. Necessary to work with some USD related projects.
2024-06-24 15:40:33 -04:00
2 changed files with 21 additions and 47 deletions

View file

@ -1,7 +1,7 @@
[Desktop Entry] [Desktop Entry]
Name=USD view Name=USD view
GenericName=Universal Scene Description Viewer GenericName=Universal Scene Description Viewer
Comment=Open .cbr & .cbz files Comment=Visualize USD files
Exec=usdview Exec=usdview
Icon=applications-graphics Icon=applications-graphics
Terminal=false Terminal=false

View file

@ -19,12 +19,7 @@
%bcond ocio 1 %bcond ocio 1
%bcond oiio 1 %bcond oiio 1
%bcond ptex 1 %bcond ptex 1
# Not yet packaged %bcond usdview 1
%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 # 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 # into /usr/tests and, and there are issues with the launchers finding the
# command-line tools in the buildroot. # command-line tools in the buildroot.
@ -185,7 +180,7 @@ BuildRequires: openvdb-devel
%endif %endif
%if %{with ptex} %if %{with ptex}
BuildRequires: pkgconfig(Ptex) BuildRequires: pkgconfig(ptex)
%endif %endif
@ -288,15 +283,11 @@ you will need to install usd-devel.
Summary: %{summary} Summary: %{summary}
BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(Qt5)
BuildRequires: python3dist(jinja2) BuildRequires: python3dist(jinja2)
%if %{with usdview} %if %{with usdview}
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
%if %{with pyside6}
BuildRequires: python3dist(pyside6) BuildRequires: python3dist(pyside6)
%else BuildRequires: pyside6-tools
BuildRequires: python3dist(pyside2)
%endif
%endif %endif
BuildRequires: python3dist(pyopengl) BuildRequires: python3dist(pyopengl)
Requires: font(roboto) Requires: font(roboto)
@ -305,11 +296,7 @@ Requires: font(robotolight)
Requires: font(robotomono) Requires: font(robotomono)
Requires: python3dist(jinja2) Requires: python3dist(jinja2)
%if %{with usdview} %if %{with usdview}
%if %{with pyside6}
Requires: python3dist(pyside6) Requires: python3dist(pyside6)
%else
Requires: python3dist(pyside2)
%endif
%endif %endif
Requires: python3dist(pyopengl) Requires: python3dist(pyopengl)
@ -358,16 +345,24 @@ sed -i 's|set(CMAKE_CXX_STANDARD 14)|set(CMAKE_CXX_STANDARD 17)|g' \
cmake/defaults/CXXDefaults.cmake cmake/defaults/CXXDefaults.cmake
# Fix libdir installation # Fix libdir installation
sed -i 's|lib/usd|%{_libdir}/usd|g' cmake/macros/Private.cmake sed -i 's|lib/usd|%{_libdir}/usd|g' \
sed -i 's|"lib"|%{_libdir}|g' cmake/macros/Private.cmake cmake/macros/{Private,Public}.cmake
sed -i 's|plugin/usd|%{_libdir}/usd/plugin|g' \ 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' \ sed -i 's|/python|/python%{python3_version}/site-packages|g' \
cmake/macros/Private.cmake cmake/macros/{Private,Public}.cmake pxr/usdImaging/usdviewq/CMakeLists.txt
sed -i 's|lib/usd|%{_libdir}/usd|g' cmake/macros/Public.cmake sed -i 's|/pxrConfig.cmake|%{_libdir}/cmake/pxr/pxrConfig.cmake|g' \
sed -i 's|"lib"|%{_libdir}|g' cmake/macros/Public.cmake pxr/CMakeLists.txt
sed -i 's|plugin/usd|%{_libdir}/usd/plugin|g' \ sed -i 's|"cmake"|"%{_libdir}/cmake/pxr"|g' \
cmake/macros/Public.cmake 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 # Fix cmake directory destination
sed -i 's|"${CMAKE_INSTALL_PREFIX}"|%{_libdir}/cmake/pxr|g' pxr/CMakeLists.txt sed -i 's|"${CMAKE_INSTALL_PREFIX}"|%{_libdir}/cmake/pxr|g' pxr/CMakeLists.txt
@ -377,13 +372,6 @@ sed -i 's|"${CMAKE_INSTALL_PREFIX}"|%{_libdir}/cmake/pxr|g' pxr/CMakeLists.txt
find . -type f -exec gawk '/embree3/ { print FILENAME }' '{}' '+' | find . -type f -exec gawk '/embree3/ { print FILENAME }' '{}' '+' |
xargs -r sed -r -i 's/(embree)3/\14/' 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 %build
# The necessary include path for Imath is not set everywhere its needed. Its # The necessary include path for Imath is not set everywhere its needed. Its
@ -441,7 +429,7 @@ extra_flags="${extra_flags-} -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1"
\ \
-DPXR_VALIDATE_GENERATED_CODE=OFF \ -DPXR_VALIDATE_GENERATED_CODE=OFF \
\ \
-DPYSIDEUICBINARY:PATH=${PWD}/uic-wrapper \ -DPYSIDEUICBINARY:PATH=pyside6-uic \
-DPYSIDE_AVAILABLE=ON \ -DPYSIDE_AVAILABLE=ON \
-DPYTHON_EXECUTABLE=%{python3} -DPYTHON_EXECUTABLE=%{python3}
%cmake_build %cmake_build
@ -464,20 +452,6 @@ desktop-file-install \
# -DPXR_BUILD_EXAMPLES=OFF. # -DPXR_BUILD_EXAMPLES=OFF.
rm -vrf '%{buildroot}%{_datadir}/usd/examples' 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 # 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 # 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 # single step, using the entry points installed into the buildroot. This is