bwa: support for aarch64 (#17473)
* bwa: support for aarch64 * bwa: fix build error for non-aarch64 machine
This commit is contained in:
parent
815f62ce0c
commit
4fa519134f
13
var/spack/repos/builtin/packages/bwa/bwa_for_aarch64.patch
Normal file
13
var/spack/repos/builtin/packages/bwa/bwa_for_aarch64.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/ksw.c b/ksw.c
|
||||||
|
index 9793e5e..2eecef4 100644
|
||||||
|
--- a/ksw.c
|
||||||
|
+++ b/ksw.c
|
||||||
|
@@ -26,7 +26,7 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <assert.h>
|
||||||
|
-#include <emmintrin.h>
|
||||||
|
+#include <SSE2NEON.h>
|
||||||
|
#include "ksw.h"
|
||||||
|
|
||||||
|
#ifdef USE_MALLOC_WRAPPERS
|
@ -4,6 +4,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import platform
|
||||||
|
|
||||||
|
|
||||||
class Bwa(Package):
|
class Bwa(Package):
|
||||||
@ -19,10 +20,20 @@ class Bwa(Package):
|
|||||||
url='https://github.com/lh3/bwa/archive/0.7.12.tar.gz')
|
url='https://github.com/lh3/bwa/archive/0.7.12.tar.gz')
|
||||||
|
|
||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
|
depends_on('sse2neon', when='target=aarch64:')
|
||||||
|
|
||||||
|
patch('bwa_for_aarch64.patch', sha256='b77213b16cf8760f01e32f9a0b2cd8988cf7bac48a11267100f703cbd55c4bfd', when='target=aarch64:')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
filter_file(r'^INCLUDES=',
|
zlib_inc_path = spec['zlib'].prefix.include
|
||||||
"INCLUDES=-I%s" % spec['zlib'].prefix.include, 'Makefile')
|
if platform.machine() == 'aarch64':
|
||||||
|
sse2neon_inc_path = spec['sse2neon'].prefix.include
|
||||||
|
filter_file(r'^INCLUDES=', "INCLUDES=-I%s -I%s" %
|
||||||
|
(zlib_inc_path, sse2neon_inc_path),
|
||||||
|
'Makefile')
|
||||||
|
else:
|
||||||
|
filter_file(r'^INCLUDES=', "INCLUDES=-I%s" %
|
||||||
|
zlib_inc_path, 'Makefile')
|
||||||
filter_file(r'^LIBS=', "LIBS=-L%s " % spec['zlib'].prefix.lib,
|
filter_file(r'^LIBS=', "LIBS=-L%s " % spec['zlib'].prefix.lib,
|
||||||
'Makefile')
|
'Makefile')
|
||||||
make()
|
make()
|
||||||
|
Loading…
Reference in New Issue
Block a user