diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/ffb/fj_compiler.patch | 10 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ffb/package.py | 13 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ffb/revocap_refiner.patch | 38 |
3 files changed, 49 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/ffb/fj_compiler.patch b/var/spack/repos/builtin/packages/ffb/fj_compiler.patch new file mode 100644 index 0000000000..2f733ced38 --- /dev/null +++ b/var/spack/repos/builtin/packages/ffb/fj_compiler.patch @@ -0,0 +1,10 @@ +--- FFB8.org/util/xvx2gf/XVX.h 2013-03-26 10:09:49.000000000 +0900 ++++ FFB8.new/util/xvx2gf/XVX.h 2020-06-16 16:00:06.408500236 +0900 +@@ -5,6 +5,7 @@ + #include <algorithm>
+ #include <cassert>
+ #include <vector>
++#include <stdint.h>
+
+ #define MAX_LEVEL 32
+
diff --git a/var/spack/repos/builtin/packages/ffb/package.py b/var/spack/repos/builtin/packages/ffb/package.py index d9de2b9862..c7d1095583 100644 --- a/var/spack/repos/builtin/packages/ffb/package.py +++ b/var/spack/repos/builtin/packages/ffb/package.py @@ -15,6 +15,7 @@ class Ffb(MakefilePackage): version('8.1', sha256='1ad008c909152b6c27668bafbad820da3e6ec3309c7e858ddb785f0a3d6e43ae') patch('revocap_refiner.patch') + patch('fj_compiler.patch', when='%fj') depends_on('mpi') depends_on('blas') @@ -52,6 +53,7 @@ class Ffb(MakefilePackage): r'#LES3DHOME =', 'LES3DHOME= {0}\n'.format(workdir)) make = join_path('make', 'OPTION') m = FileFilter(make) + m.filter(r'CPP\s*=.*$', 'CPP = /usr/bin/cpp') m.filter(r'CCOM\s*=.*$', 'CCOM = {0}'.format(spack_cc)) m.filter(r'COPT\s*=.*$', 'COPT = {0}'.format(cflags)) m.filter(r'FCOM\s*=.*$', 'FCOM = {0}\n'.format(spack_fc)) @@ -141,6 +143,17 @@ class Ffb(MakefilePackage): m.filter(r'LIBS = -lfort -lgf2 -ldd_mpi -lmpi_f77', 'LIBS = -lfort -lgf2 -ldd_mpi') + if spec.satisfies('%gcc'): + editfile = join_path('util', 'xvx2gf', 'FILES') + m = FileFilter(editfile) + m.filter(r'LIBS = -lgf2 -lz -lifcore -limf -ldl', + 'LIBS = -lgf2 -lz -ldl') + elif spec.satisfies('%fj'): + editfile = join_path('util', 'xvx2gf', 'FILES') + m = FileFilter(editfile) + m.filter(r'LIBS = -lgf2 -lz -lifcore -limf -ldl', + 'LIBS = -lgf2 -lz -ldl -linkfortran') + def build(self, spec, prefix): for m in [join_path('make', 'Makeall'), join_path('lib', 'src', 'dd_mpi', 'Makeall'), diff --git a/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch b/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch index 20886120cb..13d34bacd3 100644 --- a/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch +++ b/var/spack/repos/builtin/packages/ffb/revocap_refiner.patch @@ -1,6 +1,6 @@ diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h --- FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2013-03-26 10:09:31.000000000 +0900 -+++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2020-05-29 16:35:09.690918296 +0900 ++++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h 2020-06-16 11:33:05.765408337 +0900 @@ -64,7 +64,7 @@ public: numY = this->ynum; numZ = this->znum; @@ -10,15 +10,29 @@ diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Bucket.h FFB8.new return this->xnum * this->ynum * this->znum; }; -diff -uprN FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h ---- FFB8.org/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h 2013-03-26 10:09:31.000000000 +0900 -+++ FFB8.new/lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h 2020-05-29 16:35:48.756606155 +0900 -@@ -13,7 +13,7 @@ - # # - ----------------------------------------------------------------------*/ - #pragma once +@@ -81,12 +81,6 @@ public: + + int getIndex() const{ return it->first; }; + +- void getIndices(int &i,int &j,int &k) const{ +- i = it->first / (ynum*znum); +- j = (it->first - i*ynum*znum) / znum; +- k = it->first - i*ynum*znum - j*znum; +- }; - -+#include <cstdlib> - #ifndef PI - #define PI 3.1415926535897932384626 - #endif + iterator& operator++(void){ ++it; return *this; }; + + iterator operator++(int n){ +@@ -124,12 +118,6 @@ public: + + int getIndex() const{ return it->first; }; + +- void getIndices(int &i,int &j,int &k) const{ +- i = it->first / (ynum*znum); +- j = (it->first - i*ynum*znum) / znum; +- k = it->first - i*ynum*znum - j*znum; +- }; +- + const_iterator& operator++(void){ ++it; return *this; }; + + const_iterator operator++(int n){ |