Compare commits

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

134 commits

Author SHA1 Message Date
Benjamin A. Beasley
07ce80652a Patch for Python 3.15 (fix RHBZ#2433881) 2026-07-30 09:41:26 +01:00
Benjamin A. Beasley
f5a3fd00e0 Update to 26.08 (close RHBZ#2502858) 2026-07-30 08:03:18 +01:00
Fedora Release Engineering
0efef3a625 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:17:08 +00:00
Python Maint
e384650dca Rebuilt for Python 3.15 2026-06-06 09:08:37 +02:00
Richard Shaw
e0d1abcfac Rebuild for OpenColorIO 2.5.2. 2026-05-31 15:05:40 -05:00
Benjamin A. Beasley
b8ae07c43d Update to 26.05 (close RHBZ#2461650) 2026-04-27 11:54:06 +01:00
Orion Poplawski
d7db70a14d Rebuild for hdf5 2.1 2026-04-16 19:30:30 -06:00
Benjamin A. Beasley
099d5a046b Backport several OpenEXRCore security fixes
- Fixes CVE-2026-34378 / GHSA-v76p-4qvv-vh4g; closes RHBZ#2455493
- Fixes CVE-2026-34380 / GHSA-q3v8-hw4m-59w5; closes RHBZ#2455534
- Fixes CVE-2026-34588 / GHSA-588r-cr5c-w6hf; closes RHBZ#2455505
- Fixes CVE-2026-34589 / GHSA-p8xc-w3q4-h64x; closes RHBZ#2455501
- Fixes CVE-2026-34379 / GHSA-w88v-vqhq-5p24; closes RHBZ#2455497
2026-04-08 11:58:19 +01:00
Benjamin A. Beasley
1165f5708e Backport fix for CVE-2026-34544 in OpenEXRCore
- Fixes RHBZ#2454226
2026-04-06 13:07:00 +01:00
Benjamin A. Beasley
0a6b2117ff Update to 26.03 (close RHBZ#2442563) 2026-02-26 12:07:15 +00:00
Orion Poplawski
f168f46d3a Make devel require cmake(OpenSubdiv) and cmake(materialx) 2026-02-21 12:45:57 -07:00
Benjamin A. Beasley
d4e3de7a80 Rebuilt for ptex 2.5.1 (close RHBZ#2435890) 2026-02-02 14:13:58 +00:00
Luya Tshimbalanga
ba33ab88f9 Rebuild for ptex 2.5.1 2026-02-02 00:57:36 -08:00
Fedora Release Engineering
a93ed447d6 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 19:42:31 +00:00
Luya Tshimbalanga
f764fa904f Fix path for manterialx manual 2026-01-08 15:16:34 -08:00
Luya Tshimbalanga
099daf1d9a Fix manpage line 2026-01-08 09:09:41 -08:00
Luya Tshimbalanga
fb80c784af Enable materialx support 2026-01-08 08:01:05 -08:00
Luya Tshimbalanga
d7483c1c0d Revert "Remove unused MaterialX support"
This reverts commit b5e913b0f3.
2026-01-07 23:09:08 -08:00
Luya Tshimbalanga
b5e913b0f3 Remove unused MaterialX support
This commit removed the unusued materialx support dropped by
upstream.
2026-01-07 18:38:55 -08:00
Richard Shaw
1fe1ef6bbd Rebuild for OpenImageIO 3.1. 2025-12-07 14:15:28 -06:00
Benjamin A. Beasley
ff3482cdbe Backport fixes for CVE-2025-64181 etc. in OpenEXRCore 2025-12-02 19:26:32 +00:00
Jan Grulich
d4a03cc10d Rebuild (python-pyside6) 2025-12-02 15:42:52 +01:00
Benjamin A. Beasley
97117864dd Correct minimum NVR for stb_image 2025-11-25 14:32:01 +00:00
Benjamin A. Beasley
201f8d224f Rebuilt with stb_image patched for two new security bugs 2025-11-25 10:58:26 +00:00
Benjamin A. Beasley
b804423325 Use macros for supported architectures
[skip changelog]
2025-11-25 10:58:26 +00:00
Benjamin A. Beasley
1fef8f6c76 Rebuilt for OpenVDB 13.0.0 2025-11-23 06:57:09 +00:00
Benjamin A. Beasley
6172607253 Update to 25.11 (close RHBZ#2406284) 2025-10-27 22:28:41 +00:00
Benjamin A. Beasley
734e75b372 Add direct build dependency on OpenCL as a workaround 2025-10-27 21:14:39 +00:00
Benjamin A. Beasley
c8eae5d8a6 Rebuilt for opensubdiv 3.7.0~RC1 (fix RHBZ#2406597) 2025-10-27 18:52:40 +00:00
Luya Tshimbalanga
bccb5c96c3 Rebuild for openvdb 12.1.1 2025-09-30 15:06:28 -07:00
Python Maint
74c20c0fa2 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 15:01:43 +02:00
Richard Shaw
3721e20bfe Rebuild for OpenImageIO 3. 2025-09-16 12:02:47 -05:00
Jerry James
ee49c71c00 Rebuild for tbb 2022.2.0 2025-08-21 08:26:34 -06:00
Python Maint
4c4b91fe36 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 15:21:43 +02:00
Benjamin A. Beasley
a011711941 Update to 25.08 (close RHBZ#2385874) 2025-08-01 08:51:51 -04:00
Fedora Release Engineering
255804ecbd Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 19:53:21 +00:00
Benjamin A. Beasley
bf4f59f2c9 Revert "Disable usdview until python-pyopengl is fixed"
This reverts commit a9d49c6a7e.
2025-07-06 08:14:37 -04:00
Benjamin A. Beasley
cc7a2f2dbf Rebuilt for Python 3.14 2025-06-10 07:49:58 -04:00
Benjamin A. Beasley
a9d49c6a7e Disable usdview until python-pyopengl is fixed
https://bugzilla.redhat.com/show_bug.cgi?id=2341191
2025-06-10 07:23:26 -04:00
Benjamin A. Beasley
dafa9d3c04 Only depend on PyOpenGL when usdview is enabled 2025-06-10 07:21:03 -04:00
Benjamin A. Beasley
f6370998c7 Update to 25.05.01 (close RHBZ#2367428) 2025-05-20 05:45:16 -04:00
Benjamin A. Beasley
715b2f905d Update to 25.05 (close RHBZ#2362828) 2025-05-06 07:38:21 -04:00
Benjamin A. Beasley
92bfe4054d Rebuilt for openshadinglanguage 1.14.5.0 2025-04-15 11:41:12 -04:00
Benjamin A. Beasley
9161f5b9f5 Rebuilt for openvdb 12 2025-04-07 07:26:05 -04:00
Benjamin A. Beasley
62186d3241 Update to 25.02a (close RHBZ#2343857) 2025-02-04 18:53:02 -05:00
Benjamin A. Beasley
3d6c109ad7 Update PR#3392 patch URL to the actual merged commit 2025-01-30 10:06:54 -05:00
Benjamin A. Beasley
e7341f96c2 Update to 25.02 (close RHZ#2339319) 2025-01-21 22:53:03 -05:00
Fedora Release Engineering
7878241bba Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 13:57:58 +00:00
Adrià Cabello
856fb3d568 Change mistake sed from pxrConfig to pxrTargets 2024-12-29 20:32:00 +00:00
Adrià Cabello
30ba938df6 Fixed hack path 2024-12-29 15:57:48 +00:00
Adrià Cabello
87db7029f7 Add temporary hack to find OpenGL
See: https://github.com/PixarAnimationStudios/OpenUSD/issues/3310
2024-12-29 15:09:41 +00:00
Adrià Cabello
9c39c06ad1 Correct dekstop file comment
Change org.openusd.usdview.desktop comment since usdview does not open cbr/cbz files.
2024-12-09 13:25:47 +00:00
Benjamin A. Beasley
efebd041f7 Patch for tbb 2022.0.0 compatibility 2024-12-05 22:56:53 -05:00
Benjamin A. Beasley
5f8486734c Update to 24.11 (close RHBZ#2321975) 2024-11-14 07:18:47 -05:00
Orion Poplawski
a21c0aeb47 Rebuild for hdf5 1.14.5 2024-10-25 17:32:32 -06:00
Richard Shaw
d4c6d9b92f Rebuild for OpenColorIO 2.4.0. 2024-10-09 17:44:25 -05:00
Benjamin A. Beasley
fc01dde67d Add dependencies from -devel on unbundled libraries that are exposed in the API 2024-09-04 15:44:28 -04:00
Benjamin A. Beasley
472f446e62 Unbundle libavif/aom/libyuv 2024-09-04 11:45:40 -04:00
Benjamin A. Beasley
3212a88069 Unbundle libdeflate 2024-09-02 11:51:50 -04:00
Benjamin A. Beasley
14fbe0314c Add a note about not unbundling OpenEXR for now
[skip changelog]
2024-09-02 10:43:05 -04:00
Benjamin A. Beasley
dd5ef7aabd Improve notes about bundled PEGTL
[skip changelog]
2024-09-02 10:43:05 -04:00
Benjamin A. Beasley
add7b33a3e Unbundle robin-map 2024-09-02 10:43:05 -04:00
Benjamin A. Beasley
6e44f92c07 Unbundle rapidjson 2024-09-02 10:43:05 -04:00
Benjamin A. Beasley
26576ba783 Unbundle pugixml 2024-08-31 11:09:58 -04:00
Benjamin A. Beasley
8ac451a674 Don’t patch out headers that will be “stubbed” from CMake
[skip changelog]
2024-08-30 08:35:40 -04:00
Benjamin A. Beasley
73a20616f8 Simplified unbundling patches for double-conversion and lz4
- Use “stub” headers to avoid patching the call sites
2024-08-30 08:14:45 -04:00
Benjamin A. Beasley
40cf2f17b5 Update License comment for unbunded lz4 and cli11
[skip changelog]
2024-08-30 08:13:57 -04:00
Benjamin A. Beasley
0725c67cd1 Unbundle cli11 2024-08-30 07:11:14 -04:00
Benjamin A. Beasley
9a24539f76 Unbundle lz4 2024-08-29 16:31:13 -04:00
Benjamin A. Beasley
43282c86fb Add more notes about ilmbase bundling
[skip changelog]
2024-08-29 13:27:06 -04:00
Benjamin A. Beasley
e7b56c6019 Fix a trivial spec-file typo
[skip changelog]
2024-08-28 12:01:53 -04:00
Benjamin A. Beasley
2bcbdb9ba4 Unbundle double-conversion 2024-08-28 11:22:17 -04:00
Benjamin A. Beasley
bd415f45bc Update to 24.08 (close RHBZ#2265775) 2024-08-26 20:57:22 -04:00
Benjamin A. Beasley
9048793b2c Re-enable usdview with PySide6 (and pyside6-uic) 2024-07-31 23:11:33 -04:00
Benjamin A. Beasley
fea5e93bc8 Remove the pyside6 build conditional
PySide2 is not coming back.
2024-07-31 11:35:21 -04:00
Benjamin A. Beasley
af00d39d05 Disable usdview again
- Without the right UI compiler, it is still broken on PySide6
2024-07-31 11:35:21 -04:00
Fedora Release Engineering
0e24d85be8 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 08:26:35 +00:00
Benjamin A. Beasley
f61a75174a Rebuilt for Python 3.13 (close RHBZ#2292015) 2024-06-26 16:41:47 -04:00
Benjamin A. Beasley
a0d38c9d74 Correct pkgconfig(Ptext) to pkgconfig(ptex) for ptex-2.4.3 2024-06-24 15:17:42 -04:00
Luya Tshimbalanga
968fc39028 Rebuild for openvdb with required tbb2020.3 2024-06-12 08:52:20 -07:00
Adrià Cabello
470014a4cc Update usd.spec
Fixes installation path before building. Necessary to work with some USD related projects.
2024-05-16 08:21:12 +00:00
Benjamin A. Beasley
4442408809 Rebuilt for OpenColorIO 2.3.2
See RHBZ#2239262 for discussion.
2024-04-25 08:23:31 -04:00
Benjamin A. Beasley
72d8ee112c Rebuild for OpenVDB 11 without backward-compatible ABI 2024-04-21 15:11:49 -04:00
Benjamin A. Beasley
c9a7a6eb36 Re-enable usdview with PySide6 2024-04-12 10:27:27 -04:00
Benjamin A. Beasley
fa08a84b23 Update to 24.03 (close RHBZ#2265775) 2024-04-12 10:27:27 -04:00
Benjamin A. Beasley
5a3458e932 Rebuild for OpenVDB 11 with backward-compatible ABI (fix RHBZ#2272507) 2024-04-02 12:55:54 -04:00
Luya Tshimbalanga
d2b6fdaf41 Rebuild for openshadinglanguage 1.13.7.0 2024-03-29 01:40:12 -07:00
Yaakov Selkowitz
64291d3ebd 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.
2024-03-15 17:47:48 -04:00
Richard Shaw
bf2ba03146 Rebuild for OpenImageIO 2.5.x. 2024-01-29 22:08:27 -06:00
Richard Shaw
4dd1d7e818 Rebuild for OpenImageIO 2.5.x. 2024-01-29 22:07:04 -06:00
Fedora Release Engineering
cbeaf52457 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 07:19:30 +00:00
Luya Tshimbalanga
c0837caaff Rebuild for draco 1.5.7 2024-01-21 14:21:00 -08:00
Jonathan Wakely
1c7e24ea4b Build against tbb2020.3 instead of tbb (#2036372) 2024-01-17 23:11:44 +00:00
Benjamin A. Beasley
7cad7d9db9 Correct license to Pixar AND …
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
2023-11-10 07:57:35 -05:00
Benjamin A. Beasley
eb100cb32c Update to 23.11 (close RHBZ#2246597) 2023-10-30 07:25:04 -04:00
Benjamin A. Beasley
959bb82b9d Break a long line in the spec file
[skip changelog]
2023-10-30 07:25:04 -04:00
Benjamin A. Beasley
952ea4b1e3 Rebuild for openvdb-10.1.0 (close RHBZ#2246616) 2023-10-27 15:15:47 -04:00
Benjamin A. Beasley
ec9a2d0bd6 Add versioned Requires on usd-libs from python3-usd 2023-10-26 06:57:42 -04:00
Benjamin A. Beasley
fbd57c96cf Ensure stb_image contains the latest CVE patches 2023-10-25 12:24:09 -04:00
Benjamin A. Beasley
65b6168dde Update to 23.08 (close RHBZ#2224683) 2023-08-25 09:35:56 -04:00
Benjamin A. Beasley
c825fbe765 Drop conditional for building documentation 2023-08-25 09:35:21 -04:00
Fedora Release Engineering
39d7d820d0 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 17:17:57 +00:00
Benjamin A. Beasley
efbdec6f3b Rebuild for Python 3.12 (close RHBZ#2220617) 2023-07-18 11:42:06 -04:00
Benjamin A. Beasley
edace6d7c5 Temporarily disable usdview application
- Works around python-pyside2 FTBFS/FTI with Python 3.12
2023-07-18 11:16:31 -04:00
Benjamin A. Beasley
c43cbe099a Use new (rpm 4.17.1+) bcond style 2023-07-06 12:35:20 -04:00
Benjamin A. Beasley
4e2670fef8 Remove explicit %set_build_flags, not needed since F36
https://www.fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck
2023-06-03 12:56:41 -04:00
Luya Tshimbalanga
42b9d0a471 Rebuild for embree 4.1.0 2023-05-12 19:11:43 -07:00
Benjamin A. Beasley
8a40048925 Rebuild for draco 1.5.6 (close RHBZ#2195997) 2023-05-07 08:26:41 -04:00
Benjamin A. Beasley
86a2ce7d38 Move codegenTemplates from -devel to -libs
While headers normally go in -devel packages, these headers and C++
source files are used as data templates for generated code, and it makes
sense to package them with the rest of the library resources.
2023-04-24 21:39:01 -04:00
Benjamin A. Beasley
4382e4924a Add generated man pages
These are slightly sloppy in places. For example, there is a warning
from _DiscoverPlugins mixed into some of them. However, they are of
mostly-good quality, are perfectly usable, and are much better than
nothing.
2023-04-22 15:03:54 -04:00
Benjamin A. Beasley
26034a49bf Update to 23.05 (close RHBZ#2110024) 2023-04-21 15:38:00 -04:00
Benjamin A. Beasley
75f130e5a2 Be explicit about building the CLI tools 2023-04-21 12:47:23 -04:00
Benjamin A. Beasley
1253f72992 Stop conditionalizing imaging/usd_imaging
It’s likely that additional work would be required to build cleanly
without these, and it’s unlikely that we will want to try to do so.
2023-04-21 12:47:23 -04:00
Benjamin A. Beasley
67fbdf4266 Be explicit about not validating generated code
This would require exact flex/bison versions matching those used upstream.
2023-04-21 12:29:34 -04:00
Benjamin A. Beasley
679d045c1f Explicitly enable/disable all plugins 2023-04-21 12:07:42 -04:00
Benjamin A. Beasley
a88e488a02 Reorganize the CMake options for readability 2023-04-21 11:52:33 -04:00
Benjamin A. Beasley
d893566ad9 Write the uic-wrapper script in prep, not build 2023-04-21 09:51:47 -04:00
Benjamin A. Beasley
9f7b7c503b Use Ninja backend for CMake by default (a bit faster) 2023-04-21 09:50:54 -04:00
Benjamin A. Beasley
f0e1704299 Set CMake options more compactly and explicitly
Use RPM macro expressions with the ternary operator, and always set
Boolean conditionals one way or the other rather than relying on
upstream defaults.
2023-04-21 09:02:32 -04:00
Benjamin A. Beasley
3def9ccc3b Slightly improve handling of compiler/linker flags 2023-04-21 08:44:27 -04:00
Benjamin A. Beasley
0ec6c30a4b Be more explicit that we are on OpenEXR/Imath 3 2023-04-21 08:43:54 -04:00
Benjamin A. Beasley
8d86f169a0 Reduce macro indirection in the spec file 2023-04-17 10:55:34 -04:00
Benjamin A. Beasley
c8f652afad Put all the tools and apps in the base package
They were not correctly sorted between Python and non-Python anyway.
2023-04-17 10:54:20 -04:00
Benjamin A. Beasley
8654f1f33e Stop conditionalizing Python 2023-04-17 10:51:14 -04:00
Benjamin A. Beasley
06228d97d4 Build with the draco plugin 2023-04-17 10:50:13 -04:00
Benjamin A. Beasley
fdf058b2e7 Re-enable OpenShadingLanguage and OpenVDB support 2023-03-20 10:32:29 -04:00
Benjamin A. Beasley
b66e0f7b69 Drop manual dependency on cmake-filesystem, now automatic 2023-03-20 10:32:11 -04:00
Benjamin A. Beasley
5198aefc5b Update to 23.02 (close RHBZ#2110024) 2023-03-20 10:01:28 -04:00
Benjamin A. Beasley
7be532d932 Update to 22.11 2023-03-20 09:21:33 -04:00
Benjamin A. Beasley
7729eb9581 Update to 22.08 (.so version bump)
- The monolithic library is also renamed from libusd_usd_ms.so to
  libusd_ms.so.
2023-03-20 09:02:44 -04:00
ad69540406 Fix FTBFS on F39
- Apply upstream PR  to fix build with boost 1.81
- Backport upstream fix for additional header inclusion for g++13
2023-03-08 22:01:06 +09:00
1d67e1036c Merge remote-tracking branch 'origin/f38' into f39-ftbfs-fix 2023-03-08 21:58:21 +09:00
Benjamin A. Beasley
ca6f528281 Update minimum stb_image versions
Ensure we have a fix for null pointer dereference bug
https://github.com/nothings/stb/issues/1452.
2023-02-25 18:37:09 -05:00
Jonathan Wakely
f0cc97df57 Rebuilt for Boost 1.81 2023-02-20 22:39:43 +00:00
24 changed files with 1424 additions and 4705 deletions

19
.gitignore vendored
View file

@ -5,3 +5,22 @@
/usd-22.05.tar.gz
/usd-22.05a.tar.gz
/usd-22.05b.tar.gz
/usd-22.08.tar.gz
/usd-22.11.tar.gz
/usd-23.02.tar.gz
/usd-23.05.tar.gz
/OpenUSD-23.08.tar.gz
/OpenUSD-23.11.tar.gz
/OpenUSD-24.03.tar.gz
/OpenUSD-24.05.tar.gz
/OpenUSD-24.08.tar.gz
/OpenUSD-24.11.tar.gz
/OpenUSD-25.02.tar.gz
/OpenUSD-25.02a.tar.gz
/OpenUSD-25.05.tar.gz
/OpenUSD-25.05.01.tar.gz
/OpenUSD-25.08.tar.gz
/OpenUSD-25.11.tar.gz
/OpenUSD-26.03.tar.gz
/OpenUSD-26.05.tar.gz
/OpenUSD-26.08.tar.gz

View file

@ -0,0 +1,87 @@
From ee4e9b30e14133e35c23821d3dc7aa93df354a38 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Fri, 27 Oct 2023 12:56:58 -0400
Subject: [PATCH] Downstream-only: add an SONAME version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream was asked about .so versioning and setting SONAME properly and
seemed unprepared to handle the request:
https://github.com/PixarAnimationStudios/USD/issues/1259#issuecomment-657120216
A patch was offered:
https://github.com/PixarAnimationStudios/USD/issues/1387
but it was not sufficient for the general case, since (1) it only handled the
monolithic build, and (2) it derived the .so version from PXR_MAJOR_VERSION,
which is *not* reliably bumped on API or ABI changes, and currently is still
zero.
We will therefore probably need to keep doing downstream .so versioning for
the foreseeable future. Currently we are assuming that the ABI is likely to
change on every release (an appropriate assumption for a large C++ project
with no ABI stability policy), so we build the .so version from the project
version. Note that the “hidden” major version is zero, so this complies with
the “0.” prefix recommended in the packaging guidelines.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_name_versioning
A known defect of this patch is that it causes the hdTiny.so example plugin
to be versioned as well, which is undesired. This is not a serious problem
because we do not want to package the built plugin anyway. (It should not be
built with -DPXR_BUILD_EXAMPLES=OFF, but it is.)
---
cmake/defaults/Version.cmake | 6 ++++++
cmake/macros/Private.cmake | 1 +
cmake/macros/Public.cmake | 2 ++
3 files changed, 9 insertions(+)
diff --git a/cmake/defaults/Version.cmake b/cmake/defaults/Version.cmake
index c31b5e8d9..fabb45397 100644
--- a/cmake/defaults/Version.cmake
+++ b/cmake/defaults/Version.cmake
@@ -10,3 +10,9 @@ set(PXR_MINOR_VERSION "26")
set(PXR_PATCH_VERSION "8") # NOTE: Must not have leading 0 for single digits
math(EXPR PXR_VERSION "${PXR_MAJOR_VERSION} * 10000 + ${PXR_MINOR_VERSION} * 100 + ${PXR_PATCH_VERSION}")
+
+set(PXR_DOWNSTREAM_SOVERSION "${PXR_MAJOR_VERSION}.${PXR_MINOR_VERSION}.${PXR_PATCH_VERSION}"
+ CACHE
+ STRING
+ "Downstream shared object version"
+)
diff --git a/cmake/macros/Private.cmake b/cmake/macros/Private.cmake
index cddb4e095..5e4b4603a 100644
--- a/cmake/macros/Private.cmake
+++ b/cmake/macros/Private.cmake
@@ -1355,6 +1355,7 @@ function(_pxr_library NAME)
FOLDER "${folder}"
POSITION_INDEPENDENT_CODE ON
IMPORT_PREFIX "${args_PREFIX}"
+ SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
PREFIX "${args_PREFIX}"
SUFFIX "${args_SUFFIX}"
)
diff --git a/cmake/macros/Public.cmake b/cmake/macros/Public.cmake
index 5f6a5456b..553b645ec 100644
--- a/cmake/macros/Public.cmake
+++ b/cmake/macros/Public.cmake
@@ -415,6 +415,7 @@ function(pxr_library NAME)
TYPE "${args_TYPE}"
PREFIX "${prefix}"
SUFFIX "${suffix}"
+ SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
SUBDIR "${subdir}"
CPPFILES "${args_CPPFILES};${${NAME}_CPPFILES}"
PUBLIC_HEADERS "${args_PUBLIC_HEADERS};${${NAME}_PUBLIC_HEADERS}"
@@ -1213,6 +1214,7 @@ function(pxr_toplevel_prologue)
PREFIX "${libPrefix}"
IMPORT_PREFIX "${libPrefix}"
OUTPUT_NAME ${libName}
+ SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
)
_get_install_dir("lib" libInstallPrefix)
install(
--
2.55.0

View file

@ -0,0 +1,65 @@
From 817e23674f1b4ba62481c4e9794f0665a44d83f8 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Fri, 1 Aug 2025 08:47:41 -0400
Subject: [PATCH] Downstream-only: use Valgrind macro instead of inline
assembly
Upstream already has a plan to make this change, but is waiting to be
able to add a build dependency on valgrind-devel. We have no such
obstacle, and this change fixes the inline assembly failing to compile
on aarch64.
---
pxr/exec/vdf/executorDataVector.cpp | 28 +++-------------------------
1 file changed, 3 insertions(+), 25 deletions(-)
diff --git a/pxr/exec/vdf/executorDataVector.cpp b/pxr/exec/vdf/executorDataVector.cpp
index 96dacca06..7e5625678 100644
--- a/pxr/exec/vdf/executorDataVector.cpp
+++ b/pxr/exec/vdf/executorDataVector.cpp
@@ -11,40 +11,18 @@
#include "pxr/base/tf/stl.h"
#include "pxr/base/trace/trace.h"
+#include <valgrind/memcheck.h>
+
PXR_NAMESPACE_OPEN_SCOPE
/// Issue a magic instruction sequence which Valgrind will intercept and mark
/// the specified memory defined for memcheck.
///
-/// XXX: We should replace this with the VALGRIND_MAKE_MEM_DEFINED macro
-/// from memcheck.h, once we can establish a build dependency on
-/// valgrind-devel.
-///
static inline void
Vdf_ExecutorDataVector_ValgrindMakeDefined(void *ptr, size_t size)
{
-#if defined(ARCH_OS_LINUX) && defined(ARCH_CPU_INTEL)
- // Pass a result and a pointer to some arguments via registers
- volatile unsigned long long int result;
- volatile unsigned long long int args[6] = {
- 0x4D430002, // Memcheck: MAKE_MEM_DEFINED
- (uintptr_t)(ptr), // Memory address
- size, // Size in bytes
- 0, 0, 0 // Remaining unused arguments
- };
-
- // Magical instruction sequence which Valgrind will interpret as an
- // annotation (see valgrind.h)
- __asm__ volatile(
- "rolq $3, %%rdi ; rolq $13, %%rdi\n\t"
- "rolq $61, %%rdi ; rolq $51, %%rdi\n\t"
- "xchgq %%rbx, %%rbx"
- : "=d" (result)
- : "a" (&args[0]), "0" (0)
- : "cc", "memory"
- );
-#endif
+ VALGRIND_MAKE_MEM_DEFINED(ptr, size);
}
Vdf_ExecutorDataVector::~Vdf_ExecutorDataVector()
--
2.55.0

View file

@ -0,0 +1,46 @@
From 2d851f23e912d8312f2ea6818963150a8c484138 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Wed, 28 Aug 2024 10:42:48 -0400
Subject: [PATCH 1/6] Downstream-only: use the system double-conversion library
---
pxr/base/tf/CMakeLists.txt | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/pxr/base/tf/CMakeLists.txt b/pxr/base/tf/CMakeLists.txt
index 4294f2cb5..b45df65b8 100644
--- a/pxr/base/tf/CMakeLists.txt
+++ b/pxr/base/tf/CMakeLists.txt
@@ -105,11 +105,14 @@ function(add_py_dll_link_test)
endfunction()
+find_library(double-conversion_LIBRARY NAMES double-conversion REQUIRED)
+
pxr_library(tf
LIBRARIES
arch
${WINLIBS}
TBB::tbb
+ ${double-conversion_LIBRARY}
PUBLIC_CLASSES
anyUniquePtr
@@ -276,14 +279,6 @@ pxr_library(tf
CPPFILES
initConfig.cpp
- pxrDoubleConversion/bignum-dtoa.cc
- pxrDoubleConversion/bignum.cc
- pxrDoubleConversion/cached-powers.cc
- pxrDoubleConversion/double-to-string.cc
- pxrDoubleConversion/fast-dtoa.cc
- pxrDoubleConversion/fixed-dtoa.cc
- pxrDoubleConversion/string-to-double.cc
- pxrDoubleConversion/strtod.cc
pxrLZ4/lz4.cpp
PYMODULE_CPPFILES
--
2.55.0

View file

@ -0,0 +1,110 @@
From f3e9600db6086e834c0503cdaf30b5ba7ed53ceb Mon Sep 17 00:00:00 2001
From: Anonymous Coward <nobody@redhat.com>
Date: Sun, 26 Jul 2026 16:13:18 +0200
Subject: [PATCH] Replace PyWeakref_GetObject with PyWeakref_GetRef
PyWeakref_GetObject was removed in Python 3.15. Replace all four call
sites with PyWeakref_GetRef, which returns a strong reference instead
of a borrowed one, and adjust reference counting accordingly.
In Tf_PyIdHandle::Ptr(), return Py_None when the referent is dead to
match the original behaviour (previously returned NULL erroneously).
In Tf_PyWeakObject::GetObject(), explicitly return a Python None object
on failure, matching the original semantics exactly.
Fixes: https://github.com/PixarAnimationStudios/OpenUSD/issues/3966
Assisted-by: Claude Opus 4.6
Reviewed-by: OpenUSD Maintainers <usd-maintainers@fedoraproject.org>
---
pxr/base/tf/pyFunction.h | 13 +++++++++----
pxr/base/tf/pyIdentity.cpp | 10 +++++++++-
pxr/base/tf/pyWeakObject.cpp | 12 +++++++++---
3 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/pxr/base/tf/pyFunction.h b/pxr/base/tf/pyFunction.h
index 85af943b2..f77b5b71b 100644
--- a/pxr/base/tf/pyFunction.h
+++ b/pxr/base/tf/pyFunction.h
@@ -49,11 +49,13 @@ struct TfPyFunctionFromPython<Ret (Args...)>
using namespace pxr_boost::python;
// Attempt to get the referenced callable object.
TfPyLock lock;
- object callable(handle<>(borrowed(PyWeakref_GetObject(weak.ptr()))));
- if (TfPyIsNone(callable)) {
+ PyObject *rawCallable = NULL;
+ if (PyWeakref_GetRef(weak.ptr(), &rawCallable) <= 0) {
TF_WARN("Tried to call an expired python callback");
return Ret();
}
+ // PyWeakref_GetRef returns a strong reference; handle<> steals it.
+ object callable{handle<>(rawCallable)};
return TfPyCall<Ret>(callable)(args...);
}
};
@@ -68,12 +70,15 @@ struct TfPyFunctionFromPython<Ret (Args...)>
// Attempt to get the referenced self parameter, then build a new
// instance method and call it.
TfPyLock lock;
- PyObject *self = PyWeakref_GetObject(weakSelf.ptr());
- if (self == Py_None) {
+ PyObject *self = NULL;
+ if (PyWeakref_GetRef(weakSelf.ptr(), &self) <= 0) {
TF_WARN("Tried to call a method on an expired python instance");
return Ret();
}
+ // PyWeakref_GetRef returns a strong reference to self; PyMethod_New
+ // takes its own reference, so release ours afterward.
object method(handle<>(PyMethod_New(func.ptr(), self)));
+ Py_DECREF(self);
return TfPyCall<Ret>(method)(args...);
}
};
diff --git a/pxr/base/tf/pyIdentity.cpp b/pxr/base/tf/pyIdentity.cpp
index 5389d8f25..06b7f9b0c 100644
--- a/pxr/base/tf/pyIdentity.cpp
+++ b/pxr/base/tf/pyIdentity.cpp
@@ -136,7 +136,15 @@ PyObject *
Tf_PyIdHandle::Ptr() const {
if (_weakRef) {
TfPyLock lock;
- return PyWeakref_GetObject(_weakRef);
+ PyObject *obj = NULL;
+ if (PyWeakref_GetRef(_weakRef, &obj) > 0) {
+ // Return a borrowed-style reference: decrement so the caller
+ // does not need to release. Safe because the GIL is held by
+ // all callers.
+ Py_DECREF(obj);
+ return obj;
+ }
+ return Py_None; // dead referent → match original behaviour
}
return 0;
}
diff --git a/pxr/base/tf/pyWeakObject.cpp b/pxr/base/tf/pyWeakObject.cpp
index 8cfddc729..ecdd7f705 100644
--- a/pxr/base/tf/pyWeakObject.cpp
+++ b/pxr/base/tf/pyWeakObject.cpp
@@ -115,9 +115,15 @@ Tf_PyWeakObject::GetOrCreate(pxr_boost::python::object const &obj)
pxr_boost::python::object
Tf_PyWeakObject::GetObject() const
{
- return pxr_boost::python::object
- (pxr_boost::python::handle<>
- (pxr_boost::python::borrowed(PyWeakref_GetObject(_weakRef.get()))));
+ PyObject *obj = NULL;
+ if (PyWeakref_GetRef(_weakRef.get(), &obj) > 0) {
+ // PyWeakref_GetRef returns a strong reference; handle<> steals it.
+ return pxr_boost::python::object(
+ pxr_boost::python::handle<>(obj));
+ }
+ // Dead referent: return Py_None explicitly, as the original did.
+ return pxr_boost::python::object(
+ pxr_boost::python::handle<>(pxr_boost::python::borrowed(Py_None)));
}
void
--
2.55.0

View file

@ -0,0 +1,44 @@
From 9fd6089b3e95bb882199ee359fbba83f7c4bb410 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 29 Aug 2024 13:30:18 -0400
Subject: [PATCH 2/6] Downstream-only: use the system lz4 library
---
pxr/base/tf/CMakeLists.txt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pxr/base/tf/CMakeLists.txt b/pxr/base/tf/CMakeLists.txt
index b45df65b8..5e6de96da 100644
--- a/pxr/base/tf/CMakeLists.txt
+++ b/pxr/base/tf/CMakeLists.txt
@@ -106,6 +106,8 @@ function(add_py_dll_link_test)
endfunction()
find_library(double-conversion_LIBRARY NAMES double-conversion REQUIRED)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(LZ4 REQUIRED liblz4)
pxr_library(tf
LIBRARIES
@@ -113,6 +115,10 @@ pxr_library(tf
${WINLIBS}
TBB::tbb
${double-conversion_LIBRARY}
+ ${LZ4_LIBRARIES}
+
+ INCLUDE_DIRS
+ ${LZ4_INCLUDE_DIRS}
PUBLIC_CLASSES
anyUniquePtr
@@ -279,7 +285,6 @@ pxr_library(tf
CPPFILES
initConfig.cpp
- pxrLZ4/lz4.cpp
PYMODULE_CPPFILES
module.cpp
--
2.55.0

View file

@ -0,0 +1,39 @@
From 73637a9bf67b3f7afe5070e5d56b07524e14a073 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Fri, 30 Aug 2024 09:32:08 -0400
Subject: [PATCH 3/6] Downstream-only: use the system pugixml library
---
third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt b/third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt
index 244f27aa8..1e00413c4 100644
--- a/third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt
+++ b/third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt
@@ -1,6 +1,8 @@
set(PXR_PREFIX "")
set(PXR_PACKAGE rmanArgsParser)
+find_library(pugixml_LIBRARY NAMES pugixml REQUIRED)
+
pxr_plugin(rmanArgsParser
LIBRARIES
arch
@@ -9,12 +11,10 @@ pxr_plugin(rmanArgsParser
vt
ar
sdr
+ ${pugixml_LIBRARY}
PRIVATE_CLASSES
rmanArgsParser
-
- CPPFILES
- pugixml/pugixml.cpp
PRIVATE_HEADERS
api.h
--
2.55.0

View file

@ -0,0 +1,63 @@
From f331a476a66e41e93d83b7a2e438d3ee7f12ea32 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Sat, 31 Aug 2024 11:08:18 -0400
Subject: [PATCH 4/6] Downstream-only: use the system rapidjson library
---
pxr/base/js/CMakeLists.txt | 40 --------------------------------------
1 file changed, 40 deletions(-)
diff --git a/pxr/base/js/CMakeLists.txt b/pxr/base/js/CMakeLists.txt
index 8cbda8c52..ec8f3c249 100644
--- a/pxr/base/js/CMakeLists.txt
+++ b/pxr/base/js/CMakeLists.txt
@@ -15,46 +15,6 @@ pxr_library(js
converter.h
types.h
- PRIVATE_HEADERS
- rapidjson/allocators.h
- rapidjson/cursorstreamwrapper.h
- rapidjson/document.h
- rapidjson/encodedstream.h
- rapidjson/encodings.h
- rapidjson/error/en.h
- rapidjson/error/error.h
- rapidjson/filereadstream.h
- rapidjson/filewritestream.h
- rapidjson/fwd.h
- rapidjson/internal/biginteger.h
- rapidjson/internal/clzll.h
- rapidjson/internal/diyfp.h
- rapidjson/internal/dtoa.h
- rapidjson/internal/ieee754.h
- rapidjson/internal/itoa.h
- rapidjson/internal/meta.h
- rapidjson/internal/pow10.h
- rapidjson/internal/regex.h
- rapidjson/internal/stack.h
- rapidjson/internal/strfunc.h
- rapidjson/internal/strtod.h
- rapidjson/internal/swap.h
- rapidjson/istreamwrapper.h
- rapidjson/memorybuffer.h
- rapidjson/memorystream.h
- rapidjson/msinttypes/inttypes.h
- rapidjson/msinttypes/stdint.h
- rapidjson/ostreamwrapper.h
- rapidjson/pointer.h
- rapidjson/prettywriter.h
- rapidjson/rapidjson.h
- rapidjson/reader.h
- rapidjson/schema.h
- rapidjson/stream.h
- rapidjson/stringbuffer.h
- rapidjson/uri.h
- rapidjson/writer.h
-
DOXYGEN_FILES
overview.dox
)
--
2.55.0

View file

@ -0,0 +1,76 @@
From a537b44edabe942380d2e87ea7069bdf32b93dbc Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Sun, 1 Sep 2024 21:30:11 -0400
Subject: [PATCH 5/6] Downstream-only: use the system libdeflate
---
pxr/imaging/hio/CMakeLists.txt | 7 +++++++
.../hioOpenEXR/OpenEXR/OpenEXRCore/compression.c | 3 +--
.../plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h | 12 ------------
3 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/pxr/imaging/hio/CMakeLists.txt b/pxr/imaging/hio/CMakeLists.txt
index e61fc7c54..7cfbe9d70 100644
--- a/pxr/imaging/hio/CMakeLists.txt
+++ b/pxr/imaging/hio/CMakeLists.txt
@@ -1,6 +1,9 @@
set(PXR_PREFIX pxr/imaging)
set(PXR_PACKAGE hio)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(DEFLATE REQUIRED libdeflate)
+
pxr_library(hio
LIBRARIES
arch
@@ -11,6 +14,10 @@ pxr_library(hio
trace
ar
hf
+ ${DEFLATE_LIBRARIES}
+
+ INCLUDE_DIRS
+ ${DEFLATE_INCLUDE_DIRS}
PUBLIC_CLASSES
fieldTextureData
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/compression.c b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/compression.c
index a672e833b..1d2eaea56 100644
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/compression.c
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/compression.c
@@ -8,8 +8,7 @@
#include "internal_memory.h"
#include "internal_structs.h"
-// pxr #include <libdeflate.h>
-#include "../deflate/libdeflate.h"
+#include <libdeflate.h>
#if ( \
LIBDEFLATE_VERSION_MAJOR > 1 || \
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h
index 7481a346e..71bdde9cc 100644
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h
@@ -8,18 +8,6 @@
#include "OpenEXRCore/openexr_config.h"
-#include "deflate/lib/lib_common.h"
-#include "deflate/common_defs.h"
-#include "deflate/lib/utils.c"
-#include "deflate/lib/arm/cpu_features.c"
-#include "deflate/lib/x86/cpu_features.c"
-#include "deflate/lib/deflate_compress.c"
-#undef BITBUF_NBITS
-#include "deflate/lib/deflate_decompress.c"
-#include "deflate/lib/adler32.c"
-#include "deflate/lib/zlib_compress.c"
-#include "deflate/lib/zlib_decompress.c"
-
#include "openexr-c.h"
#include "OpenEXRCore/attributes.c"
--
2.55.0

View file

@ -0,0 +1,241 @@
From f2a3615238a691e11a4029c33498e7f21a34fff9 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Wed, 4 Sep 2024 11:09:47 -0400
Subject: [PATCH 6/6] Downstream-only: use the system libavif
---
pxr/imaging/plugin/hioAvif/AVIFImage.cpp | 2 +-
pxr/imaging/plugin/hioAvif/CMakeLists.txt | 194 +---------------------
2 files changed, 7 insertions(+), 189 deletions(-)
diff --git a/pxr/imaging/plugin/hioAvif/AVIFImage.cpp b/pxr/imaging/plugin/hioAvif/AVIFImage.cpp
index b56369ee5..c6fcb4a6c 100644
--- a/pxr/imaging/plugin/hioAvif/AVIFImage.cpp
+++ b/pxr/imaging/plugin/hioAvif/AVIFImage.cpp
@@ -30,7 +30,7 @@ ARCH_PRAGMA_UNUSED_FUNCTION
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/type.h"
-#include "pxr/imaging/plugin/hioAvif/AVIF/src/avif/avif.h"
+#include <avif/avif.h>
PXR_NAMESPACE_OPEN_SCOPE
diff --git a/pxr/imaging/plugin/hioAvif/CMakeLists.txt b/pxr/imaging/plugin/hioAvif/CMakeLists.txt
index 1ac2683f6..7d583c137 100644
--- a/pxr/imaging/plugin/hioAvif/CMakeLists.txt
+++ b/pxr/imaging/plugin/hioAvif/CMakeLists.txt
@@ -1,6 +1,9 @@
set(PXR_PREFIX pxr/imaging)
set(PXR_PACKAGE hioAvif)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(AVIF REQUIRED libavif)
+
pxr_plugin(hioAvif
LIBRARIES
ar
@@ -8,197 +11,12 @@ pxr_plugin(hioAvif
gf
hio
tf
+ ${AVIF_LIBRARIES}
- PRIVATE_HEADERS
- aom/aom.h
- aom/aom_codec.h
- aom/aom_decoder.h
- aom/aom_encoder.h
- aom/aom_frame_buffer.h
- aom/aom_image.h
- aom/aom_integer.h
- aom/aomdx.h
- aom/aom_external_partition.h
- aom/internal/aom_codec_internal.h
- aom/internal/aom_image_internal.h
- aom_dsp/aom_dsp_common.h
- aom_dsp/aom_filter.h
- aom_dsp/binary_codes_reader.h
- aom_dsp/bitreader.h
- aom_dsp/bitreader_buffer.h
- aom_dsp/blend.h
- aom_dsp/entcode.h
- aom_dsp/entdec.h
- aom_dsp/flow_estimation/corner_detect.h
- aom_dsp/flow_estimation/flow_estimation.h
- aom_dsp/grain_params.h
- aom_dsp/grain_table.h
- aom_dsp/intrapred_common.h
- aom_dsp/odintrin.h
- aom_dsp/prob.h
- aom_dsp/pyramid.h
- aom_dsp/recenter.h
- aom_dsp/txfm_common.h
- aom_mem/aom_mem.h
- aom_mem/include/aom_mem_intrnl.h
- aom_ports/aom_once.h
- aom_ports/aom_timer.h
- aom_ports/bitops.h
- aom_ports/mem.h
- aom_ports/mem_ops.h
- aom_ports/mem_ops_aligned.h
- aom_ports/sanitizer.h
- aom_scale/yv12config.h
- aom_util/aom_thread.h
- aom_util/aom_pthread.h
- av1/av1_iface_common.h
- av1/common/alloccommon.h
- av1/common/av1_common_int.h
- av1/common/av1_inv_txfm1d.h
- av1/common/av1_inv_txfm1d_cfg.h
- av1/common/av1_loopfilter.h
- av1/common/av1_txfm.h
- av1/common/blockd.h
- av1/common/cdef.h
- av1/common/cdef_block.h
- av1/common/cfl.h
- av1/common/common.h
- av1/common/common_data.h
- av1/common/convolve.h
- av1/common/entropy.h
- av1/common/entropymode.h
- av1/common/entropymv.h
- av1/common/enums.h
- av1/common/filter.h
- av1/common/frame_buffers.h
- av1/common/idct.h
- av1/common/mv.h
- av1/common/mvref_common.h
- av1/common/obmc.h
- av1/common/obu_util.h
- av1/common/pred_common.h
- av1/common/quant_common.h
- av1/common/reconinter.h
- av1/common/reconinter_template.inc
- av1/common/reconintra.h
- av1/common/resize.h
- av1/common/restoration.h
- av1/common/scale.h
- av1/common/scan.h
- av1/common/seg_common.h
- av1/common/thread_common.h
- av1/common/tile_common.h
- av1/common/timing.h
- av1/common/token_cdfs.h
- av1/common/txb_common.h
- av1/common/warped_motion.h
- av1/decoder/decodeframe.h
- av1/decoder/decodemv.h
- av1/decoder/decoder.h
- av1/decoder/decodetxb.h
- av1/decoder/detokenize.h
- av1/decoder/dthread.h
- av1/decoder/grain_synthesis.h
- av1/decoder/obu.h
- common/args_helper.h
- AVIF/src/avif/avif.h
- AVIF/src/avif/internal.h
- AVIF/src/src-libyuv/libyuv/basic_types.h
- AVIF/src/src-libyuv/libyuv.h
- AVIF/src/src-libyuv/libyuv/planar_functions.h
- AVIF/src/src-libyuv/libyuv/row.h
- AVIF/src/src-libyuv/libyuv/scale.h
- AVIF/src/src-libyuv/libyuv/scale_row.h
- AVIF/src/src-libyuv/libyuv/version.h
+ INCLUDE_DIRS
+ ${AVIF_INCLUDE_DIRS}
CPPFILES
- aom/src/aom_codec.c
- aom/src/aom_decoder.c
- aom/src/aom_image.c
- aom/src/aom_integer.c
- aom_dsp/aom_convolve.c
- aom_dsp/aom_dsp_rtcd.c
- aom_dsp/binary_codes_reader.c
- aom_dsp/bitreader.c
- aom_dsp/bitreader_buffer.c
- aom_dsp/blend_a64_hmask.c
- aom_dsp/blend_a64_mask.c
- aom_dsp/blend_a64_vmask.c
- aom_dsp/entcode.c
- aom_dsp/entdec.c
- aom_dsp/intrapred.c
- aom_dsp/loopfilter.c
- aom_dsp/odintrin.c
- aom_dsp/pyramid.c
- aom_mem/aom_mem.c
- aom_scale/aom_scale_rtcd.c
- aom_scale/generic/yv12config.c
- aom_scale/generic/yv12extend.c
- aom_util/aom_thread.c
- av1/av1_dx_iface.c
- av1/common/alloccommon.c
- av1/common/av1_inv_txfm1d.c
- av1/common/av1_inv_txfm2d.c
- av1/common/av1_loopfilter.c
- av1/common/av1_rtcd.c
- av1/common/av1_txfm.c
- av1/common/blockd.c
- av1/common/cdef.c
- av1/common/cdef_block.c
- av1/common/cfl.c
- av1/common/common_data.c
- av1/common/convolve.c
- av1/common/entropy.c
- av1/common/entropymode.c
- av1/common/entropymv.c
- av1/common/frame_buffers.c
- av1/common/idct.c
- av1/common/mvref_common.c
- av1/common/obu_util.c
- av1/common/pred_common.c
- av1/common/quant_common.c
- av1/common/reconinter.c
- av1/common/reconintra.c
- av1/common/resize.c
- av1/common/restoration.c
- av1/common/scale.c
- av1/common/scan.c
- av1/common/seg_common.c
- av1/common/thread_common.c
- av1/common/tile_common.c
- av1/common/timing.c
- av1/common/txb_common.c
- av1/common/warped_motion.c
- av1/decoder/decodeframe.c
- av1/decoder/decodemv.c
- av1/decoder/decoder.c
- av1/decoder/decodetxb.c
- av1/decoder/detokenize.c
- av1/decoder/grain_synthesis.c
- av1/decoder/obu.c
- AVIF/src/alpha.c
- AVIF/src/avif.c
- AVIF/src/codec_aom.c
- AVIF/src/colr.c
- AVIF/src/diag.c
- AVIF/src/exif.c
- AVIF/src/io.c
- AVIF/src/mem.c
- AVIF/src/avif_obu.c
- AVIF/src/rawdata.c
- AVIF/src/read.c
- AVIF/src/reformat.c
- AVIF/src/reformat_libsharpyuv.c
- AVIF/src/reformat_libyuv.c
- AVIF/src/avif-scale.c
- AVIF/src/stream.c
- AVIF/src/utils.c
- AVIF/src/write.c
- AVIF/src/src-libyuv/planar_functions.c
- AVIF/src/src-libyuv/row_common.c
- AVIF/src/src-libyuv/yuv_scale.c
- AVIF/src/src-libyuv/scale_any.c
- AVIF/src/src-libyuv/scale_common.c
AVIFImage.cpp
RESOURCE_FILES
--
2.55.0

View file

@ -1,54 +0,0 @@
From 0f6c20fa64a6b2e84cd966aa210570576fe1fcc9 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Sat, 6 Nov 2021 22:52:12 -0400
Subject: [PATCH] Fix #1675
Stop accidentally treating a message as a printf-style format string in
three places.
See details in issue #1675.
---
pxr/imaging/hd/dirtyList.cpp | 2 +-
pxr/imaging/hd/renderIndex.cpp | 2 +-
pxr/imaging/hdSt/drawItemsCache.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pxr/imaging/hd/dirtyList.cpp b/pxr/imaging/hd/dirtyList.cpp
index 7fc798c336..1bd2600f6c 100644
--- a/pxr/imaging/hd/dirtyList.cpp
+++ b/pxr/imaging/hd/dirtyList.cpp
@@ -191,7 +191,7 @@ HdDirtyList::UpdateRenderTagsAndReprSelectors(
std::stringstream ss;
ss << "Resetting tracked reprs in dirty list from "
<< _trackedReprs << " to " << reprs << "\n";
- TfDebug::Helper().Msg(ss.str().c_str());
+ TfDebug::Helper().Msg(ss.str());
}
_trackedReprs = reprs;
trackedReprsChanged = true;
diff --git a/pxr/imaging/hd/renderIndex.cpp b/pxr/imaging/hd/renderIndex.cpp
index 1503cc6988..b251c970b2 100644
--- a/pxr/imaging/hd/renderIndex.cpp
+++ b/pxr/imaging/hd/renderIndex.cpp
@@ -1412,7 +1412,7 @@ HdRenderIndex::SyncAll(HdTaskSharedPtrVector *tasks,
<< ratioNonVarying * 100.0f << "% ("
<< numNonVarying << " / " << numDirtyRprims << ") \n";
- TfDebug::Helper().Msg(ss.str().c_str());
+ TfDebug::Helper().Msg(ss.str());
}
}
}
diff --git a/pxr/imaging/hdSt/drawItemsCache.cpp b/pxr/imaging/hdSt/drawItemsCache.cpp
index 1be6aec721..61bc6794e5 100644
--- a/pxr/imaging/hdSt/drawItemsCache.cpp
+++ b/pxr/imaging/hdSt/drawItemsCache.cpp
@@ -114,7 +114,7 @@ HdSt_DrawItemsCache::GetDrawItems(
<< collection << ", render tags " << renderTags << "\n";
}
- TfDebug::Helper().Msg(ss.str().c_str());
+ TfDebug::Helper().Msg(ss.str());
}
if (cacheMiss || staleEntry) {

View file

@ -1,189 +0,0 @@
From 566da79a23d9c182e6fcc463efcc2cc585dde08b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Charles=20Fl=C3=A8che?= <charles.fleche@free.fr>
Date: Sun, 10 Apr 2022 12:08:30 -0400
Subject: [PATCH] Add PXR_ENABLE_MALLOCHOOK_SUPPORT build option
---
BUILDING.md | 9 ++++++++-
build_scripts/build_usd.py | 18 ++++++++++++++++++
cmake/defaults/Options.cmake | 1 +
pxr/base/arch/CMakeLists.txt | 5 +++++
pxr/base/arch/mallocHook.cpp | 17 +++++++++++------
5 files changed, 43 insertions(+), 7 deletions(-)
diff --git a/BUILDING.md b/BUILDING.md
index d62efeb53b..16c22917ce 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -413,7 +413,7 @@ There are certain optimizations that can be enabled in the build.
##### Malloc Library
We've found that USD performs best with allocators such as [Jemalloc](https://github.com/jemalloc/jemalloc).
-In support of this, you can specify your own allocator through ```PXR_MALLOC_LIBRARY```.
+In support of this, for Linux systems you can specify your own allocator through ```PXR_MALLOC_LIBRARY```.
This variable should be set to a path to a shared object for the allocator. For example,
```bash
@@ -423,6 +423,13 @@ This variable should be set to a path to a shared object for the allocator. For
If none are specified, the default allocator will be used. More information on getting the most out of
USD can be found [Getting the Best Performance with USD](http://openusd.org/docs/Maximizing-USD-Performance.html).
+However glibc 2.34 removed the deprecated memory allocation hooks, preventing USD to correctly build. Custom memory
+allocation code can be compiled out with the ```PXR_ENABLE_MALLOCHOOK_SUPPORT``` option.
+
+```bash
+-DPXR_ENABLE_MALLOCHOOK_SUPPORT=OFF
+```
+
## Linker Options
There are four ways to link USD controlled by the following options:
diff --git a/build_scripts/build_usd.py b/build_scripts/build_usd.py
index b00449266f..d45ade2152 100644
--- a/build_scripts/build_usd.py
+++ b/build_scripts/build_usd.py
@@ -351,6 +351,10 @@ def AppendCXX11ABIArg(buildFlag, context, buildArgs):
buildArgs.append('{flag}="{flags}"'.format(
flag=buildFlag, flags=" ".join(cxxFlags)))
+def AppendEnableMallocHookArg(buildFlag, context, buildArgs):
+ if context.enableMallocHook is None:
+ return
+
def FormatMultiProcs(numJobs, generator):
tag = "-j"
if generator:
@@ -1559,6 +1563,10 @@ def InstallUSD(context, force, buildArgs):
else:
extraArgs.append('-DPXR_ENABLE_MATERIALX_SUPPORT=OFF')
+ if context.enableMallocHook is not None:
+ support = 'ON' if context.enableMallocHook else 'OFF'
+ extraArgs.append('-DPXR_ENABLE_MALLOCHOOK_SUPPORT={}'.format(support))
+
if Windows():
# Increase the precompiled header buffer limit.
extraArgs.append('-DCMAKE_CXX_FLAGS="/Zm150"')
@@ -1696,6 +1704,8 @@ def InstallUSD(context, force, buildArgs):
if Linux():
group.add_argument("--use-cxx11-abi", type=int, choices=[0, 1],
help=("Use C++11 ABI for libstdc++. (see docs above)"))
+ group.add_argument("--enable-malloc-hook", type=int, choices=[0, 1],
+ help=("Enable specifying memory allocators on Linux with PXR_MALLOC_LIBRARY"))
group = parser.add_argument_group(title="3rd Party Dependency Build Options")
group.add_argument("--src", type=str,
@@ -1941,6 +1951,8 @@ def __init__(self, args):
# Build options
self.useCXX11ABI = \
(args.use_cxx11_abi if hasattr(args, "use_cxx11_abi") else None)
+ self.enableMallocHook = \
+ (args.enable_malloc_hook if hasattr(args, "enable_malloc_hook") else None)
self.safetyFirst = args.safety_first
# Dependencies that are forced to be built
@@ -2193,6 +2205,11 @@ def _JoinVersion(v):
Use C++11 ABI {useCXX11ABI}
"""
+if context.enableMallocHook is not None:
+ summaryMsg += """\
+ Enable malloc hook {enableMallocHook}
+"""
+
summaryMsg += """\
Variant {buildVariant}
Imaging {buildImaging}
@@ -2247,6 +2264,7 @@ def FormatBuildArguments(buildArgs):
", ".join([d.name for d in dependenciesToBuild])),
buildArgs=FormatBuildArguments(context.buildArgs),
useCXX11ABI=("On" if context.useCXX11ABI else "Off"),
+ enableMallocHook=("On" if context.enableMallocHook else "Off"),
buildType=("Shared libraries" if context.buildShared
else "Monolithic shared library" if context.buildMonolithic
else ""),
diff --git a/cmake/defaults/Options.cmake b/cmake/defaults/Options.cmake
index f6a8fd8741..fc7b344d36 100644
--- a/cmake/defaults/Options.cmake
+++ b/cmake/defaults/Options.cmake
@@ -51,6 +51,7 @@ option(PXR_PREFER_SAFETY_OVER_SPEED
"Enable certain checks designed to avoid crashes or out-of-bounds memory reads with malformed input files. These checks may negatively impact performance."
ON)
option(PXR_USE_AR_2 "Use Asset Resolver (Ar) 2.0" ON)
+option(PXR_ENABLE_MALLOCHOOK_SUPPORT "Enable Arch malloc hooks" ON)
# Determine GFX api
# Metal only valid on Apple platforms
diff --git a/pxr/base/arch/CMakeLists.txt b/pxr/base/arch/CMakeLists.txt
index 97be26e83c..ca24bc767e 100644
--- a/pxr/base/arch/CMakeLists.txt
+++ b/pxr/base/arch/CMakeLists.txt
@@ -59,6 +59,11 @@ pxr_library(arch
DOXYGEN_FILES
overview.dox
)
+if (PXR_ENABLE_MALLOCHOOK_SUPPORT)
+ target_compile_definitions(arch
+ PRIVATE target_compile_definition ARCH_MALLOC_HOOK
+ )
+endif()
pxr_build_test_shared_lib(testArchAbiPlugin
CPPFILES
diff --git a/pxr/base/arch/mallocHook.cpp b/pxr/base/arch/mallocHook.cpp
index b68a31afb3..338263388f 100644
--- a/pxr/base/arch/mallocHook.cpp
+++ b/pxr/base/arch/mallocHook.cpp
@@ -28,7 +28,7 @@
#include "pxr/base/arch/defines.h"
#include "pxr/base/arch/env.h"
-#if !defined(ARCH_OS_WINDOWS)
+#if defined(ARCH_MALLOC_HOOK) && !defined(ARCH_OS_WINDOWS)
# include <dlfcn.h>
#endif
#include <cstring>
@@ -88,7 +88,7 @@ static bool
_MallocProvidedBySameLibraryAs(const char* functionName,
bool skipMallocCheck)
{
-#if !defined(ARCH_OS_WINDOWS)
+#if defined(ARCH_MALLOC_HOOK) && !defined(ARCH_OS_WINDOWS)
const void* function = dlsym(RTLD_DEFAULT, functionName);
if (!function) {
return false;
@@ -151,8 +151,9 @@ ArchIsJemallocActive()
bool
ArchIsStlAllocatorOff()
{
-#if defined(ARCH_COMPILER_GCC) || defined(ARCH_COMPILER_ICC) || \
- defined(ARCH_COMPILER_CLANG)
+#if defined(ARCH_MALLOC_HOOK) && \
+ (defined(ARCH_COMPILER_GCC) || defined(ARCH_COMPILER_ICC) || \
+ defined(ARCH_COMPILER_CLANG))
// I'm assuming that ICC compiles will use the gcc STL library.
/*
@@ -177,7 +178,7 @@ ArchMallocHook::IsInitialized()
_underlyingMemalignFunc || _underlyingFreeFunc;
}
-#if defined(ARCH_OS_LINUX)
+#if defined(ARCH_MALLOC_HOOK) && defined(ARCH_OS_LINUX)
template <typename T>
static bool _GetSymbol(T* addr, const char* name, string* errMsg) {
if (void* symbol = dlsym(RTLD_DEFAULT, name)) {
@@ -241,8 +242,12 @@ ArchMallocHook::Initialize(
ARCH_UNUSED_ARG void (*freeWrapper)(void*, const void*),
string* errMsg)
{
-#if !defined(ARCH_OS_LINUX)
+#if !defined(ARCH_MALLOC_HOOK) || !defined(ARCH_OS_LINUX)
+ #if !defined(ARCH_MALLOC_HOOK)
+ *errMsg = "ArchMallocHook functionality deactivated at build time";
+ #else
*errMsg = "ArchMallocHook functionality not implemented for non-linux systems";
+ #endif
return false;
#else
if (IsInitialized()) {

View file

@ -1,112 +0,0 @@
From 899e6456986d42629a1ca5f2a01d07bca261207b Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Mon, 27 Jun 2022 11:50:04 -0400
Subject: [PATCH 1/2] Do not access PyFrameObject fields directly on Python
3.10+
Fixes a Python 3.11 incompatibility. Still accesses PyCodeObject fields
directly.
---
pxr/base/tf/pyTracing.cpp | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/pxr/base/tf/pyTracing.cpp b/pxr/base/tf/pyTracing.cpp
index 62262d7d75..300c30a435 100644
--- a/pxr/base/tf/pyTracing.cpp
+++ b/pxr/base/tf/pyTracing.cpp
@@ -35,8 +35,9 @@
#include <tbb/spin_mutex.h>
-// This is from python, needed for PyFrameObject.
+// These are from python, needed for PyFrameObject.
#include <frameobject.h>
+#include <patchlevel.h>
#include <list>
#include <mutex>
@@ -110,11 +111,24 @@ static int _TracePythonFn(PyObject *, PyFrameObject *frame,
{
// Build up a trace info struct.
TfPyTraceInfo info;
+#if PY_VERSION_HEX >= 0x030a00f0
+ // PyFrame_GetCode introduced in 3.9, added to Stable ABI in 3.10;
+ // PyFrameObject is opaque in 3.11
+ PyCodeObject * code = PyFrame_GetCode(frame);
+#else
+ // Use direct access to PyFrameObject fields.
+ PyCodeObject * code = frame->f_code;
+ // Create a strong reference as PyFrame_GetCode() would, so we do not have
+ // to conditionalize decrementing the reference count.
+ Py_INCREF((PyObject *)code);
+#endif
info.arg = arg;
- info.funcName = TfPyString_AsString(frame->f_code->co_name);
- info.fileName = TfPyString_AsString(frame->f_code->co_filename);
- info.funcLine = frame->f_code->co_firstlineno;
+ info.funcName = TfPyString_AsString(code->co_name);
+ info.fileName = TfPyString_AsString(code->co_filename);
+ info.funcLine = code->co_firstlineno;
info.what = what;
+ // PyFrame_GetCode returned a strong reference
+ Py_DECREF((PyObject *)code);
_InvokeTraceFns(info);
From 71ec813641e4e763db5f674d78efe533997eac1a Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Wed, 29 Jun 2022 14:15:26 -0400
Subject: [PATCH 2/2] Simplified patch with compatibility PyFrame_GetCode()
Based on suggestions in https://docs.python.org/3.11/whatsnew/3.11.html#id6
---
pxr/base/tf/pyTracing.cpp | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/pxr/base/tf/pyTracing.cpp b/pxr/base/tf/pyTracing.cpp
index 300c30a435..4b201744fa 100644
--- a/pxr/base/tf/pyTracing.cpp
+++ b/pxr/base/tf/pyTracing.cpp
@@ -106,29 +106,29 @@ static void _SetTraceFnEnabled(bool enable) {
}
+#if PY_VERSION_HEX < 0x030900B1
+// Define PyFrame_GetCode() on Python 3.8 and older:
+// https://docs.python.org/3.11/whatsnew/3.11.html#id6
+static inline PyCodeObject* PyFrame_GetCode(PyFrameObject *frame)
+{
+ Py_INCREF(frame->f_code);
+ return frame->f_code;
+}
+#endif
+
+
static int _TracePythonFn(PyObject *, PyFrameObject *frame,
int what, PyObject *arg)
{
// Build up a trace info struct.
TfPyTraceInfo info;
-#if PY_VERSION_HEX >= 0x030a00f0
- // PyFrame_GetCode introduced in 3.9, added to Stable ABI in 3.10;
- // PyFrameObject is opaque in 3.11
PyCodeObject * code = PyFrame_GetCode(frame);
-#else
- // Use direct access to PyFrameObject fields.
- PyCodeObject * code = frame->f_code;
- // Create a strong reference as PyFrame_GetCode() would, so we do not have
- // to conditionalize decrementing the reference count.
- Py_INCREF((PyObject *)code);
-#endif
info.arg = arg;
info.funcName = TfPyString_AsString(code->co_name);
info.fileName = TfPyString_AsString(code->co_filename);
info.funcLine = code->co_firstlineno;
info.what = what;
- // PyFrame_GetCode returned a strong reference
- Py_DECREF((PyObject *)code);
+ Py_DECREF(code);
_InvokeTraceFns(info);

View file

@ -1,21 +0,0 @@
From d40f0322e16dd3253181b65a5f10af9dcef0a845 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Sun, 29 Jan 2023 14:19:35 -0500
Subject: [PATCH] Add missing #include for GCC13
---
pxr/base/arch/virtualMemory.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/pxr/base/arch/virtualMemory.cpp b/pxr/base/arch/virtualMemory.cpp
index 4337b8c31e..3c409fab48 100644
--- a/pxr/base/arch/virtualMemory.cpp
+++ b/pxr/base/arch/virtualMemory.cpp
@@ -26,6 +26,7 @@
#include "pxr/base/arch/defines.h"
#include "pxr/base/arch/systemInfo.h"
+#include <cstdint>
#if defined(ARCH_OS_WINDOWS)
#include <Windows.h>
#include <Memoryapi.h>

View file

@ -1,217 +0,0 @@
From 4b6c23d459c602fdac5e0ebc9b7722cbd5475e86 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Sat, 11 Feb 2023 13:58:42 -0500
Subject: [PATCH] Port to Embree 4.x
---
cmake/modules/FindEmbree.cmake | 16 ++++++++--------
pxr/imaging/plugin/hdEmbree/context.h | 2 +-
pxr/imaging/plugin/hdEmbree/mesh.cpp | 2 +-
pxr/imaging/plugin/hdEmbree/mesh.h | 4 ++--
pxr/imaging/plugin/hdEmbree/meshSamplers.h | 4 ++--
pxr/imaging/plugin/hdEmbree/pch.h | 6 +++---
pxr/imaging/plugin/hdEmbree/renderDelegate.h | 2 +-
pxr/imaging/plugin/hdEmbree/renderParam.h | 2 +-
pxr/imaging/plugin/hdEmbree/renderer.cpp | 8 ++------
pxr/imaging/plugin/hdEmbree/renderer.h | 4 ++--
.../plugin/hdEmbree/testenv/testHdEmbree.cpp | 2 +-
11 files changed, 24 insertions(+), 28 deletions(-)
diff --git a/cmake/modules/FindEmbree.cmake b/cmake/modules/FindEmbree.cmake
index e12639d6d9..ec13d0f5c4 100644
--- a/cmake/modules/FindEmbree.cmake
+++ b/cmake/modules/FindEmbree.cmake
@@ -37,11 +37,11 @@
#=============================================================================
if (APPLE)
- set (EMBREE_LIB_NAME libembree3.dylib)
+ set (EMBREE_LIB_NAME libembree4.dylib)
elseif (UNIX)
- set (EMBREE_LIB_NAME libembree3.so)
+ set (EMBREE_LIB_NAME libembree4.so)
elseif (WIN32)
- set (EMBREE_LIB_NAME embree3.lib)
+ set (EMBREE_LIB_NAME embree4.lib)
endif()
find_library(EMBREE_LIBRARY
@@ -56,7 +56,7 @@ find_library(EMBREE_LIBRARY
)
find_path(EMBREE_INCLUDE_DIR
- embree3/rtcore.h
+ embree4/rtcore.h
HINTS
"${EMBREE_LOCATION}/include"
"$ENV{EMBREE_LOCATION}/include"
@@ -64,12 +64,12 @@ DOC
"Embree headers path"
)
-if (EMBREE_INCLUDE_DIR AND EXISTS "${EMBREE_INCLUDE_DIR}/embree3/rtcore_version.h" )
- file(STRINGS "${EMBREE_INCLUDE_DIR}/embree3/rtcore_version.h" TMP REGEX "^#define RTC_VERSION_MAJOR.*$")
+if (EMBREE_INCLUDE_DIR AND EXISTS "${EMBREE_INCLUDE_DIR}/embree4/rtcore_version.h" )
+ file(STRINGS "${EMBREE_INCLUDE_DIR}/embree4/rtcore_version.h" TMP REGEX "^#define RTC_VERSION_MAJOR.*$")
string(REGEX MATCHALL "[0-9]+" MAJOR ${TMP})
- file(STRINGS "${EMBREE_INCLUDE_DIR}/embree3/rtcore_version.h" TMP REGEX "^#define RTC_VERSION_MINOR.*$")
+ file(STRINGS "${EMBREE_INCLUDE_DIR}/embree4/rtcore_version.h" TMP REGEX "^#define RTC_VERSION_MINOR.*$")
string(REGEX MATCHALL "[0-9]+" MINOR ${TMP})
- file(STRINGS "${EMBREE_INCLUDE_DIR}/embree3/rtcore_version.h" TMP REGEX "^#define RTC_VERSION_PATCH.*$")
+ file(STRINGS "${EMBREE_INCLUDE_DIR}/embree4/rtcore_version.h" TMP REGEX "^#define RTC_VERSION_PATCH.*$")
string(REGEX MATCHALL "[0-9]+" PATCH ${TMP})
set (EMBREE_VERSION ${MAJOR}.${MINOR}.${PATCH})
diff --git a/pxr/imaging/plugin/hdEmbree/context.h b/pxr/imaging/plugin/hdEmbree/context.h
index 7af4ab0d27..fb10e8ceff 100644
--- a/pxr/imaging/plugin/hdEmbree/context.h
+++ b/pxr/imaging/plugin/hdEmbree/context.h
@@ -31,7 +31,7 @@
#include "pxr/base/gf/matrix4f.h"
#include "pxr/base/vt/array.h"
-#include <embree3/rtcore.h>
+#include <embree4/rtcore.h>
PXR_NAMESPACE_OPEN_SCOPE
diff --git a/pxr/imaging/plugin/hdEmbree/mesh.cpp b/pxr/imaging/plugin/hdEmbree/mesh.cpp
index e8e001e1cc..fe0f25b7b8 100644
--- a/pxr/imaging/plugin/hdEmbree/mesh.cpp
+++ b/pxr/imaging/plugin/hdEmbree/mesh.cpp
@@ -220,7 +220,7 @@ void HdEmbreeMesh::_EmbreeCullFaces(const RTCFilterFunctionNArguments* args)
default: break;
}
if (cull) {
- // This is how you reject a hit in embree3 instead of setting
+ // This is how you reject a hit in embree3/4 instead of setting
// geomId to invalid on the ray
args->valid[i] = 0;
}
diff --git a/pxr/imaging/plugin/hdEmbree/mesh.h b/pxr/imaging/plugin/hdEmbree/mesh.h
index 4574454368..f83bf5d998 100644
--- a/pxr/imaging/plugin/hdEmbree/mesh.h
+++ b/pxr/imaging/plugin/hdEmbree/mesh.h
@@ -32,8 +32,8 @@
#include "pxr/imaging/plugin/hdEmbree/meshSamplers.h"
-#include <embree3/rtcore.h>
-#include <embree3/rtcore_ray.h>
+#include <embree4/rtcore.h>
+#include <embree4/rtcore_ray.h>
PXR_NAMESPACE_OPEN_SCOPE
diff --git a/pxr/imaging/plugin/hdEmbree/meshSamplers.h b/pxr/imaging/plugin/hdEmbree/meshSamplers.h
index bef6f65959..2b481e5694 100644
--- a/pxr/imaging/plugin/hdEmbree/meshSamplers.h
+++ b/pxr/imaging/plugin/hdEmbree/meshSamplers.h
@@ -29,8 +29,8 @@
#include "pxr/imaging/hd/meshUtil.h"
#include "pxr/base/vt/types.h"
-#include <embree3/rtcore.h>
-#include <embree3/rtcore_geometry.h>
+#include <embree4/rtcore.h>
+#include <embree4/rtcore_geometry.h>
#include <bitset>
diff --git a/pxr/imaging/plugin/hdEmbree/pch.h b/pxr/imaging/plugin/hdEmbree/pch.h
index 7710229804..e8e733bfc4 100644
--- a/pxr/imaging/plugin/hdEmbree/pch.h
+++ b/pxr/imaging/plugin/hdEmbree/pch.h
@@ -151,9 +151,9 @@
#include <boost/unordered_map.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/weak_ptr.hpp>
-#include <embree3/rtcore.h>
-#include <embree3/rtcore_geometry.h>
-#include <embree3/rtcore_ray.h>
+#include <embree4/rtcore.h>
+#include <embree4/rtcore_geometry.h>
+#include <embree4/rtcore_ray.h>
#include <tbb/atomic.h>
#include <tbb/blocked_range.h>
#include <tbb/cache_aligned_allocator.h>
diff --git a/pxr/imaging/plugin/hdEmbree/renderDelegate.h b/pxr/imaging/plugin/hdEmbree/renderDelegate.h
index 20a80487a9..6a6bc9dbf1 100644
--- a/pxr/imaging/plugin/hdEmbree/renderDelegate.h
+++ b/pxr/imaging/plugin/hdEmbree/renderDelegate.h
@@ -31,7 +31,7 @@
#include "pxr/base/tf/staticTokens.h"
#include <mutex>
-#include <embree3/rtcore.h>
+#include <embree4/rtcore.h>
PXR_NAMESPACE_OPEN_SCOPE
diff --git a/pxr/imaging/plugin/hdEmbree/renderParam.h b/pxr/imaging/plugin/hdEmbree/renderParam.h
index ff61000ab5..d3f903e0f3 100644
--- a/pxr/imaging/plugin/hdEmbree/renderParam.h
+++ b/pxr/imaging/plugin/hdEmbree/renderParam.h
@@ -28,7 +28,7 @@
#include "pxr/imaging/hd/renderDelegate.h"
#include "pxr/imaging/hd/renderThread.h"
-#include <embree3/rtcore.h>
+#include <embree4/rtcore.h>
PXR_NAMESPACE_OPEN_SCOPE
diff --git a/pxr/imaging/plugin/hdEmbree/renderer.cpp b/pxr/imaging/plugin/hdEmbree/renderer.cpp
index 20ec78c6aa..72a897120d 100644
--- a/pxr/imaging/plugin/hdEmbree/renderer.cpp
+++ b/pxr/imaging/plugin/hdEmbree/renderer.cpp
@@ -650,9 +650,7 @@ HdEmbreeRenderer::_TraceRay(unsigned int x, unsigned int y,
rayHit.ray.flags = 0;
_PopulateRayHit(&rayHit, origin, dir, 0.0f);
{
- RTCIntersectContext context;
- rtcInitIntersectContext(&context);
- rtcIntersect1(_scene, &context, &rayHit);
+ rtcIntersect1(_scene, &rayHit);
//
// there is something odd about how this is used in Embree. Is it reversed
// here and then when it it used in
@@ -992,9 +990,7 @@ HdEmbreeRenderer::_ComputeAmbientOcclusion(GfVec3f const& position,
shadow.flags = 0;
_PopulateRay(&shadow, position, shadowDir, 0.001f);
{
- RTCIntersectContext context;
- rtcInitIntersectContext(&context);
- rtcOccluded1(_scene,&context,&shadow);
+ rtcOccluded1(_scene,&shadow);
}
// Record this AO ray's contribution to the occlusion factor: a
diff --git a/pxr/imaging/plugin/hdEmbree/renderer.h b/pxr/imaging/plugin/hdEmbree/renderer.h
index 6af8081678..740812fb03 100644
--- a/pxr/imaging/plugin/hdEmbree/renderer.h
+++ b/pxr/imaging/plugin/hdEmbree/renderer.h
@@ -32,8 +32,8 @@
#include "pxr/base/gf/matrix4d.h"
#include "pxr/base/gf/rect2i.h"
-#include <embree3/rtcore.h>
-#include <embree3/rtcore_ray.h>
+#include <embree4/rtcore.h>
+#include <embree4/rtcore_ray.h>
#include <random>
#include <atomic>
diff --git a/pxr/imaging/plugin/hdEmbree/testenv/testHdEmbree.cpp b/pxr/imaging/plugin/hdEmbree/testenv/testHdEmbree.cpp
index c361c678bc..8380aebe72 100644
--- a/pxr/imaging/plugin/hdEmbree/testenv/testHdEmbree.cpp
+++ b/pxr/imaging/plugin/hdEmbree/testenv/testHdEmbree.cpp
@@ -40,7 +40,7 @@
#include "pxr/base/tf/errorMark.h"
-#include <embree3/rtcore.h>
+#include <embree4/rtcore.h>
#include <iostream>
PXR_NAMESPACE_USING_DIRECTIVE

83
3903.patch Normal file
View file

@ -0,0 +1,83 @@
From 3e51fb244dd264b09179999d29dc7c5afd7e71e3 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Tue, 2 Dec 2025 10:43:31 +0000
Subject: [PATCH] Backport fixes for CVE-2025-64181 etc. in OpenEXRCore
---
.../hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c | 20 ++++++++++++++++---
.../OpenEXR/OpenEXRCore/internal_util.h | 4 ++--
.../OpenEXR/OpenEXRCore/parse_header.c | 4 +++-
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c
index cfe80b4cd68..e11209fe660 100644
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c
@@ -1292,6 +1292,16 @@ exr_read_tile_chunk_info (
return pctxt->report_error (
pctxt, EXR_ERR_INVALID_ARGUMENT, "Invalid packed size of 0");
+ if (part->comp_type == EXR_COMPRESSION_NONE &&
+ cinfo->packed_size != cinfo->unpacked_size)
+ {
+ return pctxt->print_error (
+ pctxt,
+ EXR_ERR_BAD_CHUNK_LEADER,
+ "Mismatch between unpacked and packed size with uncompressed data: packed is %" PRIu64 "; unpacked is %" PRIu64,
+ cinfo->packed_size, cinfo->unpacked_size);
+ }
+
return EXR_ERR_SUCCESS;
}
@@ -1350,11 +1360,15 @@ exr_read_chunk (
rv = pctxt->do_read (
pctxt, packed_data, toread, &dataoffset, &nread, rmode);
- if (rmode == EXR_ALLOW_SHORT_READ && nread < (int64_t) toread)
+ if (rmode == EXR_ALLOW_SHORT_READ &&
+ nread >= 0 &&
+ nread < (int64_t) toread)
+ {
memset (
((uint8_t*) packed_data) + nread,
- 0,
- toread - (uint64_t) (nread));
+ 0,
+ (size_t)(toread - (uint64_t)nread));
+ }
}
else
rv = EXR_ERR_SUCCESS;
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/internal_util.h b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/internal_util.h
index 3c6f02786cc..e0fa3933d92 100644
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/internal_util.h
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/internal_util.h
@@ -31,10 +31,10 @@ compute_sampled_height (int height, int y_sampling, int start_y)
else
start = start_y;
end = start_y + height - 1;
- end -= (end < 0) ? (-end % y_sampling) : (end % y_sampling);
+ end -= (end < 0 ? -end : end) % y_sampling;
if (start > end)
- nlines = 0;
+ nlines = start == start_y ? 1 : 0;
else
nlines = (end - start) / y_sampling + 1;
}
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/parse_header.c b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/parse_header.c
index d7230392693..8b6cf78cc59 100644
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/parse_header.c
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/parse_header.c
@@ -2293,7 +2293,9 @@ internal_exr_compute_chunk_offset_size (struct _internal_exr_part* curpart)
w = (uint64_t) (((int64_t) dw.max.x) - ((int64_t) dw.min.x) + 1);
- if (curpart->tiles)
+ if (curpart->storage_mode != EXR_STORAGE_SCANLINE &&
+ curpart->storage_mode != EXR_STORAGE_DEEP_SCANLINE &&
+ curpart->tiles)
{
const exr_attr_tiledesc_t* tiledesc = curpart->tiles->tiledesc;
int64_t tilecount = 0;

File diff suppressed because it is too large Load diff

View file

@ -1,23 +0,0 @@
diff -Naur USD-21.11-original/pxr/base/arch/mallocHook.cpp USD-21.11/pxr/base/arch/mallocHook.cpp
--- USD-21.11-original/pxr/base/arch/mallocHook.cpp 2021-11-01 13:10:51.000000000 -0400
+++ USD-21.11/pxr/base/arch/mallocHook.cpp 2022-03-31 17:26:22.176739670 -0400
@@ -177,7 +177,7 @@
_underlyingMemalignFunc || _underlyingFreeFunc;
}
-#if defined(ARCH_OS_LINUX)
+#if 0
template <typename T>
static bool _GetSymbol(T* addr, const char* name, string* errMsg) {
if (void* symbol = dlsym(RTLD_DEFAULT, name)) {
@@ -241,8 +241,8 @@
ARCH_UNUSED_ARG void (*freeWrapper)(void*, const void*),
string* errMsg)
{
-#if !defined(ARCH_OS_LINUX)
- *errMsg = "ArchMallocHook functionality not implemented for non-linux systems";
+#if 1
+ *errMsg = "ArchMallocHook functionality not implemented";
return false;
#else
if (IsInitialized()) {

View file

@ -1,186 +0,0 @@
diff -Naur USD-22.05-original/cmake/defaults/Packages.cmake USD-22.05/cmake/defaults/Packages.cmake
--- USD-22.05-original/cmake/defaults/Packages.cmake 2022-04-22 14:48:13.000000000 -0400
+++ USD-22.05/cmake/defaults/Packages.cmake 2022-05-24 18:51:26.406485870 -0400
@@ -188,6 +188,7 @@
# --OpenImageIO
if (PXR_BUILD_OPENIMAGEIO_PLUGIN)
find_package(OpenEXR REQUIRED)
+ find_package(Imath REQUIRED)
find_package(OpenImageIO REQUIRED)
add_definitions(-DPXR_OIIO_PLUGIN_ENABLED)
if (OIIO_idiff_BINARY)
@@ -256,7 +257,7 @@
endif()
# --OpenVDB
if (PXR_ENABLE_OPENVDB_SUPPORT)
- find_package(OpenEXR REQUIRED)
+ find_package(Imath REQUIRED)
find_package(OpenVDB REQUIRED)
add_definitions(-DPXR_OPENVDB_SUPPORT_ENABLED)
endif()
@@ -285,7 +286,7 @@
if (PXR_BUILD_ALEMBIC_PLUGIN)
find_package(Alembic REQUIRED)
- find_package(OpenEXR REQUIRED)
+ find_package(Imath REQUIRED)
if (PXR_ENABLE_HDF5_SUPPORT)
find_package(HDF5 REQUIRED
COMPONENTS
@@ -307,6 +308,7 @@
if(PXR_ENABLE_OSL_SUPPORT)
find_package(OSL REQUIRED)
find_package(OpenEXR REQUIRED)
+ find_package(Imath REQUIRED)
add_definitions(-DPXR_OSL_SUPPORT_ENABLED)
endif()
diff -Naur USD-22.05-original/cmake/modules/FindOpenEXR.cmake USD-22.05/cmake/modules/FindOpenEXR.cmake
--- USD-22.05-original/cmake/modules/FindOpenEXR.cmake 2022-04-22 14:48:13.000000000 -0400
+++ USD-22.05/cmake/modules/FindOpenEXR.cmake 1969-12-31 19:00:00.000000000 -0500
@@ -1,101 +0,0 @@
-#
-# Copyright 2016 Pixar
-#
-# Licensed under the Apache License, Version 2.0 (the "Apache License")
-# with the following modification; you may not use this file except in
-# compliance with the Apache License and the following modification to it:
-# Section 6. Trademarks. is deleted and replaced with:
-#
-# 6. Trademarks. This License does not grant permission to use the trade
-# names, trademarks, service marks, or product names of the Licensor
-# and its affiliates, except as required to comply with Section 4(c) of
-# the License and to reproduce the content of the NOTICE file.
-#
-# You may obtain a copy of the Apache License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the Apache License with the above modification is
-# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the Apache License for the specific
-# language governing permissions and limitations under the Apache License.
-#
-
-find_path(OPENEXR_INCLUDE_DIR
- OpenEXR/half.h
-HINTS
- "${OPENEXR_LOCATION}"
- "$ENV{OPENEXR_LOCATION}"
-PATH_SUFFIXES
- include/
-DOC
- "OpenEXR headers path"
-)
-
-if(OPENEXR_INCLUDE_DIR)
- set(openexr_config_file "${OPENEXR_INCLUDE_DIR}/OpenEXR/OpenEXRConfig.h")
- if(EXISTS ${openexr_config_file})
- file(STRINGS
- ${openexr_config_file}
- TMP
- REGEX "#define OPENEXR_VERSION_STRING.*$")
- string(REGEX MATCHALL "[0-9.]+" OPENEXR_VERSION ${TMP})
-
- file(STRINGS
- ${openexr_config_file}
- TMP
- REGEX "#define OPENEXR_VERSION_MAJOR.*$")
- string(REGEX MATCHALL "[0-9]" OPENEXR_MAJOR_VERSION ${TMP})
-
- file(STRINGS
- ${openexr_config_file}
- TMP
- REGEX "#define OPENEXR_VERSION_MINOR.*$")
- string(REGEX MATCHALL "[0-9]" OPENEXR_MINOR_VERSION ${TMP})
- endif()
-endif()
-
-foreach(OPENEXR_LIB
- Half
- Iex
- Imath
- IlmImf
- IlmThread
- IlmImfUtil
- IexMath
- )
-
- # OpenEXR libraries may be suffixed with the version number, so we search
- # using both versioned and unversioned names.
- find_library(OPENEXR_${OPENEXR_LIB}_LIBRARY
- NAMES
- ${OPENEXR_LIB}-${OPENEXR_MAJOR_VERSION}_${OPENEXR_MINOR_VERSION}
- ${OPENEXR_LIB}
- HINTS
- "${OPENEXR_LOCATION}"
- "$ENV{OPENEXR_LOCATION}"
- PATH_SUFFIXES
- lib/
- DOC
- "OPENEXR's ${OPENEXR_LIB} library path"
- )
-
- if(OPENEXR_${OPENEXR_LIB}_LIBRARY)
- list(APPEND OPENEXR_LIBRARIES ${OPENEXR_${OPENEXR_LIB}_LIBRARY})
- endif()
-endforeach(OPENEXR_LIB)
-
-# So #include <half.h> works
-list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR})
-list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}/OpenEXR)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(OpenEXR
- REQUIRED_VARS
- OPENEXR_INCLUDE_DIRS
- OPENEXR_LIBRARIES
- VERSION_VAR
- OPENEXR_VERSION
-)
-
diff -Naur USD-22.05-original/pxr/imaging/hioOpenVDB/CMakeLists.txt USD-22.05/pxr/imaging/hioOpenVDB/CMakeLists.txt
--- USD-22.05-original/pxr/imaging/hioOpenVDB/CMakeLists.txt 2022-04-22 14:48:13.000000000 -0400
+++ USD-22.05/pxr/imaging/hioOpenVDB/CMakeLists.txt 2022-05-24 18:51:26.407485884 -0400
@@ -14,7 +14,7 @@
hio
tf
usd
- ${OPENEXR_Half_LIBRARY}
+ ${IMATH_LIBRARIES}
${OPENVDB_LIBRARY}
INCLUDE_DIRS
diff -Naur USD-22.05-original/pxr/imaging/plugin/hioOiio/CMakeLists.txt USD-22.05/pxr/imaging/plugin/hioOiio/CMakeLists.txt
--- USD-22.05-original/pxr/imaging/plugin/hioOiio/CMakeLists.txt 2022-04-22 14:48:13.000000000 -0400
+++ USD-22.05/pxr/imaging/plugin/hioOiio/CMakeLists.txt 2022-05-24 18:51:26.407485884 -0400
@@ -16,6 +16,7 @@
tf
${OIIO_LIBRARIES}
${OPENEXR_LIBRARIES}
+ ${IMATH_LIBRARIES}
INCLUDE_DIRS
${OIIO_INCLUDE_DIRS}
diff -Naur USD-22.05-original/pxr/usd/plugin/usdAbc/CMakeLists.txt USD-22.05/pxr/usd/plugin/usdAbc/CMakeLists.txt
--- USD-22.05-original/pxr/usd/plugin/usdAbc/CMakeLists.txt 2022-04-22 14:48:13.000000000 -0400
+++ USD-22.05/pxr/usd/plugin/usdAbc/CMakeLists.txt 2022-05-24 18:51:26.407485884 -0400
@@ -23,15 +23,12 @@
usd
usdGeom
${ALEMBIC_LIBRARIES}
- ${OPENEXR_Half_LIBRARY}
- ${OPENEXR_Imath_LIBRARY}
- ${OPENEXR_Iex_LIBRARY}
- ${OPENEXR_IexMath_LIBRARY}
+ ${IMATH_LIBRARIES}
${optionalLibs}
INCLUDE_DIRS
${ALEMBIC_INCLUDE_DIR}
- ${OPENEXR_INCLUDE_DIRS}
+ ${IMATH_INCLUDE_DIRS}
${optionalIncludeDirs}
PRIVATE_CLASSES

View file

@ -1,35 +0,0 @@
diff -Naur USD-22.05-original/cmake/defaults/Version.cmake USD-22.05/cmake/defaults/Version.cmake
--- USD-22.05-original/cmake/defaults/Version.cmake 2022-04-22 14:48:13.000000000 -0400
+++ USD-22.05/cmake/defaults/Version.cmake 2022-05-24 18:49:29.199851843 -0400
@@ -27,3 +27,9 @@
set(PXR_PATCH_VERSION "5")
math(EXPR PXR_VERSION "${PXR_MAJOR_VERSION} * 10000 + ${PXR_MINOR_VERSION} * 100 + ${PXR_PATCH_VERSION}")
+
+set(PXR_DOWNSTREAM_SOVERSION "${PXR_MAJOR_VERSION}.${PXR_MINOR_VERSION}.${PXR_PATCH_VERSION}"
+ CACHE
+ STRING
+ "Downstream shared object version"
+)
diff -Naur USD-22.05-original/cmake/macros/Private.cmake USD-22.05/cmake/macros/Private.cmake
--- USD-22.05-original/cmake/macros/Private.cmake 2022-04-22 14:48:13.000000000 -0400
+++ USD-22.05/cmake/macros/Private.cmake 2022-05-24 18:49:29.200851859 -0400
@@ -1285,6 +1285,7 @@
PREFIX "${args_PREFIX}"
SUFFIX "${args_SUFFIX}"
PUBLIC_HEADER "${args_PUBLIC_HEADERS}"
+ SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
)
set(pythonEnabled "PXR_PYTHON_ENABLED=1")
diff -Naur USD-22.05-original/cmake/macros/Public.cmake USD-22.05/cmake/macros/Public.cmake
--- USD-22.05-original/cmake/macros/Public.cmake 2022-04-22 14:48:13.000000000 -0400
+++ USD-22.05/cmake/macros/Public.cmake 2022-05-24 18:49:29.201851876 -0400
@@ -998,6 +998,7 @@
FOLDER "${folder}"
PREFIX "${PXR_LIB_PREFIX}"
IMPORT_PREFIX "${PXR_LIB_PREFIX}"
+ SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
)
_get_install_dir("lib" libInstallPrefix)
install(

View file

@ -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

View file

@ -1 +1 @@
SHA512 (usd-22.05b.tar.gz) = 9a68ae60fe1826e3f100b3715bc41b622813caaa83dbde833d085fb2b18449bd5ec3241d74264ed8f6ea999e2652db5c8c572cd1399210f86a60483be6bc6aea
SHA512 (OpenUSD-26.08.tar.gz) = 82f7bb4f77b295be79cd36f591f242276d36c0d589b0fca383344c27e70daf7e29151bf587528bb2fc2b2a8b974387a253993ace3caf5f79ae70f9ebbc71cf1a

View file

@ -1,155 +0,0 @@
--- stb/stb_image.h 2021-09-16 11:52:38.284782000 -0700k
+++ stb_image.h 2021-09-16 13:45:48.159770000 -0700
@@ -488,14 +488,14 @@
STBIDEF void stbi_image_free (void *retval_from_stbi_load);
// get image dimensions & components without fully decoding
-STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp);
-STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp);
+STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, float *gamma);
+STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, float *gamma);
STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len);
STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *clbk, void *user);
#ifndef STBI_NO_STDIO
-STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp);
-STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp);
+STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp, float *gamma);
+STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp, float *gamma);
STBIDEF int stbi_is_16_bit (char const *filename);
STBIDEF int stbi_is_16_bit_from_file(FILE *f);
#endif
@@ -911,7 +911,7 @@
#ifndef STBI_NO_PNG
static int stbi__png_test(stbi__context *s);
static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri);
-static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp);
+static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp, float *gamma);
static int stbi__png_is16(stbi__context *s);
#endif
@@ -4554,6 +4554,7 @@
stbi__context *s;
stbi_uc *idata, *expanded, *out;
int depth;
+ float gamma = 0;
} stbi__png;
@@ -5112,6 +5113,13 @@
break;
}
+ case STBI__PNG_TYPE('g','A','M','A'): {
+ if (first) return stbi__err("first not IHDR", "Corrupt PNG");
+ if (4 != c.length) return stbi__err("invalid gAMA","Corrupt PNG");
+ z->gamma = stbi__get32be(s) / 100000.0f;
+ break;
+ }
+
case STBI__PNG_TYPE('I','D','A','T'): {
if (first) return stbi__err("first not IHDR", "Corrupt PNG");
if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG");
@@ -5243,7 +5251,7 @@
return r;
}
-static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp)
+static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp, float *gamma)
{
if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) {
stbi__rewind( p->s );
@@ -5252,21 +5260,22 @@
if (x) *x = p->s->img_x;
if (y) *y = p->s->img_y;
if (comp) *comp = p->s->img_n;
+ if (gamma) *gamma = p->gamma;
return 1;
}
-static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp, float *gamma)
{
stbi__png p;
p.s = s;
- return stbi__png_info_raw(&p, x, y, comp);
+ return stbi__png_info_raw(&p, x, y, comp, gamma);
}
static int stbi__png_is16(stbi__context *s)
{
stbi__png p;
p.s = s;
- if (!stbi__png_info_raw(&p, NULL, NULL, NULL))
+ if (!stbi__png_info_raw(&p, NULL, NULL, NULL, NULL))
return 0;
if (p.depth != 16) {
stbi__rewind(p.s);
@@ -7538,14 +7547,14 @@
}
#endif
-static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp)
+static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp, float *gamma)
{
#ifndef STBI_NO_JPEG
if (stbi__jpeg_info(s, x, y, comp)) return 1;
#endif
#ifndef STBI_NO_PNG
- if (stbi__png_info(s, x, y, comp)) return 1;
+ if (stbi__png_info(s, x, y, comp, gamma)) return 1;
#endif
#ifndef STBI_NO_GIF
@@ -7597,23 +7606,23 @@
}
#ifndef STBI_NO_STDIO
-STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp)
+STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp, float *gamma)
{
FILE *f = stbi__fopen(filename, "rb");
int result;
if (!f) return stbi__err("can't fopen", "Unable to open file");
- result = stbi_info_from_file(f, x, y, comp);
+ result = stbi_info_from_file(f, x, y, comp, gamma);
fclose(f);
return result;
}
-STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp)
+STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp, float *gamma)
{
int r;
stbi__context s;
long pos = ftell(f);
stbi__start_file(&s, f);
- r = stbi__info_main(&s,x,y,comp);
+ r = stbi__info_main(&s,x,y,comp, gamma);
fseek(f,pos,SEEK_SET);
return r;
}
@@ -7640,18 +7649,18 @@
}
#endif // !STBI_NO_STDIO
-STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp)
+STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, float *gamma)
{
stbi__context s;
stbi__start_mem(&s,buffer,len);
- return stbi__info_main(&s,x,y,comp);
+ return stbi__info_main(&s,x,y,comp, gamma);
}
-STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp)
+STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp, float *gamma)
{
stbi__context s;
stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user);
- return stbi__info_main(&s,x,y,comp);
+ return stbi__info_main(&s,x,y,comp, gamma);
}
STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len)

796
usd.spec
View file

@ -2,65 +2,105 @@
# package version, as a reminder of the need to rebuild dependent packages on
# every update. See additional notes near the downstream ABI versioning patch.
# It should be 0.MAJOR.MINOR without leading zeros, e.g. 22.03 → 0.22.3.
%global downstream_so_version 0.22.5
%global downstream_so_version 0.26.8
%bcond_without alembic
%bcond_with documentation
%bcond_without embree
%bcond_without imaging
%bcond_with jemalloc
%bcond_with openshading
%bcond_with openvdb
%bcond_without ocio
%bcond_without oiio
%bcond_without python3
%bcond_without usdview
%bcond alembic 1
%bcond draco 1
%bcond embree 1
%bcond jemalloc 0
%bcond materialx 1
# Default "UNIX Makefiles" backend for CMake would also work fine; ninja is a
# bit faster. We conditionalize it just in case there are backend-specific
# issues in the future.
%bcond ninja 1
%bcond openshading 1
%bcond openvdb 1
%bcond ocio 1
%bcond oiio 1
%bcond ptex 1
%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
# into /usr/tests, and there are issues with the launchers finding the
# command-line tools in the buildroot.
%bcond_with test
%bcond test 0
Name: usd
Version: 22.05b
Release: %autorelease -b 9
Version: 26.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}
# - pxr/imaging/plugin/hdEmbree/pxrPbrt/pbrtUtils.h
# - pxr/imaging/plugin/hdEmbree/pxrIES/pxr-IES.patch
# - pxr/imaging/plugin/hdEmbree/pxrIES/ies.{cpp,h}
# BSD-3-Clause:
# - pxr/base/gf/ilmbase_*
# - pxr/base/js/rapidjson/msinttypes/
# - pxr/base/tf/pxrDoubleConversion/
# - pxr/base/js/rapidjson/msinttypes/ (removed in %%prep)
# - pxr/base/tf/pxrCLI11/ (removed in %%prep)
# - pxr/base/tf/pxrDoubleConversion/ (removed in %%prep)
# - pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/
# - pxr/imaging/plugin/hioAvif/AVIF/src/src-libyuv/
# BSD-2-Clause:
# - pxr/base/tf/pxrLZ4/
# - pxr/base/tf/pxrLZ4/ (removed in %%prep)
# - pxr/imaging/plugin/hioAvif/AVIF/, except
# pxr/imaging/plugin/hioAvif/AVIF/src/src-libyuv/;
# pxr/imaging/plugin/hioAvif/AVIF/src/avif_obu.c has a different copyright
# - pxr/imaging/plugin/hioAvif/aom/
# BSL-1.0:
# - pxr/external/boost/
# MIT:
# - pxr/imaging/garch/khrplatform.h
# - pxr/base/js/rapidjson/, except pxr/base/js/rapidjson/msinttypes/
# - third_party/renderman-24/plugin/rmanArgsParser/pugixml/
# - docs/doxygen/doxygen-awesome-css/ (removed in %%prep)
# - pxr/base/js/rapidjson/, except pxr/base/js/rapidjson/msinttypes/ (both
# removed in %%prep)
# - pxr/base/pegtl/
# - pxr/base/tf/pxrTslRobinMap/
# - pxr/imaging/garch/khrplatform.h
# - pxr/imaging/hgiVulkan/vk_mem_alloc.h
# - pxr/imaging/plugin/hioOpenEXR/OpenEXR/deflate/ (removed in %%prep)
# - third_party/renderman/plugin/rmanArgsParser/pugixml/ (removed in %%prep)
# 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}
# - third_party/renderman/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)
#
# Note that the license assigned the SPDX identifier Pixar was later officially
# named Tomorrow Open Source Technology License 1.0, TOST-1.0, with no change
# to its terms.
License: %{shrink:
Pixar AND
Apache-2.0 AND
BSD-3-Clause AND
BSD-2-Clause AND
BSL-1.0 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/%{name}
Source0: %{forgeurl}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: org.open%{name}.%{name}view.desktop
# Latest stb_image.patch that applies cleanly against 2.27:
# %%{forgeurl}/raw/8f9bb9563980b41e7695148b63bf09f7abd38a41/pxr/imaging/hio/stb/stb_image.patch
# We treat this as a source file because it is applied separately during
# unbundling. It has been hand-edited to apply to 2.28, where
# stbi__unpremultiply_on_load_thread is already renamed to
# stbi_set_unpremultiply_on_load_thread.
Source2: stb_image.patch
%global forgeurl https://github.com/PixarAnimationStudios/OpenUSD
Source0: %{forgeurl}/archive/v%{version}/OpenUSD-%{version}.tar.gz
Source1: org.openusd.usdview.desktop
# Downstream-only: add an SONAME version
#
# Upstream was asked about .so versioning and setting SONAME properly and
# seemed unprepared to handle the request:
# https://github.com/PixarAnimationStudios/USD/issues/1259#issuecomment-657120216
@ -85,101 +125,144 @@ Source2: stb_image.patch
# to be versioned as well, which is undesired. This is not a serious problem
# because we do not want to package the built plugin anyway. (It should not be
# built with -DPXR_BUILD_EXAMPLES=OFF, but it is.)
Patch: USD-22.05-soversion.patch
# Add missing #include for GCC13
# https://github.com/PixarAnimationStudios/USD/pull/2215
Patch: %{forgeurl}/pull/2215.patch
Patch: 0001-Downstream-only-add-an-SONAME-version.patch
# Support OpenEXR 3
# https://github.com/PixarAnimationStudios/USD/issues/1591
# Downstream-only: use Valgrind macro instead of inline assembly
#
# See also:
# Support compiling against imath
# https://github.com/PixarAnimationStudios/USD/pull/1829
# Support OpenVDB without depending on OpenEXR
# https://github.com/PixarAnimationStudios/USD/pull/1728
Patch: USD-22.05-OpenEXR3.patch
# Upstream already has a plan to make this change, but is waiting to be
# able to add a build dependency on valgrind-devel. We have no such
# obstacle, and this change fixes the inline assembly failing to compile
# on aarch64.
Patch: 0001-Downstream-only-use-Valgrind-macro-instead-of-inline.patch
# Allow building against recent glibc with no malloc hooks (>= 2.34)
# https://github.com/PixarAnimationStudios/USD/pull/1830
Patch: %{forgeurl}/pull/1830.patch
# Downstream-only: use the system double-conversion library
Patch: 0001-Downstream-only-use-the-system-double-conversion-lib.patch
# Downstream-only: use the system lz4 library
Patch: 0002-Downstream-only-use-the-system-lz4-library.patch
# Downstream-only: use the system pugixml library
Patch: 0003-Downstream-only-use-the-system-pugixml-library.patch
# Downstream-only: use the system rapidjson library
Patch: 0004-Downstream-only-use-the-system-rapidjson-library.patch
# Downstream-only: use the system libdeflate library
Patch: 0005-Downstream-only-use-the-system-libdeflate.patch
# Downstream-only: use the system libavif library
Patch: 0006-Downstream-only-use-the-system-libavif.patch
# Do not access PyFrameObject fields directly on Python 3.10+
#
# Fixes a Python 3.11 incompatibility. Still accesses PyCodeObject fields
# directly.
# https://github.com/PixarAnimationStudios/USD/pull/1928
Patch: %{forgeurl}/pull/1928.patch
# Backport fixes for CVE-2025-64181 etc. in OpenEXRCore
# https://github.com/PixarAnimationStudios/OpenUSD/pull/3903
Patch: %{forgeurl}/pull/3903.patch
# Port to Embree 4.x
# https://github.com/PixarAnimationStudios/USD/pull/2266
Patch: %{forgeurl}/pull/2266.patch
# Replace PyWeakref_GetObject with PyWeakref_GetRef
# Fixes RHBZ#2433881. This patch is LLM-generated and needs expert human
# review, but it at least builds. See discussion in
# https://bugzilla.redhat.com/show_bug.cgi?id=2433881.
# Mentioned upstream in
# https://github.com/PixarAnimationStudios/OpenUSD/issues/3966#issuecomment-5128542913.
Patch: 0001-Replace-PyWeakref_GetObject-with-PyWeakref_GetRef.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
BuildRequires: cmake
%if %{with ninja}
BuildRequires: ninja-build
%endif
# For imaging and usd imaging
%if %{with imaging}
BuildRequires: dos2unix
BuildRequires: help2man
BuildRequires: pkgconfig(blosc)
BuildRequires: pkgconfig(dri)
BuildRequires: hdf5-devel
BuildRequires: cmake(OpenSubdiv)
BuildRequires: pkgconfig(tbb)
# This seems to be an indirect dependency, probably through OpenSubdiv.
# Ideally, everything would take care of its own dependencies, and we wouldnt
# have to specify it directly, but we havent studied the problem closely
# enough to propose a fix.
BuildRequires: pkgconfig(OpenCL)
# Unbundled:
BuildRequires: cmake(double-conversion)
BuildRequires: pkgconfig(liblz4)
BuildRequires: cli11-devel cli11-static
BuildRequires: cmake(pugixml)
BuildRequires: rapidjson-devel rapidjson-static
BuildRequires: robin-map-devel robin-map-static
BuildRequires: pkgconfig(libdeflate)
# Unbundling this means we also use external versions of libaom and libyuv.
BuildRequires: pkgconfig(libavif)
BuildRequires: cmake(Imath) >= 3.0
# Introduced by 0001-Downstream-only-use-Valgrind-macro-instead-of-inline.patch
BuildRequires: valgrind-devel
%if %{with alembic}
BuildRequires: cmake(Alembic)
%endif
%if %{with draco}
BuildRequires: draco-devel
%endif
%if %{with embree}
BuildRequires: embree-devel
%endif
%if %{with jemalloc}
BuildRequires: pkgconfig(jemalloc)
%endif
%if %{with materialx}
BuildRequires: cmake(materialx)
BuildRequires: materialx-data
BuildRequires: pkgconfig(xt)
BuildRequires: python3-materialx
%endif
%if %{with ocio}
BuildRequires: cmake(OpenColorIO)
%endif
%if %{with oiio}
BuildRequires: cmake(OpenImageIO)
%endif
%if %{with openshading}
BuildRequires: openshadinglanguage
BuildRequires: pkgconfig(oslexec)
%endif
BuildRequires: opensubdiv-devel
%if %{with openvdb}
BuildRequires: openvdb-devel
%endif
BuildRequires: pkgconfig(dri)
%if %{with jemalloc}
BuildRequires: pkgconfig(jemalloc)
%endif
%if %{with ocio}
BuildRequires: cmake(OpenColorIO)
%endif
%if %{with oiio}
BuildRequires: pkgconfig(OpenImageIO)
%endif
BuildRequires: cmake(OpenEXR)
BuildRequires: cmake(Imath) >= 2.0
BuildRequires: pkgconfig(Ptex)
%endif
%if %{with alembic}
BuildRequires: cmake(Alembic)
BuildRequires: hdf5-devel
%if %{with ptex}
BuildRequires: cmake(ptex)
%endif
# Header-only library: -static is for tracking per guidelines
#
# Enforce the the minimum EVR to contain fixes for all of CVE-2021-28021,
# CVE-2021-42715, CVE-2021-42716, and CVE-2022-28041, plus the null-pointer
# dereference bug https://github.com/nothings/stb/issues/1452.
BuildRequires: stb_image-devel >= 2.28^20230129git5736b15-0.2
BuildRequires: stb_image-static
BuildRequires: stb_image_write-devel >= 1.16
BuildRequires: stb_image_write-static
BuildRequires: stb_image_resize-devel >= 0.97
BuildRequires: stb_image_resize-static
# Enforce the the minimum EVR to contain fixes for all of:
# CVE-2021-28021
# CVE-2021-42715
# CVE-2021-42716
# CVE-2022-28041
# CVE-2023-43898
# CVE-2023-45661
# CVE-2023-45662
# CVE-2023-45663
# CVE-2023-45664
# CVE-2023-45666
# CVE-2023-45667
# https://github.com/nothings/stb/issues/1860
# https://github.com/nothings/stb/issues/1861
BuildRequires: stb_image-static >= 2.30^20251025gitf1c79c0-2
BuildRequires: stb_image_write-static >= 1.16
BuildRequires: stb_image_resize-static >= 0.97
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%if %{with python3}
Requires: python3-%{name}%{?_isa} = %{version}-%{release}
%endif
Requires: usd-libs%{?_isa} = %{version}-%{release}
Requires: python3-usd%{?_isa} = %{version}-%{release}
# This package is only available for x86_64 and aarch64
# Will fail to build on other architectures
@ -187,7 +270,7 @@ Requires: python3-%{name}%{?_isa} = %{version}-%{release}
#
# Note that pxr/base/arch/assumptions.cpp explicitly tests the machine is not
# big-endian, and pxr/base/arch/defines.h explicitly enforces x86_64 or ARM64.
ExclusiveArch: aarch64 x86_64
ExclusiveArch: %{arm64} %{x86_64}
%description
Universal Scene Description (USD) is a time-sampled scene
@ -196,29 +279,130 @@ description for interchange between graphics applications.
%package libs
Summary: Universal Scene Description library
# Upstream bundles
# Filed ticket to convince upstream to use system libraries
# https://github.com/PixarAnimationStudios/USD/issues/1490
# Version from: pxr/base/tf/pxrDoubleConversion/README
Provides: bundled(double-conversion) = 2.0.0
# Use system libraries instead of bundling them when possible
# https://github.com/PixarAnimationStudios/USD/issues/1490
# See also:
# Path to using external/system copies of OpenEXRCore and libdeflate?
# https://github.com/PixarAnimationStudios/OpenUSD/issues/2619
# Version from: pxr/base/gf/ilmbase_half.README
#
# This is difficult to unbundle even in the manner of double-conversion: code
# that uses the half type is compatible with ilmbase version 2 (as packaged in
# openexr2) rather than version 3 (as packaged in the ilmbase package).
# Unfortunately, we need cmake(Imath) elsewhere in the package, and this comes
# from the imath package (version 3), which conflicts with the imath version 2
# libraries included with openexr2. So this will not be possible until the
# surrounding code is patched (upstream or downstream) for compatibility with
# ilmbase version 3, something were currently not willing to attempt.
Provides: bundled(ilmbase) = 2.5.3
# Version from: pxr/base/pegtl/pegtl/version.hpp
# Currently, Fedoras PEGTL is too old:
# https://bugzilla.redhat.com/show_bug.cgi?id=1902427
Provides: bundled(PEGTL) = 3.2.7
# Version from
# pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/openexr_version.h
# From pxr/imaging/plugin/hioOpenEXR/OpenEXR/README.md:
# A few changes are still in progress to upstreamed to the OpenEXR project,
# but these are minor, and otherwise, almost all differences between the
# interred OpenEXRCore and the official OpenEXR repo are consolidated to the
# openexr_conf.h header. The remaining differences are removing an extern
# marking from the few global data tables.
# This suggests that it may not be entirely safe to unbundle this.
Provides: bundled(openexr) = 3.2.0
# Version from the message for the commit
# e7a8d718c7c113e1c653ee31dc52421f17e09b42 that introduced pxr/external/boost/:
#
# python: Initial import of boost::python from boost 1.85.0
# This change just brings boost::python into the tree as a starting point for
# the pxr_boost::python implementation. The src/ and test/ directories are
# placed next to the public headers since we don't have separate
# public/private directory hierarchies like boost, but the code itself is
# unchanged and not included in the build.
#
# We use boost 1.85.0 as the starting point even though we're currently on
# VFX Reference Platform 2022, which specifies boost 1.76.0. This is because
# later versions of boost are needed for other platforms and versions of
# Python that OpenUSD supports. For example Python 3.11 requires boost
# 1.82.0+.
#
# This is not a candidate for unbundling because upstream has explicitly forked
# boost::python and modified it to work without the rest of Boost as part of an
# effort to remove the Boost dependency. While pxr_boost::python is derived
# from boost::python, it is not intended to remain compatible with it.
Provides: bundled(boost) = 1.85.0
# From LICENSE.txt:
# ===========================================================
# PBRT (Sampling functions)
# ============================================================
# USD includes code derived from the pbrt-v4 library, retrieved from
# https://github.com/mmp/pbrt-v4/tree/8c19f304558fd7681e2fef2c395a689d0106fb05, which was
# provided subject to the unmodified Apache 2.0 license. For details, see
# https://github.com/mmp/pbrt-v4/blob/8c19f304558fd7681e2fef2c395a689d0106fb05/LICENSE.txt
#
# The bundled routines in pxr/imaging/plugin/hdEmbree/pxrPbrt/pbrtUtils.h are
# just a handful of small internal utility functions. It would not be
# reasonable to add a dependency on the full pbrt ray tracer even if these were
# exposed in a public API.
Provides: bundled(pbrt-v4) = 4~20251208.8c19f30
# From LICENSE.txt:
# ============================================================
# Cycles (IES reader)
# ============================================================
# USD includes classes from the Blender Foundation's Cycles project, retrieved from
# https://projects.blender.org/blender/cycles/src/commit/0be21d452506ec90259b9063c28b5a6fc1cac6a1,
# which was provided subject to the unmodified Apache 2.0 license. For details, see
# https://projects.blender.org/blender/cycles/src/commit/0be21d452506ec90259b9063c28b5a6fc1cac6a1/LICENSE
#
# These are not a candidate for unbundling because they are internal utility
# functions not available in the public API. There are also some minor
# modifications for OpenUSD, documented in
# pxr/imaging/plugin/hdEmbree/pxrIES/pxr-IES.patch.
#
# Is this commit a post-release snapshot of 4.5.0, or a pre-release snapshot of
# 5.0.0? How can we tell? There doesnt seem to be a project version number
# embedded in the source tree. Since this commit hash is only two commits ahead
# of the v4.5.0 tag, we consider it a 4.5.0 post-release.
Provides: bundled(cycles) = 4.5.0^20251210.0be21d4
# We are currently able to unbundle these and use system libraries, but we
# retain the virtual Provides, commented out, as documentation and in case we
# ever have to switch back to the bundled versions.
#
# Version from: pxr/base/tf/pxrDoubleConversion/README
# Provides: bundled(double-conversion) = 3.3.0
# Version from: pxr/base/tf/pxrLZ4/lz4.h (LZ4_VERSION_{MAJOR,MINOR_PATCH})
Provides: bundled(lz4) = 1.9.2
# Provides: bundled(lz4) = 1.9.2
# Version from: pxr/base/tf/pxrCLI11/README.md
# Provides: bundled(cli11) = 2.3.1
# Version from:
# third_party/renderman-24/plugin/rmanArgsParser/pugixml/pugiconfig.hpp
# third_party/renderman/plugin/rmanArgsParser/pugixml/pugiconfig.hpp
# (header comment)
Provides: bundled(pugixml) = 1.9
# Provides: bundled(pugixml) = 1.9
# Version from: pxr/base/js/rapidjson/rapidjson.h
# (RAPIDJSON_{MAJOR,MINOR,PATCH}_VERSION)
Provides: bundled(rapidjson) = 1.0.2
# Version from: pxr/imaging/hgiVulkan/spirv_reflect.h (header comment)
Provides: bundled(SPIRV-Reflect) = 1.0
# Version from: pxr/imaging/hgiVulkan/vk_mem_alloc.h (header comment)
Provides: bundled(VulkanMemoryAllocator) = 3.0.0~development
# Forked from an unknown version:
# pxr/base/tf/pxrTslRobinMap/
Provides: bundled(robin-map)
# Provides: bundled(rapidjson) = 1.1.0
# Version from: pxr/base/tf/pxrTslRobinMap/robin_growth_policy.h
# (PXR_TSL_RH_VERSION_{MAJOR,MINOR,PATCH})
# Provides: bundled(robin-map) = 1.3.0
# Version from pxr/imaging/plugin/hioOpenEXR/OpenEXR/deflate/libdeflate.h
# Provides: bundled(libdeflate) = 1.18
# Version from pxr/imaging/plugin/hioAvif/AVIF/src/avif/avif.h
# We actually have a post-release snapshot of libavif, because
# AVIF_VERSION_DEVEL is nonzero, but its not easy to determine which commit
# hash it was copied from.
# Provides: bundled(libavif) = 1.0.1
# Version from pxr/imaging/plugin/hioAvif/AVIF/src/src-libyuv/libyuv/version.h
# LIBYUV_VERSION is a “serial number” version, e.g. 1895, that gets incremented
# every time changes are dumped into git from an internal VCS; the libyuv
# package in Fedora is considered to have version 0 and uses snapshot
# versioning. We can dig through
# https://chromium.googlesource.com/libyuv/libyuv and find the commit hash that
# corresponds to a particular serial number.
# LIBYUV_VERSION 1895 = commit a97746349b244efd54ab1eb0c0a7366717b33f39
# Provides: bundled(libyuv) = 0^20240812.a977463
# Version from pxr/imaging/plugin/hioAvif/config/aom_version.h
# Provides: bundled(aom) = 3.0.0
%description libs
Universal Scene Description (USD) is an efficient, scalable system for
@ -227,61 +411,59 @@ interchange between graphics applications.
%package devel
Summary: Development files for USD
Requires: cmake-filesystem
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: usd-libs%{?_isa} = %{version}-%{release}
# Unbundled, and exposed in the API:
Requires: cli11-devel cli11-static
Requires: robin-map-devel robin-map-static
# Needed by cmake config
Requires: cmake(OpenSubdiv)
%if %{with materialx}
Requires: cmake(materialx)
%endif
%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.
libraries for usd. If you would like to develop programs using usd,
you will need to install usd-devel.
# For usdview
%if %{with python3}
%package -n python3-%{name}
# For usdview, usdcompress
%package -n python3-usd
Summary: %{summary}
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(Qt5)
BuildRequires: python3dist(jinja2)
%if %{with usdview}
BuildRequires: desktop-file-utils
BuildRequires: python3dist(pyside2)
%endif
BuildRequires: python3dist(pyside6)
BuildRequires: pyside6-tools
BuildRequires: python3dist(pyopengl)
%endif
Requires: font(roboto)
Requires: font(robotoblack)
Requires: font(robotolight)
Requires: font(robotomono)
Requires: python3dist(jinja2)
%if %{with usdview}
Requires: python3dist(pyside2)
%endif
Requires: python3dist(pyside6)
Requires: python3dist(pyopengl)
%endif
Requires: usd-libs%{?_isa} = %{version}-%{release}
%py_provides python3-pxr
%description -n python3-%{name}
%description -n python3-usd
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 USD-%{version}
%autosetup -p1 -n OpenUSD-%{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}' \
@ -297,27 +479,101 @@ 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 .
patch -p1 < '%{SOURCE2}'
ln -svf %{_includedir}/stb_image_resize.h \
%{_includedir}/stb_image_write.h ./
cp -p %{_usr}/include/stb_image.h .
patch -p1 < stb_image.patch
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
# building Doxygen-generated HTML documentation.
rm -rf docs/doxygen/doxygen-awesome-css/
# Remove the bundled copy of double-conversion.
#
# From pxr/base/tf/pxrDoubleConversion/README, the upstream double-conversion
# is patched with pxr/base/tf/pxrDoubleConversion/pxr-double-conversion.patch;
# examination of that patch shows that it merely adds namespaces and renames
# symbols, rather than making functional changes, so using the system library
# should be safe.
find pxr/base/tf/pxrDoubleConversion -type f ! -name '*.h' -print -delete
for hdr in pxr/base/tf/pxrDoubleConversion/*.h
do
cat > "${hdr}" <<EOF
#include <double-conversion/$(basename "${hdr}")>
namespace pxr_double_conversion = double_conversion;
EOF
done
# Similarly, remove the bundled copy of lz4. Change in the bundled copy can be
# identified by source-code comments, and appear to be limited to adding
# namespaces and removing C linkage.
rm -v pxr/base/tf/pxrLZ4/*
cat > pxr/base/tf/pxrLZ4/lz4.h <<'EOF'
#include <lz4.h>
// System LZ4 has C linkage; this just allows "using namespace"
namespace pxr_lz4 {}
EOF
# Remove the bundled copy of cli11.
rm -v pxr/base/tf/pxrCLI11/*
cat > pxr/base/tf/pxrCLI11/CLI11.h <<'EOF'
#include <CLI/CLI.hpp>
namespace pxr_CLI = CLI;
EOF
# Remove the bundled copy of pugixml.
find third_party/renderman/plugin/rmanArgsParser/pugixml/ \
-type f ! -name '*.hpp' -print -delete
for hdr in third_party/renderman/plugin/rmanArgsParser/pugixml/*.hpp
do
cat > "${hdr}" <<EOF
#include <$(basename "${hdr}")>
EOF
done
# Remove the bundled copy of rapidjson. It does not seem to have been modified
# or forked at all.
rm -rv pxr/base/js/rapidjson/
# Remove the bundled copy of robin-map. There are several macros that are
# renamed from TSL_*/tsl_* to PXR_TSL_*/pxr_tsl_* in the bundled copy, and we
# could “alias” these if necessary to avoid patching call sites, but for now
# are not used outside the library headers and we can get by with merely
# aliasing the namespace.
find pxr/base/tf/pxrTslRobinMap -type f ! -name '*.h' -print -delete
for hdr in pxr/base/tf/pxrTslRobinMap/*.h
do
cat > "${hdr}" <<EOF
#include <tsl/$(basename "${hdr}")>
namespace pxr_tsl = tsl;
EOF
done
# Remove the bundled copy of libdeflate.
rm -rv pxr/imaging/plugin/hioOpenEXR/OpenEXR/deflate/
# Remove the bundled copies of libavif, along with the associated libaom and
# the libyuv that is in the libavif sources.
rm -rv pxr/imaging/plugin/hioAvif/aom/ \
pxr/imaging/plugin/hioAvif/AVIF/
# 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|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
@ -327,72 +583,68 @@ 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/'
%build
# Fix uic-qt5 use
cat > uic-wrapper <<'EOF'
#!/bin/sh
exec uic-qt5 -g python "$@"
EOF
chmod +x uic-wrapper
# The necessary include path for Imath is not set everywhere its needed. Its
# not immediately clear exactly why this is happening here or what should be
# changed upstream.
extra_flags="${extra_flags-} $(pkgconf --cflags Imath)"
# Fix python3 support
# https://github.com/PixarAnimationStudios/USD/issues/1419
flags="%{optflags} -Wl,--as-needed -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1" \
# Patch2 was not good enough to get the include path for Imath everywhere it
# was needed. Add it globally.
# https://github.com/PixarAnimationStudios/USD/issues/1591
flags="${flags} $(pkgconf --cflags Imath)"
# Suppress deprecation warnings from TBB; upstream should act on them
# eventually, but they just add noise here.
extra_flags="${extra_flags-} -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1"
%cmake \
-DCMAKE_CXX_FLAGS_RELEASE="${flags}" \
-DCMAKE_C_FLAGS_RELEASE="${flags}" \
-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=%{?with_usdview:ON}%{?!with_usdview:OFF} \
%if %{with documentation}
-DPXR_BUILD_DOCUMENTATION=TRUE \
%if %{with ninja}
-GNinja \
%endif
-DPXR_BUILD_EXAMPLES=OFF \
-DPXR_BUILD_TUTORIALS=OFF \
-DPXR_BUILD_TESTS=%{?with_test:ON}%{!?with_test:OFF} \
%if %{with openvdb}
-DPXR_ENABLE_OPENVDB_SUPPORT=ON \
%endif
-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 ocio}
-DPXR_BUILD_OPENCOLORIO_PLUGIN=ON \
%endif
%if %{with oiio}
-DPXR_BUILD_OPENIMAGEIO_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
\
-DCMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS-} ${extra_flags}" \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS-} ${extra_flags}" \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
\
-DPXR_BUILD_HTML_DOCUMENTATION=FALSE \
-DPXR_BUILD_PYTHON_DOCUMENTATION=FALSE \
-DPXR_BUILD_EXAMPLES=OFF \
-DPXR_BUILD_IMAGING=ON \
-DPXR_BUILD_MONOLITHIC=ON \
-DPXR_ENABLE_MALLOCHOOK_SUPPORT=OFF
-DPXR_BUILD_TESTS=%{expr:%{with test}?"ON":"OFF"} \
-DPXR_BUILD_TUTORIALS=OFF \
-DPXR_BUILD_USD_IMAGING=ON \
-DPXR_BUILD_EXEC=ON \
-DPXR_BUILD_USD_TOOLS=ON \
-DPXR_BUILD_USDVIEW=%{expr:%{with usdview}?"ON":"OFF"} \
\
-DPXR_BUILD_ALEMBIC_PLUGIN=%{expr:%{with alembic}?"ON":"OFF"} \
-DPXR_BUILD_DRACO_PLUGIN=%{expr:%{with draco}?"ON":"OFF"} \
-DPXR_BUILD_EMBREE_PLUGIN=%{expr:%{with embree}?"ON":"OFF"} \
-DPXR_BUILD_OPENCOLORIO_PLUGIN=%{expr:%{with ocio}?"ON":"OFF"} \
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=%{expr:%{with oiio}?"ON":"OFF"} \
-DPXR_BUILD_PRMAN_PLUGIN=OFF \
\
-DPXR_ENABLE_OPENVDB_SUPPORT=%{expr:%{with openvdb}?"ON":"OFF"} \
-DPXR_ENABLE_HDF5_SUPPORT=ON \
-DPXR_ENABLE_PTEX_SUPPORT=%{expr:%{with ptex}?"ON":"OFF"} \
-DPXR_ENABLE_OSL_SUPPORT=%{expr:%{with openshading}?"ON":"OFF"} \
-DPXR_ENABLE_MALLOCHOOK_SUPPORT=OFF \
-DPXR_ENABLE_MATERIALX_SUPPORT=%{expr:%{with materialx}?"ON":"OFF"} \
-DPXR_ENABLE_PYTHON_SUPPORT=ON \
\
-DPXR_INSTALL_LOCATION="%{_libdir}/usd/plugin" \
\
-DPXR_VALIDATE_GENERATED_CODE=OFF \
\
-DPYSIDEUICBINARY:PATH=pyside6-uic \
-DPYSIDE_AVAILABLE=ON \
-DPYTHON_EXECUTABLE=%{python3}
%cmake_build
%install
@ -402,6 +654,10 @@ flags="${flags} $(pkgconf --cflags Imath)"
mkdir -p %{buildroot}%{python3_sitearch}
mv %{buildroot}%{python3_sitelib}/* %{buildroot}%{python3_sitearch}
# Upstream may expect to use this as a script in development, but we install it
# without executable permissions, so we remove the shebang.
sed -r -i '1{/^#!/d}' '%{buildroot}%{python3_sitearch}/pxr/Usd/usdGenSchema.py'
%if %{with usdview}
# Install a desktop icon for usdview
desktop-file-install \
@ -409,78 +665,124 @@ desktop-file-install \
%{SOURCE1}
%endif
# Little hack until this issue is resolved
# https://github.com/PixarAnimationStudios/OpenUSD/issues/3310
sed -i 's|OpenGL::GL|${OPENGL_gl_LIBRARY}|g' \
%{buildroot}%{_libdir}/cmake/pxr/pxrTargets.cmake
# Remove examples that were built and installed even though we set
# -DPXR_BUILD_EXAMPLES=OFF.
rm -vrf '%{buildroot}%{_datadir}/%{name}/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
# Currently, the pxrConfig.cmake that is installed is not correct for
# monolithic builds (and we must do a monolithic build in order to be usable as
# a dependency for Blender). It relies on the libraries that would be in
# pxrTargets.cmake, which is not generated for monolithic builds.
# https://bugzilla.redhat.com/show_bug.cgi?id=2055414
# https://github.com/PixarAnimationStudios/USD/issues/1088
rm -vrf '%{buildroot}%{_libdir}/cmake'
# 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
# especially true for the entry points that are Python scripts.
install -d '%{buildroot}%{_mandir}/man1'
for cmd in %{buildroot}%{_bindir}/*
do
PYTHONPATH='%{buildroot}%{python3_sitearch}' \
LD_LIBRARY_PATH='%{buildroot}%{_libdir}' \
help2man \
--no-info --no-discard-stderr --version-string='%{version}' \
--output="%{buildroot}%{_mandir}/man1/$(basename "${cmd}").1" \
"${cmd}"
done
%check
%if %{with usdview}
desktop-file-validate %{buildroot}%{_datadir}/applications/org.open%{name}.%{name}view.desktop
desktop-file-validate %{buildroot}%{_datadir}/applications/org.openusd.usdview.desktop
%endif
%{?with_test:%ctest}
%files
%doc NOTICE.txt README.md
%{_bindir}/hdGenSchema
%{_bindir}/sdfdump
%{_bindir}/sdffilter
%if %{with materialx}
%{_bindir}/usdBakeMaterialX
%endif
%{_bindir}/usdGenSchema
%{_bindir}/usdInitSchema
%{_bindir}/usdcat
%{_bindir}/usdchecker
%if %{with draco}
%{_bindir}/usdcompress
%endif
%{_bindir}/usddiff
%{_bindir}/usddumpcrate
%{_bindir}/usdedit
%{_bindir}/usdfixbrokenpixarschemas
%{_bindir}/usdgenschemafromsdr
%{_bindir}/usdmeasureperformance
%{_bindir}/usdrecord
%{_bindir}/usdresolve
%{_bindir}/usdstitch
%{_bindir}/usdstitchclips
%{_bindir}/usdtree
%{_bindir}/usdupdatecrate
%{_bindir}/usdzip
%if %{with python3}
%files -n python3-%{name}
%{python3_sitearch}/pxr
%if %{with usdview}
%{_datadir}/applications/org.open%{name}.%{name}view.desktop
%{_datadir}/applications/org.openusd.usdview.desktop
%{_bindir}/testusdview
%{_bindir}/usdview
%endif
%{_mandir}/man1/hdGenSchema.1*
%{_mandir}/man1/sdfdump.1*
%{_mandir}/man1/sdffilter.1*
%if %{with materialx}
%{_mandir}/man1/usdBakeMaterialX.1*
%endif
%{_mandir}/man1/usdGenSchema.1*
%{_mandir}/man1/usdInitSchema.1*
%{_mandir}/man1/usdcat.1*
%{_mandir}/man1/usdchecker.1*
%if %{with draco}
%{_mandir}/man1/usdcompress.1*
%endif
%{_mandir}/man1/usddiff.1*
%{_mandir}/man1/usddumpcrate.1*
%{_mandir}/man1/usdedit.1*
%{_mandir}/man1/usdfixbrokenpixarschemas.1*
%{_mandir}/man1/usdgenschemafromsdr.1*
%{_mandir}/man1/usdmeasureperformance.1*
%{_mandir}/man1/usdrecord.1*
%{_mandir}/man1/usdresolve.1*
%{_mandir}/man1/usdstitch.1*
%{_mandir}/man1/usdstitchclips.1*
%{_mandir}/man1/usdtree.1*
%{_mandir}/man1/usdupdatecrate.1*
%{_mandir}/man1/usdzip.1*
%if %{with usdview}
%{_mandir}/man1/testusdview.1*
%{_mandir}/man1/usdview.1*
%endif
%files -n python3-usd
%{python3_sitearch}/pxr/
%files libs
%license LICENSE.txt
%doc NOTICE.txt README.md
%{_libdir}/lib%{name}_%{name}_ms.so.%{downstream_so_version}
%{_libdir}/%{name}
%exclude %{_libdir}/%{name}/%{name}/resources/codegenTemplates
%{_libdir}/libusd_ms.so.%{downstream_so_version}
# While headers normally go in -devel packages, those in
# %%{_libdir}/usd/usd/resources/codegenTemplates/ are used as data (templates
# for generated code), and it makes sense to package them with the rest of the
# library resources. (Technically, these are currently used only by the
# usdGenSchema command-line tool, so they could be moved to the base package,
# but this is probably too fussy.)
%{_libdir}/usd/
%files devel
%doc BUILDING.md CHANGELOG.md VERSIONS.md
%{_includedir}/pxr/
%{_libdir}/lib%{name}_%{name}_ms.so
%{_libdir}/%{name}/%{name}/resources/codegenTemplates/
%if %{with documentation}
%files doc
%license LICENSE.txt
%{_docdir}/%{name}
%endif
%{_libdir}/libusd_ms.so
%{_libdir}/cmake/pxr/pxrConfig.cmake
%{_libdir}/cmake/pxr/pxrTargets.cmake
%{_libdir}/cmake/pxr/pxrTargets-release.cmake
%changelog
%autochangelog