Update blender build

This commit is contained in:
2025-07-15 21:48:55 +03:00
parent 19984c4b4f
commit f9dff3a415
8 changed files with 205 additions and 22 deletions

12
.gitmodules vendored
View File

@@ -106,3 +106,15 @@
path = pugixml path = pugixml
url = https://github.com/zeux/pugixml url = https://github.com/zeux/pugixml
branch = master branch = master
[submodule "pybind11"]
path = pybind11
url = https://github.com/pybind/pybind11
branch = master
[submodule "blender-deps/libdeflate"]
path = blender-deps/libdeflate
url = https://github.com/ebiggers/libdeflate
branch = master
[submodule "libtiff"]
path = libtiff
url = https://gitlab.com/libtiff/libtiff
branch = master

View File

@@ -1,7 +1 @@
0001-install_in_usr_share.patch 0008-Fixed-wayland-compilation.patch
0002-do_not_use_version_number_in_system_path.patch
0003-locales_directory_install.patch
0004-fix_linking_with_WITH_X11_XF86VMODE_and_bfd.patch
0005-fix_round_trip_in_Cycles.patch
0006-fix_Cycles_compilation_on_ARM.patch
0007-fix_compilation_on_certain_platforms.patch

View File

@@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
OGRE_INSTALL_PATH=$(pwd)/ogre-sdk OGRE_INSTALL_PATH=$(pwd)/ogre-sdk
BLENDER_INSTALL_PATH=$(pwd)/blender-base
QT_PATH=/usr/lib/qt QT_PATH=/usr/lib/qt
# -DQt5_ROOT=/Path/To/QtInstallationFolder/5.12.5 # -DQt5_ROOT=/Path/To/QtInstallationFolder/5.12.5
set -e set -e
@@ -20,6 +21,9 @@ set -e
build_cmake_stuff() { build_cmake_stuff() {
set -e set -e
EXTRA_FLAGS=
BBLENDER=false
BBLENDERSTATIC=false
NOINSTALL=false NOINSTALL=false
BSTATIC=false BSTATIC=false
BCLEAN=false BCLEAN=false
@@ -51,6 +55,14 @@ build_cmake_stuff() {
shift shift
BRELEASE=true BRELEASE=true
;; ;;
blender)
shift
BBLENDER=true
;;
blender-static)
shift
BBLENDERSTATIC=true
;;
--) --)
shift shift
break break
@@ -60,6 +72,7 @@ build_cmake_stuff() {
;; ;;
esac esac
done done
echo Package: $1 ...
if [ x$BDEBUG = xtrue -a x$BRELEASE = xtrue ]; then if [ x$BDEBUG = xtrue -a x$BRELEASE = xtrue ]; then
BTYPE="-DCMAKE_BUILD_TYPE=RelWidthDebInfo" BTYPE="-DCMAKE_BUILD_TYPE=RelWidthDebInfo"
elif [ x$BDEBUG = xtrue ]; then elif [ x$BDEBUG = xtrue ]; then
@@ -68,11 +81,21 @@ build_cmake_stuff() {
BTYPE="-DCMAKE_BUILD_TYPE=Release" BTYPE="-DCMAKE_BUILD_TYPE=Release"
fi fi
BUILD_DIR=$1/build BUILD_DIR=$1/build
if [ x$BSTATIC = xtrue ]; then if [ x${BSTATIC} = xtrue ]; then
BUILD_DIR=$1/build-static BUILD_DIR=$1/build-static
EXTRA_FLAGS="-DBUILD_SHARED_LIBS=OFF ${EXTRA_FLAGS}" EXTRA_FLAGS="-DBUILD_SHARED_LIBS=OFF ${EXTRA_FLAGS}"
INSTALL_PATH=${OGRE_INSTALL_PATH}-static INSTALL_PATH=${OGRE_INSTALL_PATH}-static
fi fi
if [ x${BBLENDERSTATIC} = xtrue ]; then
BUILD_DIR=$1/build-blender
EXTRA_FLAGS="-DBUILD_SHARED_LIBS=OFF ${EXTRA_FLAGS}"
INSTALL_PATH=${BLENDER_INSTALL_PATH}
fi
if [ x${BBLENDER} = xtrue ]; then
BUILD_DIR=$1/build-blender
EXTRA_FLAGS="${EXTRA_FLAGS}"
INSTALL_PATH=${BLENDER_INSTALL_PATH}
fi
if [ x$1 = xogre ]; then if [ x$1 = xogre ]; then
EXTRA_FLAGS="-DASSIMP_BUILD_ASSIMP_TOOLS=ON ${EXTRA_FLAGS}" EXTRA_FLAGS="-DASSIMP_BUILD_ASSIMP_TOOLS=ON ${EXTRA_FLAGS}"
if [ x$BSTATIC = xtrue ]; then if [ x$BSTATIC = xtrue ]; then
@@ -96,32 +119,180 @@ build_cmake_stuff() {
cd $MDIR cd $MDIR
} }
#rm -Rf assimp/build assimp/build-static build_ffmpeg() {
#rm -Rf ogre/build ogre/build-static ogre-sdk ogre-sdk-static set -e
#rm -Rf ogre-procedural/build ogre-procedural/build-static EXTRA_FLAGS=
#rm -Rf ogre-projects/world2/build ogre-projects/world2/build-static NOINSTALL=false
BSTATIC=false
BCLEAN=false
BBLENDER=false
INSTALL_PATH=${OGRE_INSTALL_PATH}
while true; do
case $1 in
noinstall)
shift
NOINSTALL=true
;;
static)
shift
BSTATIC=true
;;
clean)
shift
BCLEAN=true
;;
debug)
shift
;;
release)
shift
;;
blender)
BBLENDER=true
shift
;;
--)
shift
break
;;
*)
break
;;
esac
done
echo Package: $1
BUILD_DIR=$1/build
if [ x$BSTATIC = xtrue ]; then
BUILD_DIR=$1/build-static
EXTRA_FLAGS="--disable-pic --enable-static --disable-shared ${EXTRA_FLAGS}"
INSTALL_PATH=${OGRE_INSTALL_PATH}-static
elif [ x$BBLENDER = xtrue ]; then
BUILD_DIR=$1/build-blender
EXTRA_FLAGS="--enable-pic --enable-shared --disable-static ${EXTRA_FLAGS}"
INSTALL_PATH=${BLENDER_INSTALL_PATH}
else
EXTRA_FLAGS="--enable-pic --disable-shared --enable-static ${EXTRA_FLAGS}"
fi
MDIR=$(pwd)
if [ x$BCLEAN = xtrue ]; then
rm -Rf ${BUILD_DIR}
fi
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}
export PKG_CONFIG_PATH=${INSTALL_PATH}/lib/pkgconfig
../configure --prefix=${INSTALL_PATH} ${EXTRA_FLAGS} --disable-programs \
--extra-libs="$(pkg-config wayland-client wayland-protocols x11 libdrm --libs)"
DISPLAY= make -j10
if [ x$NOINSTALL = xfalse ]; then
DISPLAY= make install
fi
cd $MDIR
}
CLEAN=false
while true; do
case $1 in
clean)
shift
CLEAN=true
;;
--)
shift
break
;;
*)
break
;;
esac
done
if [ x$CLEAN = xtrue ]; then
rm -Rf assimp/build assimp/build-static
rm -Rf ogre/build ogre/build-static ogre-sdk ogre-sdk-static
rm -Rf ogre-procedural/build ogre-procedural/build-static
rm -Rf ogre-projects/world2/build ogre-projects/world2/build-static
fi
#(cd bzip2-1.0.8 && make all && make install PREFIX=${OGRE_INSTALL_PATH}) #(cd bzip2-1.0.8 && make all && make install PREFIX=${OGRE_INSTALL_PATH})
#(cd bzip2-1.0.8 && make all && make install PREFIX=${OGRE_INSTALL_PATH}-static) #(cd bzip2-1.0.8 && make all && make install PREFIX=${OGRE_INSTALL_PATH}-static)
build_cmake_stuff clean debug release SDL "-DCMAKE_BUILD_TYPE=RelWithDebInfo \ #set -x
rm -Rf blender-base
# blender
#blender dependencies
build_cmake_stuff blender-static clean release zlib "-DZLIB_BUILD_STATIC=ON -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_MINIZIP=OFF"
build_cmake_stuff blender-static clean release blender-deps/libdeflate "-DLIBDEFLATE_BUILD_SHARED_LIB=OFF"
build_cmake_stuff blender-static clean release libjpeg-turbo ""
build_cmake_stuff blender-static clean release libpng "-DPNG_SHARED=OFF"
build_cmake_stuff blender-static clean release libtiff ""
build_cmake_stuff blender-static clean release pugixml ""
build_ffmpeg blender clean ffmpeg
build_cmake_stuff blender-static clean release assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
build_cmake_stuff blender-static clean release Imath ""
build_cmake_stuff blender-static clean release openexr ""
build_cmake_stuff blender-static clean release oneTBB "-DTBB_TEST=OFF"
build_cmake_stuff blender-static clean release pybind11 "-DPYBIND11_TEST=OFF"
build_cmake_stuff blender-static clean release fftw-3.3.10 ""
build_cmake_stuff blender-static clean release OpenColorIO "-DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYTHON=OFF"
build_cmake_stuff blender-static clean release OpenImageIO "-DOIIO_BUILD_TESTS=OFF -DOIIO_BUILD_DOCS=OFF -DOIIO_BUILD_TOOLS=OFF -DOpenImageIO_BUILD_MISSING_DEPS=all -DUSE_PYTHON=0"
build_cmake_stuff blender-static clean release OpenColorIO "-DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYTHON=OFF"
build_cmake_stuff blender clean release embree ""
if [ ! -d blender-tree ]; then
cp -a blender blender-tree
cp -a blender-patches blender-tree/patches
cd blender-tree
quilt push -a
cd ..
fi
cd blender-tree
make update
cd ..
# "-C$(pwd)/blender/build_files/cmake/config/blender_release.cmake \
#
build_cmake_stuff blender clean debug release blender-tree \
"-DCMAKE_SKIP_RPATH=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWITH_CODEC_FFMPEG=ON \
-DWITH_CODEC_SNDFILE=ON \
-DWITH_CPU_SSE=OFF \
-DWITH_CYCLES=ON -DWITH_CYCLES_EMBREE=OFF -DWITH_DOC_MANPAGE=OFF -DWITH_FFTW3=ON -DWITH_GAMEENGINE=ON -DWITH_IMAGE_OPENJPEG=ON \
-DWITH_INPUT_NDOF=ON -DWITH_INSTALL_PORTABLE=OFF -DWITH_MOD_OCEANSIM=ON -DWITH_OPENCOLLADA=ON -DWITH_OPENCOLORIO=ON \
-DWITH_OPENSUBDIV=ON -DWITH_OPENVDB=OFF -DWITH_PLAYER=ON -DWITH_PYTHON_INSTALL=ON -DWITH_SYSTEM_GLEW=ON \
-DWITH_GHOST_SDL=ON -DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_X11=ON \
-DWITH_STATIC_LIBS=OFF"
exit 0
build_cmake_stuff debug release zlib "-DZLIB_BUILD_STATIC=OFF -DZLIB_BUILD_SHARED=ON -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_BUILD_SHARED=ON -DMINIZIP_BUILD_STATIC=OFF -DMINIZIP_ENABLE_BZIP2=OFF"
build_cmake_stuff debug release static zlib "-DZLIB_BUILD_STATIC=ON -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_BUILD_SHARED=OFF -DMINIZIP_BUILD_STATIC=ON -DMINIZIP_ENABLE_BZIP2=OFF"
build_cmake_stuff release debug libjpeg-turbo ""
build_cmake_stuff release debug static libjpeg-turbo ""
build_cmake_stuff release debug libpng "-DPNG_SHARED=ON"
build_cmake_stuff release debug static libpng "-DPNG_SHARED=OFF"
build_cmake_stuff release debug pugixml ""
build_cmake_stuff release debug static pugixml ""
build_ffmpeg ffmpeg
build_ffmpeg static ffmpeg
build_cmake_stuff debug release assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
build_cmake_stuff debug release static assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
build_cmake_stuff debug release SDL "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSDL_SHARED=OFF -DSDL_STATIC=ON -DSDL_STATIC_PIC=ON -DSDL_X11=ON \ -DSDL_SHARED=OFF -DSDL_STATIC=ON -DSDL_STATIC_PIC=ON -DSDL_X11=ON \
-DSDL_X11_SHARED=OFF -DSDL_X11_XCURSOR=ON -DSDL_X11_XDBE=ON \ -DSDL_X11_SHARED=OFF -DSDL_X11_XCURSOR=ON -DSDL_X11_XDBE=ON \
-DSDL_X11_XINPUT=ON -DSDL_X11_XRANDR=ON -DSDL_X11_XSCRNSAVER=ON -DSDL_X11_XSHAPE=ON -DSDL_WAYLAND=ON \ -DSDL_X11_XINPUT=ON -DSDL_X11_XRANDR=ON -DSDL_X11_XSCRNSAVER=ON -DSDL_X11_XSHAPE=ON -DSDL_WAYLAND=ON \
-DSDL_WAYLAND_SHARED=OFF -DSDL_WAYLAND_LIBDECOR=ON -DSDL_WAYLAND_LIBDECOR_SHARED=OFF -DSDL_KMSDRM=ON -DSDL_KMSDRM_SHARED=OFF -DSDL_OPENGL=ON \ -DSDL_WAYLAND_SHARED=OFF -DSDL_WAYLAND_LIBDECOR=ON -DSDL_WAYLAND_LIBDECOR_SHARED=OFF -DSDL_KMSDRM=ON -DSDL_KMSDRM_SHARED=OFF -DSDL_OPENGL=ON \
-DSDL_OPENGLES=ON -DSDL_VULKAN=ON-DSDL_ALSA=ON -DSDL_ALSA_SHARED=OFF -DSDL_PIPEWIRE=ON -DSDL_PIPEWIRE_SHARED=OFF \ -DSDL_OPENGLES=ON -DSDL_VULKAN=ON-DSDL_ALSA=ON -DSDL_ALSA_SHARED=OFF -DSDL_PIPEWIRE=ON -DSDL_PIPEWIRE_SHARED=OFF \
-DSDL_PULSEAUDIO=ON -DSDL_PULSEAUDIO_SHARED=OFF -DSDL_RPATH=OFF -DSDL_HIDAPI=ON -DSDL_HIDAPI_JOYSTICK=ON" -DSDL_PULSEAUDIO=ON -DSDL_PULSEAUDIO_SHARED=OFF -DSDL_RPATH=OFF -DSDL_HIDAPI=ON -DSDL_HIDAPI_JOYSTICK=ON"
build_cmake_stuff clean debug release static SDL "-DCMAKE_BUILD_TYPE=RelWithDebInfo \ build_cmake_stuff debug release static SDL "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSDL_SHARED=OFF -DSDL_STATIC=ON -DSDL_X11=ON \ -DSDL_SHARED=OFF -DSDL_STATIC=ON -DSDL_X11=ON \
-DSDL_X11_SHARED=OFF -DSDL_X11_XCURSOR=ON -DSDL_X11_XDBE=ON \ -DSDL_X11_SHARED=OFF -DSDL_X11_XCURSOR=ON -DSDL_X11_XDBE=ON \
-DSDL_X11_XINPUT=ON -DSDL_X11_XRANDR=ON -DSDL_X11_XSCRNSAVER=ON -DSDL_X11_XSHAPE=ON -DSDL_WAYLAND=ON \ -DSDL_X11_XINPUT=ON -DSDL_X11_XRANDR=ON -DSDL_X11_XSCRNSAVER=ON -DSDL_X11_XSHAPE=ON -DSDL_WAYLAND=ON \
-DSDL_WAYLAND_SHARED=OFF -DSDL_WAYLAND_LIBDECOR=ON -DSDL_WAYLAND_LIBDECOR_SHARED=OFF -DSDL_KMSDRM=ON -DSDL_KMSDRM_SHARED=OFF -DSDL_OPENGL=ON \ -DSDL_WAYLAND_SHARED=OFF -DSDL_WAYLAND_LIBDECOR=ON -DSDL_WAYLAND_LIBDECOR_SHARED=OFF -DSDL_KMSDRM=ON -DSDL_KMSDRM_SHARED=OFF -DSDL_OPENGL=ON \
-DSDL_OPENGLES=ON -DSDL_VULKAN=ON-DSDL_ALSA=ON -DSDL_ALSA_SHARED=OFF -DSDL_PIPEWIRE=ON -DSDL_PIPEWIRE_SHARED=OFF \ -DSDL_OPENGLES=ON -DSDL_VULKAN=ON-DSDL_ALSA=ON -DSDL_ALSA_SHARED=OFF -DSDL_PIPEWIRE=ON -DSDL_PIPEWIRE_SHARED=OFF \
-DSDL_PULSEAUDIO=ON -DSDL_PULSEAUDIO_SHARED=OFF -DSDL_RPATH=OFF -DSDL_HIDAPI=ON -DSDL_HIDAPI_JOYSTICK=ON" -DSDL_PULSEAUDIO=ON -DSDL_PULSEAUDIO_SHARED=OFF -DSDL_RPATH=OFF -DSDL_HIDAPI=ON -DSDL_HIDAPI_JOYSTICK=ON"
build_cmake_stuff clean debug release zlib "-DZLIB_BUILD_STATIC=OFF -DZLIB_BUILD_SHARED=ON -DZLIB_BUILD_MINIZIP=OFF"
build_cmake_stuff clean debug release static zlib "-DZLIB_BUILD_STATIC=ON -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_MINIZIP=OFF"
build_cmake_stuff clean debug release zlib "-DZLIB_BUILD_STATIC=OFF -DZLIB_BUILD_SHARED=ON -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_BUILD_SHARED=ON -DMINIZIP_BUILD_STATIC=OFF -DMINIZIP_ENABLE_BZIP2=OFF"
build_cmake_stuff clean debug release static zlib "-DZLIB_BUILD_STATIC=ON -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_BUILD_SHARED=OFF -DMINIZIP_BUILD_STATIC=ON -DMINIZIP_ENABLE_BZIP2=OFF"
build_cmake_stuff debug release assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
build_cmake_stuff debug release static assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
build_cmake_stuff release SPIRV-Headers "" build_cmake_stuff release SPIRV-Headers ""
build_cmake_stuff release SPIRV-Tools "-DBUILD_SHARED_LIBS=OFF -DSPIRV_TOOLS_BUILD_STATIC=ON -DSPIRV_TOOLS_LIBRARY_TYPE=STATIC" build_cmake_stuff release SPIRV-Tools "-DBUILD_SHARED_LIBS=OFF -DSPIRV_TOOLS_BUILD_STATIC=ON -DSPIRV_TOOLS_LIBRARY_TYPE=STATIC"
cd glslang cd glslang
@@ -139,6 +310,9 @@ build_cmake_stuff ogre "-DOGRE_GLSUPPORT_USE_EGL:BOOL=FALSE -DOGRE_BUILD_RENDERS
build_cmake_stuff static ogre "-DOGRE_GLSUPPORT_USE_EGL:BOOL=FALSE -DOGRE_BUILD_RENDERSYSTEM_VULKAN:BOOL=TRUE -DOGRE_INSTALL_DEPENDENCIES:BOOL=TRUE" build_cmake_stuff static ogre "-DOGRE_GLSUPPORT_USE_EGL:BOOL=FALSE -DOGRE_BUILD_RENDERSYSTEM_VULKAN:BOOL=TRUE -DOGRE_INSTALL_DEPENDENCIES:BOOL=TRUE"
build_cmake_stuff debug release ogre-procedural "-DOgreProcedural_BUILD_DOCS:BOOL=FALSE" build_cmake_stuff debug release ogre-procedural "-DOgreProcedural_BUILD_DOCS:BOOL=FALSE"
build_cmake_stuff debug release static ogre-procedural "-DOgreProcedural_BUILD_DOCS:BOOL=FALSE -DOgreProcedural_STATIC=TRUE -DOgreProcedural_BUILD_SAMPLES=FALSE" build_cmake_stuff debug release static ogre-procedural "-DOgreProcedural_BUILD_DOCS:BOOL=FALSE -DOgreProcedural_STATIC=TRUE -DOgreProcedural_BUILD_SAMPLES=FALSE"
build_cmake_stuff clean debug release ogre-pagedgeometry ""
build_cmake_stuff clean debug release static ogre-pagedgeometry ""
#build_cmake_stuff clean debug release OgreCrowd "-DBUILD_DEMO=OFF"
build_cmake_stuff debug release noinstall clean ogrewater "" build_cmake_stuff debug release noinstall clean ogrewater ""
build_cmake_stuff debug release noinstall clean static ogrewater "" build_cmake_stuff debug release noinstall clean static ogrewater ""
build_cmake_stuff debug noinstall clean ogre-projects/world2 "" build_cmake_stuff debug noinstall clean ogre-projects/world2 ""

2
ffmpeg

Submodule ffmpeg updated: 2e503a9b94...78690eba61

1
libtiff Submodule

Submodule libtiff added at e92f761ea4

1
pybind11 Submodule

Submodule pybind11 added at cc69a3789c