From 81b5475f8e6045d22298df191786c54bdbbbde13 Mon Sep 17 00:00:00 2001 From: darmac Date: Mon, 27 Apr 2020 22:55:35 +0800 Subject: Add new package: smartdenovo (#16310) --- .../builtin/packages/smartdenovo/aarch64.patch | 29 +++++++++++++++++++++ .../repos/builtin/packages/smartdenovo/package.py | 30 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 var/spack/repos/builtin/packages/smartdenovo/aarch64.patch create mode 100644 var/spack/repos/builtin/packages/smartdenovo/package.py diff --git a/var/spack/repos/builtin/packages/smartdenovo/aarch64.patch b/var/spack/repos/builtin/packages/smartdenovo/aarch64.patch new file mode 100644 index 0000000000..998c9b2cdf --- /dev/null +++ b/var/spack/repos/builtin/packages/smartdenovo/aarch64.patch @@ -0,0 +1,29 @@ +diff --git a/Makefile b/Makefile +index 0802f65..3816b6e 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,9 +2,9 @@ VERSION=1.0.0 + MINOR_VER=20140314 + CC=gcc + ifdef DEBUG +-CFLAGS=-g3 -W -Wall -O0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -mpopcnt -mssse3 ++CFLAGS=-g3 -W -Wall -O0 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + else +-CFLAGS=-W -Wall -O4 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -mpopcnt -mssse3 ++CFLAGS=-W -Wall -O4 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE + endif + INSTALLDIR=/usr/local/bin + GLIBS=-lm -lpthread +diff --git a/ksw.c b/ksw.c +index 15dd0f2..22641ed 100644 +--- a/ksw.c ++++ b/ksw.c +@@ -25,7 +25,7 @@ + + #include + #include +-#include ++#include "SSE2NEON.h" + #include "ksw.h" + + #ifdef USE_MALLOC_WRAPPERS diff --git a/var/spack/repos/builtin/packages/smartdenovo/package.py b/var/spack/repos/builtin/packages/smartdenovo/package.py new file mode 100644 index 0000000000..f18b8583d9 --- /dev/null +++ b/var/spack/repos/builtin/packages/smartdenovo/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Smartdenovo(MakefilePackage): + """SMARTdenovo is a de novo assembler for PacBio and Oxford Nanopore + (ONT) data.""" + + homepage = "https://github.com/ruanjue/smartdenovo" + git = "https://github.com/ruanjue/smartdenovo.git" + + version('master', branch='master') + + depends_on('sse2neon', when='target=aarch64:') + + patch('aarch64.patch', when='target=aarch64:', + sha256='7dd4bca28aafb0680cc1823aa58ac9000819993538e92628554666c4b3acc470') + + def install(self, spec, prefix): + install_files = [ + 'pairaln', 'wtpre', 'wtcyc', 'wtmer', 'wtzmo', 'wtobt', + 'wtclp', 'wtext', 'wtgbo', 'wtlay', 'wtcns', 'wtmsa' + ] + mkdirp(prefix.bin) + for f in install_files: + install(f, prefix.bin) -- cgit v1.2.3-70-g09d2