|
|
bdfba18 |
# We hard-code the ABI version here, even though it can be derived from the
|
|
|
bdfba18 |
# package version, as a reminder of the need to rebuild dependent packages on
|
|
|
bdfba18 |
# every update. See additional notes near the downstream ABI versioning patch.
|
|
|
bdfba18 |
# It should be 0.MAJOR.MINOR without leading zeros, e.g. 22.03 → 0.22.3.
|
|
|
fa08a84 |
%global downstream_so_version 0.24.3
|
|
|
bdfba18 |
|
|
|
c43cbe0 |
%bcond alembic 1
|
|
|
c43cbe0 |
%bcond draco 1
|
|
|
c43cbe0 |
%bcond embree 1
|
|
|
c43cbe0 |
%bcond jemalloc 0
|
|
|
679d045 |
# Not yet packaged: https://github.com/AcademySoftwareFoundation/MaterialX
|
|
|
fa08a84 |
# https://bugzilla.redhat.com/show_bug.cgi?id=2262694
|
|
|
c43cbe0 |
%bcond materialx 0
|
|
|
9f7b7c5 |
# Default "UNIX Makefiles" backend for CMake would also work fine; ninja is a
|
|
|
9f7b7c5 |
# bit faster. We conditionalize it just in case there are backend-specific
|
|
|
9f7b7c5 |
# issues in the future.
|
|
|
c43cbe0 |
%bcond ninja 1
|
|
|
c43cbe0 |
%bcond openshading 1
|
|
|
c43cbe0 |
%bcond openvdb 1
|
|
|
c43cbe0 |
%bcond ocio 1
|
|
|
c43cbe0 |
%bcond oiio 1
|
|
|
c43cbe0 |
%bcond ptex 1
|
|
|
c9a7a6e |
%bcond pyside6 1
|
|
|
c9a7a6e |
%bcond usdview 1
|
|
|
6bf7fc0 |
# TODO: Figure out how to re-enable the tests. Currently these want to install
|
|
|
6bf7fc0 |
# into /usr/tests and, and there are issues with the launchers finding the
|
|
|
6bf7fc0 |
# command-line tools in the buildroot.
|
|
|
c43cbe0 |
%bcond test 0
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
Name: usd
|
|
|
fa08a84 |
Version: 24.03
|
|
|
7729eb9 |
Release: %autorelease
|
|
|
ba26cf7 |
Summary: 3D VFX pipeline interchange file format
|
|
|
ba26cf7 |
|
|
|
7cad7d9 |
# The entire source is Pixar except:
|
|
|
ba26cf7 |
#
|
|
|
7cad7d9 |
# Apache-2.0:
|
|
|
7cad7d9 |
# - pxr/imaging/hgiVulkan/spirv_reflect.{cpp,h}
|
|
|
a9e448e |
# BSD-3-Clause:
|
|
|
ba26cf7 |
# - pxr/base/gf/ilmbase_*
|
|
|
ba26cf7 |
# - pxr/base/js/rapidjson/msinttypes/
|
|
|
5198aef |
# - pxr/base/tf/pxrCLI11/
|
|
|
65b6168 |
# - pxr/base/tf/pxrDoubleConversion/
|
|
|
65b6168 |
# - pxr/imaging/hio/OpenEXR/OpenEXRCore/
|
|
|
a9e448e |
# BSD-2-Clause:
|
|
|
ba26cf7 |
# - pxr/base/tf/pxrLZ4/
|
|
|
ba26cf7 |
# MIT:
|
|
|
65b6168 |
# - docs/doxygen/doxygen-awesome-css/ (removed in %%prep)
|
|
|
ba26cf7 |
# - pxr/base/js/rapidjson/, except pxr/base/js/rapidjson/msinttypes/
|
|
|
65b6168 |
# - pxr/base/tf/pxrPEGTL/
|
|
|
d17b668 |
# - pxr/base/tf/pxrTslRobinMap/
|
|
|
65b6168 |
# - pxr/imaging/garch/khrplatform.h
|
|
|
d17b668 |
# - pxr/imaging/hgiVulkan/vk_mem_alloc.h
|
|
|
65b6168 |
# - pxr/imaging/hio/EpenEXR/deflate/
|
|
|
65b6168 |
# - pxr/usd/sdf/invoke.hpp
|
|
|
65b6168 |
# - third_party/renderman-24/plugin/rmanArgsParser/pugixml/
|
|
|
a9e448e |
# MIT OR Unlicense:
|
|
|
ba26cf7 |
# - pxr/imaging/hio/stb/
|
|
|
7cad7d9 |
# Pixar AND GPL-3.0-or-later WITH Bison-exception-2.2:
|
|
|
d17b668 |
# - pxr/usd/sdf/path.tab.{cpp,h}
|
|
|
d17b668 |
# - pxr/usd/sdf/textFileFormat.tab.{cpp,h}
|
|
|
d17b668 |
# - third_party/renderman-24/plugin/hdPrman/virtualStructConditionalGrammar.tab.{cpp,h}
|
|
|
a9e448e |
#
|
|
|
7cad7d9 |
# Additionally, the following would be listed above but are removed in %%prep:
|
|
|
7cad7d9 |
#
|
|
|
7cad7d9 |
# Apache-2.0:
|
|
|
7cad7d9 |
# - pxr/usdImaging/usdviewq/fonts/Roboto_Mono/
|
|
|
7cad7d9 |
# - pxr/usdImaging/usdviewq/fonts/Roboto/
|
|
|
7cad7d9 |
# MIT:
|
|
|
7cad7d9 |
# - docs/doxygen/doxygen-awesome-css/ (except doxygen-awesome-darkmode-toggle.js)
|
|
|
7cad7d9 |
# MIT AND Apache-2.0:
|
|
|
7cad7d9 |
# - docs/doxygen/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js
|
|
|
7cad7d9 |
#
|
|
|
a9e448e |
# (Certain build system files are also under licenses other than Apache-2.0, but
|
|
|
a9e448e |
# do not contribute their license terms to the built RPMs.)
|
|
|
959bb82 |
License: %{shrink:
|
|
|
7cad7d9 |
Pixar AND
|
|
|
959bb82 |
Apache-2.0 AND
|
|
|
959bb82 |
BSD-3-Clause AND
|
|
|
959bb82 |
BSD-2-Clause AND
|
|
|
959bb82 |
MIT AND
|
|
|
959bb82 |
(MIT OR Unlicense) AND
|
|
|
7cad7d9 |
(Pixar AND GPL-3.0-or-later WITH Bison-exception-2.2)
|
|
|
959bb82 |
}
|
|
|
ba26cf7 |
URL: http://www.openusd.org/
|
|
|
65b6168 |
%global forgeurl https://github.com/PixarAnimationStudios/OpenUSD
|
|
|
65b6168 |
Source0: %{forgeurl}/archive/v%{version}/OpenUSD-%{version}.tar.gz
|
|
|
8d86f16 |
Source1: org.openusd.usdview.desktop
|
|
|
7e99411 |
# Latest stb_image.patch that applies cleanly against 2.27:
|
|
|
7e99411 |
# %%{forgeurl}/raw/8f9bb9563980b41e7695148b63bf09f7abd38a41/pxr/imaging/hio/stb/stb_image.patch
|
|
|
7e99411 |
# We treat this as a source file because it is applied separately during
|
|
|
7e99411 |
# unbundling. It has been hand-edited to apply to 2.28, where
|
|
|
7e99411 |
# stbi__unpremultiply_on_load_thread is already renamed to
|
|
|
7e99411 |
# stbi_set_unpremultiply_on_load_thread.
|
|
|
7e99411 |
Source2: stb_image.patch
|
|
|
ba26cf7 |
|
|
|
eb100cb |
# Downstream-only: add an SONAME version
|
|
|
eb100cb |
#
|
|
|
bdfba18 |
# Upstream was asked about .so versioning and setting SONAME properly and
|
|
|
bdfba18 |
# seemed unprepared to handle the request:
|
|
|
bdfba18 |
# https://github.com/PixarAnimationStudios/USD/issues/1259#issuecomment-657120216
|
|
|
bdfba18 |
#
|
|
|
bdfba18 |
# A patch was offered:
|
|
|
ba26cf7 |
# https://github.com/PixarAnimationStudios/USD/issues/1387
|
|
|
bdfba18 |
# but it was not sufficient for the general case, since (1) it only handled the
|
|
|
bdfba18 |
# monolithic build, and (2) it derived the .so version from PXR_MAJOR_VERSION,
|
|
|
bdfba18 |
# which is *not* reliably bumped on API or ABI changes, and currently is still
|
|
|
bdfba18 |
# zero.
|
|
|
bdfba18 |
#
|
|
|
bdfba18 |
# We will therefore probably need to keep doing downstream .so versioning for
|
|
|
bdfba18 |
# the foreseeable future. Currently we are assuming that the ABI is likely to
|
|
|
bdfba18 |
# change on every release (an appropriate assumption for a large C++ project
|
|
|
bdfba18 |
# with no ABI stability policy), so we build the .so version from the project
|
|
|
bdfba18 |
# version. Note that the “hidden” major version is zero, so this complies with
|
|
|
bdfba18 |
# the “0.” prefix recommended in the packaging guidelines.
|
|
|
bdfba18 |
#
|
|
|
bdfba18 |
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_name_versioning
|
|
|
bdfba18 |
#
|
|
|
bdfba18 |
# A known defect of this patch is that it causes the hdTiny.so example plugin
|
|
|
bdfba18 |
# to be versioned as well, which is undesired. This is not a serious problem
|
|
|
bdfba18 |
# because we do not want to package the built plugin anyway. (It should not be
|
|
|
bdfba18 |
# built with -DPXR_BUILD_EXAMPLES=OFF, but it is.)
|
|
|
eb100cb |
Patch: 0001-Downstream-only-add-an-SONAME-version.patch
|
|
|
2472faf |
|
|
|
f7dcba9 |
# Port to Embree 4.x
|
|
|
f7dcba9 |
# https://github.com/PixarAnimationStudios/USD/pull/2266
|
|
|
f7dcba9 |
Patch: %{forgeurl}/pull/2266.patch
|
|
|
f7dcba9 |
|
|
|
1c7e24e |
Patch: USD-23.05-tbb2020.3.patch
|
|
|
1c7e24e |
|
|
|
ba26cf7 |
# Base
|
|
|
9f7b7c5 |
BuildRequires: gcc-c++
|
|
|
9f7b7c5 |
|
|
|
ba26cf7 |
BuildRequires: cmake
|
|
|
9f7b7c5 |
%if %{with ninja}
|
|
|
9f7b7c5 |
BuildRequires: ninja-build
|
|
|
9f7b7c5 |
%endif
|
|
|
9f7b7c5 |
|
|
|
ba26cf7 |
BuildRequires: dos2unix
|
|
|
4382e49 |
BuildRequires: help2man
|
|
|
9f7b7c5 |
|
|
|
ba26cf7 |
BuildRequires: pkgconfig(blosc)
|
|
|
1253f72 |
BuildRequires: boost-devel
|
|
|
1253f72 |
BuildRequires: pkgconfig(dri)
|
|
|
1253f72 |
BuildRequires: hdf5-devel
|
|
|
fa08a84 |
BuildRequires: opensubdiv-devel >= 3.6.0
|
|
|
1c7e24e |
BuildRequires: pkgconfig(tbb) = 2020.3
|
|
|
ba26cf7 |
|
|
|
1253f72 |
BuildRequires: cmake(Imath) >= 3.0
|
|
|
1253f72 |
|
|
|
1253f72 |
%if %{with alembic}
|
|
|
1253f72 |
BuildRequires: cmake(Alembic)
|
|
|
1253f72 |
%endif
|
|
|
1253f72 |
|
|
|
06228d9 |
%if %{with draco}
|
|
|
06228d9 |
BuildRequires: draco-devel
|
|
|
06228d9 |
%endif
|
|
|
1253f72 |
|
|
|
ba26cf7 |
%if %{with embree}
|
|
|
ba26cf7 |
BuildRequires: embree-devel
|
|
|
ba26cf7 |
%endif
|
|
|
1253f72 |
|
|
|
ba26cf7 |
%if %{with jemalloc}
|
|
|
ba26cf7 |
BuildRequires: pkgconfig(jemalloc)
|
|
|
ba26cf7 |
%endif
|
|
|
1253f72 |
|
|
|
840b3b7 |
%if %{with ocio}
|
|
|
68fe1a2 |
BuildRequires: cmake(OpenColorIO)
|
|
|
840b3b7 |
%endif
|
|
|
1253f72 |
|
|
|
840b3b7 |
%if %{with oiio}
|
|
|
bf2ba03 |
BuildRequires: cmake(OpenImageIO)
|
|
|
840b3b7 |
%endif
|
|
|
1253f72 |
|
|
|
1253f72 |
%if %{with openshading}
|
|
|
1253f72 |
BuildRequires: openshadinglanguage
|
|
|
1253f72 |
BuildRequires: pkgconfig(oslexec)
|
|
|
7be532d |
%endif
|
|
|
37d2418 |
|
|
|
1253f72 |
%if %{with openvdb}
|
|
|
1253f72 |
BuildRequires: openvdb-devel
|
|
|
ba26cf7 |
%endif
|
|
|
1253f72 |
|
|
|
1253f72 |
%if %{with ptex}
|
|
|
1253f72 |
BuildRequires: pkgconfig(Ptex)
|
|
|
ba26cf7 |
%endif
|
|
|
ba26cf7 |
|
|
|
1253f72 |
|
|
|
057bb66 |
# Header-only library: -static is for tracking per guidelines
|
|
|
7a1b1c4 |
#
|
|
|
fbd57c9 |
# Enforce the the minimum EVR to contain fixes for all of:
|
|
|
fbd57c9 |
# CVE-2021-28021
|
|
|
fbd57c9 |
# CVE-2021-42715
|
|
|
fbd57c9 |
# CVE-2021-42716
|
|
|
fbd57c9 |
# CVE-2022-28041
|
|
|
fbd57c9 |
# CVE-2023-43898
|
|
|
fbd57c9 |
# CVE-2023-45661
|
|
|
fbd57c9 |
# CVE-2023-45662
|
|
|
fbd57c9 |
# CVE-2023-45663
|
|
|
fbd57c9 |
# CVE-2023-45664
|
|
|
fbd57c9 |
# CVE-2023-45666
|
|
|
fbd57c9 |
# CVE-2023-45667
|
|
|
fbd57c9 |
BuildRequires: stb_image-devel >= 2.28^20231011gitbeebb24-12
|
|
|
50dbcf7 |
BuildRequires: stb_image-static
|
|
|
7e99411 |
BuildRequires: stb_image_write-devel >= 1.16
|
|
|
50dbcf7 |
BuildRequires: stb_image_write-static
|
|
|
7e99411 |
BuildRequires: stb_image_resize-devel >= 0.97
|
|
|
057bb66 |
BuildRequires: stb_image_resize-static
|
|
|
057bb66 |
|
|
|
8d86f16 |
Requires: usd-libs%{?_isa} = %{version}-%{release}
|
|
|
8d86f16 |
Requires: python3-usd%{?_isa} = %{version}-%{release}
|
|
|
ba26cf7 |
|
|
|
8b4163d |
# This package is only available for x86_64 and aarch64
|
|
|
8b4163d |
# Will fail to build on other architectures
|
|
|
8b4163d |
# https://bugzilla.redhat.com/show_bug.cgi?id=1960848
|
|
|
d17b668 |
#
|
|
|
d17b668 |
# Note that pxr/base/arch/assumptions.cpp explicitly tests the machine is not
|
|
|
d17b668 |
# big-endian, and pxr/base/arch/defines.h explicitly enforces x86_64 or ARM64.
|
|
|
8b4163d |
ExclusiveArch: aarch64 x86_64
|
|
|
8b4163d |
|
|
|
8b4163d |
%description
|
|
|
8b4163d |
Universal Scene Description (USD) is a time-sampled scene
|
|
|
8b4163d |
description for interchange between graphics applications.
|
|
|
8b4163d |
|
|
|
8b4163d |
%package libs
|
|
|
8b4163d |
Summary: Universal Scene Description library
|
|
|
8b4163d |
|
|
|
ba26cf7 |
# Filed ticket to convince upstream to use system libraries
|
|
|
65b6168 |
# Use system libraries instead of bundling them when possible
|
|
|
65b6168 |
# https://github.com/PixarAnimationStudios/USD/issues/1490
|
|
|
65b6168 |
# See also:
|
|
|
65b6168 |
# Path to using external/system copies of OpenEXRCore and libdeflate?
|
|
|
65b6168 |
# https://github.com/PixarAnimationStudios/OpenUSD/issues/2619
|
|
|
e65dac6 |
# Version from: pxr/base/tf/pxrDoubleConversion/README
|
|
|
ba26cf7 |
Provides: bundled(double-conversion) = 2.0.0
|
|
|
e65dac6 |
# Version from: pxr/base/gf/ilmbase_half.README
|
|
|
ba26cf7 |
Provides: bundled(ilmbase) = 2.5.3
|
|
|
e65dac6 |
# Version from: pxr/base/tf/pxrLZ4/lz4.h (LZ4_VERSION_{MAJOR,MINOR_PATCH})
|
|
|
ba26cf7 |
Provides: bundled(lz4) = 1.9.2
|
|
|
5198aef |
# Version from: pxr/base/tf/pxrCLI11/README.md
|
|
|
5198aef |
Provides: bundled(cli11) = 2.3.1
|
|
|
e65dac6 |
# Version from:
|
|
|
e65dac6 |
# third_party/renderman-24/plugin/rmanArgsParser/pugixml/pugiconfig.hpp
|
|
|
e65dac6 |
# (header comment)
|
|
|
ba26cf7 |
Provides: bundled(pugixml) = 1.9
|
|
|
e65dac6 |
# Version from: pxr/base/js/rapidjson/rapidjson.h
|
|
|
e65dac6 |
# (RAPIDJSON_{MAJOR,MINOR,PATCH}_VERSION)
|
|
|
26034a4 |
Provides: bundled(rapidjson) = 1.1.0
|
|
|
e65dac6 |
# Version from: pxr/imaging/hgiVulkan/spirv_reflect.h (header comment)
|
|
|
ba26cf7 |
Provides: bundled(SPIRV-Reflect) = 1.0
|
|
|
e65dac6 |
# Version from: pxr/imaging/hgiVulkan/vk_mem_alloc.h (header comment)
|
|
|
057bb66 |
Provides: bundled(VulkanMemoryAllocator) = 3.0.0~development
|
|
|
65b6168 |
# Forked from an unknown version: pxr/base/tf/pxrTslRobinMap/
|
|
|
d17b668 |
Provides: bundled(robin-map)
|
|
|
65b6168 |
# Version from: pxr/base/tf/pxrPEGTL/pegtl.h (TAO_PEGTL_VERSION)
|
|
|
65b6168 |
Provides: bundled(PEGTL) = 2.8.3
|
|
|
65b6168 |
# Version from pxr/imaging/hio/OpenEXR/OpenEXRCore/openexr_version.h
|
|
|
65b6168 |
Provides: bundled(openexr) = 3.2.0
|
|
|
65b6168 |
# Version from pxr/imaging/hio/OpenEXR/deflate/libdeflate.h
|
|
|
65b6168 |
Provides: bundled(libdeflate) = 1.18
|
|
|
65b6168 |
# Forked from https://github.com/blackmatov/invoke.hpp, which upstream has
|
|
|
65b6168 |
# never versioned; however, a copyright statement appears in the header comment
|
|
|
65b6168 |
# in pxr/usd/sdf/invoke.hpp with a date of 2023, and the only upstream commit
|
|
|
65b6168 |
# with the same date (as of this writing) is
|
|
|
65b6168 |
# 2c1eabc2e20ab02961f95c704ff0c0818671ddd1, so we infer that the bundled copy
|
|
|
65b6168 |
# was forked from that commit.
|
|
|
65b6168 |
Provides: bundled(invoke-hpp) = 0^20230107git2c1eabc
|
|
|
057bb66 |
|
|
|
ba26cf7 |
%description libs
|
|
|
ba26cf7 |
Universal Scene Description (USD) is an efficient, scalable system for
|
|
|
ba26cf7 |
authoring, reading, and streaming time-sampled scene description for
|
|
|
ba26cf7 |
interchange between graphics applications.
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
%package devel
|
|
|
ba26cf7 |
Summary: Development files for USD
|
|
|
8d86f16 |
Requires: usd-libs%{?_isa} = %{version}-%{release}
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
%description devel
|
|
|
ba26cf7 |
This package contains the C++ header files and symbolic links to the shared
|
|
|
8d86f16 |
libraries for usd. If you would like to develop programs using usd,
|
|
|
8d86f16 |
you will need to install usd-devel.
|
|
|
ba26cf7 |
|
|
|
06228d9 |
# For usdview, usdcompress
|
|
|
8d86f16 |
%package -n python3-usd
|
|
|
ba26cf7 |
Summary: %{summary}
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
BuildRequires: pkgconfig(python3)
|
|
|
ba26cf7 |
BuildRequires: pkgconfig(Qt5)
|
|
|
ba26cf7 |
BuildRequires: python3dist(jinja2)
|
|
|
19d66d2 |
%if %{with usdview}
|
|
|
19d66d2 |
BuildRequires: desktop-file-utils
|
|
|
7729eb9 |
%if %{with pyside6}
|
|
|
7729eb9 |
BuildRequires: python3dist(pyside6)
|
|
|
7729eb9 |
%else
|
|
|
ba26cf7 |
BuildRequires: python3dist(pyside2)
|
|
|
19d66d2 |
%endif
|
|
|
7729eb9 |
%endif
|
|
|
ba26cf7 |
BuildRequires: python3dist(pyopengl)
|
|
|
ba26cf7 |
Requires: font(roboto)
|
|
|
ba26cf7 |
Requires: font(robotoblack)
|
|
|
ba26cf7 |
Requires: font(robotolight)
|
|
|
ba26cf7 |
Requires: font(robotomono)
|
|
|
ba26cf7 |
Requires: python3dist(jinja2)
|
|
|
19d66d2 |
%if %{with usdview}
|
|
|
7729eb9 |
%if %{with pyside6}
|
|
|
7729eb9 |
Requires: python3dist(pyside6)
|
|
|
7729eb9 |
%else
|
|
|
ba26cf7 |
Requires: python3dist(pyside2)
|
|
|
19d66d2 |
%endif
|
|
|
7729eb9 |
%endif
|
|
|
ba26cf7 |
Requires: python3dist(pyopengl)
|
|
|
ec9a2d0 |
|
|
|
ec9a2d0 |
Requires: usd-libs%{?_isa} = %{version}-%{release}
|
|
|
ec9a2d0 |
|
|
|
ba26cf7 |
%py_provides python3-pxr
|
|
|
ba26cf7 |
|
|
|
8d86f16 |
%description -n python3-usd
|
|
|
ba26cf7 |
Python language bindings for the Universal Scene Description (USD) C++ API
|
|
|
8654f1f |
|
|
|
ba26cf7 |
%prep
|
|
|
65b6168 |
%autosetup -p1 -n OpenUSD-%{version}
|
|
|
ba26cf7 |
|
|
|
057bb66 |
# Convert NOTICE.txt from CRNL line encoding
|
|
|
ba26cf7 |
dos2unix NOTICE.txt
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
# Fix all Python shebangs recursively in .
|
|
|
ba26cf7 |
%py3_shebang_fix .
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
# Further drop shebangs line for some py files
|
|
|
ba26cf7 |
sed -r -i '1{/^#!/d}' \
|
|
|
ba26cf7 |
pxr/usd/sdr/shaderParserTestUtils.py \
|
|
|
ba26cf7 |
pxr/usd/usdUtils/updateSchemaWithSdrNode.py \
|
|
|
ba26cf7 |
pxr/usdImaging/usdviewq/usdviewApi.py
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
# Unbundle Google Roboto fonts
|
|
|
ba26cf7 |
rm -rvf pxr/usdImaging/usdviewq/fonts/*
|
|
|
ba26cf7 |
ln -s %{_datadir}/fonts/google-roboto pxr/usdImaging/usdviewq/fonts/Roboto
|
|
|
ba26cf7 |
ln -s %{_datadir}/fonts/google-roboto-mono \
|
|
|
ba26cf7 |
pxr/usdImaging/usdviewq/fonts/Roboto_Mono
|
|
|
ba26cf7 |
|
|
|
50dbcf7 |
# Unbundle stb_image, stb_image_write, stb_image_resize:
|
|
|
50dbcf7 |
pushd pxr/imaging/hio/stb
|
|
|
64291d3 |
cp -p %{_usr}/include/stb_image.h .
|
|
|
7e99411 |
patch -p1 < '%{SOURCE2}'
|
|
|
64291d3 |
ln -svf %{_usr}/include/stb_image_resize.h \
|
|
|
64291d3 |
%{_usr}/include/stb_image_write.h ./
|
|
|
50dbcf7 |
popd
|
|
|
057bb66 |
|
|
|
65b6168 |
# Remove bundled doxygen-awesome-css (CSS and JS files) since we are not
|
|
|
65b6168 |
# building Doxygen-generated HTML documentation.
|
|
|
65b6168 |
rm -rf docs/doxygen/doxygen-awesome-css/
|
|
|
65b6168 |
|
|
|
ba26cf7 |
# Use c++17 standard otherwise build fails
|
|
|
ba26cf7 |
sed -i 's|set(CMAKE_CXX_STANDARD 14)|set(CMAKE_CXX_STANDARD 17)|g' \
|
|
|
ba26cf7 |
cmake/defaults/CXXDefaults.cmake
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
# Fix libdir installation
|
|
|
ba26cf7 |
sed -i 's|lib/usd|%{_libdir}/usd|g' cmake/macros/Private.cmake
|
|
|
ba26cf7 |
sed -i 's|"lib"|%{_libdir}|g' cmake/macros/Private.cmake
|
|
|
ba26cf7 |
sed -i 's|plugin/usd|%{_libdir}/usd/plugin|g' \
|
|
|
ba26cf7 |
cmake/macros/Private.cmake
|
|
|
ba26cf7 |
sed -i 's|/python|/python%{python3_version}/site-packages|g' \
|
|
|
ba26cf7 |
cmake/macros/Private.cmake
|
|
|
ba26cf7 |
sed -i 's|lib/usd|%{_libdir}/usd|g' cmake/macros/Public.cmake
|
|
|
ba26cf7 |
sed -i 's|"lib"|%{_libdir}|g' cmake/macros/Public.cmake
|
|
|
ba26cf7 |
sed -i 's|plugin/usd|%{_libdir}/usd/plugin|g' \
|
|
|
ba26cf7 |
cmake/macros/Public.cmake
|
|
|
057bb66 |
|
|
|
ba26cf7 |
# Fix cmake directory destination
|
|
|
ba26cf7 |
sed -i 's|"${CMAKE_INSTALL_PREFIX}"|%{_libdir}/cmake/pxr|g' pxr/CMakeLists.txt
|
|
|
ba26cf7 |
|
|
|
f7dcba9 |
# Use Embree4 instead of Embree3. The find-then-modify pattern preserves mtimes
|
|
|
f7dcba9 |
# on sources that did not need to be modified.
|
|
|
f7dcba9 |
find . -type f -exec gawk '/embree3/ { print FILENAME }' '{}' '+' |
|
|
|
f7dcba9 |
xargs -r sed -r -i 's/(embree)3/\14/'
|
|
|
f7dcba9 |
|
|
|
ba26cf7 |
# Fix uic-qt5 use
|
|
|
ba26cf7 |
cat > uic-wrapper <<'EOF'
|
|
|
ba26cf7 |
#!/bin/sh
|
|
|
ba26cf7 |
exec uic-qt5 -g python "$@"
|
|
|
ba26cf7 |
EOF
|
|
|
ba26cf7 |
chmod +x uic-wrapper
|
|
|
ba26cf7 |
|
|
|
d893566 |
|
|
|
d893566 |
%build
|
|
|
65b6168 |
# The necessary include path for Imath is not set everywhere it’s needed. It’s
|
|
|
65b6168 |
# not immediately clear exactly why this is happening here or what should be
|
|
|
65b6168 |
# changed upstream.
|
|
|
3def9cc |
extra_flags="${extra_flags-} $(pkgconf --cflags Imath)"
|
|
|
65b6168 |
|
|
|
3def9cc |
# Suppress deprecation warnings from TBB; upstream should act on them
|
|
|
3def9cc |
# eventually, but they just add noise here.
|
|
|
3def9cc |
extra_flags="${extra_flags-} -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1"
|
|
|
cc8833a |
|
|
|
ba26cf7 |
%cmake \
|
|
|
9f7b7c5 |
%if %{with ninja}
|
|
|
9f7b7c5 |
-GNinja \
|
|
|
9f7b7c5 |
%endif
|
|
|
9f7b7c5 |
%if %{with jemalloc}
|
|
|
9f7b7c5 |
-DPXR_MALLOC_LIBRARY="%{_libdir}/libjemalloc.so" \
|
|
|
9f7b7c5 |
%endif
|
|
|
1253f72 |
\
|
|
|
3def9cc |
-DCMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS-} ${extra_flags}" \
|
|
|
ba26cf7 |
-DCMAKE_CXX_STANDARD=17 \
|
|
|
a88e488 |
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS-} ${extra_flags}" \
|
|
|
3def9cc |
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
|
|
|
3def9cc |
-DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
|
|
|
ba26cf7 |
-DCMAKE_SKIP_INSTALL_RPATH=ON \
|
|
|
a88e488 |
-DCMAKE_SKIP_RPATH=ON \
|
|
|
ba26cf7 |
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
|
a88e488 |
\
|
|
|
fa08a84 |
-DPXR_BUILD_HTML_DOCUMENTATION=FALSE \
|
|
|
fa08a84 |
-DPXR_BUILD_PYTHON_DOCUMENTATION=FALSE \
|
|
|
ba26cf7 |
-DPXR_BUILD_EXAMPLES=OFF \
|
|
|
1253f72 |
-DPXR_BUILD_IMAGING=ON \
|
|
|
a88e488 |
-DPXR_BUILD_MONOLITHIC=ON \
|
|
|
f0e1704 |
-DPXR_BUILD_TESTS=%{expr:%{with test}?"ON":"OFF"} \
|
|
|
a88e488 |
-DPXR_BUILD_TUTORIALS=OFF \
|
|
|
1253f72 |
-DPXR_BUILD_USD_IMAGING=ON \
|
|
|
75f130e |
-DPXR_BUILD_USD_TOOLS=ON \
|
|
|
a88e488 |
-DPXR_BUILD_USDVIEW=%{expr:%{with usdview}?"ON":"OFF"} \
|
|
|
a88e488 |
\
|
|
|
f0e1704 |
-DPXR_BUILD_ALEMBIC_PLUGIN=%{expr:%{with alembic}?"ON":"OFF"} \
|
|
|
f0e1704 |
-DPXR_BUILD_DRACO_PLUGIN=%{expr:%{with draco}?"ON":"OFF"} \
|
|
|
f0e1704 |
-DPXR_BUILD_EMBREE_PLUGIN=%{expr:%{with embree}?"ON":"OFF"} \
|
|
|
679d045 |
-DPXR_BUILD_MATERIALX_PLUGIN=%{expr:%{with materialx}?"ON":"OFF"} \
|
|
|
f0e1704 |
-DPXR_BUILD_OPENCOLORIO_PLUGIN=%{expr:%{with ocio}?"ON":"OFF"} \
|
|
|
f0e1704 |
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=%{expr:%{with oiio}?"ON":"OFF"} \
|
|
|
679d045 |
-DPXR_BUILD_PRMAN_PLUGIN=OFF \
|
|
|
a88e488 |
\
|
|
|
a88e488 |
-DPXR_ENABLE_OPENVDB_SUPPORT=%{expr:%{with openvdb}?"ON":"OFF"} \
|
|
|
5198aef |
-DPXR_ENABLE_HDF5_SUPPORT=ON \
|
|
|
f0e1704 |
-DPXR_ENABLE_PTEX_SUPPORT=%{expr:%{with ptex}?"ON":"OFF"} \
|
|
|
f0e1704 |
-DPXR_ENABLE_OSL_SUPPORT=%{expr:%{with openshading}?"ON":"OFF"} \
|
|
|
a88e488 |
-DPXR_ENABLE_MALLOCHOOK_SUPPORT=OFF \
|
|
|
26034a4 |
-DPXR_ENABLE_PYTHON_SUPPORT=ON \
|
|
|
a88e488 |
\
|
|
|
a88e488 |
-DPXR_INSTALL_LOCATION="%{_libdir}/usd/plugin" \
|
|
|
a88e488 |
\
|
|
|
67fbdf4 |
-DPXR_VALIDATE_GENERATED_CODE=OFF \
|
|
|
67fbdf4 |
\
|
|
|
ba26cf7 |
-DPYSIDEUICBINARY:PATH=${PWD}/uic-wrapper \
|
|
|
a88e488 |
-DPYSIDE_AVAILABLE=ON \
|
|
|
a88e488 |
-DPYTHON_EXECUTABLE=%{python3}
|
|
|
ba26cf7 |
%cmake_build
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
%install
|
|
|
ba26cf7 |
%cmake_install
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
# Fix python3 files installation
|
|
|
ba26cf7 |
mkdir -p %{buildroot}%{python3_sitearch}
|
|
|
ba26cf7 |
mv %{buildroot}%{python3_sitelib}/* %{buildroot}%{python3_sitearch}
|
|
|
ba26cf7 |
|
|
|
19d66d2 |
%if %{with usdview}
|
|
|
ba26cf7 |
# Install a desktop icon for usdview
|
|
|
ba26cf7 |
desktop-file-install \
|
|
|
ba26cf7 |
--dir=%{buildroot}%{_datadir}/applications \
|
|
|
ba26cf7 |
%{SOURCE1}
|
|
|
19d66d2 |
%endif
|
|
|
057bb66 |
|
|
|
bdfba18 |
# Remove examples that were built and installed even though we set
|
|
|
bdfba18 |
# -DPXR_BUILD_EXAMPLES=OFF.
|
|
|
8d86f16 |
rm -vrf '%{buildroot}%{_datadir}/usd/examples'
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
# Fix installation path for some files
|
|
|
ba26cf7 |
mv %{buildroot}%{_prefix}/lib/python/pxr/*.* \
|
|
|
ba26cf7 |
%{buildroot}%{python3_sitearch}/pxr/
|
|
|
19d66d2 |
%if %{with usdview}
|
|
|
ba26cf7 |
mv %{buildroot}%{_prefix}/lib/python/pxr/Usdviewq/* \
|
|
|
ba26cf7 |
%{buildroot}%{python3_sitearch}/pxr/Usdviewq/
|
|
|
19d66d2 |
%endif
|
|
|
057bb66 |
|
|
|
7be532d |
# TODO: Can we figure out how to fix the installation path for
|
|
|
7be532d |
# pxrTargets{,-release}.cmake, instead of moving them after the fact? We choose
|
|
|
7be532d |
# to put them in the same directory as pxrConfig.cmake.
|
|
|
7be532d |
find %{buildroot}%{_prefix}/cmake -mindepth 1 -maxdepth 1 -type f \
|
|
|
7be532d |
-exec mv -v '{}' '%{buildroot}%{_libdir}/cmake/pxr' ';'
|
|
|
38dc65e |
|
|
|
4382e49 |
# Generate and install man pages. While generating the man pages might more
|
|
|
4382e49 |
# properly go in %%build, it is generally much easier to do this here in a
|
|
|
4382e49 |
# single step, using the entry points installed into the buildroot. This is
|
|
|
4382e49 |
# especially true for the entry points that are Python scripts.
|
|
|
4382e49 |
install -d '%{buildroot}%{_mandir}/man1'
|
|
|
4382e49 |
for cmd in %{buildroot}%{_bindir}/*
|
|
|
4382e49 |
do
|
|
|
4382e49 |
PYTHONPATH='%{buildroot}%{python3_sitearch}' \
|
|
|
4382e49 |
LD_LIBRARY_PATH='%{buildroot}%{_libdir}' \
|
|
|
4382e49 |
help2man \
|
|
|
4382e49 |
--no-info --no-discard-stderr --version-string='%{version}' \
|
|
|
4382e49 |
--output="%{buildroot}%{_mandir}/man1/$(basename "${cmd}").1" \
|
|
|
4382e49 |
"${cmd}"
|
|
|
4382e49 |
done
|
|
|
4382e49 |
|
|
|
ba26cf7 |
%check
|
|
|
19d66d2 |
%if %{with usdview}
|
|
|
8d86f16 |
desktop-file-validate %{buildroot}%{_datadir}/applications/org.openusd.usdview.desktop
|
|
|
19d66d2 |
%endif
|
|
|
ba26cf7 |
%{?with_test:%ctest}
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
%files
|
|
|
ba26cf7 |
%doc NOTICE.txt README.md
|
|
|
4382e49 |
|
|
|
d17b668 |
%{_bindir}/sdfdump
|
|
|
d17b668 |
%{_bindir}/sdffilter
|
|
|
d17b668 |
%{_bindir}/usdGenSchema
|
|
|
d17b668 |
%{_bindir}/usdcat
|
|
|
d17b668 |
%{_bindir}/usdchecker
|
|
|
c8f652a |
%if %{with draco}
|
|
|
c8f652a |
%{_bindir}/usdcompress
|
|
|
c8f652a |
%endif
|
|
|
d17b668 |
%{_bindir}/usddiff
|
|
|
d17b668 |
%{_bindir}/usddumpcrate
|
|
|
d17b668 |
%{_bindir}/usdedit
|
|
|
7be532d |
%{_bindir}/usdfixbrokenpixarschemas
|
|
|
d17b668 |
%{_bindir}/usdgenschemafromsdr
|
|
|
d17b668 |
%{_bindir}/usdrecord
|
|
|
d17b668 |
%{_bindir}/usdresolve
|
|
|
d17b668 |
%{_bindir}/usdstitch
|
|
|
d17b668 |
%{_bindir}/usdstitchclips
|
|
|
d17b668 |
%{_bindir}/usdtree
|
|
|
d17b668 |
%{_bindir}/usdzip
|
|
|
19d66d2 |
%if %{with usdview}
|
|
|
8d86f16 |
%{_datadir}/applications/org.openusd.usdview.desktop
|
|
|
d17b668 |
%{_bindir}/testusdview
|
|
|
d17b668 |
%{_bindir}/usdview
|
|
|
ba26cf7 |
%endif
|
|
|
ba26cf7 |
|
|
|
4382e49 |
%{_mandir}/man1/sdfdump.1*
|
|
|
4382e49 |
%{_mandir}/man1/sdffilter.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdGenSchema.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdcat.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdchecker.1*
|
|
|
4382e49 |
%if %{with draco}
|
|
|
4382e49 |
%{_mandir}/man1/usdcompress.1*
|
|
|
4382e49 |
%endif
|
|
|
4382e49 |
%{_mandir}/man1/usddiff.1*
|
|
|
4382e49 |
%{_mandir}/man1/usddumpcrate.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdedit.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdfixbrokenpixarschemas.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdgenschemafromsdr.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdrecord.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdresolve.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdstitch.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdstitchclips.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdtree.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdzip.1*
|
|
|
4382e49 |
%if %{with usdview}
|
|
|
4382e49 |
%{_mandir}/man1/testusdview.1*
|
|
|
4382e49 |
%{_mandir}/man1/usdview.1*
|
|
|
4382e49 |
%endif
|
|
|
4382e49 |
|
|
|
8d86f16 |
%files -n python3-usd
|
|
|
c8f652a |
%{python3_sitearch}/pxr/
|
|
|
c8f652a |
|
|
|
ba26cf7 |
%files libs
|
|
|
ba26cf7 |
%license LICENSE.txt
|
|
|
ba26cf7 |
%doc NOTICE.txt README.md
|
|
|
8d86f16 |
%{_libdir}/libusd_ms.so.%{downstream_so_version}
|
|
|
86a2ce7 |
# While headers normally go in -devel packages, those in
|
|
|
86a2ce7 |
# %%{_libdir}/usd/usd/resources/codegenTemplates/ are used as data (templates
|
|
|
86a2ce7 |
# for generated code), and it makes sense to package them with the rest of the
|
|
|
86a2ce7 |
# library resources. (Technically, these are currently used only by the
|
|
|
86a2ce7 |
# usdGenSchema command-line tool, so they could be moved to the base package,
|
|
|
86a2ce7 |
# but this is probably too fussy.)
|
|
|
8d86f16 |
%{_libdir}/usd/
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
%files devel
|
|
|
ba26cf7 |
%doc BUILDING.md CHANGELOG.md VERSIONS.md
|
|
|
ba26cf7 |
%{_includedir}/pxr/
|
|
|
8d86f16 |
%{_libdir}/libusd_ms.so
|
|
|
7be532d |
%{_libdir}/cmake/pxr/pxrConfig.cmake
|
|
|
7be532d |
%{_libdir}/cmake/pxr/pxrTargets.cmake
|
|
|
7be532d |
%{_libdir}/cmake/pxr/pxrTargets-release.cmake
|
|
|
ba26cf7 |
|
|
|
ba26cf7 |
%changelog
|
|
|
840b3b7 |
%autochangelog
|