Author: Michael R. Crusoe <crusoe@debian.org>
Description: For Debian, don't statically link to cairo, jansson, libstdc++, libgcc
Forwarded: not-needed
--- vg.orig/Makefile
+++ vg/Makefile
@@ -52,14 +52,14 @@
 
 # Define libraries to link against.
 LD_LIB_DIR_FLAGS := -L$(CWD)/$(LIB_DIR)
-LD_LIB_FLAGS := $(CWD)/$(LIB_DIR)/libvgio.a -lvcflib -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -ldivsufsort -ldivsufsort64 -lvcfh -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lfml -lstructures -lvw -lallreduce -lbdsg -lxg -lsdsl -lhandlegraph $(shell pkg-config --libs libfastahack) $(shell pkg-config --libs libsmithwaterman)
+LD_LIB_FLAGS := $(CWD)/$(LIB_DIR)/libvgio.a -lz -lvcflib -lgssw -lssw -lsublinearLS -lpthread -lncurses -lgcsa2 -lgbwtgraph -lgbwt -ldivsufsort -ldivsufsort64 -lvcfh -lraptor2 -lpinchesandcacti -l3edgeconnected -lsonlib -lfml -lstructures -lvw -lallreduce -lbdsg -lxg -lsdsl -lhandlegraph $(shell pkg-config --libs libfastahack) $(shell pkg-config --libs libsmithwaterman)
 # We omit Boost Program Options for now; we find it in a platform-dependent way.
 # By default it has no suffix
 BOOST_SUFFIX=""
 # We define some more libraries to link against at the end, in static linking mode if possible, so we can use faster non-PIC code.
-LD_STATIC_LIB_FLAGS := $(CWD)/$(LIB_DIR)/libhts.a -ldeflate -lz -lbz2 -llzma
+LD_STATIC_LIB_FLAGS := $(CWD)/$(LIB_DIR)/libhts.a -ldeflate -lz -llzma
 # Some of our static libraries depend on libraries that may not always be avilable in static form.
-LD_STATIC_LIB_DEPS := -lpthread -lm
+LD_STATIC_LIB_DEPS := -lpthread -lm -lbz2
 # Use pkg-config to find dependencies.
 # Always use --static so that we have the -l flags for transitive dependencies, in case we're doing a full static build.
 # But only force static linking of the dependencies we want to use non-PIC code for, for speed.
@@ -212,7 +212,7 @@
 # When building statically, we need to tell the linker not to bail if it sees multiple definitions.
 # libc on e.g. our Jenkins host does not define malloc as weak, so other mallocs can't override it in a static build.
 # TODO: Why did this problem only begin to happen when libvw was added?
-STATIC_FLAGS=-static -static-libstdc++ -static-libgcc -Wl,--allow-multiple-definition 
+STATIC_FLAGS=-static -Wl,--allow-multiple-definition 
 
 # These are put into libvg. Grab everything except main
 OBJ = $(filter-out $(OBJ_DIR)/main.o,$(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(wildcard $(SRC_DIR)/*.cpp)))
