[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49713] [PATCH 3/3] gnu: Add prusa-slicer.
From: |
Ivan Gankevich |
Subject: |
[bug#49713] [PATCH 3/3] gnu: Add prusa-slicer. |
Date: |
Mon, 20 Sep 2021 00:39:36 +0300 |
+ ;; CMake is unable to find headers from glib, pango and
gtk+
+ ;; when compiling src/slic3r. Here we add them via
environment variables.
+ (add-before 'configure 'add-glib-pango-gtk+
Upstream already appears to search for GTK+3 with their CMake setup.
Perhaps that's why it doesn't find GTK+2?
I changed GTK+2 to GTK+3 and removed the whole “add-glib-pango-gtk+” phase.
+ (add-before 'configure 'unbundle-3d-party-libraries
+ ;; Prusa slicer bundles a lot of dependencies in src/
directory.
+ ;; Most of them contain prusa-specific modifications
(e.g. avrdude),
+ ;; but others do not. Here we replace the latter with
Guix packages.
+ (lambda _
+ (delete-file-recursively "src/hidapi")
+ (delete-file-recursively "src/eigen")
+ (delete-file-recursively "src/libigl/igl")
+ (substitute* "src/CMakeLists.txt"
+ (("add_subdirectory\\(libigl\\)" all)
+ (string-append
+ all "\ninclude_directories(libigl INTERFACE
libigl::core)"))
+ (("add_subdirectory\\(hidapi\\)") "")
+ (("include_directories\\(hidapi/include\\)") ""))
+ ;; Do not link with bundled hidapi library.
+ (substitute* "src/slic3r/CMakeLists.txt"
+ (("\\bhidapi\\b") "")))))))
Unbundling should be done in the snippet rather than at build time.
Moved deletion of directories to the snippet.
Try sorting the inputs alphabetically, also w.r.t. gtk+-2, see above.
Now its is sorted and no more GTK+2.
Thanks for your corrections. I’ve sent the updated version of this patch via
“git send-email”.
Regards,
Ivan