git: ebdeecfbf8ee - main - science/dakota: fix build on non-x86

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Fri, 22 Oct 2021 12:09:12 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ebdeecfbf8eeca1b115e8e1a1d441429c16d22c6

commit ebdeecfbf8eeca1b115e8e1a1d441429c16d22c6
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-10-22 11:42:25 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-10-22 11:42:25 +0000

    science/dakota: fix build on non-x86
    
    fpinit.c uses fpsetmask to workaround a bug that is not present since
    FreeBSD 4.0.
    
    This issue also affected Firefox and was resolved 9 years ago
    https://bugzilla.mozilla.org/show_bug.cgi?id=789436
---
 science/dakota/files/patch-packages_external_ampl_fpinit.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/science/dakota/files/patch-packages_external_ampl_fpinit.c b/science/dakota/files/patch-packages_external_ampl_fpinit.c
new file mode 100644
index 000000000000..ed2bc78fd70e
--- /dev/null
+++ b/science/dakota/files/patch-packages_external_ampl_fpinit.c
@@ -0,0 +1,11 @@
+--- packages/external/ampl/fpinit.c.orig	2021-10-21 13:10:57 UTC
++++ packages/external/ampl/fpinit.c
+@@ -214,7 +214,7 @@ fpinit_ASL(Void)
+ 
+ /* Currently, FP_PD is the default on FreeBSD, but enabled traps */
+ /* can cause surprises, so we restore the default IEEE mask. */
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) && (defined (__amd64__) || defined(__i386__))
+ #include "floatingpoint.h"
+ #define FP_INIT_DONE
+  void