From 816f780be84b92449e7fcb019102c6e9036049b1 Mon Sep 17 00:00:00 2001 From: noguchi-k <55966120+noguchi-k@users.noreply.github.com> Date: Sun, 31 May 2020 00:57:12 +0900 Subject: revocap-refiner: add space and remove unused function. (#16861) --- .../packages/revocap-refiner/add_space.patch | 37 ++++++++++++++++++++++ .../revocap-refiner/delete_getIndices.patch | 28 ++++++++++++++++ .../builtin/packages/revocap-refiner/package.py | 5 +++ 3 files changed, 70 insertions(+) create mode 100644 var/spack/repos/builtin/packages/revocap-refiner/add_space.patch create mode 100644 var/spack/repos/builtin/packages/revocap-refiner/delete_getIndices.patch diff --git a/var/spack/repos/builtin/packages/revocap-refiner/add_space.patch b/var/spack/repos/builtin/packages/revocap-refiner/add_space.patch new file mode 100644 index 0000000000..0db2007eaf --- /dev/null +++ b/var/spack/repos/builtin/packages/revocap-refiner/add_space.patch @@ -0,0 +1,37 @@ +--- spack-src/Common/kmbDebug.h.org 2020-05-26 14:12:24.977659640 +0900 ++++ spack-src/Common/kmbDebug.h 2020-05-26 14:15:11.118470571 +0900 +@@ -52,29 +52,29 @@ + #define REVOCAP_Debug_X(format) + #else + /* _DEBUG マクロに関係なく出力 */ +- #define REVOCAP_Debug_X(fmt, ...) fprintf(stderr,"%s, line %d: "fmt,__FILE__,__LINE__, ##__VA_ARGS__) ++ #define REVOCAP_Debug_X(fmt, ...) fprintf(stderr,"%s, line %d: " fmt,__FILE__,__LINE__, ##__VA_ARGS__) + + #if defined _DEBUG || _DEBUG_ + #include +- #define REVOCAP_Debug(fmt, ...) fprintf(stderr,"%s, line %d: "fmt,__FILE__,__LINE__, ##__VA_ARGS__) ++ #define REVOCAP_Debug_X(fmt, ...) fprintf(stderr,"%s, line %d: " fmt,__FILE__,__LINE__, ##__VA_ARGS__) + #else + #define REVOCAP_Debug(format, ...) + #endif + + #if ( _DEBUG >= 1 ) || ( _DEBUG_ >= 1 ) +- #define REVOCAP_Debug_1(fmt, ...) fprintf(stderr,"%s, line %d: "fmt,__FILE__,__LINE__, ##__VA_ARGS__) ++ #define REVOCAP_Debug_X(fmt, ...) fprintf(stderr,"%s, line %d: " fmt,__FILE__,__LINE__, ##__VA_ARGS__) + #else + #define REVOCAP_Debug_1(format, ...) + #endif + + #if ( _DEBUG >= 2 ) || ( _DEBUG_ >= 2 ) +- #define REVOCAP_Debug_2(fmt, ...) fprintf(stderr,"%s, line %d: "fmt,__FILE__,__LINE__, ##__VA_ARGS__) ++ #define REVOCAP_Debug_X(fmt, ...) fprintf(stderr,"%s, line %d: " fmt,__FILE__,__LINE__, ##__VA_ARGS__) + #else + #define REVOCAP_Debug_2(format, ...) + #endif + + #if ( _DEBUG >= 3 ) || ( _DEBUG_ >= 3 ) +- #define REVOCAP_Debug_3(fmt, ...) fprintf(stderr,"%s, line %d: "fmt,__FILE__,__LINE__, ##__VA_ARGS__) ++ #define REVOCAP_Debug_X(fmt, ...) fprintf(stderr,"%s, line %d: " fmt,__FILE__,__LINE__, ##__VA_ARGS__) + #else + #define REVOCAP_Debug_3(format, ...) + #endif diff --git a/var/spack/repos/builtin/packages/revocap-refiner/delete_getIndices.patch b/var/spack/repos/builtin/packages/revocap-refiner/delete_getIndices.patch new file mode 100644 index 0000000000..7a70f354bf --- /dev/null +++ b/var/spack/repos/builtin/packages/revocap-refiner/delete_getIndices.patch @@ -0,0 +1,28 @@ +--- spack-src/Geometry/kmbBucket.h.org 2020-05-28 11:42:08.438970353 +0900 ++++ spack-src/Geometry/kmbBucket.h 2020-05-28 11:43:55.449496013 +0900 +@@ -348,12 +348,6 @@ + + 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; +- }; +- + iterator& operator++(void){ ++it; return *this; }; + + iterator operator++(int n){ +@@ -391,12 +385,6 @@ + + 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){ diff --git a/var/spack/repos/builtin/packages/revocap-refiner/package.py b/var/spack/repos/builtin/packages/revocap-refiner/package.py index 38eeb31256..4c563a91d8 100644 --- a/var/spack/repos/builtin/packages/revocap-refiner/package.py +++ b/var/spack/repos/builtin/packages/revocap-refiner/package.py @@ -22,6 +22,11 @@ class RevocapRefiner(MakefilePackage): parallel = False + # add space between literal and identifier. + patch('add_space.patch') + # remove unused function getIndices. + patch('delete_getIndices.patch') + def edit(self, spec, prefix): cflags = ['-O'] cxxflags = ['-O', self.compiler.cxx_pic_flag] -- cgit v1.2.3-60-g2f50