aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorShaun Jackman2012-06-25 10:08:33 -0700
committerAdam Vandenberg2012-08-29 10:38:16 -0700
commit595e620381b57767b4985bbc5d88cc0fc2ea4388 (patch)
tree6676f8918398a0ca85892d2c5973ff0b9b66d5b9 /Library/Formula
parent704e6949432da88e8a7541c6933abfe51cd21389 (diff)
downloadhomebrew-595e620381b57767b4985bbc5d88cc0fc2ea4388.tar.bz2
BWA 0.6.2
Closes #13009. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/bwa.rb73
1 files changed, 71 insertions, 2 deletions
diff --git a/Library/Formula/bwa.rb b/Library/Formula/bwa.rb
index 552b76917..5a66b4641 100644
--- a/Library/Formula/bwa.rb
+++ b/Library/Formula/bwa.rb
@@ -2,14 +2,83 @@ require 'formula'
class Bwa < Formula
homepage 'http://bio-bwa.sourceforge.net/'
- url 'http://downloads.sourceforge.net/project/bio-bwa/bwa-0.5.10.tar.bz2'
- md5 '04962f916f761dc259d9fb2452b46c5d'
+ url 'http://downloads.sourceforge.net/project/bio-bwa/bwa-0.6.2.tar.bz2'
+ sha1 'fd3d0666a89d189b642d6f1c4cfa9c29123c12bc'
head 'https://github.com/lh3/bwa.git'
+ # These inline functions cause undefined symbol errors with CLANG.
+ # Fixed upstream for next release. See:
+ # https://github.com/lh3/bwa/pull/11
+ def patches; DATA; end
+
def install
system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}"
bin.install "bwa"
man1.install "bwa.1"
end
end
+
+__END__
+diff --git a/bwt.c b/bwt.c
+index fcc141e..966b718 100644
+--- a/bwt.c
++++ b/bwt.c
+@@ -95,7 +95,7 @@ static inline int __occ_aux(uint64_t y, int c)
+ return ((y + (y >> 4)) & 0xf0f0f0f0f0f0f0full) * 0x101010101010101ull >> 56;
+ }
+
+-inline bwtint_t bwt_occ(const bwt_t *bwt, bwtint_t k, ubyte_t c)
++bwtint_t bwt_occ(const bwt_t *bwt, bwtint_t k, ubyte_t c)
+ {
+ bwtint_t n, l, j;
+ uint32_t *p;
+@@ -121,7 +121,7 @@ inline bwtint_t bwt_occ(const bwt_t *bwt, bwtint_t k, ubyte_t c)
+ }
+
+ // an analogy to bwt_occ() but more efficient, requiring k <= l
+-inline void bwt_2occ(const bwt_t *bwt, bwtint_t k, bwtint_t l, ubyte_t c, bwtint_t *ok, bwtint_t *ol)
++void bwt_2occ(const bwt_t *bwt, bwtint_t k, bwtint_t l, ubyte_t c, bwtint_t *ok, bwtint_t *ol)
+ {
+ bwtint_t _k, _l;
+ _k = (k >= bwt->primary)? k-1 : k;
+@@ -158,7 +158,7 @@ inline void bwt_2occ(const bwt_t *bwt, bwtint_t k, bwtint_t l, ubyte_t c, bwtint
+ ((bwt)->cnt_table[(b)&0xff] + (bwt)->cnt_table[(b)>>8&0xff] \
+ + (bwt)->cnt_table[(b)>>16&0xff] + (bwt)->cnt_table[(b)>>24])
+
+-inline void bwt_occ4(const bwt_t *bwt, bwtint_t k, bwtint_t cnt[4])
++void bwt_occ4(const bwt_t *bwt, bwtint_t k, bwtint_t cnt[4])
+ {
+ bwtint_t l, j, x;
+ uint32_t *p;
+@@ -178,7 +178,7 @@ inline void bwt_occ4(const bwt_t *bwt, bwtint_t k, bwtint_t cnt[4])
+ }
+
+ // an analogy to bwt_occ4() but more efficient, requiring k <= l
+-inline void bwt_2occ4(const bwt_t *bwt, bwtint_t k, bwtint_t l, bwtint_t cntk[4], bwtint_t cntl[4])
++void bwt_2occ4(const bwt_t *bwt, bwtint_t k, bwtint_t l, bwtint_t cntk[4], bwtint_t cntl[4])
+ {
+ bwtint_t _k, _l;
+ _k = (k >= bwt->primary)? k-1 : k;
+diff --git a/bwt_lite.c b/bwt_lite.c
+index dd411e1..902e0fc 100644
+--- a/bwt_lite.c
++++ b/bwt_lite.c
+@@ -65,7 +65,7 @@ inline uint32_t bwtl_occ(const bwtl_t *bwt, uint32_t k, uint8_t c)
+ if (c == 0) n -= 15 - (k&15); // corrected for the masked bits
+ return n;
+ }
+-inline void bwtl_occ4(const bwtl_t *bwt, uint32_t k, uint32_t cnt[4])
++void bwtl_occ4(const bwtl_t *bwt, uint32_t k, uint32_t cnt[4])
+ {
+ uint32_t x, b;
+ if (k == (uint32_t)(-1)) {
+@@ -80,7 +80,7 @@ inline void bwtl_occ4(const bwtl_t *bwt, uint32_t k, uint32_t cnt[4])
+ x -= 15 - (k&15);
+ cnt[0] += x&0xff; cnt[1] += x>>8&0xff; cnt[2] += x>>16&0xff; cnt[3] += x>>24;
+ }
+-inline void bwtl_2occ4(const bwtl_t *bwt, uint32_t k, uint32_t l, uint32_t cntk[4], uint32_t cntl[4])
++void bwtl_2occ4(const bwtl_t *bwt, uint32_t k, uint32_t l, uint32_t cntk[4], uint32_t cntl[4])
+ {
+ bwtl_occ4(bwt, k, cntk);
+ bwtl_occ4(bwt, l, cntl);