orca-slicer: get rid of osmesa dependency, clean up other mesa-related things

It's not actually necessary.
This commit is contained in:
K900
2025-03-06 09:09:39 +03:00
parent 1db9e2a4f5
commit d3631853bd
2 changed files with 15 additions and 10 deletions
+2 -10
View File
@@ -27,7 +27,6 @@
hicolor-icon-theme,
ilmbase,
libpng,
mesa,
mpfr,
nlopt,
opencascade-occt_7_6,
@@ -107,9 +106,6 @@ stdenv.mkDerivation rec {
hicolor-icon-theme
ilmbase
libpng
mesa
mesa.osmesa
mesa.drivers
mpfr
nlopt
opencascade-occt_7_6
@@ -129,6 +125,8 @@ stdenv.mkDerivation rec {
./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch
# Link opencv_core and opencv_imgproc instead of opencv_world
./patches/dont-link-opencv-world-orca.patch
# Don't link osmesa
./patches/no-osmesa.patch
# The changeset from https://github.com/SoftFever/OrcaSlicer/pull/7650, can be removed when that PR gets merged
# Allows disabling the update nag screen
(fetchpatch {
@@ -169,8 +167,6 @@ stdenv.mkDerivation rec {
NIX_LDFLAGS = toString [
(lib.optionalString withSystemd "-ludev")
"-L${mesa.osmesa}/lib"
"-L${mesa.drivers}/lib"
"-L${boost186}/lib"
"-lboost_log"
"-lboost_log_setup"
@@ -194,7 +190,6 @@ stdenv.mkDerivation rec {
"-DBOOST_LOG_NO_LIB=OFF"
"-DCMAKE_CXX_FLAGS=-DGL_SILENCE_DEPRECATION"
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-as-needed"
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${mesa.drivers}/lib -Wl,-rpath,${mesa.osmesa}/lib"
"-DORCA_VERSION_CHECK_DEFAULT=OFF"
];
@@ -202,12 +197,9 @@ stdenv.mkDerivation rec {
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : "$out/lib:${
lib.makeLibraryPath [
mesa.drivers
mesa.osmesa
glew
]
}"
--prefix LIBGL_DRIVERS_PATH : "${mesa.drivers}/lib/dri"
--set WEBKIT_DISABLE_COMPOSITING_MODE 1
)
'';
@@ -0,0 +1,13 @@
diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
index e695acd48..174e233e6 100644
--- a/src/slic3r/CMakeLists.txt
+++ b/src/slic3r/CMakeLists.txt
@@ -587,7 +587,7 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl)
FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client)
find_package(CURL REQUIRED)
- target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES} OSMesa)
+ target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES})
target_link_libraries(libslic3r_gui
OpenGL::EGL
${WAYLAND_SERVER_LIBRARIES}