Files
OrcaSlicer/scripts/linux.d/debian
T
İlker Kara 1e038bfc53 fix(linux): build deps on older GCC and Ubuntu 22.04 (#15151)
- GMP: name the parameters in the configure probe from
  0001-GMP_GCC15.patch. Unnamed parameters are a hard error on GCC 10
  and older, so configure failed there.
- TBB: turn off the automatic hwloc search so a system libhwloc-dev is
  not picked up.
- scripts/linux.d/debian: run apt update before checking which
  webkit2gtk package exists, and prefer webkit2gtk-4.1 since the build
  requires it. Add automake, which MPFR's autoreconf needs.
2026-09-21 09:36:55 -03:00

76 lines
1.7 KiB
Bash

#!/bin/bash
REQUIRED_DEV_PACKAGES=(
autoconf
automake
build-essential
cmake
eglexternalplatform-dev
extra-cmake-modules
file
g++
gettext
git
gstreamer1.0-gtk3
libcurl4-openssl-dev
libdbus-1-dev
libglew-dev
libgstreamerd-3-dev
libgtk-3-dev
libmspack-dev
libsecret-1-dev
libspnav-dev
libssl-dev
libtool
libudev-dev
clang
lld
ninja-build
texinfo
wget
pkgconf
yasm
nasm
)
if [[ -n "$UPDATE_LIB" ]]
then
# shellcheck source=/dev/null
source /etc/os-release
if [ "${ID}" == "ubuntu" ] && [ -n "${VERSION_ID}" ]; then
# It's ubuntu and we have a VERSION_ID like "24.04".
if dpkg --compare-versions "${VERSION_ID}" ge 22 && dpkg --compare-versions "${VERSION_ID}" lt 24 ;
then
# Some extra packages needed on Ubuntu 22.x and 23.x:
REQUIRED_DEV_PACKAGES+=(curl libfuse-dev m4)
fi
fi
if [[ -n "$BUILD_DEBUG" ]]
then
REQUIRED_DEV_PACKAGES+=(libssl-dev libcurl4-openssl-dev)
fi
# The package lists must be current before checking what is available.
sudo apt update
# src/slic3r/CMakeLists.txt requires webkit2gtk-4.1 unconditionally (no
# 4.0 fallback), so prefer it; only fall back to 4.0-dev when 4.1 isn't
# packaged for this distro.
if [ "$(apt show --quiet libwebkit2gtk-4.1-dev 2>/dev/null)" != "" ]
then
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.1-dev)
else
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.0-dev)
fi
# install them all at once
sudo apt install -y "${REQUIRED_DEV_PACKAGES[@]}"
echo -e "done\n"
exit 0
fi
export FOUND_GTK3_DEV
FOUND_GTK3_DEV=$(dpkg -l libgtk* | grep gtk-3-dev || echo '')