!3 兼容性生态新增需包 bwa
From: @chengzihan2 Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
6cd1826b59
BIN
bwa-0.7.17.tar.bz2
Normal file
BIN
bwa-0.7.17.tar.bz2
Normal file
Binary file not shown.
28
bwa-fix-build-gcc10.patch
Normal file
28
bwa-fix-build-gcc10.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 039e5733af162692ad670d5c6fb4a9d8fa5e3d02 Mon Sep 17 00:00:00 2001
|
||||
From: David Seifert <soap@gentoo.org>
|
||||
Date: Wed, 26 Feb 2020 13:24:17 +0100
|
||||
Subject: [PATCH] Fix building against GCC 10
|
||||
|
||||
* GCC 10 defaults to `-fno-common`, which makes C behave
|
||||
more like C++ in that you can only ever have one definition
|
||||
of an object per executable.
|
||||
---
|
||||
rle.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rle.h b/rle.h
|
||||
index 0d59484..4f8946d 100644
|
||||
--- a/rle.h
|
||||
+++ b/rle.h
|
||||
@@ -30,7 +30,7 @@ extern "C" {
|
||||
*** 43+3 codec ***
|
||||
******************/
|
||||
|
||||
-const uint8_t rle_auxtab[8];
|
||||
+extern const uint8_t rle_auxtab[8];
|
||||
|
||||
#define RLE_MIN_SPACE 18
|
||||
#define rle_nptr(block) ((uint16_t*)(block))
|
||||
--
|
||||
2.25.1
|
||||
|
||||
16
bwa-simde.patch
Normal file
16
bwa-simde.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/ksw.c b/ksw.c
|
||||
index 9793e5eb..76f39c98 100644
|
||||
--- a/ksw.c
|
||||
+++ b/ksw.c
|
||||
@@ -26,7 +26,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
+#ifdef USE_SIMDE
|
||||
+#include <simde/x86/sse2.h>
|
||||
+#else
|
||||
#include <emmintrin.h>
|
||||
+#endif
|
||||
#include "ksw.h"
|
||||
|
||||
#ifdef USE_MALLOC_WRAPPERS
|
||||
55
bwa.spec
Normal file
55
bwa.spec
Normal file
@ -0,0 +1,55 @@
|
||||
Name: bwa
|
||||
Version: 0.7.17
|
||||
Release: 1
|
||||
Summary: Burrows-Wheeler Alignment tool
|
||||
License: GPLv3 and MIT
|
||||
URL: https://github.com/lh3/bwa
|
||||
Source0: https://github.com/lh3/bwa/releases/download/v%{version}/%{name}-%{version}.tar.bz2
|
||||
Patch0: bwa-fix-build-gcc10.patch
|
||||
Patch1: bwa-simde.patch
|
||||
BuildRequires: gcc perl-generators
|
||||
%ifnarch x86_64
|
||||
BuildRequires: simde-devel
|
||||
%endif
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
%description
|
||||
BWA is a program for aligning sequencing reads against a large
|
||||
reference genome (e.g. human genome). It has two major components, one
|
||||
for read shorter than 150bp and the other for longer reads.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
CFLAGS="%{optflags} -O3"
|
||||
%ifnarch x86_64
|
||||
CFLAGS="${CFLAGS} -DUSE_SIMDE -DSIMDE_ENABLE_NATIVE_ALIASES -fopenmp-simd -DSIMDE_ENABLE_OPENMP"
|
||||
%endif
|
||||
%make_build CFLAGS="${CFLAGS}"
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
mkdir -p %{buildroot}/%{_datadir}/%{name}/bwakit
|
||||
mkdir -p %{buildroot}/%{_mandir}/man1
|
||||
install -m 0755 bwa %{buildroot}/%{_bindir}
|
||||
install -m 0755 qualfa2fq.pl %{buildroot}/%{_bindir}
|
||||
install -m 0755 xa2multi.pl %{buildroot}/%{_bindir}
|
||||
install -m 0755 bwakit/* %{buildroot}/%{_datadir}/%{name}/bwakit
|
||||
install -m 0644 bwa.1 %{buildroot}/%{_mandir}/man1/bwa.1
|
||||
|
||||
%check
|
||||
./bwa 2>&1 | grep '^Version: %{version}'
|
||||
|
||||
%files
|
||||
%doc COPYING NEWS.md README.md README-alt.md
|
||||
%{_bindir}/bwa
|
||||
%{_bindir}/qualfa2fq.pl
|
||||
%{_bindir}/xa2multi.pl
|
||||
%{_datadir}/%{name}/*
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
|
||||
%changelog
|
||||
* Fri Jan 8 2021 chengzihan <chengzihan2@huawei.com> - 0.7.17-1
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user