The package rpms/usd.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/usd.git/commit/?id=ba26cf7d986182....
Change:
+ExclusiveArch: x86_64
Thanks.
Full change:
============
commit ba26cf7d986182ae9d8f172b1bd8dc237bb1fe53
Author: Luya Tshimbalanga <luya(a)fedoraproject.org>
Date: Fri May 14 15:13:00 2021 -0700
Multiple fixes based on packaging review
Add comment for multiple licenses
Add requires for python subpackage
Resolves rhbz#1895567
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d09d5e4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/usd-21.05.tar.gz
diff --git a/README.md b/README.md
index 15ff90b..02842ec 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,7 @@
# usd
-The usd package
+Universal Scene Description (USD) is the software developed by Pixar that addresses the
need to robustly and scalably interchange and augment arbitrary 3D scenes that may be
composed from many elemental assets.
+
+USD provides for interchange of elemental assets (e.g. models) or animations. But unlike
other interchange packages, USD also enables assembly and organization of any number of
assets into virtual sets, scenes, and shots, transmit them from application to
application, and non-destructively edit them (as overrides), with a single, consistent
API, in a single scenegraph. USD provides a [rich
toolset](https://graphics.pixar.com/usd/docs/USD-Toolset.html) for reading, writing,
editing, and rapidly previewing 3D geometry and shading. In addition, because USD's
core scenegraph and ["composition
engine"](https://graphics.pixar.com/usd/docs/USD-Glossary.html#USDGl...
are agnostic of 3D, USD can be extended in a maintainable way to encode and compose data
in other domains.
+
+This page provides usd package for Fedora
diff --git a/USD-20.05-soversion.patch b/USD-20.05-soversion.patch
new file mode 100644
index 0000000..aa07e3b
--- /dev/null
+++ b/USD-20.05-soversion.patch
@@ -0,0 +1,11 @@
+diff -up USD-20.05/cmake/macros/Public.cmake.sover USD-20.05/cmake/macros/Public.cmake
+--- USD-20.05/cmake/macros/Public.cmake.sover 2020-09-16 16:40:05.489056637 +0200
++++ USD-20.05/cmake/macros/Public.cmake 2020-09-16 16:38:43.784595457 +0200
+@@ -926,6 +926,7 @@ function(pxr_toplevel_prologue)
+ FOLDER "${folder}"
+ PREFIX "${PXR_LIB_PREFIX}"
+ IMPORT_PREFIX "${PXR_LIB_PREFIX}"
++ SOVERSION ${PXR_MAJOR_VERSION}
+ )
+ _get_install_dir("lib" libInstallPrefix)
+ install(
diff --git a/org.openusd.usdview.desktop b/org.openusd.usdview.desktop
new file mode 100644
index 0000000..71aa0d2
--- /dev/null
+++ b/org.openusd.usdview.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=USD view
+GenericName=Universal Scene Description Viewer
+Comment=Open .cbr & .cbz files
+Exec=usdview
+Icon=applications-graphics
+Terminal=false
+Type=Application
+Categories=Graphics;
diff --git a/sources b/sources
new file mode 100644
index 0000000..d7ec534
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (usd-21.05.tar.gz) =
df6fbae99741cad5c1621464eb1414f51a7568203c5f24b799fa03315df7e3147ee401f9415585c53032c716aae1ef4390a411f76705988cb58ec1d3eb9762f8
diff --git a/usd-21.02-demangle-fix.patch b/usd-21.02-demangle-fix.patch
new file mode 100644
index 0000000..a59efc6
--- /dev/null
+++ b/usd-21.02-demangle-fix.patch
@@ -0,0 +1,18 @@
+--- USD-21.02/pxr/base/arch/demangle.cpp.orig 2021-01-20 09:13:57.000000000 +0900
++++ USD-21.02/pxr/base/arch/demangle.cpp 2021-02-05 16:37:27.154126908 +0900
+@@ -36,6 +36,7 @@ using std::string;
+ #if (ARCH_COMPILER_GCC_MAJOR == 3 && ARCH_COMPILER_GCC_MINOR >= 1) || \
+ ARCH_COMPILER_GCC_MAJOR > 3 || defined(ARCH_COMPILER_CLANG)
+ #define _AT_LEAST_GCC_THREE_ONE_OR_CLANG
++#include <cxxabi.h>
+ #endif
+
+ PXR_NAMESPACE_OPEN_SCOPE
+@@ -138,7 +139,6 @@ _StripPxrInternalNamespace(string* name)
+ #endif
+
+ #if defined(_AT_LEAST_GCC_THREE_ONE_OR_CLANG)
+-#include <cxxabi.h>
+
+ /*
+ * This routine doesn't work when you get to gcc3.4.
diff --git a/usd.spec b/usd.spec
new file mode 100644
index 0000000..1cb14bd
--- /dev/null
+++ b/usd.spec
@@ -0,0 +1,352 @@
+%global __cmake_in_source_build 0
+%global libmajor 0
+%global srcname USD
+%bcond_without alembic
+%bcond_with documentation
+%bcond_without embree
+%bcond_without imaging
+%bcond_with jemalloc
+%bcond_without openshading
+%bcond_without python3
+%bcond_with test
+
+Name: usd
+Version: 21.05
+Release: 2%{?dist}
+Summary: 3D VFX pipeline interchange file format
+
+# The entire source is ASL 2.0 except:
+#
+# BSD:
+# - pxr/base/gf/ilmbase_*
+# - pxr/base/js/rapidjson/msinttypes/
+# - pxr/base/tf/pxrDoubleConversion/
+# - pxr/base/tf/pxrLZ4/
+# MIT:
+# - pxr/imaging/garch/khrplatform.h
+# - pxr/base/js/rapidjson/, except pxr/base/js/rapidjson/msinttypes/
+# - pxr/base/tf/pyLock.cpp (only some sections; most of the file is
+# ASL 2.0)
+# - third_party/renderman-23/plugin/rmanArgsParser/pugixml/
+# MIT or Unlicense:
+# - pxr/imaging/hio/stb/
+#
+# (Certain build system files are also under licenses other than ASL 2.0, but
+# do not contribute their license terms to the built RPMs.)
+License: ASL 2.0 and BSD and MIT and (MIT or Unlicense)
+URL:
http://www.openusd.org/
+Source0:
https://github.com/PixarAnimationStudios/%{name}/archive/v%{version}/%{na...
+Source1: org.open%{name}.%{name}view.desktop
+
+#
https://github.com/PixarAnimationStudios/USD/issues/1387
+Patch1: %{srcname}-20.05-soversion.patch
+
+#
https://bugzilla.redhat.com/show_bug.cgi?id=1895567#c7
+Patch2: %{name}-21.02-demangle-fix.patch
+
+# Base
+BuildRequires: boost-devel
+BuildRequires: boost-program-options
+BuildRequires: cmake
+BuildRequires: dos2unix
+BuildRequires: gcc-c++
+BuildRequires: pkgconfig(blosc)
+BuildRequires: pkgconfig(tbb)
+
+# Documentation
+%if %{with documentation}
+BuildRequires: doxygen
+BuildRequires: graphviz
+%endif
+
+# For imaging and usd imaging
+%if %{with imaging}
+%if %{with embree}
+BuildRequires: embree-devel
+%endif
+BuildRequires: openshadinglanguage
+BuildRequires: opensubdiv-devel
+BuildRequires: openvdb-devel
+BuildRequires: pkgconfig(dri)
+%if %{with jemalloc}
+BuildRequires: pkgconfig(jemalloc)
+%endif
+BuildRequires: pkgconfig(OpenColorIO)
+BuildRequires: pkgconfig(OpenImageIO)
+BuildRequires: pkgconfig(oslexec)
+BuildRequires: pkgconfig(Ptex)
+%endif
+%if %{with alembic}
+BuildRequires: cmake(Alembic)
+BuildRequires: hdf5-devel
+BuildRequires: pkgconfig(OpenEXR)
+%endif
+
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+%if %{with python3}
+Requires: python3-%{name}%{?_isa} = %{version}-%{release}
+%endif
+
+# Upstream bundles
+# Filed ticket to convince upstream to use system libraries
+#
https://github.com/PixarAnimationStudios/USD/issues/1490
+Provides: bundled(double-conversion) = 2.0.0
+Provides: bundled(ilmbase) = 2.5.3
+Provides: bundled(lz4) = 1.9.2
+Provides: bundled(pugixml) = 1.9
+Provides: bundled(rapidjson) = 1.0.2
+Provides: bundled(SPIRV-Reflect) = 1.0
+Provides: bundled(stb_image) = 2.19
+Provides: bundled(stb_image_resize) = 0.95
+Provides: bundled(stb_image_write) = 1.09
+Provides: bundled(VulkanMemoryAllocator) = 3.0.0~development
+
+# This package is only available for x86_64
+# Will fail to build on other architectures
+ExclusiveArch: x86_64
+
+%description
+Universal Scene Description (USD) is a time-sampled scene
+description for interchange between graphics applications.
+
+%package libs
+Summary: Universal Scene Description library
+
+
+%description libs
+Universal Scene Description (USD) is an efficient, scalable system for
+authoring, reading, and streaming time-sampled scene description for
+interchange between graphics applications.
+
+%package devel
+Summary: Development files for USD
+Requires: cmake-filesystem
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+
+%description devel
+This package contains the C++ header files and symbolic links to the shared
+libraries for %{name}. If you would like to develop programs using %{name},
+you will need to install %{name}-devel.
+
+# For usdview
+%if %{with python3}
+%package -n python3-%{name}
+Summary: %{summary}
+
+BuildRequires: desktop-file-utils
+BuildRequires: pkgconfig(python3)
+BuildRequires: pkgconfig(Qt5)
+BuildRequires: python3dist(jinja2)
+BuildRequires: python3dist(pyside2)
+BuildRequires: python3dist(pyopengl)
+Requires: font(roboto)
+Requires: font(robotoblack)
+Requires: font(robotolight)
+Requires: font(robotomono)
+Requires: python3dist(jinja2)
+Requires: python3dist(pyside2)
+Requires: python3dist(pyopengl)
+%py_provides python3-pxr
+
+%description -n python3-%{name}
+Python language bindings for the Universal Scene Description (USD) C++ API
+%endif
+
+%if %{with documentation}
+%package doc
+Summary: Documentation for usd
+BuildArch: noarch
+
+%description doc
+Documentation for the Universal Scene Description (USD) C++ API
+%endif
+
+%prep
+%autosetup -p1 -n %{srcname}-%{version}
+
+# Convert NOTICE.txt from CRNL line encoding
+dos2unix NOTICE.txt
+
+%if %{with python3}
+# Fix all Python shebangs recursively in .
+%py3_shebang_fix .
+%endif
+
+# Further drop shebangs line for some py files
+sed -r -i '1{/^#!/d}' \
+ pxr/usd/sdr/shaderParserTestUtils.py \
+ pxr/usd/usdUtils/updateSchemaWithSdrNode.py \
+ pxr/usdImaging/usdviewq/usdviewApi.py
+
+# Unbundle Google Roboto fonts
+rm -rvf pxr/usdImaging/usdviewq/fonts/*
+ln -s %{_datadir}/fonts/google-roboto pxr/usdImaging/usdviewq/fonts/Roboto
+ln -s %{_datadir}/fonts/google-roboto-mono \
+ pxr/usdImaging/usdviewq/fonts/Roboto_Mono
+
+# Use c++17 standard otherwise build fails
+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|plugin/usd|%{_libdir}/usd/plugin|g' \
+ cmake/macros/Private.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
+
+# Fix cmake directory destination
+sed -i 's|"${CMAKE_INSTALL_PREFIX}"|%{_libdir}/cmake/pxr|g'
pxr/CMakeLists.txt
+
+
+%build
+# Fix uic-qt5 use
+cat > uic-wrapper <<'EOF'
+#!/bin/sh
+exec uic-qt5 -g python "$@"
+EOF
+chmod +x uic-wrapper
+
+# Fix python3 support
+#
https://github.com/PixarAnimationStudios/USD/issues/1419
+%cmake \
+ -DCMAKE_CXX_FLAGS_RELEASE="%{optflags} -Wl,--as-needed
-DTBB_SUPPRESS_DEPRECATED_MESSAGES=1" \
+ -DCMAKE_C_FLAGS_RELEASE="%{optflags} -Wl,--as-needed
-DTBB_SUPPRESS_DEPRECATED_MESSAGES=1" \
+ -DCMAKE_CXX_STANDARD=17 \
+ -DCMAKE_EXE_LINKER_FLAGS="-pie" \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_SKIP_INSTALL_RPATH=ON \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DPXR_BUILD_USDVIEW=ON \
+%if %{with documentation}
+ -DPXR_BUILD_DOCUMENTATION=TRUE \
+%endif
+ -DPXR_BUILD_EXAMPLES=OFF \
+ -DPXR_BUILD_TUTORIALS=OFF \
+ -DPXR_BUILD_TESTS=%{?with_test:ON}%{!?with_test:OFF} \
+ -DPXR_ENABLE_OPENVDB_SUPPORT=ON \
+ -DPXR_INSTALL_LOCATION="%{_libdir}/%{name}/plugin" \
+%if %{with jemalloc}
+ -DPXR_MALLOC_LIBRARY="%{_libdir}/libjemalloc.so" \
+%endif
+%if %{with alembic}
+ -DOPENEXR_LOCATION=%{_includedir} \
+ -DPXR_BUILD_ALEMBIC_PLUGIN=ON \
+%endif
+%if %{with embree}
+ -DPXR_BUILD_EMBREE_PLUGIN=ON \
+ -DEMBREE_LOCATION=%{_prefix} \
+%endif
+%if %{with imaging}
+ -DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON \
+ -DPXR_BUILD_OPENCOLORIO_PLUGIN=ON \
+%endif
+%if %{with openshading}
+ -DPXR_ENABLE_OSL_SUPPORT=ON \
+%endif
+ -DPYTHON_EXECUTABLE=%{python3} \
+%if %{with python3}
+ -DPXR_USE_PYTHON_3=ON \
+ -DPYSIDE_AVAILABLE=ON \
+ -DPYSIDEUICBINARY:PATH=${PWD}/uic-wrapper \
+%else
+ -DPXR_ENABLE_PYTHON_SUPPORT=OFF \
+%endif
+ -DPXR_BUILD_MONOLITHIC=ON
+%cmake_build
+
+%install
+%cmake_install
+
+# Fix python3 files installation
+mkdir -p %{buildroot}%{python3_sitearch}
+mv %{buildroot}%{python3_sitelib}/* %{buildroot}%{python3_sitearch}
+
+# Install a desktop icon for usdview
+desktop-file-install \
+--dir=%{buildroot}%{_datadir}/applications \
+%{SOURCE1}
+
+# Remove arch-specific code in /usr/share
+find %{buildroot}%{_datadir}/%{name}/examples -name '*.so' -print -delete
+
+# Fix installation path for some files
+mv %{buildroot}%{_prefix}/lib/python/pxr/*.* \
+ %{buildroot}%{python3_sitearch}/pxr/
+mv %{buildroot}%{_prefix}/lib/python/pxr/Usdviewq/* \
+ %{buildroot}%{python3_sitearch}/pxr/Usdviewq/
+
+%check
+desktop-file-validate
%{buildroot}%{_datadir}/applications/org.open%{name}.%{name}view.desktop
+%{?with_test:%ctest}
+
+%files
+%doc NOTICE.txt README.md
+%{_bindir}/*
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/examples/
+%{_datadir}/%{name}/examples/*
+
+%if %{with python3}
+%files -n python3-%{name}
+%{_datadir}/applications/org.open%{name}.%{name}view.desktop
+%{python3_sitearch}/pxr
+%endif
+
+%files libs
+%license LICENSE.txt
+%doc NOTICE.txt README.md
+%{_libdir}/lib%{name}_ms.so.%{libmajor}
+%{_libdir}/%{name}
+%exclude %{_libdir}/%{name}/%{name}/resources/codegenTemplates
+
+%files devel
+%doc BUILDING.md CHANGELOG.md VERSIONS.md
+%{_includedir}/pxr/
+%{_libdir}/cmake/*
+%{_libdir}/lib%{name}_ms.so
+%{_libdir}/%{name}/%{name}/resources/codegenTemplates/
+
+%if %{with documentation}
+%files doc
+%license LICENSE.txt
+%{_docdir}/%{name}
+%endif
+
+%changelog
+* Fri May 7 2021 Luya Tshimbalanga <luya(a)fedoraproject.org> - 21.05-2
+- Multiple fixes based on packaging review
+- Add comment for multiple licenses
+- Add requires for python subpackage
+- Resolves rhbz#1895567
+
+* Fri Apr 9 2021 Luya Tshimbalanga <luya(a)fedoraproject.org> - 21.05-1
+- Update to 21.05
+- Multiple fixes based on packaging review
+- Drop forced out of source build line
+
+* Fri Apr 9 2021 Luya Tshimbalanga <luya(a)fedoraproject.org> - 21.02-4
+- Multiple fixes based on package review
+
+* Fri Feb 05 2021 Luya Tshimbalanga <luya(a)fedoraproject.org> - 21.02-3
+- Patch for system header position causin the build to fail
+
+* Mon Jan 25 2021 Luya Tshimbalanga <luya(a)fedoraproject.org> - 21.02-2
+- Update c++ requirement to 17
+
+* Wed Jan 20 2021 Luya Tshimbalanga <luya(a)fedoraproject.org> - 21.02-1
+- Update to 21.02
+- Move isa to devel subpackage
+- Drop glew dependency
+
+* Thu Nov 12 2020 Luya Tshimbalanga <luya(a)fedoraproject.org> - 20.11-2
+- Add missing isa for arch specific
+- Strip the Carriage Returns on NOTICE.txt
+
+* Thu Oct 22 2020 Luya Tshimbalanga <luya(a)fedoraproject.org> - 20.11-1
+- Initial package