2022-10-13 12:28:00 +11:00
|
|
|
#!/usr/bin/env bash
|
2023-08-16 00:20:26 +10:00
|
|
|
# SPDX-FileCopyrightText: 2022-2023 Blender Authors
|
2023-06-14 23:06:58 +10:00
|
|
|
#
|
2022-10-13 12:28:00 +11:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
2023-03-02 21:30:22 +01:00
|
|
|
# This script is part of the official build environment, see wiki page for details.
|
2024-01-18 16:10:52 +01:00
|
|
|
# https://developer.blender.org/docs/handbook/release_process/build/rocky_8/
|
2022-10-06 16:59:07 +02:00
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
if [ `id -u` -ne 0 ]; then
|
|
|
|
|
echo "This script must be run as root"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2022-12-14 17:26:40 -07:00
|
|
|
# Required by: config manager command below to enable powertools.
|
2023-08-07 17:45:20 +02:00
|
|
|
dnf -y install 'dnf-command(config-manager)'
|
2022-12-14 17:26:40 -07:00
|
|
|
|
2022-12-09 12:55:38 +11:00
|
|
|
# Packages `ninja-build` and `meson` are not available unless CBR or PowerTools repositories are enabled.
|
|
|
|
|
# See: https://wiki.rockylinux.org/rocky/repo/#notes-on-unlisted-repositories
|
|
|
|
|
dnf config-manager --set-enabled powertools
|
|
|
|
|
|
2022-12-14 17:26:40 -07:00
|
|
|
# Required by: epel-release has the patchelf and rubygem-asciidoctor packages
|
2023-08-07 17:45:20 +02:00
|
|
|
dnf -y install epel-release
|
2022-12-15 08:58:30 +11:00
|
|
|
|
|
|
|
|
# `yum-config-manager` does not come in the default minimal install,
|
2022-10-06 16:59:07 +02:00
|
|
|
# so make sure it is installed and available.
|
|
|
|
|
yum -y update
|
|
|
|
|
yum -y install yum-utils
|
|
|
|
|
|
2022-12-09 12:55:38 +11:00
|
|
|
# Install all the packages needed for a new tool-chain.
|
2022-10-06 16:59:07 +02:00
|
|
|
#
|
|
|
|
|
# NOTE: Keep this separate from the packages install, since otherwise
|
2022-12-09 12:55:38 +11:00
|
|
|
# older tool-chain will be installed.
|
2022-10-06 16:59:07 +02:00
|
|
|
yum -y update
|
2022-12-09 12:55:38 +11:00
|
|
|
yum -y install scl-utils
|
|
|
|
|
yum -y install scl-utils-build
|
|
|
|
|
|
|
|
|
|
# Currently this is defined by the VFX platform (CY2023), see: https://vfxplatform.com
|
|
|
|
|
yum -y install gcc-toolset-11
|
2022-10-06 16:59:07 +02:00
|
|
|
|
|
|
|
|
# Install packages needed for Blender's dependencies.
|
2022-10-14 19:10:19 +11:00
|
|
|
PACKAGES_FOR_LIBS=(
|
2022-10-14 18:59:12 +11:00
|
|
|
# Used to checkout Blender's code.
|
2022-10-13 12:28:00 +11:00
|
|
|
git
|
2022-10-14 18:59:12 +11:00
|
|
|
# Used to checkout Blender's `../lib/` directory.
|
2022-10-13 12:28:00 +11:00
|
|
|
subversion
|
2022-10-14 18:59:12 +11:00
|
|
|
# Used to extract packages.
|
2022-10-13 12:28:00 +11:00
|
|
|
bzip2
|
2022-10-14 18:59:12 +11:00
|
|
|
# Used to extract packages.
|
2022-10-13 12:28:00 +11:00
|
|
|
tar
|
2022-10-14 18:59:12 +11:00
|
|
|
# Blender and some dependencies use `cmake`.
|
2022-10-13 12:28:00 +11:00
|
|
|
cmake3
|
2022-10-14 18:59:12 +11:00
|
|
|
# Apply patches from Blender's: `./build_files/build_environment/patches`
|
2022-10-13 12:28:00 +11:00
|
|
|
patch
|
2022-10-14 18:59:12 +11:00
|
|
|
# Use by `cmake` and `autoconf`.
|
2022-10-13 12:28:00 +11:00
|
|
|
make
|
2022-10-14 18:59:12 +11:00
|
|
|
|
|
|
|
|
# Required by: `external_nasm` which uses an `autoconf` build-system.
|
2022-10-13 12:28:00 +11:00
|
|
|
autoconf
|
|
|
|
|
automake
|
|
|
|
|
libtool
|
2022-10-14 18:59:12 +11:00
|
|
|
|
2023-03-02 21:30:22 +01:00
|
|
|
# Used to set rpath on shared libraries
|
2022-12-09 12:55:38 +11:00
|
|
|
patchelf
|
|
|
|
|
|
2022-10-14 18:59:12 +11:00
|
|
|
# Builds generated by meson use Ninja for the actual build.
|
2022-10-13 12:28:00 +11:00
|
|
|
ninja-build
|
|
|
|
|
|
2022-10-14 18:59:12 +11:00
|
|
|
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
2022-10-13 12:28:00 +11:00
|
|
|
mesa-libEGL-devel
|
2022-10-14 18:59:12 +11:00
|
|
|
# Required by: Blender & `external_opensubdiv` (probably others).
|
2022-10-13 12:28:00 +11:00
|
|
|
mesa-libGL-devel
|
|
|
|
|
mesa-libGLU-devel
|
|
|
|
|
|
2022-10-14 18:59:12 +11:00
|
|
|
# Required by: `external_ispc`.
|
2022-10-13 12:28:00 +11:00
|
|
|
zlib-devel
|
2022-10-14 18:59:12 +11:00
|
|
|
# TODO: dependencies build without this, consider removal.
|
2022-10-13 12:28:00 +11:00
|
|
|
rubygem-asciidoctor
|
2022-10-14 18:59:12 +11:00
|
|
|
# TODO: dependencies build without this, consider removal.
|
2022-10-13 12:28:00 +11:00
|
|
|
wget
|
2022-10-14 18:59:12 +11:00
|
|
|
# Required by: `external_sqlite` as a build-time dependency (needed for the `tclsh` command).
|
2022-10-13 12:28:00 +11:00
|
|
|
tcl
|
2022-10-14 18:59:12 +11:00
|
|
|
# Required by: `external_aom`.
|
|
|
|
|
# TODO: Blender is already building `external_nasm` which is listed as an alternative to `yasm`.
|
|
|
|
|
# Why are both needed?
|
2022-10-13 12:28:00 +11:00
|
|
|
yasm
|
|
|
|
|
|
2022-12-09 12:55:38 +11:00
|
|
|
# NOTE(@campbellbarton): while `python39` is available, the default Python version is 3.6.
|
|
|
|
|
# This is used for the `python3-mako` package for e.g.
|
|
|
|
|
# So use the "default" system Python since it means it's most compatible with other packages.
|
2022-12-14 15:23:47 +11:00
|
|
|
python3
|
2022-12-15 08:58:30 +11:00
|
|
|
# Required by: `external_mesa`.
|
|
|
|
|
python3-mako
|
2022-12-09 12:55:38 +11:00
|
|
|
|
2022-12-15 08:58:30 +11:00
|
|
|
# Required by: `external_mesa`.
|
2022-12-09 12:55:38 +11:00
|
|
|
expat-devel
|
2022-10-13 12:28:00 +11:00
|
|
|
|
2023-12-21 19:16:11 +01:00
|
|
|
# Required by: `external_mesa`.
|
|
|
|
|
libxshmfence
|
|
|
|
|
libxshmfence-devel
|
|
|
|
|
|
2022-10-14 18:59:12 +11:00
|
|
|
# Required by: `external_igc` & `external_osl` as a build-time dependency.
|
2022-10-13 12:28:00 +11:00
|
|
|
bison
|
2022-10-14 18:59:12 +11:00
|
|
|
# Required by: `external_osl` as a build-time dependency.
|
2022-10-13 12:28:00 +11:00
|
|
|
flex
|
2022-12-14 15:23:47 +11:00
|
|
|
|
2022-12-09 12:55:38 +11:00
|
|
|
# Required by: `external_ispc`.
|
2022-10-13 12:28:00 +11:00
|
|
|
ncurses-devel
|
2022-12-14 15:23:47 +11:00
|
|
|
# Required by: `external_ispc` (when building with CLANG).
|
|
|
|
|
libstdc++-static
|
2023-06-21 15:14:44 +02:00
|
|
|
|
|
|
|
|
# Required by: `external_ssl` (build dependencies).
|
|
|
|
|
perl-IPC-Cmd
|
|
|
|
|
perl-Pod-Html
|
2023-11-07 12:57:45 +11:00
|
|
|
|
|
|
|
|
# Required by: `external_wayland_weston`
|
|
|
|
|
cairo-devel
|
|
|
|
|
libdrm-devel
|
|
|
|
|
pixman-devel
|
|
|
|
|
libffi-devel
|
|
|
|
|
libinput-devel
|
|
|
|
|
libevdev-devel
|
|
|
|
|
mesa-libEGL-devel
|
2023-11-09 14:54:06 +11:00
|
|
|
systemd-devel # for `libudev` (not so obvious!).
|
2023-11-07 12:57:45 +11:00
|
|
|
# Required by: `weston --headless` (run-time requirement for off screen rendering).
|
|
|
|
|
mesa-dri-drivers
|
|
|
|
|
mesa-libEGL
|
|
|
|
|
mesa-libGL
|
2022-10-14 19:10:19 +11:00
|
|
|
)
|
2022-10-13 12:28:00 +11:00
|
|
|
|
2022-10-14 19:10:19 +11:00
|
|
|
# Additional packages needed for building Blender.
|
|
|
|
|
PACKAGES_FOR_BLENDER=(
|
|
|
|
|
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
|
|
|
|
libxkbcommon-devel
|
2022-12-09 12:55:38 +11:00
|
|
|
|
|
|
|
|
# Required by Blender build option: `WITH_GHOST_X11`.
|
|
|
|
|
libX11-devel
|
|
|
|
|
libXcursor-devel
|
|
|
|
|
libXi-devel
|
|
|
|
|
libXinerama-devel
|
|
|
|
|
libXrandr-devel
|
|
|
|
|
libXt-devel
|
|
|
|
|
libXxf86vm-devel
|
2022-10-13 12:28:00 +11:00
|
|
|
)
|
|
|
|
|
|
2022-10-14 19:10:19 +11:00
|
|
|
yum -y install -y ${PACKAGES_FOR_LIBS[@]} ${PACKAGES_FOR_BLENDER[@]}
|
2022-10-06 16:59:07 +02:00
|
|
|
|
2022-12-15 08:58:30 +11:00
|
|
|
# Dependencies for pip (needed for `buildbot-worker`), uses Python3.6.
|
2022-12-09 12:55:38 +11:00
|
|
|
yum -y install python3 python3-pip python3-devel
|
2022-10-06 16:59:07 +02:00
|
|
|
|
|
|
|
|
# Dependencies for asound.
|
|
|
|
|
yum -y install -y \
|
|
|
|
|
alsa-lib-devel pulseaudio-libs-devel
|
2023-11-27 11:24:52 +11:00
|
|
|
|
|
|
|
|
# Required by Blender build option: `WITH_JACK`.
|
|
|
|
|
yum -y install jack-audio-connection-kit-devel
|