Skip to content

Commit da5cb68

Browse files
committed
fix #14
1 parent e517b0b commit da5cb68

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: vcfppR
22
Title: Rapid Manipulation of the Variant Call Format (VCF)
3-
Version: 0.7.4
3+
Version: 0.7.5
44
Authors@R: c(
55
person("Zilong", "Li", , "[email protected]", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0001-5859-2078")),

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# vcfppR 0.7.5
2+
* fix issue #14 to handle libdeflate dependency on linux
3+
4+
# vcfppR 0.7.4
5+
* fix issue #13 to speedup setRegion
6+
7+
# vcfppR 0.7.3
8+
* enable libdeflate on linux
9+
110
# vcfppR 0.7.2
211
* make `htslib` available for including and linking by other packages
312

configure

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,27 @@
44
set -e
55

66
HTSLIB_DIR="htslib-1.21"
7-
SRC_MAKEVAR="src/Makevars"
8-
echo "Create Makevar file"
9-
echo "PKG_CPPFLAGS=-I${HTSLIB_DIR} -I../inst/include" >$SRC_MAKEVAR
10-
11-
if [ "$(uname)" = "Darwin" ]; then
12-
echo "PKG_LIBS=${HTSLIB_DIR}/libhts.a -lz -lm -lbz2 -llzma -lcurl" >>$SRC_MAKEVAR
13-
else
14-
echo "PKG_LIBS=${HTSLIB_DIR}/libhts.a -ldeflate -lz -lm -lbz2 -llzma -lcurl" >>$SRC_MAKEVAR
15-
fi
167

178
echo "Configuring HTSlib in $HTSLIB_DIR"
189
cd src/$HTSLIB_DIR
1910
## copy file instead of symbolic linking
2011
cp htscodecs_bundled.mk htscodecs.mk
21-
if [ "$(uname)" = "Darwin" ]; then
22-
./configure --without-libdeflate CFLAGS="-O2 -fPIC"
23-
else
24-
./configure --with-libdeflate CFLAGS="-O2 -fPIC"
25-
fi
12+
./configure CFLAGS="-O2 -fPIC"
13+
14+
hasdeflate="no"
15+
if grep -wq "#define HAVE_LIBDEFLATE 1" config.h;then
16+
hasdeflate="yes"
17+
fi
2618

2719
make libhts.a
2820

21+
echo "Create Makevar file"
22+
cd ../../
23+
SRC_MAKEVAR="src/Makevars"
24+
echo "PKG_CPPFLAGS=-I${HTSLIB_DIR} -I../inst/include" >$SRC_MAKEVAR
25+
26+
if [ $hasdeflate = "no" ]; then
27+
echo "PKG_LIBS=${HTSLIB_DIR}/libhts.a -lz -lm -lbz2 -llzma -lcurl" >>$SRC_MAKEVAR
28+
else
29+
echo "PKG_LIBS=${HTSLIB_DIR}/libhts.a -ldeflate -lz -lm -lbz2 -llzma -lcurl" >>$SRC_MAKEVAR
30+
fi

0 commit comments

Comments
 (0)