diff --git a/README.textile b/README.textile index bf6bd35..fda97bc 100644 --- a/README.textile +++ b/README.textile @@ -84,12 +84,12 @@ h2. Build Dependencies h3. Available Packages for Dependencies * For APT-based systems (Debian, Ubuntu), install the following packages: -bc. sudo apt-get install build-essential git-core cmake zlib1g-dev libncurses-dev +bc. sudo apt-get install build-essential git-core cmake zlib1g-dev libncurses-dev patch * For RPM-based systems (Fedora, CentOS, RHEL), install the following packages instead: bc. sudo yum groupinstall "Development tools" -sudo yum install zlib-devel ncurses-devel cmake +sudo yum install zlib-devel ncurses-devel cmake patch Note that for some RPM based systems (like RHEL), you will need to install cmake 2.8 or greater yourself as the packaged version is much older. @@ -104,7 +104,7 @@ bc. git clone https://github.com/genome/bam-readcount.git h3. Compile bam-readcount * bam-readcount does not support in source builds. Create a new build directory, enter it, and run: -bc.. cmake /path/to/bam-readcount/repo +bc. cmake /path/to/bam-readcount/repo make deps make diff --git a/cmake/BuildSamtools.cmake b/cmake/BuildSamtools.cmake index a00dcb8..3f1389a 100644 --- a/cmake/BuildSamtools.cmake +++ b/cmake/BuildSamtools.cmake @@ -31,6 +31,7 @@ ExternalProject_Add( URL ${CMAKE_SOURCE_DIR}/vendor/samtools-0.1.19.tar.gz SOURCE_DIR ${SAMTOOLS_ROOT} BINARY_DIR ${SAMTOOLS_ROOT} + PATCH_COMMAND patch -p2 -t -N < ${CMAKE_SOURCE_DIR}/vendor/samtools0.1.19.patch CONFIGURE_COMMAND echo "Building samtools, build log at ${SAMTOOLS_LOG}" BUILD_COMMAND make INCLUDES=-I${ZLIB_INCLUDE_DIRS} libbam.a > ${SAMTOOLS_LOG} 2>&1 INSTALL_COMMAND "" diff --git a/vendor/samtools0.1.19.patch b/vendor/samtools0.1.19.patch new file mode 100644 index 0000000..eea969f --- /dev/null +++ b/vendor/samtools0.1.19.patch @@ -0,0 +1,11 @@ +--- samtools-0.1.19/sam_header.c 2013-03-19 02:48:09.000000000 -0500 ++++ vendor/samtools/sam_header.c 2014-04-23 20:58:22.114860000 -0500 +@@ -687,7 +687,7 @@ + HeaderTag *key, *value; + key = header_line_has_tag(hline,key_tag); + value = header_line_has_tag(hline,value_tag); +- if ( !key && !value ) ++ if ( !key || !value ) + { + l = l->next; + continue;