From patchwork Wed Apr 30 00:15:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: nomike X-Patchwork-Id: 42169 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4DC0127BC4B; Wed, 30 Apr 2025 01:17:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CB72227BC49 for ; Wed, 30 Apr 2025 01:17:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u9v8S-0000fX-KM; Tue, 29 Apr 2025 20:17:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u9v8J-0000dI-59 for guix-patches@gnu.org; Tue, 29 Apr 2025 20:17:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u9v8H-00013K-TE for guix-patches@gnu.org; Tue, 29 Apr 2025 20:17:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=4p1tfDI1IhUWIKe0EwFP+pnfsz/42lbi5aTkzOylFY4=; b=uvM4RdRntRgnukQAt1oMCoywBwUq+jc5BdSEKSykMTt5w+v5E19ch7yxZhKniGAUXwievvv6Ong2fZEbrUF1RMvfNq/Kaxx93Url1+zIB0JmJwxNhstpDkSz9F0NOBXBFdXZouR3wX2k66Bsl3aZmSaYnsBmYCmV8DN3nc/6bZ2rMnxHQ+KB0UTvyrsJsQ9n7obEPfn/PhuK/nVsaqL7DSGIePz0qwktlAEytdGqaEySCyg4Xp65JHfQRFUrLKMdEFMa45HBHvgzT7GlioY/RfKDrjgzF4iNzI1XXja0XPFUPH5jObqrTUJjScK3drJR74Kq/RFUfJnC4efVPVZ1ZA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u9v8H-0007P4-Lr for guix-patches@gnu.org; Tue, 29 Apr 2025 20:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78154] [PATCH 5/5] gnu: Update prusa-slicer to version 2.9.2 Resent-From: nomike Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Apr 2025 00:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78154 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78154@debbugs.gnu.org Cc: nomike Received: via spool by 78154-submit@debbugs.gnu.org id=B78154.174597216828361 (code B ref 78154); Wed, 30 Apr 2025 00:17:01 +0000 Received: (at 78154) by debbugs.gnu.org; 30 Apr 2025 00:16:08 +0000 Received: from localhost ([127.0.0.1]:37505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u9v7P-0007NM-1N for submit@debbugs.gnu.org; Tue, 29 Apr 2025 20:16:08 -0400 Received: from seashell.cherry.relay.mailchannels.net ([23.83.223.162]:35009) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u9v7K-0007MC-Fp for 78154@debbugs.gnu.org; Tue, 29 Apr 2025 20:16:05 -0400 X-Sender-Id: dreamhost|x-authsender|nomike@nomike.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 622E91650ED; Wed, 30 Apr 2025 00:16:01 +0000 (UTC) Received: from pdx1-sub0-mail-a217.dreamhost.com (trex-6.trex.outbound.svc.cluster.local [100.113.55.212]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 1A8F516373F; Wed, 30 Apr 2025 00:16:01 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1745972161; a=rsa-sha256; cv=none; b=lpni5l0nF28Vjxcr3urXZ8izdvzKcD4tojZ19FQLG1vpuq8p91FWSYRXcRZmTnrf58jmDJ lORi7/na5bi9AJj3UFpQnKXLZ9e2qgZPzGibZ4n2eJL1VusTtjqRhsKgyLbXspCDbvyYuo sv/oTLl21iPDcJimEsBh1Hk5BRXLjtDC/7NW3ZLfrtCYSbL/1jn4LXCppilpIBQNZxfWmg 7KgmJhT49/7SBFVPJGdnsbQxM1NDTqnJmO6vPh5Dm05dl9HgLCfISSi+a36t9SCsTEK3eC LoEwvRd4apagw4ekcBNSK/yGfgmDid+sUfYXCwfCeQ7CJBAeeLkrvT2L3m+zTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1745972161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4p1tfDI1IhUWIKe0EwFP+pnfsz/42lbi5aTkzOylFY4=; b=uup9jhrbfvR/xC9uRa2md29MH2okdQDFkPgLF2N5lypJqf581AUHp/ECXthJm5J1UVJVHV MV/QFQK4yHfNVLunvlFaeVBGNiw5P0d6SAIJIoqrA3Iio9/acByWWuVt25zNkT3UjkVEOc RrknZiXnvlVsLO6JJ+dHnr2yXgMtGbgLvRbhUhK+o8QwjQ5QAHwBh2iJZpSjahbiFzqVNy OiyGxDTqi9fJJaWod9xHflNkgWjb+x5hZmszfVqc982ebwOsW/E7y8+yVJTUDop77o9AwP nNysYws+ugT1T8awM5w/zw7JsK73tiSYv7ZwHKh7E7M4cbXpiRrfCZ1ESZeAoA== ARC-Authentication-Results: i=1; rspamd-684646cf5b-xmrnh; auth=pass smtp.auth=dreamhost smtp.mailfrom=nomike@nomike.com X-Sender-Id: dreamhost|x-authsender|nomike@nomike.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|nomike@nomike.com X-MailChannels-Auth-Id: dreamhost X-Cooing-Broad: 2e56611b44e37f65_1745972161337_3046044979 X-MC-Loop-Signature: 1745972161336:3576106395 X-MC-Ingress-Time: 1745972161336 Received: from pdx1-sub0-mail-a217.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.113.55.212 (trex/7.0.3); Wed, 30 Apr 2025 00:16:01 +0000 Received: from localhost (84-112-221-106.cable.dynamic.surfer.at [84.112.221.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nomike@nomike.com) by pdx1-sub0-mail-a217.dreamhost.com (Postfix) with ESMTPSA id 4ZnHlh3v4Nz8y; Tue, 29 Apr 2025 17:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nomike.com; s=dreamhost; t=1745972160; bh=4p1tfDI1IhUWIKe0EwFP+pnfsz/42lbi5aTkzOylFY4=; h=From:To:Cc:Subject:Date:Content-Type:Content-Transfer-Encoding; b=STvapNz4Xvzvy5Z0ZtHTiK7VKKfrEHP5qEuBAar9MVQp3A2F1MQry53k7D3tb/Qie l6mgPb0JyCEKwKfwWNbtDTOu7/UuUtLcd90DoJu6ybNoMu9CSODNjO0qiI4c7QrWHe ja9xHchZSpvkjg4M0MsmhKX0CgsYRvM5sNT4aWSLTEdoORamGij9TNUyU39ts/68AF EyMVjiBaEqtpgHf5GggPxvJiFeEuzqr6LtSjelgo0wfJZMcjHjnTmYdIJiQQ5BW9p9 oP20fdbkcZp2nJjhI4Lg3XjoiU6vsB8o537Ogn4zwQven8/I1g8/KQ3yiWpIwrghPD Nvk5K9+vfuDJw== From: nomike Date: Wed, 30 Apr 2025 02:15:07 +0200 Message-ID: <20250430001507.912670-5-nomike@nomike.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250430001507.912670-1-nomike@nomike.com> References: <20250430001507.912670-1-nomike@nomike.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Change-Id: Ibf59b2efb751c3ea0b555c2e4e914e5c095d5413 --- gnu/packages/engineering.scm | 191 ++++++++++-------- ...0-dont-force-link-to-wayland-and-x11.patch | 12 ++ .../patches/prusa-slicer-2.8.1-cgal-6.0.patch | 191 ++++++++++++++++++ .../patches/prusa-slicer-2.8.1-fstream.patch | 42 ++++ .../patches/prusa-slicer-fix-tests.patch | 17 -- 5 files changed, 348 insertions(+), 105 deletions(-) create mode 100644 gnu/packages/patches/prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch create mode 100644 gnu/packages/patches/prusa-slicer-2.8.1-cgal-6.0.patch create mode 100644 gnu/packages/patches/prusa-slicer-2.8.1-fstream.patch delete mode 100644 gnu/packages/patches/prusa-slicer-fix-tests.patch diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 440c075156..ce8ae4e347 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -42,6 +42,7 @@ ;;; Copyright © 2024 Juliana Sims ;;; Copyright © 2024 Nguyễn Gia Phong ;;; Copyright © 2025 Frederick Muriuki Muriithi +;;; Copyright © 2025 nomike Postmann ;;; ;;; This file is part of GNU Guix. ;;; @@ -169,6 +170,7 @@ (define-module (gnu packages engineering) #:use-module (gnu packages tree-sitter) #:use-module (gnu packages version-control) #:use-module (gnu packages web) + #:use-module (gnu packages webkit) #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xiph) @@ -4402,104 +4404,117 @@ (define-public prusa-libbgcode (define-public prusa-slicer (package (name "prusa-slicer") - (version "2.7.4") + (version "2.9.2") (source (origin (method git-fetch) - (uri - (git-reference - (url "https://github.com/prusa3d/PrusaSlicer") - (commit (string-append "version_" version)))) + (uri (git-reference + (url "https://github.com/prusa3d/PrusaSlicer") + (commit (string-append "version_" version)))) (file-name (git-file-name name version)) - (sha256 (base32 "0s1cfvhfilyv0y98asr61c6rwlgyr1hf5v5hg8q9zwmzm2bkcql3")) - (patches (search-patches "prusa-slicer-fix-tests.patch")) + (sha256 + (base32 "05zwwhqv3fjg9rx6a4ga55f4ic1136f6lwms0kb4kaq50w9dvxwg")) + (patches (search-patches + "prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch" + "prusa-slicer-2.8.1-cgal-6.0.patch" + "prusa-slicer-2.8.1-fstream.patch")) (modules '((guix build utils))) - (snippet - `(begin - ;; 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. - ;; Remove bundled libraries that were not modified by Prusa Slicer developers. - (delete-file-recursively "src/hidapi") - (delete-file-recursively "src/eigen") - (delete-file-recursively "src/libigl/igl") - (substitute* "CMakeLists.txt" - (("add_library\\(libexpat INTERFACE\\)") - "")) - (substitute* "src/libigl/CMakeLists.txt" - (("target_link_libraries\\(libigl INTERFACE igl::core\\)") "")) - (substitute* "src/CMakeLists.txt" - (("add_subdirectory\\(hidapi\\)") - "pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)") - (("include_directories\\(hidapi/include\\)") - "include_directories()")) - (substitute* "src/slic3r/CMakeLists.txt" - (("add_library\\(libslic3r_gui.*" all) - (string-append - all - "\ntarget_include_directories(libslic3r_gui PUBLIC ${HIDAPI_INCLUDE_DIRS})\n")) - (("\\bhidapi\\b") "${HIDAPI_LIBRARIES}")))))) + (snippet `(begin + ;; 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. + ;; Remove bundled libraries that were not modified by Prusa Slicer + ;; developers. + + ;; un-bundling hidapi + ;; https://github.com/prusa3d/PrusaSlicer/issues/14505 + (delete-file-recursively "bundled_deps/hidapi") + (substitute* "bundled_deps/CMakeLists.txt" + (("add_subdirectory\\(hidapi\\)") + "")) + (substitute* "src/slic3r/CMakeLists.txt" + (("hidapi") + "hidapi::hidapi") + (("add_library\\(libslic3r_gui.*" all) + (string-append all "\nfind_package(hidapi REQUIRED)\n"))) + + ;; un-bundling libigl + (delete-file-recursively "bundled_deps/libigl/igl") + (substitute* "bundled_deps/libigl/CMakeLists.txt" + (("target_link_libraries\\(libigl INTERFACE igl::core\\)") + "")) + ;; Fix libsoup double linking + (substitute* "src/slic3r/CMakeLists.txt" + ((" webkit2gtk-4.1") + "")))))) (build-system cmake-build-system) (arguments - (list #:configure-flags - #~(list "-DSLIC3R_FHS=1" ;; Use The Filesystem Hierarchy Standard. - "-DSLIC3R_GTK=3" ;; Use GTK+ - ;; Use wxWidgets 3.0.x.x to prevent GUI crashes when adding support enforcers. - "-DSLIC3R_WX_STABLE=1" - (format #f "-Dlibigl_DIR=~a" - (search-input-directory %build-inputs - "lib/cmake/igl/")) - (format #f "-DCatch2_DIR=~a" - (search-input-directory %build-inputs - "lib/cmake/Catch2/"))) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'fix-include-paths - (lambda _ - (substitute* "tests/libslic3r/test_quadric_edge_collapse.cpp" - (("#include ") - "#include "))))))) - (native-inputs - (list pkg-config catch2)) - (inputs - (list boost - cereal - cgal - curl - dbus - eigen - eudev - expat - glew - glib - gmp - gtk+ - heatshrink - hidapi - ilmbase - libigl - libjpeg-turbo - libpng - mesa - mpfr - nanosvg - nlopt - opencascade-occt - openvdb - pango - prusa-libbgcode - ;; XXX: Using Prusa wxWidgets fork as PrusaSlicer segfaults when compiled - ;; with regular wxwidgets. - prusa-wxwidgets - qhull - tbb - zlib)) + (list + #:configure-flags + #~(list "-DSLIC3R_FHS=1" ;Use The Filesystem Hierarchy Standard. + "-DSLIC3R_GTK=3" ;Use GTK+ + ;; Use wxWidgets 3.0.x.x to prevent GUI crashes when adding support + ;; enforcers. + "-DSLIC3R_WX_STABLE=1" + (format #f "-Dlibigl_DIR=~a" + (search-input-directory %build-inputs "lib/cmake/igl/")) + (format #f "-DCatch2_DIR=~a" + (search-input-directory %build-inputs + "lib/cmake/Catch2/"))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-include-paths + (lambda _ + (substitute* "tests/libslic3r/test_quadric_edge_collapse.cpp" + (("#include ") + "#include ")) + (substitute* "src/slic3r/GUI/Mouse3DController.hpp" + (("#include \"hidapi.h\"") + "#include \"hidapi/hidapi.h\""))))))) + (native-inputs (list pkg-config catch2-3.8)) + (inputs (list boost + cereal + catch2-3.8 + cgal + curl + dbus + eigen + eudev + `(,expat "static") + glew + glib + gmp + gtk+ + heatshrink + hidapi-cmake + ilmbase + libigl + libjpeg-turbo + libpng + mesa + mpfr + nanosvg + nlopt + opencascade-occt-7.6.1 + openssl + openvdb + pango + prusa-libbgcode + ;; XXX: Using Prusa wxWidgets fork as PrusaSlicer + ;; segfaults when compiled with regular wxwidgets. + prusa-wxwidgets + qhull + tbb + webkitgtk-with-libsoup2 + z3 + zlib)) (home-page "https://www.prusa3d.com/prusaslicer/") - (synopsis "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)") - (description "PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into + (synopsis + "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)") + (description + "PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into G-code instructions for FFF printers or PNG layers for mSLA 3D printers.") (license license:agpl3) - ;; Mark as tunable to take advantage of SIMD code in Eigen and in libigl. (properties '((tunable? . #t))))) diff --git a/gnu/packages/patches/prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch b/gnu/packages/patches/prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch new file mode 100644 index 0000000000..1d36fcbb7b --- /dev/null +++ b/gnu/packages/patches/prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch @@ -0,0 +1,12 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -115,9 +115,6 @@ if (SLIC3R_GUI) + # libslic3r_gui will link to opengl anyway, so lets override wx + list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX OpenGL) + +- if (UNIX AND NOT APPLE) +- list(APPEND wxWidgets_LIBRARIES X11 wayland-client wayland-egl EGL) +- endif () + # list(REMOVE_ITEM wxWidgets_LIBRARIES oleacc) + message(STATUS "wx libs: ${wxWidgets_LIBRARIES}") + diff --git a/gnu/packages/patches/prusa-slicer-2.8.1-cgal-6.0.patch b/gnu/packages/patches/prusa-slicer-2.8.1-cgal-6.0.patch new file mode 100644 index 0000000000..3aac479197 --- /dev/null +++ b/gnu/packages/patches/prusa-slicer-2.8.1-cgal-6.0.patch @@ -0,0 +1,191 @@ +From a9283c62cec2b802aa2133c92b7ff5bf320c0bb6 Mon Sep 17 00:00:00 2001 +From: Laurent Rineau +Date: Sat, 13 Jul 2024 01:19:21 +0200 +Subject: [PATCH] compatibility with CGAL-6.0 (and 5.6.x) + +updated for 2.8.1 + +--- a/src/libslic3r/CutSurface.cpp ++++ b/src/libslic3r/CutSurface.cpp +@@ -4,6 +4,14 @@ + ///|/ + #include "CutSurface.hpp" + ++template ++auto access_pmap(std::optional opt) -> T { ++ return opt.value(); ++} ++ ++template ++auto access_pmap(Pair pair) { return pair.first; } ++ + /// models_input.obj - Check transormation of model to each others + /// projection_center.obj - circle representing center of projection with correct distance + /// {M} .. model index +@@ -31,6 +39,7 @@ using namespace Slic3r; + #include + #include + #include ++#include + #include + #include + #include +@@ -1021,8 +1030,8 @@ priv::CutMesh priv::to_cgal(const ExPolygons &shapes, + if (shapes.empty()) return {}; + + CutMesh result; +- EdgeShapeMap edge_shape_map = result.add_property_map(edge_shape_map_name).first; +- FaceShapeMap face_shape_map = result.add_property_map(face_shape_map_name).first; ++ EdgeShapeMap edge_shape_map = access_pmap((result.add_property_map(edge_shape_map_name))); ++ FaceShapeMap face_shape_map = access_pmap((result.add_property_map(face_shape_map_name))); + + std::vector indices; + auto insert_contour = [&projection, &indices, &result, +@@ -1432,17 +1441,17 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model, + const ExPolygonsIndices &s2i) + { + // pointer to edge or face shape_map +- VertexShapeMap vert_shape_map = cgal_model.add_property_map(vert_shape_map_name, nullptr).first; ++ VertexShapeMap vert_shape_map = access_pmap((cgal_model.add_property_map(vert_shape_map_name, nullptr))); + + // detect anomalities in visitor. + bool is_valid = true; + // NOTE: map are created when convert shapes to cgal model +- const EdgeShapeMap& edge_shape_map = cgal_shape.property_map(edge_shape_map_name).first; +- const FaceShapeMap& face_shape_map = cgal_shape.property_map(face_shape_map_name).first; ++ const EdgeShapeMap& edge_shape_map = access_pmap((cgal_shape.property_map(edge_shape_map_name))); ++ const FaceShapeMap& face_shape_map = access_pmap((cgal_shape.property_map(face_shape_map_name))); + Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid}; + + // a property map containing the constrained-or-not status of each edge +- EdgeBoolMap ecm = cgal_model.add_property_map(is_constrained_edge_name, false).first; ++ EdgeBoolMap ecm = access_pmap((cgal_model.add_property_map(is_constrained_edge_name, false))); + const auto &p = CGAL::parameters::visitor(visitor) + .edge_is_constrained_map(ecm) + .throw_on_self_intersection(false); +@@ -1451,7 +1460,7 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model, + + if (!is_valid) return {}; + +- FaceTypeMap face_type_map = cgal_model.add_property_map(face_type_map_name, FaceType::not_constrained).first; ++ FaceTypeMap face_type_map = access_pmap((cgal_model.add_property_map(face_type_map_name, FaceType::not_constrained))); + + // Select inside and outside face in model + set_face_type(face_type_map, cgal_model, vert_shape_map, ecm, cgal_shape, s2i); +@@ -1587,8 +1596,8 @@ void priv::collect_surface_data(std::queue &process, + + void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh) + { +- const VertexShapeMap &vert_shape_map = mesh.property_map(vert_shape_map_name).first; +- const EdgeBoolMap &ecm = mesh.property_map(is_constrained_edge_name).first; ++ const VertexShapeMap &vert_shape_map = access_pmap((mesh.property_map(vert_shape_map_name))); ++ const EdgeBoolMap &ecm = access_pmap((mesh.property_map(is_constrained_edge_name))); + + // check if vertex was made by edge_2 which is diagonal of quad + auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool { +@@ -1773,10 +1782,10 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches, + for (const SurfacePatch &patch : patches) { + // map is created during intersection by corefine visitor + const VertexShapeMap &vert_shape_map = +- models[patch.model_id].property_map(vert_shape_map_name).first; ++ access_pmap((models[patch.model_id].property_map(vert_shape_map_name))); + uint32_t patch_index = &patch - &patches.front(); + // map is created during patch creation / dividing +- const CvtVI2VI& cvt = patch.mesh.property_map(patch_source_name).first; ++ const CvtVI2VI& cvt = access_pmap((patch.mesh.property_map(patch_source_name))); + // for each point on outline + for (const Loop &loop : patch.loops) + for (const VI &vi_patch : loop) { +@@ -2666,7 +2675,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector &fis, + /* const */ CutMesh &mesh, + const ReductionMap *rmap) + { +- auto is_counted = mesh.add_property_map("v:is_counted").first; ++ auto is_counted = access_pmap((mesh.add_property_map("v:is_counted"))); + uint32_t count_vertices = 0; + if (rmap == nullptr) { + for (FI fi : fis) +@@ -2696,7 +2705,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector &fis, + cm.reserve(count_vertices, count_edges, count_faces); + + // vertex conversion function from mesh VI to result VI +- CvtVI2VI mesh2result = mesh.add_property_map("v:mesh2result").first; ++ CvtVI2VI mesh2result = access_pmap((mesh.add_property_map("v:mesh2result"))); + + if (rmap == nullptr) { + for (FI fi : fis) { +@@ -2748,7 +2757,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector &fis, + assert(count_edges >= cm.edges().size()); + + // convert VI from this patch to source VI, when exist +- CvtVI2VI cvt = cm.add_property_map(patch_source_name).first; ++ CvtVI2VI cvt = access_pmap((cm.add_property_map(patch_source_name))); + // vi_s .. VertexIndex into mesh (source) + // vi_d .. new VertexIndex in cm (destination) + for (VI vi_s : mesh.vertices()) { +@@ -2939,7 +2948,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch, + uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model) + { + // map is created during intersection by corefine visitor +- const VertexShapeMap &vert_shape_map = model.property_map(vert_shape_map_name).first; ++ const VertexShapeMap &vert_shape_map = access_pmap((model.property_map(vert_shape_map_name))); + // for each half edge of outline + for (HI hi : cut.second) { + VI vi = model.source(hi); +@@ -2964,7 +2973,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector& fis, + patch_new.model_id = patch.model_id; + patch_new.shape_id = patch.shape_id; + // fix cvt +- CvtVI2VI cvt = patch_new.mesh.property_map(patch_source_name).first; ++ CvtVI2VI cvt = access_pmap((patch_new.mesh.property_map(patch_source_name))); + for (VI &vi : cvt) { + if (!vi.is_valid()) continue; + vi = cvt_from[vi]; +@@ -2982,9 +2991,9 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches) + CutMesh& cm = patch.mesh; + assert(!cm.faces().empty()); + std::string patch_number_name = "f:patch_number"; +- CutMesh::Property_map is_processed = cm.add_property_map(patch_number_name, false).first; ++ CutMesh::Property_map is_processed = access_pmap((cm.add_property_map(patch_number_name, false))); + +- const CvtVI2VI& cvt_from = patch.mesh.property_map(patch_source_name).first; ++ const CvtVI2VI& cvt_from = access_pmap((patch.mesh.property_map(patch_source_name))); + + std::vector fis; + fis.reserve(cm.faces().size()); +@@ -3085,7 +3094,7 @@ priv::SurfacePatches priv::diff_models(VCutAOIs &cuts, + CutAOIs &model_cuts = cuts[model_index]; + CutMesh &cut_model_ = cut_models[model_index]; + const CutMesh &cut_model = cut_model_; +- ReductionMap vertex_reduction_map = cut_model_.add_property_map(vertex_reduction_map_name).first; ++ ReductionMap vertex_reduction_map = access_pmap((cut_model_.add_property_map(vertex_reduction_map_name))); + create_reduce_map(vertex_reduction_map, cut_model); + + for (size_t cut_index = 0; cut_index < model_cuts.size(); ++cut_index, ++index) { +@@ -3171,7 +3180,7 @@ bool priv::is_over_whole_expoly(const CutAOI &cutAOI, + const CutMesh &mesh) + { + // NonInterupted contour is without other point and contain all from shape +- const VertexShapeMap &vert_shape_map = mesh.property_map(vert_shape_map_name).first; ++ const VertexShapeMap &vert_shape_map = access_pmap((mesh.property_map(vert_shape_map_name))); + for (HI hi : cutAOI.second) { + const IntersectingElement *ie_s = vert_shape_map[mesh.source(hi)]; + const IntersectingElement *ie_t = vert_shape_map[mesh.target(hi)]; +@@ -3708,7 +3717,7 @@ void priv::store(const CutMesh &mesh, const FaceTypeMap &face_type_map, const st + } + + CutMesh &mesh_ = const_cast(mesh); +- auto face_colors = mesh_.add_property_map("f:color").first; ++ auto face_colors = access_pmap((mesh_.add_property_map("f:color"))); + for (FI fi : mesh.faces()) { + auto &color = face_colors[fi]; + switch (face_type_map[fi]) { +@@ -3734,7 +3743,7 @@ void priv::store(const CutMesh &mesh, const ReductionMap &reduction_map, const s + std::string off_file = dir + "model" + std::to_string(reduction_order++) + ".off"; + + CutMesh &mesh_ = const_cast(mesh); +- auto vertex_colors = mesh_.add_property_map("v:color").first; ++ auto vertex_colors = access_pmap((mesh_.add_property_map("v:color"))); + // initialize to gray color + for (VI vi: mesh.vertices()) + vertex_colors[vi] = CGAL::Color{127, 127, 127}; diff --git a/gnu/packages/patches/prusa-slicer-2.8.1-fstream.patch b/gnu/packages/patches/prusa-slicer-2.8.1-fstream.patch new file mode 100644 index 0000000000..f550c53d3f --- /dev/null +++ b/gnu/packages/patches/prusa-slicer-2.8.1-fstream.patch @@ -0,0 +1,42 @@ +--- a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp ++++ b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp +@@ -1595,7 +1595,7 @@ void GLGizmoSVG::draw_filename(){ + if (dlg.ShowModal() == wxID_OK ){ + last_used_directory = dlg.GetDirectory(); + std::string out_path_str(into_u8(dlg.GetPath())); +- boost::nowide::ofstream stream(out_path_str); ++ std::ofstream stream(out_path_str); + if (stream.is_open()){ + stream << *svg.file_data; + +--- a/src/slic3r/GUI/PresetArchiveDatabase.cpp ++++ b/src/slic3r/GUI/PresetArchiveDatabase.cpp +@@ -515,7 +515,7 @@ void PresetArchiveDatabase::load_app_manifest_json() + if (!fs::exists(path, ec) || ec) { + copy_initial_manifest(); + } +- boost::nowide::ifstream file(path.string()); ++ std::ifstream file(path.string()); + std::string data; + if (file.is_open()) { + std::string line; +@@ -682,7 +682,7 @@ void PresetArchiveDatabase::save_app_manifest_json() const + data += "]"; + + std::string path = get_stored_manifest_path().string(); +- boost::nowide::ofstream file(path); ++ std::ofstream file(path); + if (file.is_open()) { + file << data; + file.close(); +--- a/src/slic3r/Utils/Http.cpp ++++ b/src/slic3r/Utils/Http.cpp +@@ -302,7 +302,7 @@ void Http::priv::form_add_file(const char *name, const fs::path &path, const cha + //FIXME may throw! Is the caller aware of it? + void Http::priv::set_post_body(const fs::path &path) + { +- boost::nowide::ifstream file(path.string()); ++ std::ifstream file(path.string()); + std::string file_content { std::istreambuf_iterator(file), std::istreambuf_iterator() }; + postfields = std::move(file_content); + } diff --git a/gnu/packages/patches/prusa-slicer-fix-tests.patch b/gnu/packages/patches/prusa-slicer-fix-tests.patch deleted file mode 100644 index da9a5307f9..0000000000 --- a/gnu/packages/patches/prusa-slicer-fix-tests.patch +++ /dev/null @@ -1,17 +0,0 @@ -This patch comes from Gentoo: - portage/media-gfx/prusaslicer/files/prusaslicer-2.5.0_rc1-fix-tests.patch - ---- a/tests/fff_print/test_data.cpp -+++ b/tests/fff_print/test_data.cpp -@@ -4,10 +4,9 @@ - #include "libslic3r/GCodeReader.hpp" - #include "libslic3r/Config.hpp" - #include "libslic3r/Print.hpp" --#include "libslic3r/Format/OBJ.hpp" --#include "libslic3r/Format/STL.hpp" - - #include -+#include - #include - - #include