summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaël Kerbiriou2022-02-01 18:42:17 +0100
committerMaël Kerbiriou2022-02-01 18:44:09 +0100
commit513b5b100b06af6f9d0c4742688ce6f0e4ac642a (patch)
treedb6ff218983d228735e39da32dc9d4547e74aee2
parentb2f944b5a4fc95cead8f5261e2943382e3b41d48 (diff)
downloadaur-bwa.tar.gz
Backport some compiler fixes from master
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD28
-rw-r--r--backported.patch59
3 files changed, 81 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b333e68c1234..233d2c868d6d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = bwa
pkgdesc = Burrows-Wheeler Aligner maps low-divergent sequences against a large reference genome
pkgver = 0.7.17
- pkgrel = 1
+ pkgrel = 2
url = http://bio-bwa.sourceforge.net/
arch = i686
arch = x86_64
@@ -9,7 +9,8 @@ pkgbase = bwa
depends = perl
depends = zlib
source = https://github.com/lh3/bwa/releases/download/v0.7.17/bwa-0.7.17.tar.bz2
- md5sums = 82cba7ef695538e6a38b9d4156837381
+ source = backported.patch
+ sha256sums = de1b4d4e745c0b7fc3e107b5155a51ac063011d33a5d82696331ecf4bed8d0fd
+ sha256sums = ec91adc478cbf207c694c5b7e46738dcbd77cd77180c7a6279d3e000108fe8c2
pkgname = bwa
-
diff --git a/PKGBUILD b/PKGBUILD
index e7c636065740..6bea3959d79c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,37 @@
-# Maintainer: Alex Peltzer ("alexpe87") <alexpe.aur@mailbox.org>
+# Maintainer: Maël Kerbiriou <m431.kerbiriou@gmail.com>
+# Previous maintainer: Alex Peltzer ("alexpe87") <alexpe.aur@mailbox.org>
# Contributor: Christian Krause ("wookietreiber") <kizkizzbangbang@googlemail.com>
pkgname=bwa
pkgver=0.7.17
_pkgver=${pkgver}
-pkgrel=1
+pkgrel=2
pkgdesc="Burrows-Wheeler Aligner maps low-divergent sequences against a large reference genome"
arch=('i686' 'x86_64')
url="http://bio-bwa.sourceforge.net/"
license=('GPL3')
depends=('perl' 'zlib')
-source=(https://github.com/lh3/bwa/releases/download/v$pkgver/bwa-${_pkgver}.tar.bz2)
-md5sums=('82cba7ef695538e6a38b9d4156837381')
+source=("https://github.com/lh3/bwa/releases/download/v$pkgver/bwa-${_pkgver}.tar.bz2"
+ 'backported.patch')
+sha256sums=('de1b4d4e745c0b7fc3e107b5155a51ac063011d33a5d82696331ecf4bed8d0fd'
+ 'ec91adc478cbf207c694c5b7e46738dcbd77cd77180c7a6279d3e000108fe8c2')
+
+prepare() {
+ patch --directory="$pkgname-$_pkgver" --forward --strip=1 --input="${srcdir}/backported.patch"
+}
build() {
- cd $srcdir/$pkgname-$_pkgver
+ cd "$srcdir/$pkgname-$_pkgver"
make
}
package() {
- cd $srcdir/$pkgname-$_pkgver
+ cd "$srcdir/$pkgname-$_pkgver"
- install -Dm755 bwa $pkgdir/usr/bin/bwa
- install -Dm755 qualfa2fq.pl $pkgdir/usr/bin/qualfa2fq
- install -Dm755 xa2multi.pl $pkgdir/usr/bin/xa2multi
- install -Dm644 bwa.1 $pkgdir/usr/share/man/man1/bwa.1
+ install -Dm755 bwa "$pkgdir/usr/bin/bwa"
+ install -Dm755 qualfa2fq.pl "$pkgdir/usr/bin/qualfa2fq"
+ install -Dm755 xa2multi.pl "$pkgdir/usr/bin/xa2multi"
+ install -Dm644 bwa.1 "$pkgdir/usr/share/man/man1/bwa.1"
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/${pkgname}"
}
diff --git a/backported.patch b/backported.patch
new file mode 100644
index 000000000000..a4624cdc9bb4
--- /dev/null
+++ b/backported.patch
@@ -0,0 +1,59 @@
+From 36f69f6f9ca1aada7f6a9ce045e1983ab7263a0d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ma=C3=ABl=20Kerbiriou?= <m431.kerbiriou@gmail.com>
+Date: Tue, 1 Feb 2022 18:23:00 +0100
+Subject: [PATCH] fixes
+
+---
+ bntseq.c | 8 +++++++-
+ bwakit/bwa-postalt.js | 2 +-
+ rle.h | 2 +-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/bntseq.c b/bntseq.c
+index 65f7e93..bf67bd4 100644
+--- a/bntseq.c
++++ b/bntseq.c
+@@ -197,7 +197,13 @@ bntseq_t *bns_restore(const char *prefix)
+ }
+ while (c != '\n' && c != EOF) c = fgetc(fp);
+ i = 0;
+- } else str[i++] = c; // FIXME: potential segfault here
++ } else {
++ if (i >= 1022) {
++ fprintf(stderr, "[E::%s] sequence name longer than 1023 characters. Abort!\n", __func__);
++ exit(1);
++ }
++ str[i++] = c;
++ }
+ }
+ kh_destroy(str, h);
+ fclose(fp);
+diff --git a/bwakit/bwa-postalt.js b/bwakit/bwa-postalt.js
+index bfc4190..e00d3dc 100644
+--- a/bwakit/bwa-postalt.js
++++ b/bwakit/bwa-postalt.js
+@@ -283,7 +283,7 @@ function bwa_postalt(args)
+ // process SAM
+ var buf2 = [], hla = {};
+ file = args.length - getopt.ind >= 2? new File(args[getopt.ind+1]) : new File();
+- while (file.readline(buf) >= 0) {
++ while (file.readline(buf) > 0) {
+ var m, line = buf.toString();
+
+ if (line.charAt(0) == '@') { // print and then skip the header line
+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.35.1
+