[med-svn] [Git][med-team/nanopolish][master] 2 commits: patch code to not define PR_R7 and PT_R9
Sascha Steinbiss
gitlab at salsa.debian.org
Sat Feb 20 14:49:39 GMT 2021
Sascha Steinbiss pushed to branch master at Debian Med / nanopolish
Commits:
df0f8daa by Sascha Steinbiss at 2021-02-20T15:48:49+01:00
patch code to not define PR_R7 and PT_R9
- - - - -
0d4caf1e by Sascha Steinbiss at 2021-02-20T15:49:09+01:00
add patch
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/rename_enum.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+nanopolish (0.13.2-2) unstable; urgency=medium
+
+ * Team upload.
+ * Patch code to not define PR_R7 and PT_R9 to avoid FTBFS on
+ some archs (Closes: #960634)
+ Thanks to Barry Arndt for the hint.
+
+ -- Sascha Steinbiss <satta at debian.org> Sat, 20 Feb 2021 15:06:55 +0100
+
nanopolish (0.13.2-1) unstable; urgency=medium
[ Michael R. Crusoe ]
=====================================
debian/patches/rename_enum.patch
=====================================
@@ -0,0 +1,109 @@
+Description: do not define PT_R{7,9}
+ Defining these enum values will cause a FTBFS on some architectures
+ due to them already existing in some architecture-dependent headers.
+ We rename them to avoid clashes. Thanks to Barry Arndt fot the hint.
+Author: Sascha Steinbiss <satta at debian.org>
+Forwarded: https://github.com/jts/nanopolish/issues/883
+Last-Update: 2021-02-20
+--- a/src/hmm/nanopolish_profile_hmm.cpp
++++ b/src/hmm/nanopolish_profile_hmm.cpp
+@@ -22,7 +22,7 @@
+
+ float profile_hmm_score(const HMMInputSequence& sequence, const HMMInputData& data, const uint32_t flags)
+ {
+- if(data.read->pore_type == PT_R9) {
++ if(data.read->pore_type == PORETYPE_R9) {
+ return profile_hmm_score_r9(sequence, data, flags);
+ } else {
+ return profile_hmm_score_r7(sequence, data, flags);
+@@ -57,7 +57,7 @@
+
+ std::vector<HMMAlignmentState> profile_hmm_align(const HMMInputSequence& sequence, const HMMInputData& data, const uint32_t flags)
+ {
+- if(data.read->pore_type == PT_R9) {
++ if(data.read->pore_type == PORETYPE_R9) {
+ return profile_hmm_align_r9(sequence, data, flags);
+ } else {
+ return profile_hmm_align_r7(sequence, data, flags);
+--- a/src/nanopolish_call_variants.cpp
++++ b/src/nanopolish_call_variants.cpp
+@@ -673,7 +673,7 @@
+
+ double num_kmers = variant_offset_end - variant_offset_start;
+ double log_gamma = sum_duration > MIN_DURATION ? DurationModel::log_gamma_sum(sum_duration, params, num_kmers) : 0.0f;
+- if(read->pore_type == PT_R9) {
++ if(read->pore_type == PORETYPE_R9) {
+ duration_likelihoods[var_sequence_length] += log_gamma;
+ }
+ if(opt::verbose > 3) {
+--- a/src/nanopolish_squiggle_read.cpp
++++ b/src/nanopolish_squiggle_read.cpp
+@@ -106,7 +106,7 @@
+ void SquiggleRead::init(const std::string& read_sequence, const Fast5Data& data, const uint32_t flags)
+ {
+ this->nucleotide_type = SRNT_DNA;
+- this->pore_type = PT_UNKNOWN;
++ this->pore_type = PORETYPE_UNKNOWN;
+ this->f_p = nullptr;
+
+ this->events_per_base[0] = events_per_base[1] = 0.0f;
+@@ -219,7 +219,7 @@
+ // in this case, we have to set this strand to be invalid
+ if(!event_maps_1d[si].empty()) {
+ // run version-specific load
+- if(pore_type == PT_R7) {
++ if(pore_type == PORETYPE_R7) {
+ _load_R7(si);
+ } else {
+ _load_R9(si, read_sequences_1d[si], event_maps_1d[si], p_model_states, flags);
+@@ -231,10 +231,10 @@
+
+ // Build the map from k-mers of the read sequence to events
+ if(read_type == SRT_2D) {
+- if(pore_type == PT_R9) {
++ if(pore_type == PORETYPE_R9) {
+ build_event_map_2d_r9();
+ } else {
+- assert(pore_type == PT_R7);
++ assert(pore_type == PORETYPE_R7);
+ build_event_map_2d_r7();
+ }
+ } else {
+@@ -298,7 +298,7 @@
+ }
+
+ this->read_type = SRT_TEMPLATE;
+- this->pore_type = PT_R9;
++ this->pore_type = PORETYPE_R9;
+
+ // Set the base model for this read to either the nucleotide or U->T RNA model
+ this->base_model[strand_idx] = PoreModelSet::get_model(kit, alphabet, strand_str, k);
+@@ -1122,11 +1122,11 @@
+ assert(f_p and f_p->is_open());
+ if (f_p->have_basecall_model(0))
+ {
+- pore_type = PT_R7;
++ pore_type = PORETYPE_R7;
+ }
+ else
+ {
+- pore_type = PT_R9;
++ pore_type = PORETYPE_R9;
+ }
+ }
+
+--- a/src/nanopolish_squiggle_read.h
++++ b/src/nanopolish_squiggle_read.h
+@@ -21,9 +21,9 @@
+
+ enum PoreType
+ {
+- PT_UNKNOWN = 0,
+- PT_R7,
+- PT_R9,
++ PORETYPE_UNKNOWN = 0,
++ PORETYPE_R7,
++ PORETYPE_R9,
+ };
+
+ // the type of the read
=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ add-shebang-to-script.patch
reproducible.patch
fix_remaining_python_interpreters.patch
staticMinimap2Library.patch
+rename_enum.patch
View it on GitLab: https://salsa.debian.org/med-team/nanopolish/-/compare/6fa303abb77cb1bc622aef3c3e45f4c9b48b5bd7...0d4caf1e51a7040872879917e8290cfbcfed73fe
--
View it on GitLab: https://salsa.debian.org/med-team/nanopolish/-/compare/6fa303abb77cb1bc622aef3c3e45f4c9b48b5bd7...0d4caf1e51a7040872879917e8290cfbcfed73fe
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210220/99cc7a0c/attachment-0001.htm>
More information about the debian-med-commit
mailing list