unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add gmsh
@ 2014-04-24 20:19 Eric Bavier
  2014-04-25 11:23 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Bavier @ 2014-04-24 20:19 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 54 bytes --]

This patch adds the gmsh package.  Comments welcome.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-gmsh.patch --]
[-- Type: text/x-diff, Size: 4425 bytes --]

From c5377db5fa9919b4a40d4995969ad3e00954cf95 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Thu, 24 Apr 2014 15:13:59 -0500
Subject: [PATCH] gnu: Add gmsh

* gnu/packages/maths.scm (gmsh): New variable
---
 gnu/packages/maths.scm | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 68c3267..de7da78 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -26,9 +26,13 @@
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages algebra)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages elf)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gettext)
@@ -349,3 +353,72 @@ applications and it provides great support for visualizing results.  Work may
 be performed both at the interactive command-line as well as via script
 files.")
     (license license:gpl3+)))
+
+(define-public gmsh
+  (package
+    (name "gmsh")
+    (version "2.8.4")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "http://www.geuz.org/gmsh/src/gmsh-"
+                          version "-source.tgz"))
+      (sha256
+       (base32 "0jv2yvk28w86rx5mvjkb0w12ff2jxih7axnpvznpd295lg5jg7hr"))
+      (modules '((guix build utils)))
+      (snippet
+       ;; Remove non-free METIS code
+       '(delete-file-recursively "contrib/Metis"))))
+    (build-system cmake-build-system)
+    (native-inputs `(("patchelf" ,patchelf))) ;for augment-rpath
+    (propagated-inputs
+     `(("fltk" ,fltk)
+       ("gfortran" ,gfortran-4.8)
+       ("gmp" ,gmp)
+       ("hdf5-lib" ,hdf5 "lib")
+       ("hdf5-include" ,hdf5 "include")
+       ("lapack" ,lapack)
+       ("mesa" ,mesa)
+       ("libx11" ,libx11)
+       ("libxext" ,libxext)))
+    (arguments
+     `(#:modules ((guix build cmake-build-system)
+                  (guix build utils)
+                  (guix build rpath))
+       #:imported-modules ((guix build cmake-build-system)
+                           (guix build gnu-build-system)
+                           (guix build utils)
+                           (guix build rpath))
+       #:configure-flags '("-DENABLE_METIS:BOOL=OFF"
+                           "-DENABLE_BUILD_SHARED:BOOL=ON"
+                           "-DENABLE_BUILD_DYNAMIC:BOOL=ON")
+       #:phases (alist-cons-after
+                 'strip 'add-libs-to-runpath
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (let* ((out     (assoc-ref outputs "out"))
+                          (libc    (assoc-ref inputs "libc"))
+                          (fltk    (assoc-ref inputs "fltk"))
+                          (fortran (assoc-ref inputs "gfortran"))
+                          (gmp     (assoc-ref inputs "gmp"))
+                          (lapack  (assoc-ref inputs "lapack"))
+                          (mesa    (assoc-ref inputs "mesa"))
+                          (libx11  (assoc-ref inputs "libx11"))
+                          (libxext (assoc-ref inputs "libxext"))
+                          (prog    (string-append out "/bin/gmsh")))
+                     (with-directory-excursion out
+                       (for-each
+                        (lambda (dir)
+                          (augment-rpath prog (string-append dir "/lib")))
+                        (list out fltk fortran gmp lapack
+                              libc mesa libx11 libxext)))))
+                 %standard-phases)))
+    (home-page "http://www.geuz.org/gmsh/")
+    (synopsis "3D finite element grid generator")
+    (description "Gmsh is a 3D finite element grid generator with a build-in
+CAD engine and post-processor. Its design goal is to provide a fast, light and
+user-friendly meshing tool with parametric input and advanced visualization
+capabilities. Gmsh is built around four modules: geometry, mesh, solver and
+post-processing. The specification of any input to these modules is done
+either interactively using the graphical user interface or in ASCII text files
+using Gmsh's own scripting language.")
+    (license license:gpl2+)))
-- 
1.8.4


[-- Attachment #3: Type: text/plain, Size: 12 bytes --]


-- 
`~Eric

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add gmsh
  2014-04-24 20:19 [PATCH] Add gmsh Eric Bavier
@ 2014-04-25 11:23 ` Ludovic Courtès
  2014-04-25 11:34   ` Andreas Enge
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2014-04-25 11:23 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <ericbavier@gmail.com> skribis:

> From c5377db5fa9919b4a40d4995969ad3e00954cf95 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Thu, 24 Apr 2014 15:13:59 -0500
> Subject: [PATCH] gnu: Add gmsh
>
> * gnu/packages/maths.scm (gmsh): New variable

[...]

> +    (synopsis "3D finite element grid generator")
> +    (description "Gmsh is a 3D finite element grid generator with a build-in

“built-in” (with ‘t’)

> +CAD engine and post-processor. Its design goal is to provide a fast, light and

Two space after end-of-sentence period.

OK to push with these changes, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add gmsh
  2014-04-25 11:23 ` Ludovic Courtès
@ 2014-04-25 11:34   ` Andreas Enge
  2014-04-25 12:19     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Enge @ 2014-04-25 11:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Fri, Apr 25, 2014 at 01:23:10PM +0200, Ludovic Courtès wrote:
> Eric Bavier <ericbavier@gmail.com> skribis:
> > * gnu/packages/maths.scm (gmsh): New variable
> OK to push with these changes, thanks!

Eric, could you maybe wait until we sort out the rpath handling of the cmake
build system, as suggested in my patch from yesterday? Does it make the
explicit rpath patchelf business for this package obsolete or not?
It would be good to solve the problem once and for all.

Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Add gmsh
  2014-04-25 11:34   ` Andreas Enge
@ 2014-04-25 12:19     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2014-04-25 12:19 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> skribis:

> On Fri, Apr 25, 2014 at 01:23:10PM +0200, Ludovic Courtès wrote:
>> Eric Bavier <ericbavier@gmail.com> skribis:
>> > * gnu/packages/maths.scm (gmsh): New variable
>> OK to push with these changes, thanks!
>
> Eric, could you maybe wait until we sort out the rpath handling of the cmake
> build system, as suggested in my patch from yesterday? Does it make the
> explicit rpath patchelf business for this package obsolete or not?
> It would be good to solve the problem once and for all.

Oh right, probably a good idea.

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-25 12:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24 20:19 [PATCH] Add gmsh Eric Bavier
2014-04-25 11:23 ` Ludovic Courtès
2014-04-25 11:34   ` Andreas Enge
2014-04-25 12:19     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).