[med-svn] [bamtools] 01/01: allow to read bam files on big endian systems

Dominique Belhachemi domibel at moszumanska.debian.org
Sun Dec 20 22:31:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

domibel pushed a commit to branch master
in repository bamtools.

commit 0a9961e543848ec7a9c0635fd2580982bf26ad7c
Author: Dominique Belhachemi <domibel at debian.org>
Date:   Sun Dec 20 17:29:28 2015 -0500

    allow to read bam files on big endian systems
---
 debian/changelog                     |  7 +++++++
 debian/copyright                     |  1 +
 debian/patches/0007-Big_Endian.patch | 25 +++++++++++++++++++++++++
 debian/patches/0008_Cmake_Test.patch | 25 +++++++++++++++++++++++++
 debian/patches/series                |  2 ++
 5 files changed, 60 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 0a92d7c..0a77457 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+bamtools (2.4.0+dfsg-3) unstable; urgency=medium
+
+  * allow to read bam files on big endian systems (Closes: #807979)
+  * activated cmake testing framework, tests need to be added
+
+ -- Dominique Belhachemi <domibel at debian.org>  Sun, 20 Dec 2015 15:41:42 -0500
+
 bamtools (2.4.0+dfsg-2) unstable; urgency=medium
 
   [ Kevin Murray ]
diff --git a/debian/copyright b/debian/copyright
index 4a89112..d7ac49c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -14,6 +14,7 @@ Files: debian/*
 Copyright: 2012 Michael R. Crusoe <michael.crusoe at gmail.com>
            2014 Andreas Tille <tille at debian.org>
            2015 Kevin Murray <spam at kdmurray.id.au>
+           2012,2015 Dominique Belhachemi <domibel at debian.org>
 License: Expat
 
 License: Expat
diff --git a/debian/patches/0007-Big_Endian.patch b/debian/patches/0007-Big_Endian.patch
new file mode 100644
index 0000000..e9235d4
--- /dev/null
+++ b/debian/patches/0007-Big_Endian.patch
@@ -0,0 +1,25 @@
+Description: read bam files on big endian systems
+Author: Dominique Belhachemi <domibel at debian.org>
+Bug-Debian: https://bugs.debian.org/807979
+Forwarded: https://github.com/pezmaster31/bamtools/issues/113
+
+Index: bamtools/src/api/BamAux.h
+===================================================================
+--- bamtools.orig/src/api/BamAux.h
++++ bamtools/src/api/BamAux.h
+@@ -424,8 +424,15 @@ API_EXPORT inline unsigned int UnpackUns
+ API_EXPORT inline unsigned short UnpackUnsignedShort(const char* buffer) {
+     union { unsigned short value; unsigned char valueBuffer[sizeof(unsigned short)]; } un;
+     un.value = 0;
++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+     un.valueBuffer[0] = buffer[0];
+     un.valueBuffer[1] = buffer[1];
++#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++    un.valueBuffer[0] = buffer[1];
++    un.valueBuffer[1] = buffer[0];
++#else
++    #error "Unsupported hardware"
++#endif
+     return un.value;
+ }
+ 
diff --git a/debian/patches/0008_Cmake_Test.patch b/debian/patches/0008_Cmake_Test.patch
new file mode 100644
index 0000000..35ac9cf
--- /dev/null
+++ b/debian/patches/0008_Cmake_Test.patch
@@ -0,0 +1,25 @@
+Description: run simple test after compilation
+ The test suite can be extended once we add some small and simple bam files.
+Author: Dominique Belhachemi <domibel at debian.org>
+
+Index: bamtools/CMakeLists.txt
+===================================================================
+--- bamtools.orig/CMakeLists.txt
++++ bamtools/CMakeLists.txt
+@@ -8,6 +8,8 @@
+ # set project name
+ project( BamTools )
+ 
++enable_testing()
++
+ # Cmake requirements
+ cmake_minimum_required( VERSION 2.6.4 )
+ 
+@@ -64,3 +66,7 @@ include_directories("${CMAKE_BINARY_DIR}
+ 
+ # list subdirectories to build in
+ add_subdirectory( src )
++
++add_test(NAME    bamtools
++         COMMAND bin/bamtools --help
++)
diff --git a/debian/patches/series b/debian/patches/series
index 0f5a38c..8e3563c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,5 @@
 0005-Install-libbamtools-to-lib.-Installing-libraries-to-.patch
 0006-Doxygen-reproducibility
 0006-Fix-Doxyfile-input-source-path.patch
+0007-Big_Endian.patch
+0008_Cmake_Test.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/bamtools.git



More information about the debian-med-commit mailing list