Source: skesa
Version: 2.4.0-6
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs
skesa fails to cross build from source, because debhelper overrides CC
with a C cross compilere while the upstream build system uses the CC
variable to contain a C++ compiler. I suggest adapting upstream source
code to use the more common CXX variable and am attaching a patch for
your convenience. If upstream does not like this patch, you may instead
try:
override_dh_auto_build:
dh_auto_build -- CC='$$(CXX)'
Helmut
--- skesa-2.4.0.orig/Makefile
+++ skesa-2.4.0/Makefile
@@ -39,7 +39,11 @@
NGS_INCL := -I $(NGS_PATH)/include
NGS_LIB := -L $(NGS_PATH)/lib64
-CC = c++ -std=c++11 -fdiagnostics-color=never
+ifeq ($(origin CXX),default)
+CXX = c++
+endif
+CFLAGS += -std=c++11 -fdiagnostics-color=never
+LDLAGS += -std=c++11 -fdiagnostics-color=never
CFLAGS += -Wall -Wno-format-y2k -pthread -fPIC -O3 -finline-functions -fstrict-aliasing \
-fomit-frame-pointer $(BOOST_INCL) $(NGS_INCL) $(VDB_INCL)
@@ -54,7 +58,7 @@
-lrt -ldl -lm -lpthread -lz
%.o: %.cpp
- $(CC) -c -o $@ $< $(CFLAGS)
+ $(CXX) -c -o $@ $< $(CFLAGS)
binaries=skesa gfa_connector kmercounter
@@ -69,15 +73,15 @@
skesa.o: common_util.hpp concurrenthash.hpp readsgetter.hpp ngs_includes.hpp counter.hpp graphdigger.hpp assembler.hpp KmerInit.hpp DBGraph.hpp Integer.hpp LargeInt.hpp LargeInt1.hpp LargeInt2.hpp Model.hpp config.hpp glb_align.hpp Makefile
skesa: skesa.o glb_align.o
- $(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
+ $(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
gfa_connector.o: gfa.hpp glb_align.hpp common_util.hpp concurrenthash.hpp readsgetter.hpp ngs_includes.hpp graphdigger.hpp KmerInit.hpp DBGraph.hpp Integer.hpp LargeInt.hpp LargeInt1.hpp LargeInt2.hpp Model.hpp config.hpp Makefile
gfa_connector: gfa_connector.o glb_align.o
- $(CC) -o $@ $^ $(LIBS)
+ $(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
kmercounter.o: common_util.hpp concurrenthash.hpp readsgetter.hpp ngs_includes.hpp counter.hpp graphdigger.hpp assembler.hpp KmerInit.hpp DBGraph.hpp Integer.hpp LargeInt.hpp LargeInt1.hpp LargeInt2.hpp Model.hpp config.hpp glb_align.hpp Makefile
kmercounter: kmercounter.o glb_align.o
- $(CC) -o $@ $^ $(LIBS)
+ $(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)
$(NGS_DIR)/ngs.done: