all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick@tourbillion-technology.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add openfoam
Date: Tue, 25 Jul 2017 11:02:50 +0200	[thread overview]
Message-ID: <871sp4nb2d.fsf@gnu.org> (raw)
In-Reply-To: <20170723201138.18131-1-pgarlick@tourbillion-technology.com> (Paul Garlick's message of "Sun, 23 Jul 2017 21:11:38 +0100")

Hello Paul,

Thanks for this patch!

Paul Garlick <pgarlick@tourbillion-technology.com> skribis:

> * gnu/packages/maths.scm(openfoam): Add it
> * gnu/packages/patches/openfoam-cleanup.patch: New file
> * gnu/local.mk(dist_patch_DATA): Add patch

I think it might make sense to create a new “simulation” module, and
eventually move OpenCascade there as well, WDYT?

Some comments:

> +    (build-system trivial-build-system)

Did you consider using ‘gnu-build-system’?  I think this would save
quite a few lines corresponding to the initial setup (set-paths, unpack,
patch-shebang, etc.), and also ensure that the final phases (strip,
compress-documentation, etc.) are run.  In addition you wouldn’t need to
list all the usual build inputs (GCC, Coreutils, Make, etc.).  WDYT?

> +		   )
> +		 )
> +       )
> +     )

Please listen to what ‘guix lint’ has to say about these.  :-)

> +    (native-search-paths
> +     ;; define the FOAM_INST_DIR variable
> +     (list (search-path-specification
> +            (variable "FOAM_INST_DIR")
> +            (files '(".")))))

My guess is that ‘FOAM_INST_DIR’ is not a search path (in the sense of a
colon-separated list of directories like ‘PATH’.)

What about wrapping the resulting binaries so that they have
‘FOAM_INST_DIR’ set to %output?

> diff --git a/gnu/packages/patches/openfoam-cleanup.patch b/gnu/packages/patches/openfoam-cleanup.patch
> new file mode 100644
> index 000000000..e7760b7a5
> --- /dev/null
> +++ b/gnu/packages/patches/openfoam-cleanup.patch
> @@ -0,0 +1,267 @@
> +# This patch removes all need for the ThirdParty files of OpenFOAM

Nice!

> +# Derived from easybuild patch:  Ward Poelmans <wpoely86@gmail.com>
> +# Modified for GNU Guix:  Paul Garlick <pgarlick@tourbillion-technology.com>
> +
> +diff -ur OpenFOAM-4.x-version-4.1.org/applications/utilities/mesh/manipulation/setSet/Allwmake OpenFOAM-4.x-version-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake
> +--- OpenFOAM-4.x-version-4.1.org/applications/utilities/mesh/manipulation/setSet/Allwmake
> ++++ OpenFOAM-4.x-version-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake
> +@@ -9,7 +9,7 @@
> + #
> + # use readline if available
> + #
> +-if [ -f /usr/include/readline/readline.h ]
> ++if [ -f $READLINE_ROOT/include/readline/readline.h ]

You could make it “if true”, thereby avoiding the need to define
$READLINE_ROOT.

> +--- OpenFOAM-4.x-version-4.1.org/applications/utilities/mesh/manipulation/setSet/Make/options
> ++++ OpenFOAM-4.x-version-4.1/applications/utilities/mesh/manipulation/setSet/Make/options
> +@@ -1,7 +1,9 @@
> + EXE_INC = \
> +     -I$(LIB_SRC)/meshTools/lnInclude \
> ++    -I$(READLINE_ROOT)/include \

Likewise, ‘gnu-build-system’ will set C_INCLUDE_PATH appropriately so
this -I flag won’t be needed.

Could you send an updated patch to guix-patches@gnu.org, where it will
be visible in the patch tracker?

Thank you!

Ludo’.

  reply	other threads:[~2017-07-25  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-23 20:11 [PATCH] gnu: Add openfoam Paul Garlick
2017-07-25  9:02 ` Ludovic Courtès [this message]
2017-07-28 16:01   ` Paul Garlick
2017-08-01 12:18     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871sp4nb2d.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=pgarlick@tourbillion-technology.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.