%global blender_api 4.5 %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) #%%global _without_bundled_deps 1 # Build conditionals for lite release %bcond clang 0 # Use system GCC (Clang unavailable in EPEL) %bcond draco 1 # Draco mesh compression support %bcond llvm 0 # Disable LLVM (reduces dependencies) %bcond manpage 1 # Generate manpage %bcond materialx 0 # MaterialX disabled (lite release) %bcond nanovdb 0 # NanoVDB disabled (lite release) %bcond ninja 1 # Use Ninja build system %bcond openshading 0 # OSL disabled (lite release) %bcond openvdb 0 # OpenVDB disabled (lite release) %bcond sdl 0 # SDL backend disabled %bcond system_eigen3 1 # Use system Eigen3 %bcond vulkan 1 # Vulkan rendering support # Architecture-specific features %ifarch x86_64 aarch64 ppc64le %global cyclesflag OFF %ifarch x86_64 aarch64 %bcond embree 0 # Disable Embree (lite release) %bcond hidapi 0 # Disable HIDAPI (lite release) # x86_64 exclusive features %ifarch x86_64 %bcond hip 0 # Disable HIP (unavailable in EPEL) %bcond hiprt 0 # Disable HIPRT (requires HIP) %bcond ilzrt 0 # Disable Intel L0 RT (unavailable) %bcond oidn 0 # Disable OIDN (lite release) %bcond oneapi 0 # Disable OneAPI (unavailable) %bcond opgl 0 # Disable OpenPGL (lite release) %endif %bcond usd 0 # Disable USD (lite release) %else %bcond embree 0 %bcond hidapi 0 %bcond oidn 0 %bcond opgl 0 %bcond usd 0 %endif %else %global cyclesflag OFF %endif Name: blender Epoch: 1 Version: 4.5.6 Release: %autorelease Summary: 3D modeling, animation, rendering and post-production License: 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 Source1: %{name}-macros-source # Core build dependencies BuildRequires: boost-devel BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: gettext #BuildRequires: libharu-devel BuildRequires: libtool BuildRequires: ninja-build BuildRequires: pkgconfig(blosc) BuildRequires: pkgconfig(eigen3) BuildRequires: pkgconfig(epoxy) >= 1.5.10 BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(gmp) BuildRequires: pkgconfig(jemalloc) BuildRequires: pkgconfig(libpcre2-32) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(pugixml) BuildRequires: pkgconfig(python3) >= 3.11 BuildRequires: pkgconfig(shaderc) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(libdecor-0) >= 0.1.0 BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xxf86vm) # Python dependencies BuildRequires: python3dist(setuptools) BuildRequires: python3dist(cython) BuildRequires: python3dist(numpy) BuildRequires: python3dist(requests) BuildRequires: python3dist(zstandard) # Graphics/media dependencies #BuildRequires: cmake(ceres) #BuildRequires: opensubdiv-devel >= 3.4.4 BuildRequires: pkgconfig(fftw3) BuildRequires: pkgconfig(ftgl) BuildRequires: pkgconfig(glut) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(openxr) BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xrender) #BuildRequires: pkgconfig(ode) #BuildRequires: cmake(Alembic) BuildRequires: ffmpeg-free-devel >= 5.1.2 BuildRequires: pkgconfig(libavdevice) BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libtiff-4) BuildRequires: pkgconfig(libwebp) BuildRequires: cmake(OpenColorIO) > 2 BuildRequires: cmake(Imath) BuildRequires: cmake(OpenEXR) BuildRequires: cmake(OpenImageIO) >= 2.5.0.0 BuildRequires: pkgconfig(libopenjp2) BuildRequires: pkgconfig(tbb) BuildRequires: potrace-devel # Audio dependencies BuildRequires: pkgconfig(ao) BuildRequires: pkgconfig(flac) #BuildRequires: pkgconfig(freealut) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(ogg) BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(libpipewire-0.3) BuildRequires: pkgconfig(samplerate) BuildRequires: pkgconfig(sndfile) BuildRequires: pkgconfig(vorbis) # Typography dependencies BuildRequires: fontpackages-devel BuildRequires: pkgconfig(fribidi) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(harfbuzz) # Runtime dependencies Requires: hicolor-icon-theme Requires: shared-mime-info Requires: python3dist(cython) Requires: python3dist(numpy) Requires: python3dist(requests) Requires: python3dist(zstandard) Provides: %{name}(ABI) = %{blender_api} # 64-bit only ExcludeArch: %{ix86} %{arm} %description Blender is the essential software solution for 3D modeling, animation, rendering and post-production. Lite release with reduced dependencies. %package rpm-macros Summary: RPM macros for third-party %{name} addons BuildArch: noarch %description rpm-macros Provides RPM macros for creating third-party addon packages for Blender. %prep %autosetup -p1 # System integration fixes rm -f build_files/cmake/Modules/FindOpenJPEG.cmake %py3_shebang_fix . # Fix numpy detection sed -i "s|core/include|_core/include|" CMakeLists.txt %build %cmake \ -G Ninja \ -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_RPATH=ON \ -DPYTHON_VERSION=%{python3_version} \ -DWITH_COMPILER_CCACHE=ON \ -DWITH_CYCLES=%{cyclesflag} \ -DWITH_INSTALL_PORTABLE=OFF \ -DWITH_PYTHON_INSTALL=OFF \ -DWITH_OPENCOLLADA=OFF \ -DWITH_LIBS_PRECOMPILED=ON \ -W no-dev %cmake_build %install %cmake_install %if %{with manpage} # Generate manpage LD_LIBRARY_PATH='%{buildroot}%{_libdir}' %{python3} doc/manpage/%{name}.1.py \ --blender '%{buildroot}%{_bindir}/%{name}' \ --output '%{buildroot}%{_mandir}/man1/%{name}.1' %endif # Install additional components install -Dm755 release/bin/%{name}-softwaregl %{buildroot}%{_bindir}/%{name}-softwaregl mkdir -p %{buildroot}%{macrosdir} install -pm 644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.%{name} sed -i 's/@VERSION@/%{blender_api}/g' %{buildroot}%{macrosdir}/macros.%{name} # Install metainfo install -p -m 644 -D release/freedesktop/org.blender.Blender.metainfo.xml \ %{buildroot}%{_metainfodir}/org.blender.Blender.metainfo.xml # Localization and cleanup %find_lang %{name} find %{buildroot}%{_datadir}/%{name}/%{blender_api}/scripts -name "*.py" -exec chmod 755 {} \; rm -rf %{buildroot}%{_docdir}/%{name}/* %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.%{name}.Blender.metainfo.xml %files -f %{name}.lang %license COPYING doc/license/*-license.txt release/text/copyright.txt %doc release/text/readme.html %{_bindir}/%{name}{,-softwaregl,-thumbnailer} %{_datadir}/applications/%{name}.desktop %{_datadir}/%{name}/%{blender_api}/ %{_datadir}/icons/hicolor/*/apps/%{name}*.* %{_metainfodir}/org.%{name}.Blender.metainfo.xml %{_mandir}/man1/%{name}.* %files rpm-macros %{macrosdir}/macros.%{name} %changelog %autochangelog