subread -- Request for review
Hi,
I noticed that src:subread has unstisfiablity for python3. Since python3 and bc are test-only deps, I annotated them with a <!nocheck>
Situation improved -- post that, It failed with weird linker errors, this was due to using build-compiler than the host compiler and it seems to be also due to hardcoding "make" in d/rules
On patching needed stuff and changing d/rules to not use "make", build seems to work well. There are help2man generations at build time, removing which it looks OK -- ofcourse, in the package I'll use createmanpages script than removing them
The patch of the fixes I proposed is attached with the mail, please consider taking a look.
Nilesh
diff --git a/debian/control b/debian/control
index a02d6b1..b05d7fb 100644
--- a/debian/control
+++ b/debian/control
@@ -5,11 +5,11 @@ Uploaders: Alexandre Mestiashvili <mestia@debian.org>,
Nilesh Patra <nilesh@debian.org>
Section: science
Priority: optional
-Build-Depends: bc,
+Build-Depends: bc <!nocheck>,
debhelper-compat (= 12),
help2man,
- python3,
- zlib1g-dev
+ python3 <!nocheck>,
+ zlib1g-dev,
Standards-Version: 4.5.0
Vcs-Browser: https://salsa.debian.org/med-team/subread
Vcs-Git: https://salsa.debian.org/med-team/subread.git
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 0000000..06ef778
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,121 @@
+--- a/src/Makefile.Linux
++++ b/src/Makefile.Linux
+@@ -1,7 +1,7 @@
+ #MACOS = -D MACOS
+
+
+-CC_EXEC = gcc
++CC ?= gcc
+ OPT_LEVEL = 3
+
+ include makefile.version
+@@ -9,7 +9,7 @@
+
+ CCFLAGS += -O${OPT_LEVEL} -fsigned-char -Wall -DMAKE_FOR_EXON -D MAKE_STANDALONE -D SUBREAD_VERSION=\"${SUBREAD_VERSION}\" -D_FILE_OFFSET_BITS=64 ${WARNING_LEVEL}
+ LDFLAGS += ${STATIC_MAKE} -pthread -lz -O${OPT_LEVEL} -DMAKE_FOR_EXON -D MAKE_STANDALONE -lm
+-CC = ${CC_EXEC} ${CCFLAGS} ${CFLAGS} ${CPPFLAGS} -fmessage-length=0 -ggdb
++CFLAGS += ${CCFLAGS} -fmessage-length=0 -ggdb
+
+
+ ALL_LIBS= core core-junction core-indel sambam-file sublog gene-algorithms hashtable input-files sorted-hashtable gene-value-index exon-algorithms HelperFunctions interval_merge long-hashtable core-bigtable seek-zlib input-blc
+@@ -38,55 +38,55 @@
+ cd longread-one && $(MAKE)
+
+ genRandomReads: gen_rand_reads.c ${ALL_OBJECTS}
+- ${CC} -o genRandomReads gen_rand_reads.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o genRandomReads gen_rand_reads.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ flattenGTF: flattenAnnotations.c ${ALL_OBJECTS}
+- ${CC} -o flattenGTF flattenAnnotations.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o flattenGTF flattenAnnotations.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ detectionCall: detection-calls.c ${ALL_OBJECTS}
+- ${CC} -o detectionCall detection-calls.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o detectionCall detection-calls.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ repair: read-repair.c ${ALL_OBJECTS}
+- ${CC} -o repair read-repair.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o repair read-repair.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ txUnique: tx-unique.c tx-unique.h ${ALL_OBJECTS}
+- ${CC} -o txUnique tx-unique.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o txUnique tx-unique.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ globalReassembly: global-reassembly.c ${ALL_OBJECTS}
+- ${CC} -o globalReassembly global-reassembly.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o globalReassembly global-reassembly.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ propmapped: propmapped.c ${ALL_OBJECTS}
+- ${CC} -o propmapped propmapped.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o propmapped propmapped.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ exactSNP: SNPCalling.c SNPCalling.h ${ALL_OBJECTS}
+- ${CC} -o exactSNP SNPCalling.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o exactSNP SNPCalling.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ subread-buildindex: index-builder.c subread.h ${ALL_OBJECTS}
+- ${CC} -o subread-buildindex index-builder.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o subread-buildindex index-builder.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ removeDup: removeDupReads.c removeDupReads.h subread.h ${ALL_OBJECTS}
+- ${CC} -o removeDup removeDupReads.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o removeDup removeDupReads.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ subindel: SUBindel.c core.h subread.h ${ALL_OBJECTS}
+- ${CC} -o subindel SUBindel.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o subindel SUBindel.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ featureCounts: readSummary.c subread.h ${ALL_OBJECTS}
+- ${CC} -o featureCounts readSummary.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o featureCounts readSummary.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ subread-align: core-interface-aligner.c ${ALL_OBJECTS}
+- ${CC} -o subread-align core-interface-aligner.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o subread-align core-interface-aligner.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ subjunc: core-interface-subjunc.c ${ALL_OBJECTS}
+- ${CC} -o subjunc core-interface-subjunc.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o subjunc core-interface-subjunc.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ subtools: subtools.c ${ALL_OBJECTS}
+- ${CC} -o subtools subtools.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o subtools subtools.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ qualityScores: qualityScores.c ${ALL_OBJECTS}
+- ${CC} -o qualityScores qualityScores.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o qualityScores qualityScores.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ subread-fullscan: fullscan.c ${ALL_OBJECTS}
+- ${CC} -o subread-fullscan fullscan.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} ${CFLAGS} ${CPPFLAGS} -o subread-fullscan fullscan.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ clean:
+ rm -f core featureCounts exactSNP removeDup subread-buildindex ${ALL_OBJECTS}
+--- a/src/longread-one/Makefile
++++ b/src/longread-one/Makefile
+@@ -1,4 +1,4 @@
+-CC_EXEC = gcc
++CC ?= gcc
+ OPT_LEVEL = 3
+
+ include ../makefile.version
+@@ -6,7 +6,7 @@
+
+ CCFLAGS += -O${OPT_LEVEL} -Wall -DMAKE_FOR_EXON -D MAKE_STANDALONE -D_FILE_OFFSET_BITS=64 -DSUBREAD_VERSION=\"${SUBREAD_VERSION}\" ${WARNING_LEVEL} ${MINGW32}
+ LDFLAGS += -lpthread -lz -lm -O${OPT_LEVEL} -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST
+-CC = ${CC_EXEC} ${CFLAGS} ${CPPFLAGS} ${CCFLAGS} -fmessage-length=0 -ggdb
++CFLAGS += ${CCFLAGS} -fmessage-length=0 -ggdb
+
+ ALL_LIBS=LRMsorted-hashtable LRMbase-index LRMchro-event LRMhelper LRMseek-zlib LRMfile-io LRMhashtable
+ ALL_OBJECTS=$(addsuffix .o, ${ALL_LIBS})
+@@ -20,8 +20,8 @@
+ rm -f *.o LRM
+
+ LRM: longread-mapping.c ${ALL_OBJECTS}
+- ${CC} -o LRM longread-mapping.c ${ALL_OBJECTS} ${LDFLAGS}
++ ${CC} $(CFLAGS) $(CPPFLAGS) -o LRM longread-mapping.c ${ALL_OBJECTS} ${LDFLAGS}
+
+ $(ALL_OBJECTS): $(ALL_C) $(ALL_H)
+- $(CC) -o $@ -c $(subst .o,.c,$@)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $(subst .o,.c,$@)
+
diff --git a/debian/patches/series b/debian/patches/series
index df88836..365cb18 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ fix_ftbfs_kfreebsd.patch
arch_specific_flags.patch
2to3.patch
gcc10.patch
+cross.patch
diff --git a/debian/rules b/debian/rules
index bcbc09a..738d5c7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,7 +24,7 @@ endif
dh $@
override_dh_clean:
- cd src; make -f Makefile.Linux clean
+ cd src && rm -f core featureCounts exactSNP removeDup subread-buildindex
dh_clean
override_dh_auto_clean:
@@ -34,8 +34,7 @@ override_dh_auto_clean:
find . -name "*.o" -delete
override_dh_auto_build:
- cd src; make -f Makefile.Linux
- dh_auto_build -- CC=$(CC)
+ dh_auto_build --sourcedirectory=src -- -f Makefile.Linux CC=$(CC)
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
Reply to: