[med-svn] [libvcflib] 01/01: Enable creation of shared library

Andreas Tille tille at debian.org
Thu Sep 15 13:24:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository libvcflib.

commit 41aa13cf838d7509cfa5df31c58cf6b16086e60c
Author: Andreas Tille <tille at debian.org>
Date:   Thu Sep 15 15:18:59 2016 +0200

    Enable creation of shared library
---
 debian/patches/series           |  1 +
 debian/patches/shared_lib.patch | 99 +++++++++++++++++++++++++++++++++++++++++
 debian/rules                    | 15 -------
 3 files changed, 100 insertions(+), 15 deletions(-)

diff --git a/debian/patches/series b/debian/patches/series
index ec7bf95..e734ebe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ multichoose.h.patch
 filevercmp.h.patch
 use_debian_packaged_fastahack.patch
 intervaltree.patch
+shared_lib.patch
diff --git a/debian/patches/shared_lib.patch b/debian/patches/shared_lib.patch
new file mode 100644
index 0000000..2c4d792
--- /dev/null
+++ b/debian/patches/shared_lib.patch
@@ -0,0 +1,99 @@
+--- a/Makefile
++++ b/Makefile
+@@ -115,11 +115,11 @@ BINS = $(addprefix bin/,$(notdir $(BIN_S
+ SHORTBINS = $(notdir $(BIN_SOURCES:.cpp=))
+ 
+ # TABIX = tabixpp/tabix.o
+-SMITHWATERMAN = smithwaterman/SmithWatermanGotoh.o
+-REPEATS = smithwaterman/Repeats.o
+-INDELALLELE = smithwaterman/IndelAllele.o
+-DISORDER = smithwaterman/disorder.o
+-LEFTALIGN = smithwaterman/LeftAlign.o
++# SMITHWATERMAN = smithwaterman/SmithWatermanGotoh.o
++# REPEATS = smithwaterman/Repeats.o
++# INDELALLELE = smithwaterman/IndelAllele.o
++# DISORDER = smithwaterman/disorder.o
++# LEFTALIGN = smithwaterman/LeftAlign.o
+ FSOM = fsom/fsom.o
+ FILEVERCMP = filevercmp/filevercmp.o
+ 
+@@ -138,8 +138,11 @@ CXXFLAGS = -O3 -D_FILE_OFFSET_BITS=64 -s
+ 
+ SSW = src/ssw.o src/ssw_cpp.o
+ 
+-ssw.o: src/ssw.h
+-ssw_cpp.o:src/ssw_cpp.h
++src/ssw.o: src/ssw.h src/ssw.c
++	$(CXX) -c $(CFLAGS) -fPIC -o $@ src/$(*F).c
++
++src/ssw_cpp.o: src/ssw_cpp.cpp src/ssw_cpp.h
++	$(CXX) -c $(CFLAGS) -fPIC -o $@ src/$(*F).cpp
+ 
+ openmp:
+ 	$(MAKE) CXXFLAGS="$(CXXFLAGS) -fopenmp -D HAS_OPENMP"
+@@ -151,7 +154,7 @@ gprof:
+ 	$(MAKE) CXXFLAGS="$(CXXFLAGS) -pg" all
+ 
+ $(OBJECTS): $(SOURCES) $(HEADERS) multichoose pre $(SMITHWATERMAN) $(FILEVERCMP)
+-	$(CXX) -c -o $@ src/$(*F).cpp $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) && cp src/*.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/
++	$(CXX) -c $(CFLAGS) -fPIC -o $@ src/$(*F).cpp $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) && cp src/*.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/
+ 
+ multichoose: pre
+ 	echo "Source does not contain dir multichoose"
+@@ -162,22 +165,6 @@ intervaltree: pre
+ 	# cd intervaltree && $(MAKE) && cp *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/
+ 	mkdir -p $(VCF_LIB_LOCAL)/$(INC_DIR)/ && cp -a debian/include/* $(VCF_LIB_LOCAL)/$(INC_DIR)/
+ 
+-$(TABIX): pre
+-	echo "No need to create separately packaged tabixpp"
+-	# cd tabixpp && $(MAKE) && cp *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/
+-
+-$(SMITHWATERMAN): pre
+-	echo "Source does not contain dir smithwaterman"
+-	# cd smithwaterman && $(MAKE) && cp *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && cp *.o $(VCF_LIB_LOCAL)/$(OBJ_DIR)/
+-
+-$(DISORDER): $(SMITHWATERMAN)
+-
+-$(REPEATS): $(SMITHWATERMAN)
+-
+-$(LEFTALIGN): $(SMITHWATERMAN)
+-
+-$(INDELALLELE): $(SMITHWATERMAN)
+-
+ #$(FSOM):
+ #	cd fsom && $(CXX) $(CXXFLAGS) -c fsom.c -lm
+ 
+@@ -186,18 +173,19 @@ $(FILEVERCMP): pre
+ 	#cp /usr/share/gnulib/lib/filevercmp.* filevercmp
+ 	#echo 'Proper use of filevercmp would be: `gnulib-tool --import filevercmp` - but it needs ./configure.ac'
+ 	#We here go with quilt patches from upstream files
+-	cd filevercmp && $(CXX) $(CXXFLAGS) -c filevercmp.c
++	cd filevercmp && $(CXX) $(CXXFLAGS) -fPIC -c filevercmp.c
+ 	ln -sf ../filevercmp/filevercmp.h $(VCF_LIB_LOCAL)/$(INC_DIR)/filevercmp.h
+ 
+ $(SHORTBINS): pre
+ 	$(MAKE) bin/$@
+ 
+-$(BINS): $(BIN_SOURCES) libvcflib.a $(OBJECTS) $(SMITHWATERMAN) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre intervaltree
++$(BINS): $(BIN_SOURCES) libvcflib.so $(OBJECTS) $(SMITHWATERMAN) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre intervaltree
+ 	$(CXX) src/$(notdir $@).cpp -o $@ $(INCLUDES) $(LDFLAGS) $(CXXFLAGS)
+ 
+-libvcflib.a: $(OBJECTS) $(SMITHWATERMAN) $(REPEATS) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre
+-	ar rs libvcflib.a $(OBJECTS) $(SSW) $(FILEVERCMP)
+-	cp libvcflib.a $(LIB_DIR)
++libvcflib.so: $(OBJECTS) $(SMITHWATERMAN) $(REPEATS) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre
++	# ar rs libvcflib.a $(OBJECTS) $(SSW) $(FILEVERCMP)
++	gcc -shared -o $@ $(OBJECTS) $(SSW) $(FILEVERCMP) 
++	cp -a $@ $(LIB_DIR)
+ 
+ 
+ test: $(BINS)
+@@ -218,7 +206,7 @@ update: pull all
+ clean:
+ 	rm -f $(BINS) $(OBJECTS)
+ 	rm -f ssw_cpp.o ssw.o
+-	rm -f libvcflib.a
++	rm -f libvcflib.so
+ 	rm -rf $(BIN_DIR)
+ 	rm -rf $(LIB_DIR)
+ 	rm -rf $(INC_DIR)
diff --git a/debian/rules b/debian/rules
index 31515db..860ff26 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,20 +2,6 @@
 
 # DH_VERBOSE := 1
 
-# some helpful variables - uncomment them if needed
-# shamelessly stolen from http://jmtd.net/log/awk/
-#DEBVERS        := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
-#VERSION        := $(shell echo '$(DEBVERS)' | sed -e 's/^[0-9]*://' -e 's/-.*//')
-#DEBFLAVOR      := $(shell dpkg-parsechangelog | awk '/^Distribution:/ {print $$2}')
-#DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
-#DEBIAN_BRANCH  := $(shell awk 'BEGIN{FS="[= ]+"} /debian-branch/ {print $$2}' debian/gbp.conf)
-#GIT_TAG        := $(subst ~,_,$(VERSION))
-
-# alternatively to manually set those variables you can
-#  include /usr/share/cdbs/1/rules/buildvars.mk
-# and use what is set there.  Any hint whether dh might set variables in
-# a similar manner are welcome.
-
 %:
 	dh $@
 
@@ -26,4 +12,3 @@ override_dh_clean:
 override_dh_auto_build:
 	dh_auto_build
 	markdown_py -f README.html README.md
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libvcflib.git



More information about the debian-med-commit mailing list