Skip to content
Commits on Source (8)
libbiod (0.2.3+git20191120.b8eecef-1) UNRELEASED; urgency=medium
libbiod (0.2.3+git20191120.b8eecef-1) unstable; urgency=medium
[ Andreas Tille ]
* New upstream version
Closes: #912077
* debhelper-compat 12
* Standards-Version: 4.4.1
* libundead is not needed any more
* Remove old patches
* Use Makefile provided by upstream for building
* Rebuild to bump dependencies latest libphobos2-ldc-shared
Closes: 927166
Closes: #927166
* Remove obsolete fields Name from debian/upstream/metadata.
* Force making library
-- Andreas Tille <tille@debian.org> Tue, 19 Nov 2019 14:01:46 +0100
[ Matthias Klumpp ]
* respect-env-dflags.patch: Make Makefile respect environment flags
* d/watch: Look for release tags only again
* add-meson-build.patch: Build the software with Meson
* Build with optimization flags from upstream
* Ignore test failures for now (Closes: #917721)
* Include a static library build
-- Matthias Klumpp <mak@debian.org> Sun, 15 Dec 2019 12:36:12 +0100
libbiod (0.2.1-1) unstable; urgency=medium
......
......@@ -5,7 +5,7 @@ Section: science
Priority: optional
Build-Depends: debhelper-compat (= 12),
dh-dlang,
meson (>= 0.40),
meson (>= 0.48),
pkg-config,
zlib1g-dev
Standards-Version: 4.4.1
......@@ -16,8 +16,8 @@ Homepage: https://github.com/biod/BioD
Package: libbiod0
Architecture: any
Section: libs
Depends: ${shlibs:Depends},
${misc:Depends}
Depends: ${misc:Depends},
${shlibs:Depends}
Description: bioinformatics library in D
BioD is a fast and memory efficient bioinformatics library written in
the D programming language. BioD aims to:
......@@ -34,9 +34,9 @@ Description: bioinformatics library in D
Package: libbiod-dev
Architecture: any
Section: libdevel
Depends: ${shlibs:Depends},
Depends: libbiod0 (= ${binary:Version}),
${misc:Depends},
libbiod0 (= ${binary:Version})
${shlibs:Depends}
Description: bioinformatics library in D (development files)
BioD is a fast and memory efficient bioinformatics library written in
the D programming language. BioD aims to:
......
usr/include/d/bio/*
usr/lib/*/libbiod.a
usr/lib/*/libbiod.so
usr/lib/*/pkgconfig/biod.pc
Make the Makefile respect the environment flags Debian provides,
to fix builds.
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,9 @@
#
# make sharedlibrary : make shared library
-D_COMPILER=ldc2
-DFLAGS = -wi -g -relocation-model=pic -Icontrib/undead -L-lz
+DC ?= ldc2
+DFLAGS ?= -wi -g -relocation-model=pic
+DFLAGS += -Icontrib/undead -L-lz
ifndef GUIX
ifdef GUIX_ENVIRONMENT
@@ -34,11 +35,11 @@
default debug release static sharedlibrary: $(BIN)
%.o: %.d
- $(D_COMPILER) $(DFLAGS) -c $< -od=$(dir $@)
+ $(DC) $(DFLAGS) -c $< -od=$(dir $@)
$(BIN): $(OBJ)
$(info linking...)
- $(D_COMPILER) -main $(DFLAGS) $(OBJ) -of=$(BIN)
+ $(DC) -main $(DFLAGS) $(OBJ) -of=$(BIN)
check: $(BIN)
$(info running tests...)
From 6a5a4710d4600b939e7d3ef183be73756326b4b5 Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Sun, 15 Dec 2019 00:45:59 +0100
Subject: [PATCH] Add Meson build definition
---
meson.build | 184 ++++++++++++++++++++++++++++++++++++++++++++++
meson_options.txt | 1 +
2 files changed, 185 insertions(+)
create mode 100644 meson.build
create mode 100644 meson_options.txt
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..4408520
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,184 @@
+project('BioD', 'd',
+ meson_version : '>=0.48',
+ license : 'MIT',
+ version : '0.2.3',
+ default_options : ['buildtype=debugoptimized']
+)
+
+project_soversion = '0'
+
+src_dir = include_directories('.')
+pkgc = import('pkgconfig')
+
+extra_dflags = []
+if get_option('optimize_strong')
+ if meson.get_compiler('d').get_id() == 'gcc'
+ message('No custom strong optimization flags are defined for GDC yet.')
+ endif
+ extra_dflags = ['-O3', '-release', '-enable-inlining', '-boundscheck=off']
+endif
+
+#
+# Dependencies
+#
+zlib_dep = dependency('zlib')
+
+#
+# Sources
+#
+undead_src = [
+ 'contrib/undead/cstream.d',
+ 'contrib/undead/doformat.d',
+ 'contrib/undead/internal/file.d',
+ 'contrib/undead/stream.d',
+ 'contrib/undead/utf.d'
+]
+
+biod_src = [
+ 'bio/core/base.d',
+ 'bio/core/bgzf/block.d',
+ 'bio/core/bgzf/chunk.d',
+ 'bio/core/bgzf/compress.d',
+ 'bio/core/bgzf/constants.d',
+ 'bio/core/bgzf/inputstream.d',
+ 'bio/core/bgzf/outputstream.d',
+ 'bio/core/bgzf/virtualoffset.d',
+ 'bio/core/call.d',
+ 'bio/core/decompress.d',
+ 'bio/core/genotype.d',
+ 'bio/core/kmer.d',
+ 'bio/core/region.d',
+ 'bio/core/sequence.d',
+ 'bio/core/tinymap.d',
+ 'bio/core/utils/algo.d',
+ 'bio/core/utils/bylinefast.d',
+ 'bio/core/utils/exception.d',
+ 'bio/core/utils/format.d',
+ 'bio/core/utils/memoize.d',
+ 'bio/core/utils/outbuffer.d',
+ 'bio/core/utils/range.d',
+ 'bio/core/utils/roundbuf.d',
+ 'bio/core/utils/stream.d',
+ 'bio/core/utils/switchendianness.d',
+ 'bio/core/utils/tmpfile.d',
+ 'bio/core/utils/zlib.d',
+ 'bio/std/experimental/hts/bam/header.d',
+ 'bio/std/experimental/hts/bam/reader.d',
+ 'bio/std/experimental/hts/bam/writer.d',
+ 'bio/std/experimental/hts/bgzf.d',
+ 'bio/std/experimental/hts/bgzf_writer.d',
+ 'bio/std/experimental/hts/constants.d',
+ 'bio/std/experimental/hts/hashing.d',
+ 'bio/std/experimental/hts/logger.d',
+ 'bio/std/experimental/hts/pileup.d',
+ 'bio/std/experimental/hts/reads.d',
+ 'bio/std/experimental/hts/unpack.d',
+ 'bio/std/file/fai.d',
+ 'bio/std/file/fasta.d',
+ 'bio/std/file/fastq.d',
+ 'bio/std/genotype/maf.d',
+ 'bio/std/genotype/snp.d',
+ 'bio/std/hts/bam/abstractreader.d',
+ 'bio/std/hts/bam/bai/bin.d',
+ 'bio/std/hts/bam/baifile.d',
+ 'bio/std/hts/bam/bai/indexing.d',
+ 'bio/std/hts/bam/baseinfo.d',
+ 'bio/std/hts/bam/cigar.d',
+ 'bio/std/hts/bam/constants.d',
+ 'bio/std/hts/bam/md/core.d',
+ 'bio/std/hts/bam/md/operation.d',
+ 'bio/std/hts/bam/md/parse.d',
+ 'bio/std/hts/bam/md/reconstruct.d',
+ 'bio/std/hts/bam/multireader.d',
+ 'bio/std/hts/bam/pileup.d',
+ 'bio/std/hts/bam/randomaccessmanager.d',
+ 'bio/std/hts/bam/read.d',
+ 'bio/std/hts/bam/reader.d',
+ 'bio/std/hts/bam/readrange.d',
+ 'bio/std/hts/bam/reference.d',
+ 'bio/std/hts/bam/referenceinfo.d',
+ 'bio/std/hts/bam/region.d',
+ 'bio/std/hts/bam/splitter.d',
+ 'bio/std/hts/bam/tagvalue.d',
+ 'bio/std/hts/bam/validation/alignment.d',
+ 'bio/std/hts/bam/validation/samheader.d',
+ 'bio/std/hts/bam/writer.d',
+ 'bio/std/hts/iontorrent/flowcall.d',
+ 'bio/std/hts/iontorrent/flowindex.d',
+ 'bio/std/hts/sam/header.d',
+ 'bio/std/hts/sam/reader.d',
+ 'bio/std/hts/sam/utils/fastrecordparser.d',
+ 'bio/std/hts/sam/utils/recordparser.d',
+ 'bio/std/hts/snpcallers/maq.d',
+ 'bio/std/hts/snpcallers/simple.d',
+ 'bio/std/hts/thirdparty/msgpack.d',
+ 'bio/std/hts/utils/array.d',
+ 'bio/std/hts/utils/graph.d',
+ 'bio/std/hts/utils/samheadermerger.d',
+ 'bio/std/hts/utils/value.d',
+ 'bio/std/maf/block.d',
+ 'bio/std/maf/parser.d',
+ 'bio/std/maf/reader.d',
+ 'bio/std/range/splitter.d',
+ 'bio/std/sff/constants.d',
+ 'bio/std/sff/index.d',
+ 'bio/std/sff/read.d',
+ 'bio/std/sff/reader.d',
+ 'bio/std/sff/readrange.d',
+ 'bio/std/sff/utils/roundup.d',
+ 'bio/std/sff/writer.d'
+]
+
+tests_src = [
+ 'test/unittests.d'
+]
+
+#
+# Includes
+#
+install_subdir('bio/', install_dir: 'include/d/bio/')
+install_subdir('contrib/undead', install_dir: 'include/d/bio/contrib/')
+
+#
+# Library and pkg-config
+#
+biod_lib = both_libraries('biod',
+ [undead_src, biod_src],
+ dependencies: [zlib_dep],
+ install: true,
+ version: meson.project_version(),
+ soversion: project_soversion,
+ d_args: extra_dflags
+)
+pkgc.generate(name: 'biod',
+ libraries: biod_lib,
+ subdirs: 'd/bio/',
+ version: meson.project_version(),
+ description: 'D library for computational biology and bioinformatics'
+)
+
+#
+# Tests
+#
+
+# workaround for GDC having no -main switch
+test_main_src = join_paths(meson.build_root(), 'utmain.d')
+run_command('sh',
+ ['-c', 'echo "void main () {}" > ' + test_main_src],
+ check: true)
+
+biod_test_exe = executable('biod_test',
+ [undead_src,
+ biod_src,
+ tests_src,
+ test_main_src],
+ dependencies: [zlib_dep],
+ d_unittest: true,
+ d_args: extra_dflags
+)
+test('biod_tests',
+ biod_test_exe,
+ args: ['--DRT-gcopt=gc:precise disable:1 cleanup:none'],
+ workdir: join_paths(meson.source_root(), 'test'),
+ is_parallel: false
+)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..607da9a
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1 @@
+option('optimize_strong', type : 'boolean', value: false)
--
2.24.0
fix_clean_target.patch
01_fix_clean_target.patch
02_respect-env-dflags.patch
03_add-meson-build.patch
......@@ -2,13 +2,16 @@
# DH_VERBOSE := 1
include /usr/share/dh-dlang/dlang-flags.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@
dh $@ --buildsystem=meson
override_dh_auto_build:
$(MAKE) sharedlibrary
override_dh_auto_configure:
dh_auto_configure -- -Doptimize_strong=true
override_dh_missing:
dh_missing --list-missing
dh_missing --fail-missing
override_dh_auto_test:
# we ignore test failures for now, the tests fail to find a few files correctly
-dh_auto_test
version=4
# https://github.com/biod/BioD/releases .*/archive/v(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
# just for testing
opts="mode=git,pretty=0.2.3+git%cd.%h" \
https://github.com/biod/BioD.git HEAD
https://github.com/biod/BioD/tags .*/v?(\d\S*)\.tar\.gz