Skip to content

Commit

Permalink
Reintroducing lz4 because Debian recently dropped lz4frames.h and rel…
Browse files Browse the repository at this point in the history
…ated

functions from the liblz4-dev package(!?)
  • Loading branch information
pjotrp committed Jul 30, 2018
1 parent 0e7e6fb commit 1e26e6c
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[submodule "htslib"]
path = htslib
url = https://github.com/lomereiter/htslib.git
[submodule "undeaD"]
path = undeaD
url = https://github.com/dlang/undeaD
[submodule "BioD"]
path = BioD
url = https://github.com/biod/BioD.git
[submodule "lz4"]
path = lz4
url = https://github.com/lz4/lz4.git
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
language: d
d:
- ldc
matrix:
# OSX testing is under development
allow_failures:
- os: osx
include:
- os: linux
compiler: gcc
addons:
apt:
packages:
# Our dev environment is a more recent GNU C++
# note that Debian liblz4-dev no longer supports LZ4 frames
# - liblz4-dev
- shunit2
- os: osx
compiler: clang
script:
- make
- make test
1 change: 1 addition & 0 deletions BioD
Submodule BioD added at dd07f3
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DFLAGS = -wi -I. -IBioD -IundeaD/src -g

DLIBS = $(LIBRARY_PATH)/libphobos2-ldc.a $(LIBRARY_PATH)/libdruntime-ldc.a
DLIBS_DEBUG = $(LIBRARY_PATH)/libphobos2-ldc-debug.a $(LIBRARY_PATH)/libdruntime-ldc-debug.a
LIBS = htslib/libhts.a -L-llz4 -L-L$(LIBRARY_PATH) -L-lrt -L-lpthread -L-lm
LIBS = htslib/libhts.a lz4/lib/liblz4.a -L-L$(LIBRARY_PATH) -L-lrt -L-lpthread -L-lm
LIBS_STATIC = $(LIBRARY_PATH)/libc.a $(DLIBS) htslib/libhts.a $(LIBRARY_PATH)/liblz4.a
SRC = $(wildcard main.d utils/*.d thirdparty/*.d cram/*.d) $(wildcard undeaD/src/undead/*.d) $(wildcard BioD/bio/*/*.d BioD/bio/*/*/*.d BioD/bio2/*.d BioD/bio2/*/*.d) $(wildcard sambamba/*.d sambamba/*/*.d sambamba/*/*/*.d)
OBJ = $(SRC:.d=.o) utils/ldc_version_info_.o
Expand All @@ -40,6 +40,11 @@ pgo-static: DFLAGS += -fprofile-instr-use=profile.data

all: release

lz4-static: lz4/lib/liblz4.a

lz4/lib/liblz4.a: lz4/lib/lz4.c lz4/lib/lz4hc.c lz4/lib/lz4frame.c lz4/lib/xxhash.c
cd lz4/lib && gcc -O3 -c lz4.c lz4hc.c lz4frame.c xxhash.c && $(AR) rcs liblz4.a lz4.o lz4hc.o lz4frame.o xxhash.o

htslib-static:
cd htslib && $(MAKE)

Expand All @@ -50,7 +55,7 @@ ldc-version-info:
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
build-setup: lz4-static htslib-static ldc-version-info
mkdir -p bin/

default debug release static: $(OUT)
Expand Down
1 change: 1 addition & 0 deletions lz4
Submodule lz4 added at b3692d
1 change: 1 addition & 0 deletions undeaD
Submodule undeaD added at 14540c

0 comments on commit 1e26e6c

Please sign in to comment.