From patchwork Wed Aug 14 05:48:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Artyom V. Poptsov" X-Patchwork-Id: 67002 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 8B58527BBE2; Wed, 14 Aug 2024 06:49:58 +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.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 84FFC27BBE9 for ; Wed, 14 Aug 2024 06:49:55 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1se6t1-000668-Dd; Wed, 14 Aug 2024 01:49:31 -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 1se6sy-00065u-DU for guix-patches@gnu.org; Wed, 14 Aug 2024 01:49:28 -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 1se6sy-0004Jy-4g for guix-patches@gnu.org; Wed, 14 Aug 2024 01:49:28 -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:Date:From:To:Subject; bh=t2rztWN+Hgpj/uttyTH+pnIDagMFDctAqAgHYoBZ6UQ=; b=Zdz1ERvBK+kRSsnsdB2849NnaP3+3JY5PJ+aRPkCGyng0WFhze6PTIICjrWhAKJt7zoC4D8CclRuQXJMxMH9S5UHAWOD2twKPHt7NGq02EcNqFh+QFyEPBhce0xIPwuwDXEmffJQ/n1BEyJYppi7XDticGqRZR/sLh9l4KoMzBkqlgfa2oRDGu731bioaGZvonpKUmYlvxtFIzdSWjyIW1WosAnqp7AZRF04iAK0a/JIcO12Xzxakp06gQb8TM091XCSR7jAl487iR9zDbsRGbGpBEStjwix9FNGSfFIkmWZ3RQ6kfQxtQjdPdPKdbPxK07YQE9MAH4/MEAW95qMHA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1se6tW-0000Uc-9j for guix-patches@gnu.org; Wed, 14 Aug 2024 01:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72614] [PATCH] gnu: asli: Update to 0.1-1.4f4ba14. Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Aug 2024 05:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72614 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72614@debbugs.gnu.org Cc: "Artyom V. Poptsov" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17236145801850 (code B ref -1); Wed, 14 Aug 2024 05:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Aug 2024 05:49:40 +0000 Received: from localhost ([127.0.0.1]:45855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1se6t9-0000Tm-Lg for submit@debbugs.gnu.org; Wed, 14 Aug 2024 01:49:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:48916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1se6t7-0000Td-AA for submit@debbugs.gnu.org; Wed, 14 Aug 2024 01:49:38 -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 1se6sY-00064T-Id for guix-patches@gnu.org; Wed, 14 Aug 2024 01:49:02 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1se6sW-0004Gl-6b for guix-patches@gnu.org; Wed, 14 Aug 2024 01:49:02 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-52f01613acbso641945e87.1 for ; Tue, 13 Aug 2024 22:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723614537; x=1724219337; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=t2rztWN+Hgpj/uttyTH+pnIDagMFDctAqAgHYoBZ6UQ=; b=MEJNRCLfe2sQPj9mk8yta9MuEFFDkD9lqqBgG8qKN+GkUXByigHgyPugUAYhKETGBh goRbmFVRH5H8dOWPmEhsCpomzfWkoKjLg4IAg70BaEf8tjAEUT8WH74WJ+VXCRpC6z+G /2bUgFgPjaydPx+4lPLxixijmPzJKLoN9UCCGAHIU4JSWA9BnwK7Xbs/H/tbSugEjXaL XQTJCdH4RBLeridSxa9TL7owBhPa69lbuyLNjJ7Bll+gdP8PAdYGwIzk34e/u9mANhoF 5tK2RjNcOFcgxyoMjjyfZ2SSICXgXCWyE/t+meLEA85Jc1Zpa8LSyYPezfDan84uxnSG lhCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723614537; x=1724219337; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=t2rztWN+Hgpj/uttyTH+pnIDagMFDctAqAgHYoBZ6UQ=; b=AJw7A+ShgHbEqXux2pjNsyybM5+emohMspFxxVuVh9bipFJdXmftsjgX4wbKJ438K0 0EuJpoysA4rwwT0JQz16XXZnbNLdDOhBZ+8DRmHh6zmitqzoeHrlfkk//VTEFr/IFXW+ bm5oYjNMnmDFjcRKdWsVSg6DmE37bOLhANPKPB+lKBYFsm7Sr4bM/piiduHBwQqx1X3h UvY+EOJBEg8n0VeArkdo7S9IvCoHebvGluF33Li/Vfjq25U5CdV8gcdAZS/bsjDw7i3j XWHHImPmAVQQgk2X3HFazK8u6a7RygP+3kima860Re3kqAi1T051jFUyi5BqWKN6VOBc kqAQ== X-Gm-Message-State: AOJu0YxchPfDjzbUC2eHv3Y2JLoZjjqICYY8hCBmsWrM1lASSA363IB9 RZxDHh+erpB+6wLCuJzC9CY4HpAXv9/Tkfnzl4SZwLwzI5ktSCx17lsy1g== X-Google-Smtp-Source: AGHT+IF1hfvKn+tdP4bJwA6xpoYOdw157sMA1i6jHt3PMMfUeoJv01K+/6LF6+fguUc0hJnoq5ar+g== X-Received: by 2002:ac2:4e05:0:b0:52f:c281:72de with SMTP id 2adb3069b0e04-532f1390a28mr213926e87.15.1723614536631; Tue, 13 Aug 2024 22:48:56 -0700 (PDT) Received: from elephant.. ([95.79.70.170]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53200f417c2sm1139844e87.257.2024.08.13.22.48.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 22:48:55 -0700 (PDT) From: "Artyom V. Poptsov" Date: Wed, 14 Aug 2024 08:48:45 +0300 Message-ID: <014ba641cf8ba34ec8de3d24b791c685fb7ebcc1.1723614525.git.poptsov.artyom@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=poptsov.artyom@gmail.com; helo=mail-lf1-x132.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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 * gnu/packages/graphics.scm (asli): Update to the commit 4f4ba142ea7db6eecfdb546538c88a38680a83c5 to allow build with CGAL v5.6. * gnu/packages/patches/asli-use-system-libs.patch: Update. Change-Id: I623099a34d96180fe6aa4c161cfa895597a45304 --- gnu/packages/graphics.scm | 138 +++++++++--------- .../patches/asli-use-system-libs.patch | 55 ++++--- 2 files changed, 102 insertions(+), 91 deletions(-) base-commit: 99a81b6f2a1386d6ea76a6ecb1942f1f7f891080 diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 6c9d6cded9..11bd24e949 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -2800,78 +2800,80 @@ (define-public nanosvg (license license:zlib)))) (define-public asli - (package - (name "asli") - (version "0.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/tpms-lattice/ASLI") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "02hwdavpsy3vmivd6prp03jn004ykrl11lbkvksy5i2zm38zbknr")) - (patches (search-patches "asli-use-system-libs.patch")) - (modules '((guix build utils))) - (snippet - ;; Remove bundled libraries except (the ones missing from Guix and) - ;; KU Leuven's mTT, which is an obscure (i.e., unfindable by searching - ;; online for “mTT KU Leuven”), BSD-3 licensed, header-only library. - #~(begin - ;;(delete-file-recursively "libs/AdaptTools") ; Missing from Guix - (delete-file-recursively "libs/CGAL") - ;;(delete-file-recursively "libs/alglib") ; Missing from Guix - (delete-file-recursively "libs/eigen") - (delete-file-recursively "libs/mmg") - ;;(delete-file-recursively "libs/tetgen") ; Missing from Guix - (delete-file-recursively "libs/yaml"))))) - (build-system cmake-build-system) - (inputs - (list boost - cgal - eigen - gmp - `(,mmg "lib") - mpfr - tbb-2020 - yaml-cpp)) - (arguments - (list #:tests? #f ; No tests - #:configure-flags - #~(list "-DCGAL_ACTIVATE_CONCURRENT_MESH_3=ON" - (string-append "-DEIGEN3_INCLUDE_DIR=" - #$(this-package-input "eigen") - "/include/eigen3") - (string-append "-DMMG_INCLUDE_DIR=" - (ungexp (this-package-input "mmg") "lib") - "/include") - (string-append "-DMMG_LIBRARY_DIR=" - (ungexp (this-package-input "mmg") "lib") - "/lib")) - #:phases - #~(modify-phases %standard-phases - (replace 'install ; No install phase - (lambda _ - (with-directory-excursion "../source/bin" - (install-file "ASLI" (string-append #$output "/bin")) - ;; The manual is included in the repository. - ;; Building it requires -DASLI_DOC=ON, but this is marked - ;; as unsupported (presumably for users). - ;; Besides, some of the LaTeX packages it uses are - ;; missing from Guix, for example emptypage, fvextra and - ;; menukeys. - (install-file "docs/ASLI [User Manual].pdf" - (string-append #$output "/share/doc/" - #$name "-" #$version)))))))) - (home-page "http://www.biomech.ulg.ac.be/ASLI/") - (synopsis "Create lattice infills with varying unit cell type, size and feature") - (description "ASLI (A Simple Lattice Infiller) is a command-line tool that + ;; Use the newer version of ASLI that allows build with CGAL v5.6. + (let ((commit "4f4ba142ea7db6eecfdb546538c88a38680a83c5") + (revision "1")) + (package + (name "asli") + (version (git-version "0.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tpms-lattice/ASLI") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "122xxnj3dckmg6mh07x490564b2z9gd38cd0wc5zz3p4nshcq7wy")) + (patches (search-patches "asli-use-system-libs.patch")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled libraries except (the ones missing from Guix and) + ;; KU Leuven's mTT, which is an obscure (i.e., unfindable by searching + ;; online for “mTT KU Leuven”), BSD-3 licensed, header-only library. + #~(begin + ;;(delete-file-recursively "libs/AdaptTools") ; Missing from Guix + (delete-file-recursively "libs/CGAL") + ;;(delete-file-recursively "libs/alglib") ; Missing from Guix + (delete-file-recursively "libs/eigen") + (delete-file-recursively "libs/mmg") + (delete-file-recursively "libs/yaml"))))) + (build-system cmake-build-system) + (inputs + (list boost + cgal + eigen + gmp + `(,mmg "lib") + mpfr + tbb-2020 + yaml-cpp)) + (arguments + (list #:tests? #f ; No tests + #:configure-flags + #~(list "-DCGAL_ACTIVATE_CONCURRENT_MESH_3=ON" + (string-append "-DEIGEN3_INCLUDE_DIR=" + #$(this-package-input "eigen") + "/include/eigen3") + (string-append "-DMMG_INCLUDE_DIR=" + (ungexp (this-package-input "mmg") "lib") + "/include") + (string-append "-DMMG_LIBRARY_DIR=" + (ungexp (this-package-input "mmg") "lib") + "/lib")) + #:phases + #~(modify-phases %standard-phases + (replace 'install ; No install phase + (lambda _ + (with-directory-excursion "../source/bin" + (install-file "ASLI" (string-append #$output "/bin")) + ;; The manual is included in the repository. + ;; Building it requires -DASLI_DOC=ON, but this is marked + ;; as unsupported (presumably for users). + ;; Besides, some of the LaTeX packages it uses are + ;; missing from Guix, for example emptypage, fvextra and + ;; menukeys. + (install-file "docs/ASLI [User Manual].pdf" + (string-append #$output "/share/doc/" + #$name "-" #$version)))))))) + (home-page "http://www.biomech.ulg.ac.be/ASLI/") + (synopsis "Create lattice infills with varying unit cell type, size and feature") + (description "ASLI (A Simple Lattice Infiller) is a command-line tool that allows users to fill any 3D geometry with a functionally graded lattice. The lattice infill is constructed out of unit cells, described by implicit functions, whose type, size and feature can be varied locally to obtain the desired local properties.") - (license license:agpl3+))) + (license license:agpl3+)))) (define-public f3d (package diff --git a/gnu/packages/patches/asli-use-system-libs.patch b/gnu/packages/patches/asli-use-system-libs.patch index 6c4518e04e..82e49addb6 100644 --- a/gnu/packages/patches/asli-use-system-libs.patch +++ b/gnu/packages/patches/asli-use-system-libs.patch @@ -1,12 +1,20 @@ -Adjust CMakeLists.txt to use system-provided mmg and yaml-cpp libraries. +From edfff0027c3cdacbbc0f288078366058f598544d Mon Sep 17 00:00:00 2001 +From: "Artyom V. Poptsov" +Date: Wed, 14 Aug 2024 07:57:20 +0300 +Subject: [PATCH] CMakeLists.txt: Adjust to use system libraries. + +* CMakeLists.txt: Adjust to use system-provided mmg and yaml-cpp libraries. +--- + CMakeLists.txt | 38 ++++++-------------------------------- + 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index b11c5ba..702423e 100755 +index ca2a01f9..c6eff22f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -122,28 +122,8 @@ if(MMG_MESH) - add_definitions(-DMMG_MESH) +@@ -113,28 +113,8 @@ endif() + # Mmg and its components # MMG - set(MMG_PREFIX mmg3d) - set(MMG_PREFIX_DIR ${CMAKE_CURRENT_BINARY_DIR}/${MMG_PREFIX}) @@ -19,7 +27,7 @@ index b11c5ba..702423e 100755 - INSTALL_DIR ${MMG_INSTALL_DIR} - - CMAKE_ARGS(-DCMAKE_BUILD_TYPE=Release -DBUILD=MMG3D -DLIBMMG3D_STATIC=ON -- -DLIBMMG3D_SHARED=OFF -DCMAKE_INSTALL_PREFIX=) +- -DLIBMMG3D_SHARED=OFF -DUSE_ELAS=OFF -DUSE_VTK=OFF -DCMAKE_INSTALL_PREFIX=) - - BUILD_COMMAND make - INSTALL_COMMAND make install @@ -35,8 +43,8 @@ index b11c5ba..702423e 100755 # MshMet set(MSHMET_PREFIX mshmet) -@@ -192,14 +172,8 @@ target_include_directories(tet PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libs/tetgen) - target_compile_definitions(tet PUBLIC TETLIBRARY) # -DTETLIBRARY: flag to compile tetgen as a library +@@ -174,14 +154,8 @@ target_include_directories(alg PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libs/alglib/sr + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/mTT/include) # yaml -file(GLOB yaml_SRC CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libs/yaml/src/*.cpp) # Using file GLOB is not recomended! @@ -52,21 +60,22 @@ index b11c5ba..702423e 100755 # Compile options for debuging if(CMAKE_BUILD_TYPE MATCHES Debug) -@@ -259,7 +233,7 @@ if(MARCH_NATIVE) - endif() +@@ -218,7 +192,7 @@ endif() # Create entries for C++ files in "ASLI" routine --target_link_libraries(ASLI PUBLIC alg tet yaml) -+target_link_libraries(ASLI PUBLIC alg tet ${YAML_CPP_LIBRARIES}) - if(NOT MSVC) - target_link_libraries(ASLI PUBLIC stdc++fs) - endif() -@@ -272,7 +246,7 @@ if(CGAL_MESH) - endif() - - if(MMG_MESH) -- add_dependencies(ASLI ${MMG_PREFIX} ${MSHMET_PREFIX}) -+ add_dependencies(ASLI ${MSHMET_PREFIX}) - target_link_libraries(ASLI PUBLIC ${MMG3D_LIBRARIES} ${MSHMET_LIBRARIES}) - if(SCOTCH_FOUND) - target_link_libraries(ASLI PUBLIC ${SCOTCH_LIBRARIES} scotch) + add_dependencies(ASLI ${MMG_PREFIX} ${MSHMET_PREFIX}) +-target_link_libraries(ASLI PUBLIC alg yaml ++target_link_libraries(ASLI PUBLIC alg ${YAML_CPP_LIBRARIES} + CGAL::CGAL CGAL::Eigen_support + ${MMG3D_LIBRARIES} ${MSHMET_LIBRARIES} + ) +@@ -301,4 +275,4 @@ if(MSYS AND ASLI_DLL) + $ + ) + endif() +-endif() +\ No newline at end of file ++endif() +-- +2.45.2 +