1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
Description: port codebase to gnu++11.
Since boost 1.83, it is necessary to build rsem with C++ 2011 standard. This
patch bumps the -std=gnu++98 passed by upstream Makefil to -std=gnu++11. It
should become unnecessary once upstream bumped to C++ 2011 or later, or when
the package will not depend on boost anymore, in case this is in upstream's
agenda; there is a merge request open upstream to bump to -std=gnu++17 in the
meantime.
Author: Étienne Mollier <emollier@debian.org>
Bug: https://github.com/deweylab/RSEM/pull/96
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056010
Last-Update: 2023-12-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- rsem.orig/Makefile
+++ rsem/Makefile
@@ -12,7 +12,7 @@
# Compilation variables
CXX = g++
-CXXFLAGS += -std=gnu++98 -Wall -I. -I$(BOOST)
+CXXFLAGS += -std=gnu++11 -Wall -I. -I$(BOOST)
CPPFLAGS ?=
LDFLAGS ?=
--- rsem.orig/PairedEndHit.h
+++ rsem/PairedEndHit.h
@@ -26,7 +26,7 @@
bool PairedEndHit::read(std::istream& in) {
conprb = 0.0;
- return (in>>sid>>pos>>insertL);
+ return ((bool)(in>>sid>>pos>>insertL));
}
void PairedEndHit::write(std::ostream& out) {
--- rsem.orig/SingleHit.h
+++ rsem/SingleHit.h
@@ -43,7 +43,7 @@
bool SingleHit::read(std::istream& in) {
conprb = 0.0;
- return (in>>sid>>pos);
+ return ((bool)(in>>sid>>pos));
}
void SingleHit::write(std::ostream& out) {
--- rsem.orig/buildReadIndex.cpp
+++ rsem/buildReadIndex.cpp
@@ -37,15 +37,15 @@
streampos pos = fin.tellg();
success = true;
- success = (getline(fin, line));
+ success = ((bool)getline(fin, line));
if (!success) continue;
- success = (getline(fin, line));
+ success = ((bool)getline(fin, line));
if (!success) continue;
if (hasQ) {
- success = (getline(fin, line));
+ success = ((bool)getline(fin, line));
if (!success) continue;
- success = (getline(fin, line));
+ success = ((bool)getline(fin, line));
if (!success) continue;
}
|