# TODO:
# - enable internalization support (BR libftgl)
-# - libsolid/libqhull/libode BR ?
+# - DRACO (requires WITH_PYTHON_INSTALL?)
+# - OSL, Cycles
+# - Alembic
+# - USD
+# - OpenImageDenoise
+# - OpenSubdiv
+# - OptiX >= 7.3.0
+# - NanoVDB
+# - OpenPGL
+#
+# Conditional build:
+%bcond_without openvdb # OpenVDB support
+
Summary: 3D modeling, rendering, animation and game creation package
Summary(pl.UTF-8): Pakiet do tworzenia animacji 3D oraz gier
Name: blender
-Version: 2.76
-Release: 8
-License: GPL
+# beware: don't use 3.3.17+, they have all the libs packaged (0.5GB compressed)
+Version: 3.6.11
+Release: 1
+License: GPL v2+
Group: X11/Applications/Graphics
-Source0: http://download.blender.org/source/%{name}-%{version}.tar.gz
-# Source0-md5: 1f35ae56bb221bbeb21e89501fbd6c6a
-Source1: %{name}.desktop
-Source2: %{name}.png
-Source3: %{name}.manpage
+Source0: https://download.blender.org/source/%{name}-%{version}.tar.xz
+# Source0-md5: 32ec8c8403ead5e843edc1a26bdecb03
Patch0: %{name}-2.76-droid.patch
-Patch1: x32.patch
-Patch2: ffmpeg3.patch
-URL: http://www.blender.org/
+Patch1: format-security.patch
+URL: https://www.blender.org/
BuildRequires: OpenAL-devel
+BuildRequires: OpenCOLLADA-devel
+BuildRequires: OpenColorIO-devel >= 2.0.0
BuildRequires: OpenEXR-devel
BuildRequires: OpenGL-devel
+BuildRequires: OpenGL-GLU-devel
BuildRequires: OpenImageIO-devel
+BuildRequires: OpenXR-devel
BuildRequires: SDL2-devel
-BuildRequires: cmake
-#BuildRequires: esound-devel
+BuildRequires: boost-devel >= 1.48
+BuildRequires: cmake >= 3.10
+BuildRequires: embree-devel >= 3.8.0
BuildRequires: ffmpeg-devel >= 0.4.9-4.20080930.1
+BuildRequires: fftw3-devel >= 3
BuildRequires: freealut-devel
-BuildRequires: freetype-devel
+BuildRequires: freetype-devel >= 2
BuildRequires: ftgl-devel
BuildRequires: gcc >= 5:3.4.0
BuildRequires: gettext-tools
+BuildRequires: gmp-devel
+BuildRequires: jack-audio-connection-kit-devel
+BuildRequires: jemalloc-devel
+BuildRequires: libdecor-devel >= 0.1
+BuildRequires: libepoxy-devel
+BuildRequires: libgomp-devel
+BuildRequires: libharu-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
+BuildRequires: libsndfile-devel
+BuildRequires: libspnav-devel
BuildRequires: libstdc++-devel
BuildRequires: libtiff-devel
-BuildRequires: libtool
BuildRequires: libvorbis-devel
+BuildRequires: libwebp-devel
+BuildRequires: libxml2-devel >= 2.0
+BuildRequires: openjpeg2-devel >= 2
+%{?with_openvdb:BuildRequires: openvdb-devel}
BuildRequires: openssl-devel >= 0.9.7d
-BuildRequires: python3-devel
+BuildRequires: pcre-devel
+BuildRequires: pkgconfig
+BuildRequires: potrace-devel
+BuildRequires: pugixml-devel
+BuildRequires: pulseaudio-devel
+BuildRequires: python3 >= 1:3.10
+BuildRequires: python3-devel >= 1:3.10
+BuildRequires: python3-numpy-devel
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.385
+BuildRequires: rpmbuild(macros) >= 1.605
BuildRequires: sed >= 4.0
-#BuildRequires: smpeg-devel
+BuildRequires: tar >= 1:1.22
+BuildRequires: tbb-devel
+# wayland-client, wayland-cursor, wayland-scanner
+BuildRequires: wayland-devel >= 1.12
+BuildRequires: wayland-egl-devel
+BuildRequires: wayland-protocols >= 1.31
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXext-devel
BuildRequires: xorg-lib-libXi-devel
+BuildRequires: xorg-lib-libxkbcommon-devel
+BuildRequires: xz
BuildRequires: zlib-devel
+BuildRequires: zstd-devel
Requires(post,postun): desktop-file-utils
Requires: OpenGL
-Requires: freetype
-Requires: python-modules
+Requires: python3-modules >= 1:3.10
+ExclusiveArch: %{x8664}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _noautoreqdep libGL.so.1 libGLU.so.1
-
%description
Blender is a free and fully functional 3D modeling, rendering,
animation and game creation package for Unix, Windows and BeOS
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
+
+# /usr/bin/env python3
+%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
+ scripts/addons/io_curve_svg/svg_util_test.py \
+ scripts/addons/io_scene_fbx/fbx2json.py \
+ scripts/addons/io_scene_fbx/json2fbx.py \
+ scripts/modules/bl_i18n_utils/merge_po.py \
+ scripts/modules/bl_i18n_utils/utils_rtl.py \
+ scripts/modules/blend_render_info.py
%build
install -d build
cd build
%cmake \
- -DCMAKE_SKIP_RPATH=ON \
- -DBUILD_SHARED_LIBS=OFF \
- -DWITH_FFTW3:BOOL=ON \
- -DWITH_JACK:BOOL=ON \
+ -DBOOST_ROOT=%{_prefix} \
+ -DBUILD_SHARED_LIBS:BOOL=OFF \
+ -DCMAKE_SKIP_RPATH:BOOL=ON \
+ -DPYTHON_VERSION:STRING=%{py3_ver} \
+ -DWITH_CODEC_FFMPEG:BOOL=ON \
-DWITH_CODEC_SNDFILE:BOOL=ON \
- -DWITH_IMAGE_OPENJPEG:BOOL=ON \
- -DWITH_OPENCOLLADA:BOOL=ON \
+ -DWITH_CXX_GUARDEDALLOC:BOOL=OFF \
-DWITH_CYCLES:BOOL=ON \
-DWITH_FFTW3:BOOL=ON \
+ -DWITH_IMAGE_OPENJPEG:BOOL=ON \
+ -DWITH_INPUT_NDOF:BOOL=ON \
+ -DWITH_INSTALL_PORTABLE:BOOL=OFF \
+ -DWITH_JACK:BOOL=ON \
+ -DWITH_JACK_DYNLOAD:BOOL=ON \
+ -DWITH_MEM_JEMALLOC:BOOL=ON \
-DWITH_MOD_OCEANSIM:BOOL=ON \
- -DOPENCOLLADA=%{_includedir} \
+ -DWITH_OPENCOLLADA:BOOL=ON \
+ -DWITH_OPENCOLORIO:BOOL=ON \
+ %{!?with_openvdb:-DWITH_OPENVDB:BOOL=OFF} \
-DWITH_PYTHON:BOOL=ON \
- -DPYTHON_VERSION:STRING=%{py3_ver} \
-DWITH_PYTHON_INSTALL:BOOL=OFF \
- -DWITH_CODEC_FFMPEG:BOOL=ON \
- -DWITH_GAMEENGINE:BOOL=ON \
- -DWITH_CXX_GUARDEDALLOC:BOOL=OFF \
- -DWITH_BUILTIN_GLEW=OFF \
- -DWITH_INSTALL_PORTABLE=OFF \
- -DWITH_PYTHON_SAFETY=ON \
- -DWITH_PLAYER=ON \
- -DWITH_MEM_JEMALLOC=ON \
- -DBOOST_ROOT=%{_prefix} \
- -DWITH_INPUT_NDOF=ON \
+ -DWITH_PYTHON_SAFETY:BOOL=ON \
-DWITH_SDL:BOOL=ON \
+ -DWITH_SDL_DYNLOAD:BOOL=ON \
..
%{__make} V=1
%install
rm -rf $RPM_BUILD_ROOT
-
install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_mandir}/man1}
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
-cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
-cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man1/blender.1
+./doc/manpage/blender.1.py \
+ --blender $RPM_BUILD_ROOT%{_bindir}/blender \
+ --output $RPM_BUILD_ROOT%{_mandir}/man1/blender.1
#%find_lang %{name}
# -f %{name}.lang
%doc doc/license/bf-members.txt doc/guides/*.txt
%attr(755,root,root) %{_bindir}/blender
-%attr(755,root,root) %{_bindir}/blender-thumbnailer.py
-%attr(755,root,root) %{_bindir}/blenderplayer
+%attr(755,root,root) %{_bindir}/blender-thumbnailer
%attr(755,root,root) %{_datadir}/%{name}
-%{_desktopdir}/*.desktop
-%{_pixmapsdir}/*.png
-%{_iconsdir}/*/*x*/apps/blender.png
-%{_iconsdir}/*/scalable/apps/blender.svg
-%{_mandir}/man1/*
+%{_desktopdir}/blender.desktop
+%{_iconsdir}/hicolor/scalable/apps/blender.svg
+%{_iconsdir}/hicolor/symbolic/apps/blender-symbolic.svg
+%{_mandir}/man1/blender.1*