| |
@@ -0,0 +1,79 @@
|
| |
+ From 7bb13a999b2d3afe13ddad0a7bd8da1e4f99ff09 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 | 1 +
|
| |
+ 3 files changed, 8 insertions(+)
|
| |
+
|
| |
+ diff --git a/cmake/defaults/Version.cmake b/cmake/defaults/Version.cmake
|
| |
+ index 1406ac2a9..197377ff2 100644
|
| |
+ --- a/cmake/defaults/Version.cmake
|
| |
+ +++ b/cmake/defaults/Version.cmake
|
| |
+ @@ -27,3 +27,9 @@ set(PXR_MINOR_VERSION "23")
|
| |
+ set(PXR_PATCH_VERSION "11") # 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 21606d4d6..4cf8aeeb6 100644
|
| |
+ --- a/cmake/macros/Private.cmake
|
| |
+ +++ b/cmake/macros/Private.cmake
|
| |
+ @@ -1299,6 +1299,7 @@ function(_pxr_library NAME)
|
| |
+ IMPORT_PREFIX "${args_PREFIX}"
|
| |
+ PREFIX "${args_PREFIX}"
|
| |
+ SUFFIX "${args_SUFFIX}"
|
| |
+ + SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
|
| |
+ )
|
| |
+
|
| |
+ target_compile_definitions(${NAME}
|
| |
+ diff --git a/cmake/macros/Public.cmake b/cmake/macros/Public.cmake
|
| |
+ index 2080d7a36..2642b603f 100644
|
| |
+ --- a/cmake/macros/Public.cmake
|
| |
+ +++ b/cmake/macros/Public.cmake
|
| |
+ @@ -1007,6 +1007,7 @@ function(pxr_toplevel_prologue)
|
| |
+ FOLDER "${folder}"
|
| |
+ PREFIX "${libPrefix}"
|
| |
+ IMPORT_PREFIX "${libPrefix}"
|
| |
+ + SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
|
| |
+ )
|
| |
+ _get_install_dir("lib" libInstallPrefix)
|
| |
+ install(
|
| |
+ --
|
| |
+ 2.41.0
|
| |
+
|
| |
Release: https://github.com/PixarAnimationStudios/OpenUSD/releases/tag/v23.11
Source diff (yes, I skimmed it all): https://github.com/PixarAnimationStudios/OpenUSD/compare/v23.08...v23.11
Changelog: https://github.com/PixarAnimationStudios/OpenUSD/blob/v23.11/CHANGELOG.md
Currently verifying Blender compatibility using a local
mock
build. Assuming that goes well, I will announce this to thedevel
mailing list today and merge and build no earlier than 2023-11-05.