[med-svn] [Git][med-team/diann][master] 3 commits: Fix syntax properly
Nilesh Patra (@nilesh)
gitlab at salsa.debian.org
Tue Jan 18 18:41:29 GMT 2022
Nilesh Patra pushed to branch master at Debian Med / diann
Commits:
079d9125 by Nilesh Patra at 2022-01-18T09:55:55-08:00
Fix syntax properly
- - - - -
2a2eed21 by Nilesh Patra at 2022-01-18T10:38:30-08:00
Add patch to initialise Makefile for easier maintainence
- - - - -
200f412d by Nilesh Patra at 2022-01-18T10:39:14-08:00
Remove home grown commands from d/rules, declare buildsystem as makefile
- - - - -
4 changed files:
- + debian/patches/Makefile.patch
- debian/patches/fix_syntax.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/patches/Makefile.patch
=====================================
@@ -0,0 +1,29 @@
+Description: Initialise makefile for building the package
+Author: Nilesh Patra <nilesh at debian.org>
+Last-Update: 2022-01-18
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,22 @@
++CXX ?= g++
++LD = g++
++PROG = bin/diann
++OBJS = src/diann.o
++CXXFLAGS = -Wformat -Werror=format-security -std=c++17 -fpermissive -O3 -mfpmath=sse \
++ -I/usr/include/libmstoolkit \
++ -I/usr/include/eigen3 \
++ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H
++
++all: $(PROG)
++
++src/diann.cpp.o: src/diann.cpp
++ $(CXX) $(CXXFLAGS) -c $@ $<
++
++$(PROG): $(OBJS)
++ mkdir -p bin/
++ $(LD) -o $@ $< -lpthread -lmstoolkitlite -lstdc++fs $(LDFLAGS)
++
++clean:
++ rm -f src/diann.o bin/diann
++
++.PHONY: clean
+\ No newline at end of file
=====================================
debian/patches/fix_syntax.patch
=====================================
@@ -4,7 +4,7 @@ Description: Fix C++ syntax
--- a/src/diann.cpp
+++ b/src/diann.cpp
-@@ -606,6 +606,7 @@ bool load_unimod() {
+@@ -606,6 +606,7 @@
}
}
in.close();
@@ -12,3 +12,62 @@ Description: Fix C++ syntax
}
void init_unimod() {
+@@ -2549,12 +2550,22 @@
+ auto pos = std::lower_bound(frm.begin(), frm.end(), query);
+ if (pos == frm.end()) continue;
+ while (pos->mz < high) {
+- if (open && iter == 1 && pos->charge != 1) goto finish;
++ if (open && iter == 1 && pos->charge != 1) {
++ pos++;
++ if (pos == frm.end())
++ break;
++ continue;
++ }
+ auto &pr = precursors[pos->pr];
+ if ((open || (pr.first > min && pr.first < max)) && pr.second == charge) {
+ if (size <= pos->pr) size = ((pos->pr * 5) / 4) + 1, temp.resize(size);
+ auto &match = temp[pos->pr].hit;
+- if (p.score <= match[SCSFr - 1].score) goto finish;
++ if (p.score <= match[SCSFr - 1].score) {
++ pos++;
++ if (pos == frm.end())
++ break;
++ continue;
++ }
+ int fr, j; if (open) fr = pos->index;
+
+ for (i = 0; i < SCSFr - 1; i++) {
+@@ -2580,9 +2591,6 @@
+ if (open) match[j].fr = fr;
+ }
+ }
+- finish:
+- pos++;
+- if (pos == frm.end()) break;
+ }
+ }
+
+@@ -5391,12 +5399,13 @@
+ }
+
+ int tot_pr = 0; for (i = 0; i < prs_n; i++) if (prn[i]) tot_pr++;
++ int ni = indices.size();
+ if (tot_pr < 2) {
+ for (i = 0; i < n_s; i++) quantities[i] = reference[i];
+ goto save;
+ }
+
+- int ni = indices.size();
++
+ B.resize(ni); A.resize(ni, ni);
+ for (i = 0; i < ni; i++) {
+ B(i) = 0.0;
+@@ -10869,7 +10878,7 @@
+ lib.close();
+
+ Run run(0);
+- run.load("D:/Raw/USP/20181113_normalswath_4.wiff.dia");
++ run.load((char*)"D:/Raw/USP/20181113_normalswath_4.wiff.dia");
+ run.init();
+
+ ms1_rt.resize(run.ms1h.size()), ms1_peak_n.resize(run.ms1h.size());
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
use_debian_packaged_eigen3.patch
fix_syntax.patch
+Makefile.patch
=====================================
debian/rules
=====================================
@@ -9,17 +9,4 @@ include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
%:
- dh $@
-
-# Options removed from ../linux-build-gcc-7: -static -msse2 -march=core2
-override_dh_auto_build:
- mkdir -p bin
- # Does not build with option `-fstack-protector-strong` (--> needs -fpermissive for some goto statements)
- g++ -Wformat -Werror=format-security -o bin/diann.o \
- src/diann.cpp \
- -std=c++17 -fpermissive -O3 -mfpmath=sse\
- -I/usr/include/libmstoolkit \
- -I/usr/include/eigen3 \
- -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DGCC -DHAVE_EXPAT_CONFIG_H
- $(LD) -o bin/diann \
- -lpthread -lstdc++fs -lmstoolkitlite # $(LDFLAGS)
+ dh $@ --buildsystem=makefile
View it on GitLab: https://salsa.debian.org/med-team/diann/-/compare/217fee6950d68b44f0d01ab291e830ecb04ddf3b...200f412dbfd639c94069408afa06cb043ce4825a
--
View it on GitLab: https://salsa.debian.org/med-team/diann/-/compare/217fee6950d68b44f0d01ab291e830ecb04ddf3b...200f412dbfd639c94069408afa06cb043ce4825a
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/20220118/53d67deb/attachment-0001.htm>
More information about the debian-med-commit
mailing list