[bowtie] Fix compilation with GCC 4.7

verdurin verdurin at fedoraproject.org
Mon Jan 9 10:58:40 UTC 2012


commit 179ce9054430e06830107a95faa8ccfdfd1de5f5
Author: Adam Huffman <bloch at verdurin.com>
Date:   Mon Jan 9 10:58:22 2012 +0000

    Fix compilation with GCC 4.7

 bowtie-gcc47.patch |   39 +++++++++++++++++++++++++++++++++++++++
 bowtie.spec        |    8 +++++++-
 2 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/bowtie-gcc47.patch b/bowtie-gcc47.patch
new file mode 100644
index 0000000..373569e
--- /dev/null
+++ b/bowtie-gcc47.patch
@@ -0,0 +1,39 @@
+--- bowtie-0.12.7/alphabet.h	2009-11-24 20:53:52.000000000 +0000
++++ bowtie-0.12.7.new/alphabet.h	2012-01-09 10:53:09.902974406 +0000
+@@ -38,6 +38,18 @@
+ 	return s_rc;
+ }
+ 
++/// Reverse a string in-place
++template <typename TStr>
++static inline void reverseInPlace(TStr& s) {
++	typedef typename Value<TStr>::Type TVal;
++	size_t len = length(s);
++	for(size_t i = 0; i < (len>>1); i++) {
++		TVal tmp = s[i];
++		s[i] = s[len-i-1];
++		s[len-i-1] = tmp;
++	}
++}
++
+ /**
+  * Reverse-complement s in-place.  Ns go to Ns.
+  */
+@@ -69,17 +81,6 @@
+ 	}
+ }
+ 
+-/// Reverse a string in-place
+-template <typename TStr>
+-static inline void reverseInPlace(TStr& s) {
+-	typedef typename Value<TStr>::Type TVal;
+-	size_t len = length(s);
+-	for(size_t i = 0; i < (len>>1); i++) {
+-		TVal tmp = s[i];
+-		s[i] = s[len-i-1];
+-		s[len-i-1] = tmp;
+-	}
+-}
+ 
+ /**
+  * Return the reverse-complement of s.
diff --git a/bowtie.spec b/bowtie.spec
index 02431e3..7c0effb 100644
--- a/bowtie.spec
+++ b/bowtie.spec
@@ -1,6 +1,6 @@
 Name:		bowtie
 Version:	0.12.7
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	An ultrafast, memory-efficient short read aligner
 
 Group:		Applications/Engineering
@@ -8,6 +8,7 @@ License:	Artistic 2.0
 URL:		http://bowtie-bio.sourceforge.net/index.shtml
 Source0:	http://downloads.sourceforge.net/%{name}-bio/%{name}-%{version}-src.zip
 Patch0:		%{name}-script-shebang.patch
+Patch1:		%{name}-gcc47.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 
@@ -22,6 +23,8 @@ sequences to the human genome. Genome Biol 10:R25.
 %setup -q
 
 %patch0 -p1 
+#Fix compilation with GCC 4.7
+%patch1 -p1 -b .%{name}-gcc47.patch
 
 %build
 make %{?_smp_mflags} -p EXTRA_FLAGS="%{optflags}"
@@ -61,6 +64,9 @@ rm -rf %{buildroot}
 %{_datadir}/bowtie/scripts
 
 %changelog
+* Mon Jan  9 2012 Adam Huffman <verdurin at fedoraproject.org> - 0.12.7-3
+- add patch to fix compilation with GCC 4.7
+
 * Mon Jun 27 2011 Adam Huffman <bloch at verdurin.com> - 0.12.7-2
 - add missing doc/ 
 - add patch to fix Perl script without shebang


More information about the scm-commits mailing list