[med-svn] [sambamba] 01/04: Try some patches to build with Debian tools

Andreas Tille tille at debian.org
Sun Mar 5 12:22:37 UTC 2017


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

tille pushed a commit to branch master
in repository sambamba.

commit 5cdcdc7a4130bffff8dd4707970766205f3ccd96
Author: Andreas Tille <tille at debian.org>
Date:   Sun Mar 5 13:10:53 2017 +0100

    Try some patches to build with Debian tools
---
 debian/control                     |  1 +
 debian/patches/guix_makefile.patch | 86 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series              |  5 ++-
 debian/rules                       |  3 ++
 4 files changed, 93 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 2799444..fe55d95 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Andreas Tille <tille at debian.org>
 Build-Depends: debhelper (>= 10),
                ldc,
+               libundead-dev,
                libbiod-dev,
                liblz4-dev,
                libhts-dev
diff --git a/debian/patches/guix_makefile.patch b/debian/patches/guix_makefile.patch
new file mode 100644
index 0000000..7879948
--- /dev/null
+++ b/debian/patches/guix_makefile.patch
@@ -0,0 +1,86 @@
+--- /dev/null
++++ b/Makefile.guix
+@@ -0,0 +1,83 @@
++# GNU Guix makefile
++#
++# To build sambamba on GNU Guix:
++#
++#   make -f Makefile.guix
++#
++# run with
++#
++#   ./build/sambamba
++
++# The following two are modified by the Guix package:
++D_COMPILER=ldc2
++LDC_LIB_PATH=$(HOME)/.guix-profile/lib
++
++DFLAGS = -wi -I. -IBioD -IundeaD/src
++DLIBS  = $(LDC_LIB_PATH)/libphobos2-ldc.a $(LDC_LIB_PATH)/libdruntime-ldc.a
++DLIBS_DEBUG = $(LDC_LIB_PATH)/libphobos2-ldc-debug.a $(LDC_LIB_PATH)/libdruntime-ldc-debug.a
++RPATH  = -L--rpath=$(dir $(realpath $(LDC_LIB_PATH)/libz.so)):$(dir $(realpath $(LDC_LIB_PATH)/liblz4.so))
++LIBS   = htslib/libhts.a -L-L$(LDC_LIB_PATH) -L-lrt -L-lpthread -L-lm -L-lz -L-llz4
++SRC    = $(wildcard main.d utils/*.d thirdparty/*.d cram/*.d) $(wildcard undeaD/src/undead/*.d) $(wildcard BioD/bio/*/*.d BioD/bio/*/*/*.d) $(wildcard sambamba/*.d sambamba/*/*.d sambamba/*/*/*.d)
++OBJ    = $(SRC:.d=.o) utils/ldc_version_info_.o
++OUT    = build/sambamba
++
++# The Guix targets resolve the RPATH automatically
++guix:        DFLAGS += -O -g -inline
++
++guix-debug:  DFLAGS += -O0 -g -d-debug
++
++# The development options are run from ~/.guix-profile and need to inject the RPATH
++debug:       DFLAGS += -O0 -g -d-debug $(RPATH) -link-debuglib
++
++release:     DFLAGS += -O -release -inline -noboundscheck $(RPATH)
++
++profile:     DFLAGS += -g -O -profile $(RPATH)
++
++guix release:             LIBS += $(DLIBS)
++
++guix-debug debug profile: LIBS += $(DLIBS_DEBUG)
++
++.PHONY: all guix guix-debug debug release profile clean test
++
++all: debug
++
++htslib-static:
++	cd htslib && $(MAKE)
++
++ldc-version-info:
++	./gen_ldc_version_info.py $(shell which ldmd2) > utils/ldc_version_info_.d
++
++utils/ldc_version_info_.o: ldc-version-info
++	$(D_COMPILER) $(DFLAGS) -c utils/ldc_version_info_.d -od=$(dir $@)
++
++build-setup: htslib-static ldc-version-info
++	mkdir -p build/
++
++guix guix-debug default debug release profile: $(OUT)
++
++# ---- Compile step
++%.o: %.d
++	$(D_COMPILER) $(DFLAGS) -c $< -od=$(dir $@)
++
++# ---- Link step
++$(OUT): build-setup $(OBJ)
++	$(D_COMPILER) $(DFLAGS) -of=build/sambamba $(OBJ) $(LIBS)
++
++test:
++	./.run_tests.sh
++
++debug-strip: debug
++	objcopy --only-keep-debug build/sambamba sambamba.debug
++	objcopy --strip-debug build/sambamba
++	objcopy --add-gnu-debuglink=sambamba.debug build/sambamba
++	mv sambamba.debug build/
++
++install:
++	install -m 0755 build/sambamba $(prefix)/bin
++
++clean: clean-d
++	cd htslib ; make clean
++
++clean-d:
++	rm -rf build/*
++	rm -f $(OBJ) $(OUT) trace.{def,log}
diff --git a/debian/patches/series b/debian/patches/series
index fffaae3..603fc00 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
-use_debian_packaged_libs.patch
-replace_rdmd.patch
+#use_debian_packaged_libs.patch
+#replace_rdmd.patch
+#guix_makefile.patch
diff --git a/debian/rules b/debian/rules
index ebb2835..e6afc4f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,3 +11,6 @@ export LC_ALL=C.UTF-8
 
 override_dh_auto_clean:
 	rm -rf build/
+
+override_dh_auto_build:
+	dh_auto_build --buildsystem=makefile -- -f Makefile.guix

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



More information about the debian-med-commit mailing list