From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WNUsMjo13WJUBgAAbAwnHQ (envelope-from ) for ; Sun, 24 Jul 2022 14:04:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8KUUMjo13WL2FwAA9RJhRA (envelope-from ) for ; Sun, 24 Jul 2022 14:04:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 220001718A for ; Sun, 24 Jul 2022 14:04:10 +0200 (CEST) Received: from localhost ([::1]:39032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFaLB-0003hd-8a for larch@yhetil.org; Sun, 24 Jul 2022 08:04:09 -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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658664250; h=from:from:sender:sender:reply-to: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VaZ5Su5Un7/S2X+BnIBZcYiIzdtPRn+qW8Fke0paOkA=; b=fUdqnCca8/WNldjuYp6pxmrPW5FvggJ124BE0t5oKA/iEFFmIqWf2MaoeWnunrId/AWlEX F5CHB/s0taXVA7OJVviZRl1TtZaHqO9Z75iJt7n7E1DBL4zOtaehgymv2Myvg8OLJwHihy EW/akXrpYMXgveevOu2v91bFtR8xRoktFd9N6n2BgOLd+OaPSShUrLYuoYxl68/eQUrFBR 1l+S88GDOyxN5SNdENFOYweiprqWyq5u8oXwlJej66VxsaJDFkM3l5Y+u0SGE/4nltCF0V LWpOb3CP3DCv07avEwW3BK8h4SQEPlfj2DiFun7/qVXA2G1hFcNOIp6PH46rMw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658664250; a=rsa-sha256; cv=none; b=KiWHy398l71OEyI0Pdcurfq69/yuxRREHvODlSpyCyBAbC3KMVKel0czzB9yaCFFZHfN9n D503SiIM2qmAKhOIyqqLVsJ89aJ7UPcfCMe8RseemnFZX7VgPD70Ft8FsAKAP2fYMZzNRO i8Pn1O1cWNl9bhjrgpDsj/3YmtnNmwpCC6KMgCG4l3MVpsj/rD7n6J1oX6WLC1aifMYclY oge7e5L66MpAuxn9KNcrOMeFdP9O9d5XHnnwnj+CCQS0Ea632eteFXWfQgYSkNKBJfFaUF GhsfeEme1y60F5C2CtGhd8SKTzpQ1L/ifgymeMlDx+OZDkwPACOoj3BLFsgobA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=apatience.com header.s=protonmail2 header.b=RMEyg8IC; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.07 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=apatience.com header.s=protonmail2 header.b=RMEyg8IC; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 220001718A X-Spam-Score: 2.07 X-Migadu-Scanner: scn1.migadu.com X-TUID: MbfnYQE6XhtS * gnu/packages/graphics.scm (mmg): New variable. --- gnu/packages/graphics.scm | 104 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) 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 =C2=A9 2022 John Kehayias ;;; Copyright =C2=A9 2022 Zheng Junjie <873216071@qq.com> ;;; Copyright =C2=A9 2022 Tobias Kortkamp +;;; Copyright =C2=A9 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=3D" #$output:lib= ) + (string-append "-DCMAKE_INSTALL_RPATH=3D" #$output:lib = "/lib") + ;; The build doesn't honor -DCMAKE_INSTALL_BINDIR, henc= e + ;; the adjust-bindir phase. + ;;(string-append "-DCMAKE_INSTALL_BINDIR=3D" #$output "= /bin") + "-DBUILD_SHARED_LIBS=3DON" + "-DBUILD_TESTING=3DON" + ;; The longer tests are for continuous integration and + ;; depend on input data which must be downloaded. + "-DONLY_VERY_SHORT_TESTS=3DON" + ;; TODO: Add Elas (from + ;; https://github.com/ISCDtoolbox/LinearElasticity). + "-DUSE_ELAS=3DOFF" + ;; TODO: Figure out how to add VTK to inputs without + ;; causing linking errors in ASLI of the form: + ;; + ;; ld: /gnu/store/=E2=80=A6-vtk-9.0.1/lib/libvtkWrapp= ingPythonCore-9.0.so.1: + ;; undefined reference to `PyUnicode_InternFromStri= ng' + ;; + ;; Also, adding VTK to inputs requires adding these as = well: + ;; + ;; double-conversion eigen expat freetype gl2ps glew = hdf5 + ;; jsoncpp libjpeg-turbo libpng libtheora libtiff lib= x11 + ;; libxml2 lz4 netcdf proj python sqlite zlib + "-DUSE_VTK=3DOFF") + #: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 genera= ted, + ;; 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 equatio= ns + ;; 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 consist= s +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 optimizatio= n 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+))) -- 2.37.0