From patchwork Sun Jul 24 12:02:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 40891 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 15DD927BBEA; Sun, 24 Jul 2022 13:04:14 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 6D99727BBE9 for ; Sun, 24 Jul 2022 13:04:13 +0100 (BST) Received: from localhost ([::1]:39032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFaLE-0003hd-7f for patchwork@mira.cbaines.net; Sun, 24 Jul 2022 08:04:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFaL5-0003gb-2h for guix-patches@gnu.org; Sun, 24 Jul 2022 08:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFaL4-0005Hw-9l for guix-patches@gnu.org; Sun, 24 Jul 2022 08:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFaL4-0002dG-5f for guix-patches@gnu.org; Sun, 24 Jul 2022 08:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56638] [PATCH v2 1/2] gnu: Add mmg. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 Jul 2022 12:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56638 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56638@debbugs.gnu.org Cc: "Paul A. Patience" Received: via spool by 56638-submit@debbugs.gnu.org id=B56638.165866419010031 (code B ref 56638); Sun, 24 Jul 2022 12:04:02 +0000 Received: (at 56638) by debbugs.gnu.org; 24 Jul 2022 12:03:10 +0000 Received: from localhost ([127.0.0.1]:47005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFaKB-0002bh-N9 for submit@debbugs.gnu.org; Sun, 24 Jul 2022 08:03:09 -0400 Received: from mail-40136.proton.ch ([185.70.40.136]:15944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFaK9-0002b1-3O for 56638@debbugs.gnu.org; Sun, 24 Jul 2022 08:03:06 -0400 Date: Sun, 24 Jul 2022 12:02:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1658664178; x=1658923378; bh=VaZ5Su5Un7/S2X+BnIBZcYiIzdtPRn+qW8Fke0paOkA=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=RMEyg8ICEUY8PdkBci3VlagV8OZJvDguWMOs5WMFW1qWQVuLVXBfmHPdNB8bZKFqO HMKvNmXtu638ObSngbUzOPk4IvXadnc2ihoBzK3IS0OyO3ggj50gfwiYqXGZi6OgWe FW1XDO+nbuythOxYxXNBZ7fILszB+PzdVflcQ2NAt39+7ZDvPOds+3yE5xZaP9cocQ 7l9lgqHLPBb5WhlTFq+CA75PbIbYvp8e5gDLGbixzt7wA1BrusCYusUacOYWQhs47e Bq1E4C5OgEdSecO6OncyqVJQntu7QVm4mhDaZVlRwfBzp33DowvCDZLgYF17pQ3Y+R bRn2PoJCiYxew== From: "Paul A. Patience" Message-ID: <20220724120228.54052-2-paul@apatience.com> In-Reply-To: <20220724120228.54052-1-paul@apatience.com> References: <20220724120228.54052-1-paul@apatience.com> Feedback-ID: 19227857:user:proton 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: , Reply-To: "Paul A. Patience" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/graphics.scm (mmg): New variable. --- gnu/packages/graphics.scm | 104 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) -- 2.37.0 diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index c193be1efb..7417fbe690 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -31,6 +31,7 @@ ;;; Copyright © 2022 John Kehayias ;;; Copyright © 2022 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2022 Tobias Kortkamp +;;; Copyright © 2022 Paul A. Patience ;;; ;;; This file is part of GNU Guix. ;;; @@ -2120,3 +2121,106 @@ (define-public azpainter @end itemize ") (license license:gpl3+))) + +(define-public mmg + (package + (name "mmg") + (version "5.6.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/MmgTools/mmg") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "173biz5skbwg27i5w6layg7mydjzv3rmi1ywhra4rx9rjf5c0cc5")))) + (build-system cmake-build-system) + (outputs '("out" "lib" "doc")) + (arguments + (list #:configure-flags + #~(list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output:lib) + (string-append "-DCMAKE_INSTALL_RPATH=" #$output:lib "/lib") + ;; The build doesn't honor -DCMAKE_INSTALL_BINDIR, hence + ;; the adjust-bindir phase. + ;;(string-append "-DCMAKE_INSTALL_BINDIR=" #$output "/bin") + "-DBUILD_SHARED_LIBS=ON" + "-DBUILD_TESTING=ON" + ;; The longer tests are for continuous integration and + ;; depend on input data which must be downloaded. + "-DONLY_VERY_SHORT_TESTS=ON" + ;; TODO: Add Elas (from + ;; https://github.com/ISCDtoolbox/LinearElasticity). + "-DUSE_ELAS=OFF" + ;; TODO: Figure out how to add VTK to inputs without + ;; causing linking errors in ASLI of the form: + ;; + ;; ld: /gnu/store/…-vtk-9.0.1/lib/libvtkWrappingPythonCore-9.0.so.1: + ;; undefined reference to `PyUnicode_InternFromString' + ;; + ;; Also, adding VTK to inputs requires adding these as well: + ;; + ;; double-conversion eigen expat freetype gl2ps glew hdf5 + ;; jsoncpp libjpeg-turbo libpng libtheora libtiff libx11 + ;; libxml2 lz4 netcdf proj python sqlite zlib + "-DUSE_VTK=OFF") + #:phases + #~(modify-phases %standard-phases + (add-after 'build 'build-doc + (lambda _ + ;; Fontconfig wants to write to a cache directory. + (setenv "HOME" "/tmp") + (invoke "make" "doc"))) + (add-after 'install 'install-doc + (lambda _ + (copy-recursively + "../source/doc/man" (string-append #$output + "/share/man/man1")) + (copy-recursively + "doc" (string-append #$output:doc "/share/doc/" + #$name "-" #$version)))) + (add-after 'install 'adjust-bindir + (lambda _ + (let ((src (string-append #$output:lib "/bin")) + (dst (string-append #$output "/bin"))) + (copy-recursively src dst) + (delete-file-recursively src)))) + ;; Suffixing program names with build information, i.e., + ;; optimization flags and whether debug symbols were generated, + ;; is unusual and fragilizes scripts calling these programs. + (add-after 'adjust-bindir 'fix-program-names + (lambda _ + (with-directory-excursion (string-append #$output "/bin") + (rename-file "mmg2d_O3d" "mmg2d") + (rename-file "mmg3d_O3d" "mmg3d") + (rename-file "mmgs_O3d" "mmgs"))))))) + (native-inputs + ;; For the documentation + (list doxygen graphviz + ;; TODO: Fix failing LaTeX invocation (which results in equations + ;; being inserted literally into PNGs rather than being typeset). + ;;texlive-tiny + )) + (inputs + (list scotch)) + (home-page "http://www.mmgtools.org/") + (synopsis "Surface and volume remeshers") + (description "Mmg is a collection of applications and libraries for +bidimensional and tridimensional surface and volume remeshing. It consists +of: + +@itemize +@item the @code{mmg2d} application and library: mesh generation from a set of +edges, adaptation and optimization of a bidimensional triangulation and +isovalue discretization; + +@item the @code{mmgs} application and library: adaptation and optimization of +a surface triangulation and isovalue discretization; + +@item the @code{mmg3d} application and library: adaptation and optimization of +a tetrahedral mesh, isovalue discretization and Lagrangian movement; + +@item the @code{mmg} library gathering the @code{mmg2d}, @code{mmgs} and +@code{mmg3d} libraries. +@end itemize") + (license license:lgpl3+)))