summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/sortmerna/for_aarch64.patch22
-rw-r--r--var/spack/repos/builtin/packages/sortmerna/package.py7
2 files changed, 27 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/sortmerna/for_aarch64.patch b/var/spack/repos/builtin/packages/sortmerna/for_aarch64.patch
new file mode 100644
index 0000000000..a1a279a1de
--- /dev/null
+++ b/var/spack/repos/builtin/packages/sortmerna/for_aarch64.patch
@@ -0,0 +1,22 @@
+--- spack-src/src/sortmerna/ssw.c.bak 2021-01-15 15:52:23.000000000 +0900
++++ spack-src/src/sortmerna/ssw.c 2021-01-15 16:20:53.863003152 +0900
+@@ -42,7 +42,7 @@
+ * July 10, 2013
+ */
+
+-#include <emmintrin.h>
++#include <sse2neon.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+--- spack-src/include/ssw.h.bak 2021-01-15 15:52:22.000000000 +0900
++++ spack-src/include/ssw.h 2021-01-15 16:16:51.383025096 +0900
+@@ -21,7 +21,7 @@
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <string.h>
+-#include <emmintrin.h>
++#include <sse2neon.h>
+
+ extern const char map_nt[122];
+ /*! @typedef structure of the query profile */
diff --git a/var/spack/repos/builtin/packages/sortmerna/package.py b/var/spack/repos/builtin/packages/sortmerna/package.py
index 45c7bf33fc..a5537da9b2 100644
--- a/var/spack/repos/builtin/packages/sortmerna/package.py
+++ b/var/spack/repos/builtin/packages/sortmerna/package.py
@@ -16,10 +16,13 @@ class Sortmerna(CMakePackage):
version('2017-07-13', commit='8bde6fa113a5d99a23ae81b48eeea6760e966094')
depends_on('zlib')
+ depends_on('sse2neon', when='target=aarch64:')
+
+ patch('for_aarch64.patch', when='target=aarch64:')
def install(self, spec, prefix):
mkdirp(prefix.bin)
- with working_dir(join_path('spack-build', 'src', 'indexdb')):
+ with working_dir(join_path(self.build_directory, 'src', 'indexdb')):
install('indexdb', prefix.bin)
- with working_dir(join_path('spack-build', 'src', 'sortmerna')):
+ with working_dir(join_path(self.build_directory, 'src', 'sortmerna')):
install('sortmerna', prefix.bin)