diff mbox series

[bug#62473,v2,4/4] gnu: Add openfoam-com.

Message ID 0102018752a6f95e-6dba2432-a52f-478f-a194-47a0d05fc7f6-000000@eu-west-1.amazonses.com
State New
Headers show
Series Remove spurious file, add env var | expand

Commit Message

reza April 5, 2023, 6:21 p.m. UTC
---
 gnu/packages/simulation.scm | 39 +++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

-- 
2.39.2

Comments

Ludovic Courtès April 6, 2023, 2:36 p.m. UTC | #1
reza <reza@housseini.me> skribis:

> +(define-public openfoam-com
> +  (package
> +    (inherit openfoam-org)
> +    (name "openfoam-com")
> +    (version "2212")
> +    (source (origin
> +              (method url-fetch)
> +
> +              (uri (string-append "https://develop.openfoam.com"
> +                    "/Development/openfoam/-/archive/OpenFOAM-v"
> +                    version
> +                    "/openfoam-OpenFOAM-v"
> +                    version
> +                    ".tar.gz"))
> +              (sha256
> +               (base32
> +                "0i9039hfz9gvgymkdjhjvvn5500zha3cpdbpqrzfrfi8lbz10is2"))
> +              (modules '((guix build utils)))
> +              (snippet '(begin
> +                          ;; patch shell paths
> +                          (substitute* (list "src/OSspecific/POSIX/POSIX.C"
> +                                             "wmake/src/Makefile"
> +                                             "wmake/makefiles/general"
> +                                             "wmake/makefiles/info")
> +                            (("/bin/sh")
> +                             which "sh"))))))
> +    (description
> +     "OpenFOAM is a free, open source CFD software released and developed by
> +OpenCFD Ltd since 2004.  It has a large user base across most areas of
> +engineering and science, from both commercial and academic organizations.

This is not OK:

  https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html

You can keep the description of ‘openfoam-org’, which is inherited.
However, please provide at least a different ‘synopsis’ to show how it
differs from ‘openfoam-org’.

Is the license the same for both?

Does “com” stand for “commercial”, and if so, what are the implications?

Thanks in advance,
Ludo’.
reza April 6, 2023, 2:52 p.m. UTC | #2
> This is not OK:
> 
>    https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html
> 
> You can keep the description of ‘openfoam-org’, which is inherited.
> However, please provide at least a different ‘synopsis’ to show how it
> differs from ‘openfoam-org’.

Ok will change thy synopsis.

> Is the license the same for both?

They have the same license (GPL3.0)

> Does “com” stand for “commercial”, and if so, what are the implications?

"com" stands for the website "openfoam.com". The project forked at some 
point and now there are two almost identical code bases. openfoam-com 

which is maintained by a company has more rapid development in favor of 
stability while openfoam-org stays more conservative with code additions 
but being more stable therefore.

I don't know how to handle the almost identical builds of this two code 
bases, shall I make a function? There is also an issue with the version 
of openfoam-org getting used in the build of openfoam-com, maybe this is 
a bug?
Ludovic Courtès April 18, 2023, 8:09 p.m. UTC | #3
Hi,

reza <reza@housseini.me> skribis:

>> Does “com” stand for “commercial”, and if so, what are the implications?
>
> "com" stands for the website "openfoam.com". The project forked at some 
> point and now there are two almost identical code bases. openfoam-com 
>
> which is maintained by a company has more rapid development in favor of 
> stability while openfoam-org stays more conservative with code additions 
> but being more stable therefore.

Interesting situation.  :-)

> I don't know how to handle the almost identical builds of this two code 
> bases, shall I make a function?

No, I think it’s fine to inherit like you did.

> There is also an issue with the version of openfoam-org getting used
> in the build of openfoam-com, maybe this is a bug?

Given your description above, it’s surprising that one depends on the
other.  If there is such a dependency, then it might be worth reporting
upstream as a bug or asking for clarifications.

Thanks for your replies!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index a4df23785a..15fff6e57c 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -375,6 +375,45 @@  (define-public openfoam-org
     (license license:gpl3+)
     (home-page "https://openfoam.org")))
 
+(define-public openfoam-com
+  (package
+    (inherit openfoam-org)
+    (name "openfoam-com")
+    (version "2212")
+    (source (origin
+              (method url-fetch)
+
+              (uri (string-append "https://develop.openfoam.com"
+                    "/Development/openfoam/-/archive/OpenFOAM-v"
+                    version
+                    "/openfoam-OpenFOAM-v"
+                    version
+                    ".tar.gz"))
+              (sha256
+               (base32
+                "0i9039hfz9gvgymkdjhjvvn5500zha3cpdbpqrzfrfi8lbz10is2"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; patch shell paths
+                          (substitute* (list "src/OSspecific/POSIX/POSIX.C"
+                                             "wmake/src/Makefile"
+                                             "wmake/makefiles/general"
+                                             "wmake/makefiles/info")
+                            (("/bin/sh")
+                             which "sh"))))))
+    (description
+     "OpenFOAM is a free, open source CFD software released and developed by
+OpenCFD Ltd since 2004.  It has a large user base across most areas of
+engineering and science, from both commercial and academic organizations.
+OpenFOAM has an extensive range of features to solve anything from complex
+fluid flows involving chemical reactions, turbulence and heat transfer, to
+acoustics, solid mechanics and electromagnetics.  See documentation OpenFOAM
+is professionally released every six months to include customer sponsored
+developments and contributions from the community - individual and group
+contributors, integrations (eg, from FOAM-extend and OpenFOAM Foundation Ltd)
+as well as governance guided activities.")
+    (home-page "https://www.openfoam.com")))
+
 (define-public open-simulation-interface
   (package
     (name "open-simulation-interface")