%global build_number 11 %global version_full 1.3.0.11 # Disable LTO - bundled FFmpeg assembly has issues with -flto %global _lto_cflags %{nil} Name: elegoo-slicer Version: 1.3.0 Release: 7%{?dist} Summary: Feature-rich 3D printing slicer for ELEGOO and other FDM printers License: AGPL-3.0-only URL: https://github.com/ELEGOO-3D/ElegooSlicer Source0: %{name}-%{version}.tar.gz # On Linux, use system GMP/MPFR in deps stage to avoid bundled GMP toolchain issues Patch0: use-system-gmp-linux.patch Patch1: use-system-mpfr-linux.patch Patch2: curl-disable-docs.patch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake >= 3.14 BuildRequires: perl BuildRequires: perl-FindBin BuildRequires: m4 BuildRequires: git-core BuildRequires: gettext BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: texinfo BuildRequires: wget BuildRequires: procps-ng BuildRequires: mesa-libGL-devel BuildRequires: mesa-libGLU-devel BuildRequires: mesa-compat-libOSMesa-devel BuildRequires: gtk3-devel BuildRequires: webkit2gtk4.1-devel BuildRequires: dbus-devel BuildRequires: eglexternalplatform-devel BuildRequires: libmspack-devel BuildRequires: libsecret-devel BuildRequires: libspnav-devel BuildRequires: extra-cmake-modules BuildRequires: wayland-devel BuildRequires: wayland-protocols-devel BuildRequires: libxkbcommon-devel BuildRequires: gstreamer1-devel BuildRequires: gstreamer1-plugins-base-devel BuildRequires: gstreamer1-plugin-openh264 BuildRequires: gstreamermm-devel BuildRequires: nasm BuildRequires: yasm BuildRequires: x264-devel BuildRequires: ninja-build BuildRequires: libcurl-devel BuildRequires: openssl-devel BuildRequires: libquadmath-devel BuildRequires: bzip2-devel BuildRequires: gmp-devel BuildRequires: mpfr-devel BuildRequires: desktop-file-utils Requires: gtk3 Requires: webkit2gtk4.1 Requires: gstreamer1 Requires: gstreamer1-plugins-base Requires: gstreamer1-plugins-good Provides: bundled(wxwidgets) = 3.2.0 Provides: bundled(imgui) Provides: bundled(libnest2d) Provides: bundled(admesh) Provides: bundled(miniz) Provides: bundled(polyclipping) Provides: bundled(heatshrink) Provides: bundled(boost) Provides: bundled(cgal) Provides: bundled(openvdb) Provides: bundled(nlopt) Provides: bundled(cereal) %description Elegoo Slicer is a feature-rich 3D printing slicing software designed for ELEGOO 3D printers and compatible with other FDM printers. It is a fork in the Orca/Bambu/Prusa slicer family, with enhanced device integration and project-oriented workflows. %prep %autosetup -n ElegooSlicer -p1 %build if [ -z "$CMAKE_BUILD_PARALLEL_LEVEL" ]; then FREE_MEM_GB=$(free -g | grep '^Mem:' | awk '{print $7}') PARALLEL_LEVEL=$((FREE_MEM_GB / 3)) if [ $PARALLEL_LEVEL -lt 1 ]; then PARALLEL_LEVEL=1 fi if [ $PARALLEL_LEVEL -gt 8 ]; then PARALLEL_LEVEL=8 fi export CMAKE_BUILD_PARALLEL_LEVEL=$PARALLEL_LEVEL fi echo "Building with CMAKE_BUILD_PARALLEL_LEVEL=$CMAKE_BUILD_PARALLEL_LEVEL" # Stage 1: Build bundled dependencies SAVED_CFLAGS="$CFLAGS" SAVED_CXXFLAGS="$CXXFLAGS" SAVED_LDFLAGS="$LDFLAGS" export CFLAGS="-O2 -fPIC" export CXXFLAGS="-O2 -fPIC" export LDFLAGS="" mkdir -p deps/build/redhat-linux-build cd deps/build/redhat-linux-build cmake \ -DDESTDIR=%{_builddir}/ElegooSlicer/deps_install \ -DCMAKE_BUILD_TYPE=Release \ -DDEP_WX_GTK3=ON \ ../.. cmake --build . --parallel ${CMAKE_BUILD_PARALLEL_LEVEL} cd ../../.. # Stage 2: Build ElegooSlicer itself export CFLAGS="$SAVED_CFLAGS" export CXXFLAGS="$SAVED_CXXFLAGS" export LDFLAGS="$SAVED_LDFLAGS" mkdir -p build cd build %cmake \ -DSLIC3R_STATIC=ON \ -DSLIC3R_GTK=3 \ -DBBL_RELEASE_TO_PUBLIC=1 \ -DELEGOO_INTERNAL_TESTING=0 \ -DSLIC3R_FHS=1 \ -DSLIC3R_BUILD_TESTS=0 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=%{_builddir}/ElegooSlicer/deps_install/usr/local \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ .. %cmake_build %install cd build %cmake_install # Upstream install drops an extra top-level license copy not tracked by %%files. rm -f %{buildroot}%{_prefix}/LICENSE.txt # Install vendor-shipped runtime libs in a private libdir and use a wrapper. mkdir -p %{buildroot}%{_libdir}/%{name} mv %{buildroot}%{_bindir}/lib*.so* %{buildroot}%{_libdir}/%{name}/ mkdir -p %{buildroot}%{_libexecdir}/%{name} mv %{buildroot}%{_bindir}/elegoo-slicer %{buildroot}%{_libexecdir}/%{name}/elegoo-slicer-bin cat > %{buildroot}%{_bindir}/elegoo-slicer << 'EOF' #!/bin/sh export LD_LIBRARY_PATH=%{_libdir}/%{name}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} # Work around blank wxWebView setup/login screens seen on some Wayland stacks. : "${WEBKIT_DISABLE_COMPOSITING_MODE:=1}" export WEBKIT_DISABLE_COMPOSITING_MODE : "${WEBKIT_DISABLE_DMABUF_RENDERER:=1}" export WEBKIT_DISABLE_DMABUF_RENDERER if [ -n "${WAYLAND_DISPLAY:-}" ] && [ -z "${GDK_BACKEND:-}" ]; then export GDK_BACKEND=x11 fi exec %{_libexecdir}/%{name}/elegoo-slicer-bin "$@" EOF chmod 0755 %{buildroot}%{_bindir}/elegoo-slicer %check desktop-file-validate %{buildroot}%{_datadir}/applications/ElegooSlicer.desktop %files %license LICENSE.txt %doc README.md %{_bindir}/elegoo-slicer %{_libexecdir}/%{name}/elegoo-slicer-bin %{_libdir}/%{name}/lib*.so* %{_datadir}/ElegooSlicer/ %{_datadir}/applications/ElegooSlicer.desktop %{_datadir}/icons/hicolor/32x32/apps/ElegooSlicer.png %{_datadir}/icons/hicolor/128x128/apps/ElegooSlicer.png %{_datadir}/icons/hicolor/192x192/apps/ElegooSlicer.png %changelog * Fri Feb 27 2026 linuxguy123 - 1.3.0-7 - Add runtime WebKit/Wayland launcher workarounds for blank setup/login screens - Set WEBKIT_DISABLE_COMPOSITING_MODE=1 and WEBKIT_DISABLE_DMABUF_RENDERER=1 by default - Prefer X11 backend under Wayland unless user explicitly sets GDK_BACKEND * Fri Feb 27 2026 linuxguy123 - 1.3.0-6 - Fix runtime linker failure for libagora_rtm_sdk.so and libaosl.so - Move bundled vendor .so files to %{_libdir}/elegoo-slicer - Run binary via wrapper that sets LD_LIBRARY_PATH * Thu Feb 26 2026 linuxguy123 - 1.3.0-5 - Remove unpackaged /usr/LICENSE.txt from buildroot during install * Thu Feb 26 2026 linuxguy123 - 1.3.0-4 - Force ELEGOO_INTERNAL_TESTING=0 to avoid empty macro expansion in libslic3r_version.h * Thu Feb 26 2026 linuxguy123 - 1.3.0-3 - Patch bundled elegoo-link build: add missing include for std::find_if with GCC 15 * Thu Feb 26 2026 linuxguy123 - 1.3.0-2 - Disable bundled curl docs/manpage generation to fix dep_CURL build failure * Thu Feb 26 2026 linuxguy123 - 1.3.0-1 - Initial COPR packaging for ElegooSlicer - Fedora/COPR build based on working Bambu Studio packaging flow - Use system GMP/MPFR for Linux deps stage