Skip to content

Commit c628a79

Browse files
committed
Merge branch 'develop' (htslib-1.10 support)
Breaking changes! * 64-bit coordinates * Revamped namespace - dhtslib.* represents helpers, idiomatic D, utils not in htslib - htslib.* represents direct C bindings - htslib top level module name [i.e., not dhtslib.htslib.*] * SAM Header convenience structure (dhtslib.sam.header) Unfortunately in the merge dhtslib.cigar and dhtslib.md which had Windows line endings were replaced in their entirety so the diff may not show what (if anything) changed.
2 parents 00d2101 + 9e515da commit c628a79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+12455
-4311
lines changed

dstep/Makefile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
DSTEP=dstep --space-after-function-name=false
3+
4+
outputfiles=output/faidx.d output/kstring.d
5+
6+
all: $(outputfiles)
7+
.PHONY: all
8+
9+
vpath %.h include
10+
vpath %.diff patches
11+
12+
$(outputfiles): output/%.d: %.h %.diff
13+
$(DSTEP) $< -o /tmp/$(notdir $@)
14+
patch /tmp/$(notdir $@) -o $@ < patches/$*.diff
15+
16+
output/bgzf.d: /tmp/bgzf.d patches/bgzf.diff
17+
patch /tmp/bgzf.d -o output/bgzf.d < patches/bgzf.diff
18+
19+
/tmp/bgzf.d: include/bgzf.h
20+
dstep include/bgzf.h -o /tmp/bgzf.d
21+
22+
output/cram.d: /tmp/cram.d patches/cram.diff
23+
$(DSTEP) -o /tmp/cram.d include/cram.h
24+
patch /tmp/cram.d -o output/cram.d < patches/cram.diff
25+
26+

dstep/README

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Here we will use dstep (https://github.com/jacob-carlborg/dstep) to assist in
2+
conversion of htslib header files to D modules in the `htslib.*` namespace.
3+
4+
Importantly, dstep does not get things 100% right (or when it does, we may
5+
prefer e.g. an inline function instead of a generic templated fn to replace
6+
a #define; or we may wish to add deprecated("...") etc.), and so we will store
7+
a patch for each (?) file to track any further transformation(s) before it can
8+
go in-tree.
9+
10+
This will also be critically important when upgrading the bindings to a new
11+
library version, so that we do not have to manually track fixes to the auto-
12+
mated conversion and can re-apply them (assuming `patch` can locate the hunk)
13+
14+
Add new conversion to the Makefile

dstep/include

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../source/htslib/include-1.10/

0 commit comments

Comments
 (0)