From patchwork Mon Sep 20 22:15:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Gankevich X-Patchwork-Id: 33217 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 E570E27BBE3; Mon, 20 Sep 2021 23:27:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A8C4427BBE1 for ; Mon, 20 Sep 2021 23:27:22 +0100 (BST) Received: from localhost ([::1]:52704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSRkv-0005ks-Mt for patchwork@mira.cbaines.net; Mon, 20 Sep 2021 18:27:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSRaw-0006xi-IN for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60904) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSRaw-0007Zw-2C for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSRav-0000PS-Tw for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49713] [PATCH v3 1/3] gnu: cereal: Use cmake to build and install the library. References: <20210723210037.28150-1-i.gankevich@spbu.ru> In-Reply-To: <20210723210037.28150-1-i.gankevich@spbu.ru> Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Sep 2021 22:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49713 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49713@debbugs.gnu.org Cc: Ivan Gankevich Received: via spool by 49713-submit@debbugs.gnu.org id=B49713.16321761941499 (code B ref 49713); Mon, 20 Sep 2021 22:17:01 +0000 Received: (at 49713) by debbugs.gnu.org; 20 Sep 2021 22:16:34 +0000 Received: from localhost ([127.0.0.1]:44211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSRaU-0000O7-8N for submit@debbugs.gnu.org; Mon, 20 Sep 2021 18:16:34 -0400 Received: from mail.spbu.ru ([195.70.197.23]:37579 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSRaQ-0000Nm-WA for 49713@debbugs.gnu.org; Mon, 20 Sep 2021 18:16:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=E7HgJdZXi97A/F9kh7Qu8ZSJ7pgyl4+uB9lsxmBkD4I=; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From; b=YJqklWLd9QHCxifGoJi04TEpCrsuL4ZVaUQElzfy85VWvvE9JyIW/zujHZI+Rj2QOieTozmfV6 qoSnIxminhVvvmPz4Txo6XfE4G398tTkZc55ZFsZd67x2KUl45bRkyBzmqmtNnFjhhPPxDhfIAtKF eeKiBmPcmOb0xf0EURD04j7KytrhzXdP9reRJ8d5P9lIRZ2FzcbeLBAMyRbjCatkD8nvwCFKQgEHS dAMqNK5kpKqEcrbwPfT7ad6L/+w9IHhhMHLK1OXdnqfwqrW6DnAk949/eGBW+G61mgEwWZo3IkA4C R1kw6j0b3VPby4mZv4+2inBe8se0v/Pm7b01A== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 187015456; Tue, 21 Sep 2021 01:16:23 +0300 From: Ivan Gankevich Date: Tue, 21 Sep 2021 01:15:48 +0300 Message-Id: <20210920221549.14678-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/serialization.scm (cereal): Use cmake to build and install the library. --- gnu/packages/serialization.scm | 38 +++++++++++----------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 0e79b7c89c..3263805c68 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -142,32 +142,18 @@ implement RPC protocols.") "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p")))) (build-system cmake-build-system) (arguments - `(;; The only included tests are portability tests requiring - ;; cross-compilation and boost. Since we are building cereal on more - ;; platforms anyway, there is no compelling reason to build the tests. - #:tests? #f - #:out-of-source? #f - #:phases - (modify-phases %standard-phases - (delete 'configure) - (replace 'build - (lambda _ - (substitute* "doc/doxygen.in" - (("@CMAKE_CURRENT_BINARY_DIR@") ".") - (("@CMAKE_CURRENT_SOURCE_DIR@") ".")) - (with-directory-excursion "doc" - (invoke "doxygen" "doxygen.in")))) - ;; There is no "install" target, so we have to provide our own - ;; "install" phase. - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (doc (string-append out "/share/cereal/docs")) - (include (string-append out "/include/cereal"))) - (mkdir-p doc) - (mkdir-p include) - (copy-recursively "include/cereal" include) - (copy-recursively "doc/html" doc))))))) + `(#:configure-flags (list "-DSKIP_PORTABILITY_TEST=ON") + #:phases (modify-phases %standard-phases + (add-before 'configure 'skip-sandbox + (lambda _ + (substitute* "CMakeLists.txt" + (("add_subdirectory\\(sandbox\\)") "")))) + (add-after 'install 'install-doc + (lambda _ + (let ((doc (string-append %output "/share/doc/html"))) + (invoke "make" "doc") + (mkdir-p doc) + (copy-recursively "doc/html" doc))))))) (native-inputs `(("doxygen" ,doxygen))) (home-page "https://uscilab.github.io/cereal/") From patchwork Mon Sep 20 22:15:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Gankevich X-Patchwork-Id: 33221 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 E417827BBE3; Mon, 20 Sep 2021 23:43:46 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 589B927BBE1 for ; Mon, 20 Sep 2021 23:43:46 +0100 (BST) Received: from localhost ([::1]:57218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSS0n-0003OK-GT for patchwork@mira.cbaines.net; Mon, 20 Sep 2021 18:43:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSRaw-0006yN-Na for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSRaw-0007aa-EX for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSRaw-0000PZ-Af for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49713] [PATCH v3 2/3] gnu: Add libigl. Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Sep 2021 22:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49713 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49713@debbugs.gnu.org Cc: Ivan Gankevich Received: via spool by 49713-submit@debbugs.gnu.org id=B49713.16321761981516 (code B ref 49713); Mon, 20 Sep 2021 22:17:02 +0000 Received: (at 49713) by debbugs.gnu.org; 20 Sep 2021 22:16:38 +0000 Received: from localhost ([127.0.0.1]:44213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSRaX-0000OO-JM for submit@debbugs.gnu.org; Mon, 20 Sep 2021 18:16:38 -0400 Received: from mail.spbu.ru ([195.70.197.23]:37579 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSRaT-0000Nm-85 for 49713@debbugs.gnu.org; Mon, 20 Sep 2021 18:16:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=rEFJpC7eyIxVEIzTrgb6BvigTx1tD6zMD6JqPMmoM9I=; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From; b=jCpz4sp51gjgcBy5oT7BTjzbT9ZS9KXkjysCvy1qJIlImgBu/L 8QNBJMAzdgrpXQQbM3TocirY/sOdRzmqyAECaFyhfYtN86C+aWT+PqIYM4UHxQim7Wu1taHS6pOK/ lKpFQXZaNyvzFSrXqBajRIu/2z4XxE1Kws63wKg4Y5Jf1FNT8159l2p367sEMHyWl2CnBVW7DTRDZ F0cPnfTcJBjb7lPDDWlLqS9rvgoe17LZcZjdJLw6uyPXuCVgAnztvlFju8Ebd+E0dprsFVStK2vwk NzS0VXwETH1L2YrMDPShZ2nnHTGy3h+Qesy/0RzNppslWShGWdjhXhjQofp9Q== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 187015477; Tue, 21 Sep 2021 01:16:31 +0300 From: Ivan Gankevich Date: Tue, 21 Sep 2021 01:15:50 +0300 Message-Id: <20210920221549.14678-2-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210920221549.14678-1-i.gankevich@spbu.ru> References: <20210920221549.14678-1-i.gankevich@spbu.ru> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/engineering.scm (libigl): New variable. --- gnu/packages/engineering.scm | 139 +++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 46622f3a1f..421a10292a 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -2863,3 +2863,142 @@ for hooking Linux system calls in user space. This is achieved by hot-patching the machine code of the standard C library in the memory of a process.") (license license:bsd-2)))) + +(define-public libigl + (package + (name "libigl") + (version "2.3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libigl/libigl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "004a22ifq2vibgkgvrlyihqimpsfizvq5l448204kwfg3lkycajj")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list "-DLIBIGL_USE_STATIC_LIBRARY=OFF" + "-DLIBIGL_BUILD_TESTS=ON" + "-DLIBIGL_BUILD_TUTORIALS=OFF" + "-DLIBIGL_EXPORT_TARGETS=ON" + ;; The following options disable tests for the corresponding libraries. + ;; The options do not affect whether the libraries are linked to libigl or not, + ;; they are used for tests. + "-DLIBIGL_WITH_COMISO=OFF" + "-DLIBIGL_WITH_CORK=OFF" + "-DLIBIGL_WITH_MATLAB=OFF" + "-DLIBIGL_WITH_MOSEK=OFF" + "-DLIBIGL_WITH_TRIANGLE=OFF" ;; Undefined reference to "triangulate". + "-DLIBIGL_WITH_OPENGL_GLFW_IMGUI=OFF") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'do-not-download-dependencies + (lambda _ + (setenv "HOME" (getcwd)) ;; cmake needs this to export modules + (mkdir "external") + (copy-recursively (assoc-ref %build-inputs "libigl-glad") "external/glad") + (copy-recursively (assoc-ref %build-inputs "libigl-stb") "external/stb") + (copy-recursively (assoc-ref %build-inputs "libigl-tetgen") "external/tetgen") + (copy-recursively (assoc-ref %build-inputs "libigl-predicates") "external/predicates") + (substitute* "cmake/libigl.cmake" + (("if\\(NOT TARGET Eigen3::Eigen\\)" all) + (string-append "find_package(Eigen3 CONFIG REQUIRED)\n" all)) + (("if\\(NOT TARGET CGAL::CGAL\\)" all) + (string-append "find_package(CGAL CONFIG COMPONENTS Core)\n" all)) + (("if\\(NOT TARGET tinyxml2\\)" all) + (string-append "find_package(tinyxml2 CONFIG REQUIRED)\n" + "if (NOT TARGET tinyxml2::tinyxml2)")) + (("if\\(NOT TARGET embree\\)" all) + (string-append "find_package(embree 3 CONFIG REQUIRED)\n" all)) + (("if\\(NOT TARGET glfw\\)" all) + (string-append "find_package(glfw3 CONFIG REQUIRED)\n" all)) + (("igl_download_glad\\(\\)" all) "") + (("igl_download_stb\\(\\)" all) "") + (("igl_download_tetgen\\(\\)" all) "") + (("igl_download_triangle\\(\\)" all) "") + (("igl_download_predicates\\(\\)" all) "")) + (substitute* "tests/CMakeLists.txt" + (("igl_download_test_data\\(\\)") "") + (("set\\(IGL_TEST_DATA.*") + (format #f "set(IGL_TEST_DATA ~a)\n" + (assoc-ref %build-inputs "libigl-test-data"))) + (("igl_download_catch2\\(\\)") "find_package(Catch2 CONFIG REQUIRED)") + (("list\\(APPEND CMAKE_MODULE_PATH \\$\\{LIBIGL_EXTERNAL\\}/catch2/contrib\\)") + "") + (("add_subdirectory\\(\\$\\{LIBIGL_EXTERNAL\\}/catch2 catch2\\)") "")))) + (add-after 'install 'install-all-subdirs + (lambda _ + (copy-recursively + "../source/include" + (string-append (assoc-ref %outputs "out") "/include"))))))) + (inputs + `(("eigen" ,eigen) + ("gmp" ,gmp) + ("mpfr" ,mpfr) + ("boost" ,boost))) + (native-inputs + `(("catch2" ,catch-framework2) + ("cgal" ,cgal) + ("embree" ,embree) + ("mesa" ,mesa) + ("glfw" ,glfw) + ("tinyxml2" ,tinyxml2) + ("libigl-test-data" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libigl/libigl-tests-data") + ;; This commit should be updated for each version + ;; from "cmake/LibiglDownloadExternal.cmake". + (commit "19cedf96d70702d8b3a83eb27934780c542356fe"))) + (file-name (git-file-name "libigl-test-data" version)) + (sha256 (base32 "1wxglrxw74xw4a4jmmjpm8719f3mnlbxbwygjb4ddfixxxyya4i2")))) + ("libigl-glad" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libigl/libigl-glad") + ;; This commit should be updated for each version + ;; from "cmake/LibiglDownloadExternal.cmake". + (commit "09b4969c56779f7ddf8e6176ec1873184aec890f"))) + (file-name (git-file-name "libigl-glad" version)) + (sha256 (base32 "0rwrs7513ylp6gxv7crjzflapcg9p7x04nzfvywgl665vl53rawk")))) + ("libigl-stb" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libigl/libigl-stb.git") + ;; This commit should be updated for each version + ;; from "cmake/LibiglDownloadExternal.cmake". + (commit "cd0fa3fcd90325c83be4d697b00214e029f94ca3"))) + (file-name (git-file-name "libigl-stb" version)) + (sha256 (base32 "0wwlb370z40y63ic3ny6q7lxibhixg2k1pjdkl4ymzv79zld28kj")))) + ("libigl-tetgen" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libigl/tetgen.git") + ;; This commit should be updated for each version + ;; from "cmake/LibiglDownloadExternal.cmake". + (commit "4f3bfba3997f20aa1f96cfaff604313a8c2c85b6"))) + (file-name (git-file-name "libigl-tetgen" version)) + (sha256 (base32 "1k724syssw37py7kwmibk3sfwkkgyjyy7qkijnhn6rjm91g8qxsg")))) + ("libigl-predicates" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libigl/libigl-predicates.git") + ;; This commit should be updated for each version + ;; from "cmake/LibiglDownloadExternal.cmake". + (commit "488242fa2b1f98a9c5bd1441297fb4a99a6a9ae4"))) + (file-name (git-file-name "libigl-predicates" version)) + (sha256 (base32 "13bd98g8lgcq37i3crj66433z09grnb2xjrcqpwqmyn147rp5wyh")))))) + (home-page "https://libigl.github.io/") + (synopsis "Simple C++ geometry processing library") + (description "This library provides functionality for shape modelling, +visualization, matrix manipulation.") + (license (list license:gpl3 license:mpl2.0)))) From patchwork Mon Sep 20 22:15:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ivan Gankevich X-Patchwork-Id: 33218 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 D76DC27BBE3; Mon, 20 Sep 2021 23:34:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 458F327BBE1 for ; Mon, 20 Sep 2021 23:34:17 +0100 (BST) Received: from localhost ([::1]:40004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSRrc-0007pB-B7 for patchwork@mira.cbaines.net; Mon, 20 Sep 2021 18:34:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSRax-0006zy-57 for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSRaw-0007al-SD for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSRaw-0000Pg-OF for guix-patches@gnu.org; Mon, 20 Sep 2021 18:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49713] [PATCH v3 3/3] gnu: Add prusa-slicer. Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Sep 2021 22:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49713 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49713@debbugs.gnu.org Cc: Ivan Gankevich Received: via spool by 49713-submit@debbugs.gnu.org id=B49713.16321762071543 (code B ref 49713); Mon, 20 Sep 2021 22:17:02 +0000 Received: (at 49713) by debbugs.gnu.org; 20 Sep 2021 22:16:47 +0000 Received: from localhost ([127.0.0.1]:44217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSRah-0000Oo-36 for submit@debbugs.gnu.org; Mon, 20 Sep 2021 18:16:47 -0400 Received: from mail.spbu.ru ([195.70.197.23]:45067 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSRae-0000OW-O0 for 49713@debbugs.gnu.org; Mon, 20 Sep 2021 18:16:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=wZyZepfSVGN3/EMic1ljSdCJCGrfdIEGvk22vbYn/gw=; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From; b=G0dRRQlBjsoYFRGiC3EtbJnc8lfSNm371rd8Y9h be07gvtxcv7P2SKzHVY6+6csUegZTN2LH0W16Wh3HQudkoBLE82E2nZZEfRQmhAlkR18n8kDKKB4O 6KHUuPsYqknXl70c7QJRnZbZ+9EsbVNTFnFAPRDE6P4I1jJA2SmTtCR54xajQ+TziTwhgkVUhfy+W t903rQ7zeaS5BI/YYCs1QL8axk+uaP7TqcWj4SKWNLpOs2tIzmPW3uEpCsW5MrVE5DLsfnCQN1yQ5 JUepZAZkE0wL0ntNf4RaCCecBuLZcGz8h2o1VM1Z6NKVkGEXTgO7kaYfP8Sa8GNZXwiYqtUg== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 187015493; Tue, 21 Sep 2021 01:16:38 +0300 From: Ivan Gankevich Date: Tue, 21 Sep 2021 01:15:52 +0300 Message-Id: <20210920221549.14678-3-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210920221549.14678-1-i.gankevich@spbu.ru> References: <20210920221549.14678-1-i.gankevich@spbu.ru> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/engineering.scm (prusa-slicer): New variable. --- gnu/packages/engineering.scm | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 421a10292a..c4183c0c71 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -24,6 +24,7 @@ ;;; Copyright © 2021 qblade ;;; Copyright © 2021 Gerd Heber ;;; Copyright © 2021 Guillaume Le Vaillant +;;; Copyright © 2021 Ivan Gankevich ;;; ;;; This file is part of GNU Guix. ;;; @@ -95,6 +96,7 @@ #:use-module (gnu packages image-processing) #:use-module (gnu packages imagemagick) #:use-module (gnu packages libevent) + #:use-module (gnu packages libusb) #:use-module (gnu packages linux) ;FIXME: for pcb #:use-module (gnu packages lisp) #:use-module (gnu packages m4) @@ -3002,3 +3004,80 @@ a process.") (description "This library provides functionality for shape modelling, visualization, matrix manipulation.") (license (list license:gpl3 license:mpl2.0)))) + +(define-public prusa-slicer + (package + (name "prusa-slicer") + (version "2.3.3") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/prusa3d/PrusaSlicer") + (commit (string-append "version_" version)))) + (file-name (git-file-name name version)) + (sha256 (base32 "0w0synqi3iz9aigsgv6x1c6sg123fasbx19h4w3ic1l48r8qmpwm")) + (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* "src/CMakeLists.txt" + (("add_subdirectory\\(libigl\\)" all) + (string-append + all "\ninclude_directories(libigl INTERFACE libigl::core)")) + (("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}")))))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + '("-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"))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("boost" ,boost) + ("cereal" ,cereal) + ("cgal" ,cgal) + ("curl" ,curl) + ("dbus" ,dbus) + ("eigen" ,eigen) + ("expat" ,expat) + ("glew" ,glew) + ("glib" ,glib) + ("gmp" ,gmp) + ("gtk" ,gtk+) + ("hidapi" ,hidapi) + ("ilmbase" ,ilmbase) + ("libigl" ,libigl) + ("libpng" ,libpng) + ("mesa" ,mesa) + ("mpfr" ,mpfr) + ("nlopt" ,nlopt) + ("openvdb" ,openvdb) + ("pango" ,pango) + ("tbb" ,tbb) + ("udev" ,eudev) + ("wxwidgets" ,wxwidgets) + ("zlib" ,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 +G-code instructions for FFF printers or PNG layers for mSLA 3D printers.") + (license license:agpl3)))