[PATCH] gnu: Add tetgen.

  • Done
  • quality assurance status badge
Details
3 participants
  • Andreas Enge
  • Lars Bilke
  • Ludovic Courtès
Owner
unassigned
Submitted by
Lars Bilke
Severity
normal

Debbugs page

Lars Bilke wrote 2 months ago
(address . guix-patches@gnu.org)(name . Lars Bilke)(address . lars.bilke@ufz.de)
e5d53d4f5e24af42bdf092b61659815878ebf813.1735829423.git.lars.bilke@ufz.de
* gnu/packages/geo.scm (tetgen): New variable.

Change-Id: Iba2de71cf0a10ca5c7b65f9851d05fe63c944b30
---
gnu/packages/geo.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 8b9b9a4cf7..ec48474708 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -3614,3 +3614,29 @@ (define-public laszip
@code{LAZ} files. The @code{LAS} format is a file format designed for the
interchange and archiving of lidar point cloud data.")
(license license:asl2.0)))
+
+ (define-public tetgen
+ (package
+ (name "tetgen")
+ (synopsis
+ "Quality Tetrahedral Mesh Generator and 3D Delaunay Triangulator")
+ (license license:agpl3)
+ (description
+ "TetGen is a program to generate tetrahedral meshes of any 3D
+polyhedral domains. TetGen generates exact constrained Delaunay
+tetrahedralizations, boundary conforming Delaunay meshes, and Voronoi
+partitions.")
+ (home-page "https://wias-berlin.de/software/tetgen/")
+ (version "1.5.1-2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ufz/tetgen")
+ (commit version)))
+ (sha256
+ (base32 "0hd8mvmzybvlgvfx131p8782v8hggmg53vlkgazpsw9d6ympfcrv"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f
+ #:configure-flags (list "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")))))

base-commit: ab43d883a0a88adbcfd3c3ab8d4c097cd9054b90
--
2.46.1
Ludovic Courtès wrote 1 months ago
(name . Lars Bilke)(address . lars.bilke@ufz.de)
87a5bcnzv6.fsf@gnu.org
Lars Bilke <lars.bilke@ufz.de> skribis:

Toggle quote (4 lines)
> * gnu/packages/geo.scm (tetgen): New variable.
>
> Change-Id: Iba2de71cf0a10ca5c7b65f9851d05fe63c944b30

[...]

Toggle quote (26 lines)
> + (define-public tetgen
> + (package
> + (name "tetgen")
> + (synopsis
> + "Quality Tetrahedral Mesh Generator and 3D Delaunay Triangulator")
> + (license license:agpl3)
> + (description
> + "TetGen is a program to generate tetrahedral meshes of any 3D
> +polyhedral domains. TetGen generates exact constrained Delaunay
> +tetrahedralizations, boundary conforming Delaunay meshes, and Voronoi
> +partitions.")
> + (home-page "https://wias-berlin.de/software/tetgen/")
> + (version "1.5.1-2")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/ufz/tetgen")
> + (commit version)))
> + (sha256
> + (base32 "0hd8mvmzybvlgvfx131p8782v8hggmg53vlkgazpsw9d6ympfcrv"))))
> + (build-system cmake-build-system)
> + (arguments
> + `(#:tests? #f
> + #:configure-flags (list "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")))))

Could you remove the extra indentation, reorder fields in the more
conventional way, check the license (AGPLv3+ maybe?), add a ‘file-name’
field to the origin (as noted by ‘guix lint’), and run ‘guix style -S
arguments tetgen’?

If tests have to be disabled, there needs to be a margin comment
explaining why, such as “no test suite”. Otherwise it’s worth
investigating.

Thanks in advance!

Ludo’.
Lars Bilke wrote 1 months ago
[PATCH v2] gnu: Add tetgen.
(name . Lars Bilke)(address . lars.bilke@ufz.de)
7622e8ab9d2ed49d00210d4c4c3586e3e92a41f4.1738056004.git.lars.bilke@ufz.de
* gnu/packages/geo.scm (tetgen): New variable.

Change-Id: Iba2de71cf0a10ca5c7b65f9851d05fe63c944b30
---
gnu/packages/geo.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 3317271802..2a63d892d8 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -3684,3 +3684,32 @@ (define-public laszip
@code{LAZ} files. The @code{LAS} format is a file format designed for the
interchange and archiving of lidar point cloud data.")
(license license:asl2.0)))
+
+(define-public tetgen
+ (package
+ (name "tetgen")
+ (version "1.5.1-2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ufz/tetgen")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0hd8mvmzybvlgvfx131p8782v8hggmg53vlkgazpsw9d6ympfcrv"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags #~(list "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
+ ;; No test suite.
+ #:tests? #f))
+ (home-page "https://wias-berlin.de/software/tetgen/")
+ (synopsis
+ "Quality Tetrahedral Mesh Generator and 3D Delaunay Triangulator")
+ (description
+ "TetGen is a program to generate tetrahedral meshes of any 3D
+polyhedral domains. TetGen generates exact constrained Delaunay
+tetrahedralizations, boundary conforming Delaunay meshes, and Voronoi
+partitions.")
+ (license license:agpl3+)))

base-commit: 44d9f05fb3a8f20044873597762e6d8d6a895783
--
2.46.1
Andreas Enge wrote 1 months ago
[PATCH v3] gnu: Add tetgen.
(name . Lars Bilke)(address . lars.bilke@ufz.de)
Z6Nw36Hwgn3RuSQK@jurong
Hello Lars,

when looking at the tetgen homepage, I see that they do not have a
version 1.5.1, but that there is a version 1.6.0. They hide the source
behind a form that asks for a name and an email address, but the real
place of the source code is easily reverse engineered.

I am attaching a corresponding patch; unfortunately there is no install
target, so I copy the binary "by hand" to bin/. And there is an
installed file etc/ld.so.cache, of which I do not know where it comes
from and which phase puts it into the output; it is surely superfluous?

What do you think? I see that your email address is @ufz.de and that the
github origin you provide belongs to ufz, so maybe you maintain a fork?
But if you need one, maybe this should be mentioned somewhere and/or
reflected in the package name?

Andreas
From 1c926212be095477afe06e4ff664060dacfd723f Mon Sep 17 00:00:00 2001
Message-ID: <1c926212be095477afe06e4ff664060dacfd723f.1738764179.git.andreas@enge.fr>
From: Lars Bilke <lars.bilke@ufz.de>
Date: Tue, 28 Jan 2025 10:20:04 +0100
Subject: [PATCH] gnu: Add tetgen.

* gnu/packages/geo.scm (tetgen): New variable.

Change-Id: Iba2de71cf0a10ca5c7b65f9851d05fe63c944b30
Co-authored-by: Andreas Enge <andreas@enge.fr>
Signed-off-by: Andreas Enge <andreas@enge.fr>
---
gnu/packages/geo.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 3317271802f..9acb9c4cb80 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -24,6 +24,7 @@
;;; Copyright ᅵ 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;; Copyright ᅵ 2024 Wilko Meyer <w@wmeyer.eu>
;;; Copyright ᅵ 2024 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright ᅵ 2025 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3684,3 +3685,35 @@ (define-public laszip
@code{LAZ} files. The @code{LAS} format is a file format designed for the
interchange and archiving of lidar point cloud data.")
(license license:asl2.0)))
+
+(define-public tetgen
+ (package
+ (name "tetgen")
+ (version "1.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri
+ "https://wias-berlin.de/software/tetgen/1.5/src/tetgen1.6.0.tar.gz")
+ (sha256
+ (base32 "0fff0l6i3xfjlm0zkcgyyhwndp8i5d615mydyb21yirsplgfddc7"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f ;; No test suite.
+ #:configure-flags #~(list "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'install ;; no install target
+ (lambda _
+ (install-file "tetgen"
+ (string-append #$output "/bin")))))))
+ (home-page "https://wias-berlin.de/software/tetgen/")
+ (synopsis
+ "Quality Tetrahedral Mesh Generator and 3D Delaunay Triangulator")
+ (description
+ "TetGen is a program to generate tetrahedral meshes of any 3D
+polyhedral domains. TetGen generates exact constrained Delaunay
+tetrahedralizations, boundary conforming Delaunay meshes, and Voronoi
+partitions.")
+ (license license:agpl3+)))

base-commit: a53bd6f27b0a49491dc87c2476555682fef6c47e
--
2.47.1
Lars Bilke wrote 1 months ago
(name . Andreas Enge)(address . andreas@enge.fr)
45F59AA8-5DB8-489D-9D11-6DE6C47D0333@ufz.de
Hi Andreas,

thanks for your patch!

On 5 Feb 2025, at 15:08, Andreas Enge wrote:

Toggle quote (5 lines)
> I am attaching a corresponding patch; unfortunately, there is no install
> target, so I copy the binary "by hand" to bin/. And there is an
> installed file etc/ld.so.cache, of which I do not know where it comes
> from and which phase puts it into the output; it is surely superfluous?

Yes, the ld cache is not required for the binary.

Toggle quote (5 lines)
> What do you think? I see that your email address is @ufz.de and that the
> github origin you provide belongs to ufz, so maybe you maintain a fork?
> But if you need one, maybe this should be mentioned somewhere and/or
> reflected in the package name?

I am perfectly fine to merge this patch v3.

We relied on tetgen (the library) in the past and made some fixes in the build system on that fork. But this is not required for us anymore and our fork is not maintained anymore.

So building this with the original source as you did is better.

Thanks a lot!
Lars
Andreas Enge wrote 1 months ago
(name . Lars Bilke)(address . lars.bilke@ufz.de)
Z6TVZsdDBaEuJFxh@jurong
Hello!

Am Thu, Feb 06, 2025 at 03:11:41PM +0100 schrieb Lars Bilke:
Toggle quote (3 lines)
> I am perfectly fine to merge this patch v3.
> So building this with the original source as you did is better.

thanks for your quick reply! I have just pushed the patch.
The etc/ld.so.cache comes from the phase make-dynamic-linker-cache,
of which I do not know why it appears; I have not seen it in other
packages using the cmake build system. So I have just removed the phase
by hand.

Andreas
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 75286@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75286
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help