public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/blender] f43: Backport Blender 5.2.3 packaging fixes
@ 2026-10-25  5:17 Luya Tshimbalanga
  0 siblings, 0 replies; only message in thread
From: Luya Tshimbalanga @ 2026-10-25  5:17 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/blender
            Branch : f43
            Commit : aaf01e7fa4cf7b0d534ba4ebaba3195632e4b6ee
            Author : Luya Tshimbalanga <luya@fedoraproject.org>
            Date   : 2026-10-24T22:17:33-07:00
            Stats  : +154/-52 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/blender/c/aaf01e7fa4cf7b0d534ba4ebaba3195632e4b6ee?branch=f43

            Log:
            Backport Blender 5.2.3 packaging fixes

Enable HIPRT with logging API compatibility and the runtime dependency
needed for device detection. Reject HIPRT builds without HIP.

Backport the Vulkan shader optimization workaround (rhbz#2560332).
Synchronize feature switches with build dependencies, disable oneAPI
by default, and avoid duplicate translation file entries.

---
diff --git a/blender-hiprt-log-level-upstream.patch b/blender-hiprt-log-level-upstream.patch
new file mode 100644
index 0000000..efea418
--- /dev/null
+++ b/blender-hiprt-log-level-upstream.patch
@@ -0,0 +1,39 @@
+Subject: [PATCH] Fix: Cycles build with HIPRT 3 logging API
+
+HIPRT 3.0 changed hiprtSetLogLevel from a global logging setting to a
+per-context setting. Calling the old one-argument API fails to compile
+against HIPRT 3 headers.
+
+Pass the existing HIPRT context for HIPRT 3 and newer, while retaining
+the one-argument call for HIPRT 2.x used by Blender's dependency bundle.
+Compute the log level once to keep the existing trace logging behavior
+identical in both cases. The context has already been created and checked
+successfully at this point.
+
+This addresses the logging API mismatch only; it does not claim complete
+HIPRT 3 compatibility or update Blender's bundled HIPRT version.
+
+---
+--- a/intern/cycles/device/hiprt/device_impl.cpp
++++ b/intern/cycles/device/hiprt/device_impl.cpp
+@@ -144,12 +144,14 @@
+     return;
+   }
+ 
+-  if (LOG_IS_ON(LOG_LEVEL_TRACE)) {
+-    hiprtSetLogLevel(hiprtLogLevelInfo | hiprtLogLevelWarn | hiprtLogLevelError);
+-  }
+-  else {
+-    hiprtSetLogLevel(hiprtLogLevelNone);
+-  }
++  const hiprtLogLevel log_level = LOG_IS_ON(LOG_LEVEL_TRACE) ?
++                                     hiprtLogLevelInfo | hiprtLogLevelWarn | hiprtLogLevelError :
++                                     hiprtLogLevelNone;
++#  if HIPRT_MAJOR_VERSION >= 3
++  hiprtSetLogLevel(hiprt_context, log_level);
++#  else
++  hiprtSetLogLevel(log_level);
++#  endif
+ }
+ 
+ HIPRTDevice::~HIPRTDevice()

diff --git a/blender-vulkan-disable-shaderc-optimization.patch b/blender-vulkan-disable-shaderc-optimization.patch
new file mode 100644
index 0000000..503b45c
--- /dev/null
+++ b/blender-vulkan-disable-shaderc-optimization.patch
@@ -0,0 +1,7 @@
+--- a/source/blender/gpu/vulkan/vk_shader_compiler.cc
++++ b/source/blender/gpu/vulkan/vk_shader_compiler.cc
+@@ -207,3 +207,3 @@
+   shaderc::CompileOptions options;
+-  bool do_optimize = true;
++  bool do_optimize = false;
+   options.SetTargetEnvironment(shaderc_target_env_vulkan, shaderc_env_version_vulkan_1_2);

diff --git a/blender.spec b/blender.spec
index 98083ad..aee256c 100644
--- a/blender.spec
+++ b/blender.spec
@@ -11,44 +11,58 @@
 %bcond manifold   1   # Manifold support
 %bcond manpage    1   # Generate manpage
 %bcond materialx  1   # MaterialX support
+%bcond meshoptimizer 1 # Meshoptimizer support
 %bcond nanovdb    0   # NanoVDB support
 %bcond ninja      1   # Use Ninja build system
 %bcond openvdb    1   # OpenVDB support
 %bcond vulkan     1   # Vulkan rendering support
 
-# Architecture-specific features
+# Cycles and USD are available on Fedora's supported 64-bit little-endian
+# architectures.
 %ifarch x86_64 aarch64 ppc64le
 %global cyclesflag ON
-    # x86_64/aarch64 specific features
-    %ifarch x86_64 aarch64
-    %bcond embree 1   # Intel Embree ray tracing
-    %bcond hidapi 1   # HIDAPI support
-
-    # x86_64 exclusive features
-    %ifarch x86_64
-    %bcond hip   1    # AMD HIP support
-    %bcond hiprt 0    # HIP ray tracing (requires Fedora 42+)
-    %bcond oidn  1    # OpenImageDenoise
-    %bcond oneapi 1   # Intel OneAPI support
-    %bcond openshading 1  # OpenShadingLanguage support
-    %bcond opgl  1    # OpenPGL
-    %global llvm_compat 18
-    %endif
-    %bcond usd   1    # Universal Scene Description
 %else
-    %bcond embree 0
-    %bcond hidapi 0
-    %bcond oidn  0
-    %bcond opgl  0
-    %bcond usd   0
+%global cyclesflag OFF
 %endif
+
+# Embree and HIDAPI are available on x86_64 and aarch64.
+%ifarch x86_64 aarch64
+%bcond embree 1
+%bcond hidapi 1
+%bcond usd 1
 %else
-%global cyclesflag OFF
+%bcond embree 0
+%bcond hidapi 0
+%bcond usd 0
+%endif
+
+# GPU kernel generation and OSL/path-guiding support are currently x86_64-only.
+%ifarch x86_64
+%bcond hip 1
+%bcond hiprt 1
+%bcond oidn 1
+# Blender requires a SYCL compiler in addition to Level Zero. The Fedora
+# buildroot currently lacks the required SYCL toolchain.
+%bcond oneapi 0
+%bcond openshading 1
+%bcond opgl 1
+%global llvm_compat 18
+%else
+%bcond hip 0
+%bcond hiprt 0
+%bcond oidn 0
+%bcond oneapi 0
+%bcond openshading 0
+%bcond opgl 0
+%endif
+
+%if %{with hiprt} && %{without hip}
+%{error:HIPRT requires HIP; use --without hiprt together with --without hip}
 %endif
 
 Name:           blender
 Epoch:          1
-Version:        5.2.0
+Version:        5.2.3
 Release:        %autorelease
 
 Summary:        3D modeling, animation, rendering and post-production
@@ -58,13 +72,13 @@ Summary:        3D modeling, animation, rendering and post-production
 # Zlib License for Bullets
 # GPL-3.0-or-later for the whole project
 # https://www.blender.org/about/license/
-License:	%{shrink:
-		Apache-2.0 AND
-  		BSD-3-Clause AND
-  		GPL-2.0-or-later AND
-  		GPL-3.0-or-later AND
-  		Zlib
-		}
+License:        %{shrink:
+                Apache-2.0 AND
+                BSD-3-Clause AND
+                GPL-2.0-or-later AND
+                GPL-3.0-or-later AND
+                Zlib
+                }
 URL:            https://www.blender.org
 
 Source0:        https://download.%{name}.org/source/%{name}-%{version}.tar.xz
@@ -72,8 +86,15 @@ Source0:        https://download.%{name}.org/source/%{name}-%{version}.tar.xz
 Source1:        %{name}-macros-source
 %if 0%{?fedora} == 43
 # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/Y4Q26PTYC6UARVSSOQ6QUJSKAFB6MYON/
-Patch:          %{name}-5.1.0-eigen-jacobisvd.patch
+Patch0:         %{name}-5.1.0-eigen-jacobisvd.patch
 %endif
+
+# Support HIPRT 2 and HIPRT 3 logging APIs.
+Patch1:         blender-hiprt-log-level-upstream.patch
+
+# Temporary workaround for rhbz#2560332.
+Patch2:         blender-vulkan-disable-shaderc-optimization.patch
+
 # Build requirements
 BuildRequires:  boost-devel
 BuildRequires:  ccache
@@ -113,7 +134,7 @@ BuildRequires:  pkgconfig(libpcre2-32)
 BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(openssl)
 BuildRequires:  pkgconfig(pugixml)
-BuildRequires:  pkgconfig(python3) >= 3.7
+BuildRequires:  pkgconfig(python3) >= 3.13
 %if %{with vulkan}
 BuildRequires:  pkgconfig(shaderc)
 BuildRequires:  pkgconfig(vulkan)
@@ -227,13 +248,17 @@ BuildRequires:  pkgconfig(zlib)
 BuildRequires:  pkgconfig(libzstd)
 
 # 3D modeling stuff
+%if %{with draco}
+BuildRequires:  cmake(draco)
+BuildRequires:  draco-static
+%endif
 BuildRequires:  cmake(ceres)
 BuildRequires:  flexiblas-devel
 %if %{with embree}
 BuildRequires:  embree-devel
 %endif
 %if %{with manifold}
-BuildRequires:	pkgconfig(manifold)
+BuildRequires:  pkgconfig(manifold)
 BuildRequires:  polyclipping2-devel
 %endif
 %if %{with materialx}
@@ -241,6 +266,9 @@ BuildRequires:  cmake(materialx)
 BuildRequires:  materialx-data
 BuildRequires:  python3-materialx
 %endif
+%if %{with meshoptimizer}
+BuildRequires:  cmake(meshoptimizer)
+%endif
 BuildRequires:  metis-devel
 BuildRequires:  opensubdiv-devel >= 3.4.4
 %if %{with openshading}
@@ -334,7 +362,7 @@ BuildRequires:  libappstream-glib
 %if %{with hiprt}
 BuildRequires:  hiprt-devel
 %endif
-BuildRequires:	hipcc
+BuildRequires:  hipcc
 BuildRequires:  rocm-core
 BuildRequires:  rocm-device-libs
 BuildRequires:  rocm-hip-devel
@@ -349,6 +377,10 @@ BuildRequires:  pkgconfig(vpl)
 %endif
 
 Requires:       hicolor-icon-theme
+%if %{with hip} && %{with hiprt}
+# Cycles' Linux HIPRT availability check loads libamdhip64.so.
+Requires:       rocm-hip-devel%{?_isa}
+%endif
 Requires:       rsms-inter-fonts
 Requires:       shared-mime-info
 Provides:       blender(ABI) = %{blender_api}
@@ -356,7 +388,7 @@ Provides:       blender(ABI) = %{blender_api}
 # Starting from 2.90, Blender supports only 64-bits architectures
 # Starting from 5.0.0, Blender dropped big endian support impacting s390x arch
 # https://projects.blender.org/blender/blender/commit/bc80ef136e8af0a355d234205ed6c7b0acaa84ab
-ExcludeArch:	%{ix86} %{arm} s390x
+ExcludeArch:    %{ix86} %{arm} s390x
 
 %description
 Blender is the essential software solution you need for 3D, from modeling,
@@ -389,8 +421,8 @@ sed -i 's/CLOG_TRACE(&LOG, log_message\.c_str());/CLOG_TRACE(\&LOG, "%s", log_me
 
 %build
 %if %{with hip}
-export HIP_PATH=`hipconfig -p`
-export HIP_CLANG_PATH=`hipconfig -l`
+export HIP_PATH=$(hipconfig -p)
+export HIP_CLANG_PATH=$(hipconfig -l)
 %endif
 
 %cmake \
@@ -403,7 +435,19 @@ export HIP_CLANG_PATH=`hipconfig -l`
     -DPYTHON_VERSION=%{python3_version} \
     -DWITH_COMPILER_CCACHE=ON \
     -DWITH_CYCLES=%{cyclesflag} \
-    -DWITH_CYCLES_EMBREE=%{?with_embree:ON}%{!?with_embree:OFF} \
+    -DWITH_CYCLES_EMBREE=%{with embree} \
+    -DWITH_CYCLES_DEVICE_HIP=%{with hip} \
+    -DWITH_CYCLES_DEVICE_HIPRT=%{with hiprt} \
+    -DWITH_CYCLES_HIP_BINARIES=%{with hip} \
+    -DWITH_CYCLES_DEVICE_ONEAPI=%{with oneapi} \
+    -DWITH_CYCLES_ONEAPI_BINARIES=%{with oneapi} \
+    -DWITH_CYCLES_DEVICE_CUDA=OFF \
+    -DWITH_CYCLES_CUDA_BINARIES=OFF \
+    -DWITH_CYCLES_DEVICE_OPTIX=OFF \
+    -DWITH_DRACO=%{with draco} \
+    -DWITH_NANOVDB=%{with nanovdb} \
+    -DWITH_OPENVDB=%{with openvdb} \
+    -DWITH_VULKAN_BACKEND=%{with vulkan} \
     -DWITH_INSTALL_PORTABLE=OFF \
     -DWITH_PYTHON_INSTALL=OFF \
 %if %{with fribidi}
@@ -423,6 +467,7 @@ export HIP_CLANG_PATH=`hipconfig -l`
 %if %{with openshading}
     -DOSL_COMPILER=%{_bindir}/oslc \
 %endif
+    -DWITH_MESHOPTIMIZER=%{with meshoptimizer} \
 %if %{with usd}
     -DUSD_LIBRARY=%{_libdir}/libusd_ms.so \
 %else
@@ -433,19 +478,11 @@ export HIP_CLANG_PATH=`hipconfig -l`
     -DXR_OPENXR_SDK_LOADER_LIBRARY=%{_libdir}/libopenxr_loader.so.1 \
 %if %{with hip}
     -DHIP_HIPCC_EXECUTABLE=%{_bindir}/hipcc \
-    -DWITH_CYCLES_HIP_BINARIES=ON \
-%if %{with hiprt}
-    -DWITH_CYCLES_DEVICE_HIPRT=ON \
-%endif
-%endif
-%if %{with oneapi}
-    -DWITH_CYCLES_DEVICE_ONEAPI=ON \
-    -DWITH_CYCLES_ONEAPI_BINARIES=ON \
 %endif
     -DWITH_OPENCOLLADA=OFF \
     -DWITH_LIBS_PRECOMPILED=OFF \
     -DWITH_SYSTEM_GLOG=ON \
-    -W no-dev
+    -Wno-dev
 
 %cmake_build
 
@@ -464,7 +501,6 @@ install -p -m 644 -D release/freedesktop/org.%{name}.Blender.metainfo.xml \
 # Localization and cleanup
 %fdupes %{buildroot}%{_datadir}/%{name}/%{blender_api}/
 %find_lang %{name}
-find %{buildroot}%{_datadir}/%{name}/%{blender_api}/scripts -name "*.py" -exec chmod 755 {} \;
 rm -rf %{buildroot}%{_docdir}/%{name}/*
 
 %check
@@ -476,10 +512,30 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.%{name}.Bl
 %doc release/text/readme.html
 %{_bindir}/%{name}{,-thumbnailer}
 %{_datadir}/applications/%{name}.desktop
-%{_datadir}/%{name}/%{blender_api}/
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/%{blender_api}
+%dir %{_datadir}/%{name}/%{blender_api}/datafiles
+%{_datadir}/%{name}/%{blender_api}/datafiles/assets/
+%{_datadir}/%{name}/%{blender_api}/datafiles/colormanagement/
+%{_datadir}/%{name}/%{blender_api}/datafiles/fonts/
+%{_datadir}/%{name}/%{blender_api}/datafiles/icons/
+%dir %{_datadir}/%{name}/%{blender_api}/datafiles/locale
+%{_datadir}/%{name}/%{blender_api}/datafiles/locale/languages
+%dir %{_datadir}/%{name}/%{blender_api}/datafiles/locale/*/
+%dir %{_datadir}/%{name}/%{blender_api}/datafiles/locale/*/LC_MESSAGES/
+%{_datadir}/%{name}/%{blender_api}/datafiles/studiolights/
+%{_datadir}/%{name}/%{blender_api}/extensions/
+%{_datadir}/%{name}/%{blender_api}/scripts/
+%if %{with draco}
+# Blender deliberately installs the glTF Draco bridge below /usr/lib rather
+# than the multilib library directory.
+%{_prefix}/lib/%{name}/
+%endif
 %{_datadir}/icons/hicolor/*/apps/%{name}*.*
 %{_metainfodir}/org.%{name}.Blender.metainfo.xml
-%{?with_manpage:%{_mandir}/man1/%{name}.*}
+%if %{with manpage}
+%{_mandir}/man1/%{name}.1*
+%endif
 
 %files rpm-macros
 %{macrosdir}/macros.%{name}

diff --git a/sources b/sources
index 79e09fb..63063f4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (blender-5.2.0.tar.xz) = 9d8d9a6c9ec5093eb37be0848d277ec3d8a89c4fe914f844ca0b5800b2a2b800d444b4af753ccc124df92125916754c8a300958941f865871b131ccd250cfdd4
+SHA512 (blender-5.2.3.tar.xz) = 68d6972e8e628d517d65cbcec723486ad0ff188c1d4ef3cd2acbbdf2b37f5944f9c28032d168ba1efeb51ea706f49b8ef36db6dd1c5d35df7ff057cc841ccee5

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

only message in thread, other threads:[~2026-10-25  5:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25  5:17 [rpms/blender] f43: Backport Blender 5.2.3 packaging fixes Luya Tshimbalanga

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