File: build_with_gcc6.patch

package info (click to toggle)
dnaclust 3-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 720 kB
  • sloc: cpp: 3,630; sh: 516; makefile: 64
file content (23 lines) | stat: -rw-r--r-- 835 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: allow building with GCC 6
Author: Sascha Steinbiss <satta@debian.org>
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 #PROFILE_FLAGS = -pg -fprofile-arcs -ftest-coverage -g -O1
 CXXFLAGS += -Wall -pedantic -std=c++98 -O2
-CXX = g++ 
+CXX ?= g++
 #-DCHRIS_DEBUG
 
 all: dnaclust fastaselect fastasort
--- a/dnaclust.cpp
+++ b/dnaclust.cpp
@@ -1769,7 +1769,7 @@
       for (sequence::Fasta::const_iterator i = inputFasta.begin(); i != inputFasta.end(); ++i)
 	sizes.push_back(i->sequence.length());
       size_t median_size = *median(sizes.begin(), sizes.end());
-      k_mer_length = static_cast<int>(floor(log(median_size) / log(NUMBER_OF_NUCLEOTIDES)));
+      k_mer_length = static_cast<int>(floor(log(median_size) / log((double) NUMBER_OF_NUCLEOTIDES)));
     }
 
     // Initializing this at the beginning is crucial.