public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/usd] rawhide: Use the cmake declarative buildsystem
@ 2026-09-19 21:07 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-09-19 21:07 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/usd
Branch : rawhide
Commit : c720bd561d947eec2fd68d500d1850cac1161eb4
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-09-19T08:01:23+01:00
Stats  : +55/-64 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/usd/c/c720bd561d947eec2fd68d500d1850cac1161eb4?branch=rawhide

Log:
Use the cmake declarative buildsystem

---
diff --git a/usd.spec b/usd.spec
index 94be5ec..bfbb39d 100644
--- a/usd.spec
+++ b/usd.spec
@@ -18,7 +18,7 @@
 # TODO: Figure out how to re-enable the tests. Currently these want to install
 # into /usr/tests, and there are issues with the launchers finding the
 # command-line tools in the buildroot.
-%bcond test          0
+%bcond ctest         0
 
 Name:           usd
 Version:        26.08
@@ -164,10 +164,57 @@ Patch:          %{forgeurl}/pull/3903.patch
 # Fixes RHBZ#2433881.
 Patch:          %{forgeurl}/commit/cd3b9c9f031fdface3423ff7a89995dadf4b73aa.patch
 
-# Base
-BuildRequires:  gcc-c++
+BuildSystem:    cmake
+
+%if %{with jemalloc}
+BuildOption(conf): -DPXR_MALLOC_LIBRARY='%{_libdir}/libjemalloc.so'
+%endif
+
+BuildOption(conf): -DCMAKE_CXX_FLAGS_RELEASE="${CXXFLAGS-} ${extra_flags}"
+BuildOption(conf): -DCMAKE_CXX_STANDARD=17
+BuildOption(conf): -DCMAKE_C_FLAGS_RELEASE="${CFLAGS-} ${extra_flags}"
+BuildOption(conf): -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}"
+BuildOption(conf): -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}"
+BuildOption(conf): -DCMAKE_SKIP_INSTALL_RPATH=ON
+BuildOption(conf): -DCMAKE_SKIP_RPATH=ON
+BuildOption(conf): -DCMAKE_VERBOSE_MAKEFILE=ON
+
+BuildOption(conf): -DPXR_BUILD_HTML_DOCUMENTATION=FALSE
+BuildOption(conf): -DPXR_BUILD_PYTHON_DOCUMENTATION=FALSE
+BuildOption(conf): -DPXR_BUILD_EXAMPLES=OFF
+BuildOption(conf): -DPXR_BUILD_IMAGING=ON
+BuildOption(conf): -DPXR_BUILD_MONOLITHIC=ON
+BuildOption(conf): -DPXR_BUILD_TESTS:BOOL=%{with ctest}
+BuildOption(conf): -DPXR_BUILD_TUTORIALS=OFF
+BuildOption(conf): -DPXR_BUILD_USD_IMAGING=ON
+BuildOption(conf): -DPXR_BUILD_EXEC=ON
+BuildOption(conf): -DPXR_BUILD_USD_TOOLS=ON
+BuildOption(conf): -DPXR_BUILD_USDVIEW:BOOL=%{with usdview}
+
+BuildOption(conf): -DPXR_BUILD_ALEMBIC_PLUGIN:BOOL=%{with alembic}
+BuildOption(conf): -DPXR_BUILD_DRACO_PLUGIN:BOOL=%{with draco}
+BuildOption(conf): -DPXR_BUILD_EMBREE_PLUGIN:BOOL=%{with embree}
+BuildOption(conf): -DPXR_BUILD_OPENCOLORIO_PLUGIN:BOOL=%{with ocio}
+BuildOption(conf): -DPXR_BUILD_OPENIMAGEIO_PLUGIN:BOOL=%{with oiio}
+BuildOption(conf): -DPXR_BUILD_PRMAN_PLUGIN=OFF
+
+BuildOption(conf): -DPXR_ENABLE_OPENVDB_SUPPORT:BOOL=%{with openvdb}
+BuildOption(conf): -DPXR_ENABLE_HDF5_SUPPORT=ON
+BuildOption(conf): -DPXR_ENABLE_PTEX_SUPPORT:BOOL=%{with ptex}
+BuildOption(conf): -DPXR_ENABLE_OSL_SUPPORT:BOOL=%{with openshading}
+BuildOption(conf): -DPXR_ENABLE_MALLOCHOOK_SUPPORT=OFF
+BuildOption(conf): -DPXR_ENABLE_MATERIALX_SUPPORT:BOOL=%{with materialx}
+BuildOption(conf): -DPXR_ENABLE_PYTHON_SUPPORT=ON
+
+BuildOption(conf): -DPXR_INSTALL_LOCATION="%{_libdir}/usd/plugin"
+
+BuildOption(conf): -DPXR_VALIDATE_GENERATED_CODE=OFF
+
+BuildOption(conf): -DPYSIDEUICBINARY:PATH=pyside6-uic
+BuildOption(conf): -DPYSIDE_AVAILABLE=ON
+BuildOption(conf): -DPYTHON_EXECUTABLE=%{python3}
 
-BuildRequires:  cmake
+BuildRequires:  gcc-c++
 
 BuildRequires:  dos2unix
 BuildRequires:  help2man
@@ -461,9 +508,7 @@ Requires:       usd-libs%{?_isa} = %{version}-%{release}
 Python language bindings for the Universal Scene Description (USD) C++ API
 
 
-%prep
-%autosetup -p1 -n OpenUSD-%{version}
-
+%prep -a
 # Convert NOTICE.txt from CRNL line encoding
 dos2unix NOTICE.txt
 
@@ -592,7 +637,7 @@ find . -type f -exec gawk '/embree3/ { print FILENAME }' '{}' '+' |
   xargs --no-run-if-empty sed --regexp-extended --in-place 's/(embree)3/\14/'
 
 
-%build
+%conf -p
 # The necessary include path for Imath is not set everywhere it’s needed. It’s
 # not immediately clear exactly why this is happening here or what should be
 # changed upstream.
@@ -602,59 +647,8 @@ extra_flags="${extra_flags-} $(pkgconf --cflags Imath)"
 # eventually, but they just add noise here.
 extra_flags="${extra_flags-} -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1"
 
-%cmake \
-%if %{with jemalloc}
-    -DPXR_MALLOC_LIBRARY="%{_libdir}/libjemalloc.so" \
-%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_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
-%cmake_install
 
+%install -a
 # Fix python3 files installation
 mkdir --parents %{buildroot}%{python3_sitearch}
 mv %{buildroot}%{python3_sitelib}/* %{buildroot}%{python3_sitearch}
@@ -692,14 +686,11 @@ do
 done
 
 
-%check
+%check -p
 %if %{with usdview}
 desktop-file-validate \
     '%{buildroot}%{_datadir}/applications/org.openusd.usdview.desktop'
 %endif
-%if %{with test}
-%ctest
-%endif
 
 
 %files

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-19 21:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-19 21:07 [rpms/usd] rawhide: Use the cmake declarative buildsystem Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox