Compare commits
17 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d8854a2cb | ||
|
|
8a8ee165ff | ||
|
|
cc92cc5b5c | ||
|
|
a16575c743 | ||
|
|
1d6d45546c | ||
|
|
6dd424098f | ||
|
|
60ca8fb0f9 | ||
|
|
b3dc28a5d7 | ||
|
|
b0b9b2119b | ||
|
|
81f473afe1 | ||
|
|
26288440d6 | ||
|
|
2eb0ca6f91 | ||
|
|
e1349c1a93 | ||
|
|
2cf2df0246 | ||
|
|
6ade62ab42 | ||
|
|
e0712ae000 | ||
|
|
a0e28a191a |
1 changed files with 134 additions and 45 deletions
179
usd.spec
179
usd.spec
|
|
@ -6,14 +6,14 @@
|
|||
|
||||
%bcond_without alembic
|
||||
%bcond_with documentation
|
||||
%bcond_without draco
|
||||
%bcond_without embree
|
||||
%bcond_without imaging
|
||||
%bcond_with jemalloc
|
||||
%bcond_with openshading
|
||||
%bcond_with openvdb
|
||||
%bcond_without openshading
|
||||
%bcond_without openvdb
|
||||
%bcond_without ocio
|
||||
%bcond_without oiio
|
||||
%bcond_without python3
|
||||
%bcond_without usdview
|
||||
# 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
|
||||
|
|
@ -25,8 +25,10 @@ Version: 22.05b
|
|||
Release: %autorelease -b 9
|
||||
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}
|
||||
# BSD-3-Clause:
|
||||
# - pxr/base/gf/ilmbase_*
|
||||
# - pxr/base/js/rapidjson/msinttypes/
|
||||
|
|
@ -41,14 +43,32 @@ Summary: 3D VFX pipeline interchange file format
|
|||
# - pxr/imaging/hgiVulkan/vk_mem_alloc.h
|
||||
# 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}
|
||||
#
|
||||
# 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)
|
||||
License: %{shrink:
|
||||
Pixar AND
|
||||
Apache-2.0 AND
|
||||
BSD-3-Clause AND
|
||||
BSD-2-Clause 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
|
||||
|
|
@ -116,11 +136,16 @@ Patch: %{forgeurl}/pull/1928.patch
|
|||
Patch: %{forgeurl}/pull/2266.patch
|
||||
|
||||
# Base
|
||||
BuildRequires: gcc-c++
|
||||
|
||||
BuildRequires: cmake
|
||||
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: help2man
|
||||
|
||||
BuildRequires: pkgconfig(blosc)
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: boost-program-options
|
||||
BuildRequires: cmake
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkgconfig(blosc)
|
||||
BuildRequires: pkgconfig(tbb)
|
||||
|
||||
|
|
@ -133,6 +158,9 @@ BuildRequires: graphviz
|
|||
# For imaging and usd imaging
|
||||
%if %{with imaging}
|
||||
|
||||
%if %{with draco}
|
||||
BuildRequires: draco-devel
|
||||
%endif
|
||||
%if %{with embree}
|
||||
BuildRequires: embree-devel
|
||||
%endif
|
||||
|
|
@ -154,8 +182,8 @@ BuildRequires: cmake(OpenColorIO)
|
|||
%if %{with oiio}
|
||||
BuildRequires: pkgconfig(OpenImageIO)
|
||||
%endif
|
||||
BuildRequires: cmake(OpenEXR)
|
||||
BuildRequires: cmake(Imath) >= 2.0
|
||||
BuildRequires: cmake(OpenEXR) >= 3.0
|
||||
BuildRequires: cmake(Imath) >= 3.0
|
||||
BuildRequires: pkgconfig(Ptex)
|
||||
|
||||
%endif
|
||||
|
|
@ -166,10 +194,19 @@ BuildRequires: hdf5-devel
|
|||
|
||||
# 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
|
||||
# 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
|
||||
BuildRequires: stb_image-devel >= 2.28^20231011gitbeebb24-12
|
||||
BuildRequires: stb_image-static
|
||||
BuildRequires: stb_image_write-devel >= 1.16
|
||||
BuildRequires: stb_image_write-static
|
||||
|
|
@ -177,9 +214,7 @@ BuildRequires: stb_image_resize-devel >= 0.97
|
|||
BuildRequires: stb_image_resize-static
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
%if %{with python3}
|
||||
Requires: python3-%{name}%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
# This package is only available for x86_64 and aarch64
|
||||
# Will fail to build on other architectures
|
||||
|
|
@ -227,7 +262,6 @@ interchange between graphics applications.
|
|||
|
||||
%package devel
|
||||
Summary: Development files for USD
|
||||
Requires: cmake-filesystem
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
|
|
@ -235,8 +269,7 @@ This package contains the C++ header files and symbolic links to the shared
|
|||
libraries for %{name}. If you would like to develop programs using %{name},
|
||||
you will need to install %{name}-devel.
|
||||
|
||||
# For usdview
|
||||
%if %{with python3}
|
||||
# For usdview, usdcompress
|
||||
%package -n python3-%{name}
|
||||
Summary: %{summary}
|
||||
|
||||
|
|
@ -257,11 +290,14 @@ Requires: python3dist(jinja2)
|
|||
Requires: python3dist(pyside2)
|
||||
%endif
|
||||
Requires: python3dist(pyopengl)
|
||||
|
||||
Requires: usd-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%py_provides python3-pxr
|
||||
|
||||
%description -n python3-%{name}
|
||||
Python language bindings for the Universal Scene Description (USD) C++ API
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with documentation}
|
||||
%package doc
|
||||
|
|
@ -278,10 +314,8 @@ Documentation for the Universal Scene Description (USD) C++ API
|
|||
# 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}' \
|
||||
|
|
@ -327,7 +361,6 @@ 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
|
||||
|
|
@ -335,20 +368,24 @@ exec uic-qt5 -g python "$@"
|
|||
EOF
|
||||
chmod +x uic-wrapper
|
||||
|
||||
# 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)"
|
||||
%build
|
||||
%set_build_flags
|
||||
|
||||
# Although upstream supports OpenEXR3 / Imath now, the necessary include path
|
||||
# is not set everywhere it’s needed. It’s not immediately clear exactly why
|
||||
# this is happening here or what should be changed upstream.
|
||||
extra_flags="${extra_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_FLAGS_RELEASE="${CXXFLAGS-} ${extra_flags}" \
|
||||
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS-} ${extra_flags}" \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-pie" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DCMAKE_SKIP_INSTALL_RPATH=ON \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
|
|
@ -370,6 +407,9 @@ flags="${flags} $(pkgconf --cflags Imath)"
|
|||
-DOPENEXR_LOCATION=%{_includedir} \
|
||||
-DPXR_BUILD_ALEMBIC_PLUGIN=ON \
|
||||
%endif
|
||||
%if %{with draco}
|
||||
-DPXR_BUILD_DRACO_PLUGIN=ON \
|
||||
%endif
|
||||
%if %{with embree}
|
||||
-DPXR_BUILD_EMBREE_PLUGIN=ON \
|
||||
-DEMBREE_LOCATION=%{_prefix} \
|
||||
|
|
@ -384,13 +424,9 @@ flags="${flags} $(pkgconf --cflags Imath)"
|
|||
-DPXR_ENABLE_OSL_SUPPORT=ON \
|
||||
%endif
|
||||
-DPYTHON_EXECUTABLE=%{python3} \
|
||||
%if %{with python3}
|
||||
-DPXR_USE_PYTHON_3=ON \
|
||||
-DPYSIDE_AVAILABLE=ON \
|
||||
-DPYSIDEUICBINARY:PATH=${PWD}/uic-wrapper \
|
||||
%else
|
||||
-DPXR_ENABLE_PYTHON_SUPPORT=OFF \
|
||||
%endif
|
||||
-DPXR_BUILD_MONOLITHIC=ON \
|
||||
-DPXR_ENABLE_MALLOCHOOK_SUPPORT=OFF
|
||||
%cmake_build
|
||||
|
|
@ -398,6 +434,13 @@ flags="${flags} $(pkgconf --cflags Imath)"
|
|||
%install
|
||||
%cmake_install
|
||||
|
||||
# Blender 3.5.1 requires libusd_ms.so
|
||||
ln -s %{_libdir}/lib%{name}_%{name}_ms.so \
|
||||
%{buildroot}%{_libdir}/lib%{name}_ms.so
|
||||
|
||||
ln -s %{_libdir}/lib%{name}_%{name}_ms.so.%{downstream_so_version} \
|
||||
%{buildroot}%{_libdir}/lib%{name}_ms.so.%{downstream_so_version}
|
||||
|
||||
# Fix python3 files installation
|
||||
mkdir -p %{buildroot}%{python3_sitearch}
|
||||
mv %{buildroot}%{python3_sitelib}/* %{buildroot}%{python3_sitearch}
|
||||
|
|
@ -429,6 +472,21 @@ mv %{buildroot}%{_prefix}/lib/python/pxr/Usdviewq/* \
|
|||
# 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
|
||||
|
|
@ -437,11 +495,15 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.open%{name}.%{nam
|
|||
|
||||
%files
|
||||
%doc NOTICE.txt README.md
|
||||
|
||||
%{_bindir}/sdfdump
|
||||
%{_bindir}/sdffilter
|
||||
%{_bindir}/usdGenSchema
|
||||
%{_bindir}/usdcat
|
||||
%{_bindir}/usdchecker
|
||||
%if %{with draco}
|
||||
%{_bindir}/usdcompress
|
||||
%endif
|
||||
%{_bindir}/usddiff
|
||||
%{_bindir}/usddumpcrate
|
||||
%{_bindir}/usdedit
|
||||
|
|
@ -452,29 +514,56 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.open%{name}.%{nam
|
|||
%{_bindir}/usdstitchclips
|
||||
%{_bindir}/usdtree
|
||||
%{_bindir}/usdzip
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-%{name}
|
||||
%{python3_sitearch}/pxr
|
||||
%if %{with usdview}
|
||||
%{_datadir}/applications/org.open%{name}.%{name}view.desktop
|
||||
%{_bindir}/testusdview
|
||||
%{_bindir}/usdview
|
||||
%endif
|
||||
|
||||
%{_mandir}/man1/sdfdump.1*
|
||||
%{_mandir}/man1/sdffilter.1*
|
||||
%{_mandir}/man1/usdGenSchema.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/usdgenschemafromsdr.1*
|
||||
%{_mandir}/man1/usdrecord.1*
|
||||
%{_mandir}/man1/usdresolve.1*
|
||||
%{_mandir}/man1/usdstitch.1*
|
||||
%{_mandir}/man1/usdstitchclips.1*
|
||||
%{_mandir}/man1/usdtree.1*
|
||||
%{_mandir}/man1/usdzip.1*
|
||||
%if %{with usdview}
|
||||
%{_mandir}/man1/testusdview.1*
|
||||
%{_mandir}/man1/usdview.1*
|
||||
%endif
|
||||
|
||||
%files -n python3-%{name}
|
||||
%{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}/lib%{name}_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}/%{name}/
|
||||
|
||||
%files devel
|
||||
%doc BUILDING.md CHANGELOG.md VERSIONS.md
|
||||
%{_includedir}/pxr/
|
||||
%{_libdir}/lib%{name}_%{name}_ms.so
|
||||
%{_libdir}/%{name}/%{name}/resources/codegenTemplates/
|
||||
%{_libdir}/lib%{name}_ms.so
|
||||
|
||||
%if %{with documentation}
|
||||
%files doc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue