[med-svn] [spaced] 03/06: Add a bunch of patches

Fabian Klötzl kloetzl-guest at moszumanska.debian.org
Wed Mar 23 12:26:06 UTC 2016


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

kloetzl-guest pushed a commit to branch master
in repository spaced.

commit 756b37fa7eb5fa84382d5bb40841fd0981a4acef
Author: Fabian Klötzl <fabian at kloetzl.info>
Date:   Wed Mar 23 12:24:00 2016 +0100

    Add a bunch of patches
    
    - Remove the precompiled binary
    - Add a manpage
    - Fix a problem if the compiler does not support OpenMP
    - Add autotools as proper build system
---
 debian/patches/0001-Remove-binary.patch            | Bin 0 -> 159477 bytes
 debian/patches/0002-Add-man-page.patch             |  75 +++++++
 debian/patches/0003-Fix-FTBFS-without-OpenMP.patch |  23 ++
 .../patches/0004-Add-autotools-buildsystem.patch   | 237 +++++++++++++++++++++
 debian/patches/series                              |   4 +
 5 files changed, 339 insertions(+)

diff --git a/debian/patches/0001-Remove-binary.patch b/debian/patches/0001-Remove-binary.patch
new file mode 100644
index 0000000..719be17
Binary files /dev/null and b/debian/patches/0001-Remove-binary.patch differ
diff --git a/debian/patches/0002-Add-man-page.patch b/debian/patches/0002-Add-man-page.patch
new file mode 100644
index 0000000..503a735
--- /dev/null
+++ b/debian/patches/0002-Add-man-page.patch
@@ -0,0 +1,75 @@
+From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fabian at kloetzl.info>
+Date: Wed, 23 Mar 2016 12:00:11 +0100
+Subject: Add man page
+
+---
+ spaced.1 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 60 insertions(+)
+ create mode 100644 spaced.1
+
+diff --git a/spaced.1 b/spaced.1
+new file mode 100644
+index 0000000..9878d2b
+--- /dev/null
++++ b/spaced.1
+@@ -0,0 +1,60 @@
++.TH SPACED "1" "February 2016" "1.0.2" ""
++.SH NAME
++spaced \- alignment-free sequence comparison
++.SH SYNOPSIS
++.B spaced
++[\fI-r\fR] [\fI-k INT\fR] [\fI-l INT\fR] [\fI-n INT\fR] [\fI-t INT\fR] [\fI-d TYPE\fR] [\fI-f FILE\fR] \fIFILES\fR...
++.SH DESCRIPTION
++.TP
++Spaced Words is a new approach to alignment-free sequence comparison. While most alignment-free algorithms compare the word-composition of sequences, Spaced Words uses a pattern of care and don't care positions. The occurrence of a spaced word in a sequence is then defined by the characters at the match positions only, while the characters at the don't care positions are ignored (this was originally inspired by the PatternHunter algorithm for homology search in databases). Instead of co [...]
++.SH OUTPUT
++The output is a symmetrical distance matrix similar to \fIPHYLIP\fR format, with each entry representing divergence with a positive real number. A distance of zero means that two sequences are identical, whereas other values are estimates for the nucleotide substitution rate (Jukes-Cantor corrected). 
++.SH OPTIONS
++.TP
++\fB\-o\fR <file>
++Print the distance matrix to the given \fIfile\fR. Default is \fIDMat\fR.
++.TP
++\fB\-k\fR <int>
++Set the patterns weight. Default: 14.
++.TP
++\fB\-l\fR <int>
++Set \fIdon't care\fR positions for the used patterns. Default: 15.
++.TP
++\fB\-n\fR <int>
++Set the number of patterns. Default: 5.
++.TP
++\fB\-f\fR <file>
++Instead of generating new patterns, use read them from the given file.
++.TP
++\fB\-t\fR <INT>
++The number of threads to be used; by default, 25 threads are used. 
++.br
++Multithreading is only available if \fBspaced\fR was compiled with OpenMP support.
++.TP
++\fB-r\fR
++Skip comparison with the reverse complement.
++.TP
++\fB-d\fR <type>
++The distances can be compute with different measures. Available options are Euclidean (\fIEU\fR), Jensen-Shannon (\fIJS\fR), and evolutionary distance (\fIEV\fR). Default: EV.
++.TP
++\fB\-h\fR
++Prints the synopsis and an explanation of available options.
++.SH COPYRIGHT
++Copyright \(co 2016 Chris Leimeister <chris.leimeister at stud.uni-goettingen.de>
++License GPLv3+: GNU GPL version 3 or later.
++.br
++This is free software: you are free to change and redistribute it.
++There is NO WARRANTY, to the extent permitted by law.
++The full license text is available at <http://gnu.org/licenses/gpl.html>.
++.PP
++.SH REFERENCES
++1) C.-A. Leimeister, M. Boden, S. Horwege, S. Lindner, B. Morgenstern (2014). Fast alignment-free sequence comparison using spaced-word frequencies, Bioinformatics <http://bioinformatics.oxfordjournals.org/content/early/2014/04/03/bioinformatics.btu177>
++.br
++2) S. Horwege, S. Linder, M. Boden, K. Hatje, M. Kollmar, C.-A. Leimeister, B. Morgenstern (2014). Spaced words and kmacs: fast alignment-free sequence comparison based on inexact word matches, Nucleic Acids Research 42, W7-W11 <http://nar.oxfordjournals.org/content/42/W1/W7.abstract>
++.br
++3) B. Morgenstern, B. Zhu, S. Horwege, C.-A Leimeister (2015). Estimating evolutionary distances between genomic sequences from spaced-word matches, Algorithms for Molecular Biology 10,5
++.SH BUGS
++.SS Reporting Bugs
++Please report bugs to <kloetzl at evolbio.mpg.de> or <chris.leimeister at stud.uni-goettingen.de>.
++.SS
++
diff --git a/debian/patches/0003-Fix-FTBFS-without-OpenMP.patch b/debian/patches/0003-Fix-FTBFS-without-OpenMP.patch
new file mode 100644
index 0000000..55b9baf
--- /dev/null
+++ b/debian/patches/0003-Fix-FTBFS-without-OpenMP.patch
@@ -0,0 +1,23 @@
+From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fabian at kloetzl.info>
+Date: Wed, 23 Mar 2016 12:01:55 +0100
+Subject: Fix FTBFS without OpenMP
+
+---
+ sort.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sort.h b/sort.h
+index bef900e..4034495 100644
+--- a/sort.h
++++ b/sort.h
+@@ -153,9 +153,9 @@ void writeDmat(vector<vector<double> > dmat, vector<sequence<uint> >& sequences,
+ 
+ template<typename uint>
+ void spacedDNA(vector<string>& patternSet, unsigned char* seqData, uint n, int distance, int threads, int weight, int dontCare, bool revComp, string output){
++	int ell=dontCare+weight-1;
+ 	#ifdef _OPENMP
+ 	omp_set_dynamic(0);
+-	int ell=dontCare+weight-1;
+ 	omp_set_num_threads(threads);
+ 	#endif
+ 	unsigned char alphabet[256]={};
diff --git a/debian/patches/0004-Add-autotools-buildsystem.patch b/debian/patches/0004-Add-autotools-buildsystem.patch
new file mode 100644
index 0000000..402301e
--- /dev/null
+++ b/debian/patches/0004-Add-autotools-buildsystem.patch
@@ -0,0 +1,237 @@
+From: =?utf-8?q?Fabian_Kl=C3=B6tzl?= <fabian at kloetzl.info>
+Date: Wed, 23 Mar 2016 12:21:00 +0100
+Subject: Add autotools buildsystem
+
+---
+ Makefile                       |   4 -
+ Makefile.am                    |   8 ++
+ configure.ac                   |  24 ++++++
+ m4/ax_cxx_compile_stdcxx_11.m4 | 162 +++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 194 insertions(+), 4 deletions(-)
+ delete mode 100644 Makefile
+ create mode 100644 Makefile.am
+ create mode 100644 configure.ac
+ create mode 100644 m4/ax_cxx_compile_stdcxx_11.m4
+
+diff --git a/Makefile b/Makefile
+deleted file mode 100644
+index 0515a61..0000000
+--- a/Makefile
++++ /dev/null
+@@ -1,4 +0,0 @@
+-
+-all: 
+-		g++ -O3 -std=c++11 spaced.cc  variance.cpp patternset.cpp extkey.cpp -o spaced -fopenmp
+- 
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 0000000..aaee67c
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,8 @@
++bin_PROGRAMS = spaced
++spaced_SOURCES = extkey.cpp extkey.h patternset.cpp patternset.h sort.h spaced.cc variance.cpp variance.h
++spaced_CPPFLAGS = $(OPENMP_CPPFLAGS) -Wall -Wextra -std=c++11 -Wno-char-subscripts
++spaced_CXXFLAGS = $(OPENMP_CXXFLAGS)
++
++man_MANS = spaced.1
++
++dist_noinst_DATA = README COPYING
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..6808730
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,24 @@
++AC_PREREQ([2.69])
++AC_INIT([spaced], [1.0.2])
++AM_INIT_AUTOMAKE([-Wall foreign])
++
++AC_CONFIG_SRCDIR([extkey.cpp])
++AC_CONFIG_HEADERS([config.h])
++
++AC_PROG_CXX
++AC_LANG(C++)
++AC_OPENMP
++
++AC_CONFIG_MACRO_DIR([m4])
++AX_CXX_COMPILE_STDCXX_11([],[mandatory])
++
++AC_CHECK_HEADERS([inttypes.h stdlib.h string.h unistd.h])
++
++AC_CHECK_HEADER_STDBOOL
++AC_TYPE_SIZE_T
++AC_TYPE_UINT64_T
++
++AC_CHECK_FUNCS([pow sqrt])
++
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
+diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4
+new file mode 100644
+index 0000000..f3779d6
+--- /dev/null
++++ b/m4/ax_cxx_compile_stdcxx_11.m4
+@@ -0,0 +1,162 @@
++# ============================================================================
++#  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
++# ============================================================================
++#
++# SYNOPSIS
++#
++#   AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
++#
++# DESCRIPTION
++#
++#   Check for baseline language coverage in the compiler for the C++11
++#   standard; if necessary, add switches to CXXFLAGS to enable support.
++#
++#   The first argument, if specified, indicates whether you insist on an
++#   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
++#   -std=c++11).  If neither is specified, you get whatever works, with
++#   preference for an extended mode.
++#
++#   The second argument, if specified 'mandatory' or if left unspecified,
++#   indicates that baseline C++11 support is required and that the macro
++#   should error out if no mode with that support is found.  If specified
++#   'optional', then configuration proceeds regardless, after defining
++#   HAVE_CXX11 if and only if a supporting mode is found.
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Benjamin Kosnik <bkoz at redhat.com>
++#   Copyright (c) 2012 Zack Weinberg <zackw at panix.com>
++#   Copyright (c) 2013 Roy Stogner <roystgnr at ices.utexas.edu>
++#   Copyright (c) 2014 Alexey Sokolov <sokolov at google.com>
++#   Copyright (c) 2014, 2015 Google Inc.
++#
++#   Copying and distribution of this file, with or without modification, are
++#   permitted in any medium without royalty provided the copyright notice
++#   and this notice are preserved. This file is offered as-is, without any
++#   warranty.
++
++#serial 7
++
++m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
++  template <typename T>
++    struct check
++    {
++      static_assert(sizeof(int) <= sizeof(T), "not big enough");
++    };
++
++    struct Base {
++    virtual void f() {}
++    };
++    struct Child : public Base {
++    virtual void f() override {}
++    };
++
++    typedef check<check<bool>> right_angle_brackets;
++
++    int a;
++    decltype(a) b;
++
++    typedef check<int> check_type;
++    check_type c;
++    check_type&& cr = static_cast<check_type&&>(c);
++
++    auto d = a;
++    auto l = [](){};
++
++    // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
++    // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this
++    namespace test_template_alias_sfinae {
++        struct foo {};
++
++        template<typename T>
++        using member = typename T::member_type;
++
++        template<typename T>
++        void func(...) {}
++
++        template<typename T>
++        void func(member<T>*) {}
++
++        void test() {
++            func<foo>(0);
++        }
++    }
++]])
++
++AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
++  m4_if([$1], [], [],
++        [$1], [ext], [],
++        [$1], [noext], [],
++        [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
++  m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
++        [$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
++        [$2], [optional], [ax_cxx_compile_cxx11_required=false],
++        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])
++  AC_LANG_PUSH([C++])dnl
++  ac_success=no
++  AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
++  ax_cv_cxx_compile_cxx11,
++  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
++    [ax_cv_cxx_compile_cxx11=yes],
++    [ax_cv_cxx_compile_cxx11=no])])
++  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
++    ac_success=yes
++  fi
++
++  m4_if([$1], [noext], [], [dnl
++  if test x$ac_success = xno; then
++    for switch in -std=gnu++11 -std=gnu++0x; do
++      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
++      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
++                     $cachevar,
++        [ac_save_CXXFLAGS="$CXXFLAGS"
++         CXXFLAGS="$CXXFLAGS $switch"
++         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
++          [eval $cachevar=yes],
++          [eval $cachevar=no])
++         CXXFLAGS="$ac_save_CXXFLAGS"])
++      if eval test x\$$cachevar = xyes; then
++        CXXFLAGS="$CXXFLAGS $switch"
++        ac_success=yes
++        break
++      fi
++    done
++  fi])
++
++  m4_if([$1], [ext], [], [dnl
++  if test x$ac_success = xno; then
++    for switch in -std=c++11 -std=c++0x; do
++      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
++      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
++                     $cachevar,
++        [ac_save_CXXFLAGS="$CXXFLAGS"
++         CXXFLAGS="$CXXFLAGS $switch"
++         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
++          [eval $cachevar=yes],
++          [eval $cachevar=no])
++         CXXFLAGS="$ac_save_CXXFLAGS"])
++      if eval test x\$$cachevar = xyes; then
++        CXXFLAGS="$CXXFLAGS $switch"
++        ac_success=yes
++        break
++      fi
++    done
++  fi])
++  AC_LANG_POP([C++])
++  if test x$ax_cxx_compile_cxx11_required = xtrue; then
++    if test x$ac_success = xno; then
++      AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
++    fi
++  else
++    if test x$ac_success = xno; then
++      HAVE_CXX11=0
++      AC_MSG_NOTICE([No compiler with C++11 support was found])
++    else
++      HAVE_CXX11=1
++      AC_DEFINE(HAVE_CXX11,1,
++                [define if the compiler supports basic C++11 syntax])
++    fi
++
++    AC_SUBST(HAVE_CXX11)
++  fi
++])
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3350ea0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+0001-Remove-binary.patch
+0002-Add-man-page.patch
+0003-Fix-FTBFS-without-OpenMP.patch
+0004-Add-autotools-buildsystem.patch

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



More information about the debian-med-commit mailing list