pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
vcflib: update & cleanup
Module Name: pkgsrc-wip
Committed By: Winston Weinert <winston%ml1.net@localhost>
Pushed By: winston
Date: Fri Mar 30 08:02:58 2018 -0500
Changeset: f47af7a5fa9c8a5ea124d21ae5992bbf564f0549
Modified Files:
vcflib/Makefile
vcflib/PLIST
vcflib/distinfo
Added Files:
vcflib/files/Makefile.external-libs
vcflib/patches/patch-src_cdflib.cpp
Log Message:
vcflib: update & cleanup
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f47af7a5fa9c8a5ea124d21ae5992bbf564f0549
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
vcflib/Makefile | 43 ++++----
vcflib/PLIST | 35 +++++-
vcflib/distinfo | 9 +-
vcflib/files/Makefile.external-libs | 208 ++++++++++++++++++++++++++++++++++++
vcflib/patches/patch-src_cdflib.cpp | 14 +++
5 files changed, 284 insertions(+), 25 deletions(-)
diffs:
diff --git a/vcflib/Makefile b/vcflib/Makefile
index f5445b32b4..8ca6d44c23 100644
--- a/vcflib/Makefile
+++ b/vcflib/Makefile
@@ -6,11 +6,11 @@
DISTNAME= vcflib-${PORTVERSION}
CATEGORIES= biology
-MASTER_SITES= ${MASTER_SITE_GITHUB:=outpaddling/}
-GITHUB_TAG= ${PORTVERSION}
+MASTER_SITES= ${MASTER_SITE_GITHUB:=vcflib/}
+GITHUB_TAG= 7e3d8066a6c6c0f22191a70d050ead23f9c453b3
MAINTAINER= bacon%NetBSD.org@localhost
-HOMEPAGE= http://example.com
+HOMEPAGE= https://github.com/vcflib/vcflib
COMMENT= C++ library and CLI tools for parsing and manipulating VCF files
LICENSE= mit
@@ -23,26 +23,31 @@ USE_TOOLS+= gmake
# FreeBSD's SHEBANG_FILES may include bash, perl, python, etc.
# I don't know which is which, so you'll have to finish.
# Add bash, etc. to USE_TOOLS if used below.
-#
-# REPLACE_SH=
-# REPLACE_BASH=
-# REPLACE_CSH=
-# REPLACE_KSH=
-# REPLACE_PERL=
-# REPLACE_PYTHON=
+#
+# REPLACE_SH=
+# REPLACE_BASH=
+# REPLACE_CSH=
+# REPLACE_KSH=
+# REPLACE_PERL=
+# REPLACE_PYTHON=
+
+pre-configure:
+ ${CP} ${FILESDIR}/Makefile.external-libs ${WRKSRC}
+
+post-install:
+ cd ${DESTDIR}${PREFIX}/lib && ${LN} -s libvcflib.so.1 libvcflib.so
+
+CXXFLAGS+= -I${PREFIX}/include/smithwaterman \
+ -I${PREFIX}/include/multichoose \
+ -I${PREFIX}/include/filevercmp \
+ -I${PREFIX}/include/fastahack \
+ -I${PREFIX}/include/intervaltree \
+ -DVERSION='"${PORTVERSION}"'
-CXXFLAGS+= -I${LOCALBASE}/include/smithwaterman \
- -I${LOCALBASE}/include/multichoose \
- -I${LOCALBASE}/include/filevercmp \
- -I${LOCALBASE}/include/fastahack \
- -I${LOCALBASE}/include/intervaltree
MAKE_FILE= Makefile.external-libs
INSTALL_TARGET= install-strip
-# PORTVERSION= 6451cf639cc7d735137218c4b08f597ba9dd6e73
-PORTVERSION= 790904320065e603c6af5b8a32f635134354467c
-DATADIR= ${PREFIX}/share/vcflib
-DOCSDIR= ${PREFIX}/share/doc/vcflib
+PORTVERSION= 0.0.0.20180208
#SUBST_CLASSES+= ldflags
#SUBST_FILES.ldflags= ${WRKSRC}/Makefile.external-libs
diff --git a/vcflib/PLIST b/vcflib/PLIST
index e4ce04d293..6b9b9749ac 100644
--- a/vcflib/PLIST
+++ b/vcflib/PLIST
@@ -1,4 +1,23 @@
@comment $NetBSD$
+bin/LD
+bin/abba-baba
+bin/bFst
+bin/dumpContigsFromHeader
+bin/genotypeSummary
+bin/hapLrt
+bin/iHS
+bin/meltEHH
+bin/normalize-iHS
+bin/pFst
+bin/pVst
+bin/permuteGPAT++
+bin/permuteSmooth
+bin/plotHaps
+bin/popStats
+bin/segmentFst
+bin/segmentIhs
+bin/sequenceDiversity
+bin/smoother
bin/vcf2dag
bin/vcf2fasta
bin/vcf2tsv
@@ -43,6 +62,8 @@ bin/vcfkeepinfo
bin/vcfkeepsamples
bin/vcfleftalign
bin/vcflength
+bin/vcfnormalizesvs
+bin/vcfnull2ref
bin/vcfnumalt
bin/vcfoverlay
bin/vcfparsealts
@@ -62,13 +83,23 @@ bin/vcfstats
bin/vcfstreamsort
bin/vcfuniq
bin/vcfuniqalleles
+bin/vcfunphase
+bin/wcFst
include/vcflib/BedReader.h
include/vcflib/Variant.h
+include/vcflib/cdflib.hpp
include/vcflib/convert.h
+include/vcflib/gpatInfo.hpp
include/vcflib/join.h
include/vcflib/mt19937ar.h
+include/vcflib/pdflib.hpp
+include/vcflib/rnglib.hpp
include/vcflib/split.h
-include/vcflib/ssw.h
-include/vcflib/ssw_cpp.h
+include/vcflib/ssw.hpp
+include/vcflib/ssw_cpp.hpp
+include/vcflib/var.hpp
+include/vcflib/vec128int.h
+include/vcflib/veclib_types.h
lib/libvcflib.a
+lib/libvcflib.so
lib/libvcflib.so.1
diff --git a/vcflib/distinfo b/vcflib/distinfo
index 83aa3c3f2f..5d09d89cf8 100644
--- a/vcflib/distinfo
+++ b/vcflib/distinfo
@@ -1,6 +1,7 @@
$NetBSD$
-SHA1 (vcflib-790904320065e603c6af5b8a32f635134354467c-790904320065e603c6af5b8a32f635134354467c.tar.gz) = 18287d02a6fb2303466f53b447dceaba68133151
-RMD160 (vcflib-790904320065e603c6af5b8a32f635134354467c-790904320065e603c6af5b8a32f635134354467c.tar.gz) = 822055de94c9eeb22e261fabcb19a2e43acbc0fb
-SHA512 (vcflib-790904320065e603c6af5b8a32f635134354467c-790904320065e603c6af5b8a32f635134354467c.tar.gz) = 4518e7277d92eabdc5606ac6297b7350af4e287a3dc6d0bf4f63c7ac1fcc41e4585a7d4c264c8783687086765cbb28874dc85df1f6cdc7be9fe788da6c1132a6
-Size (vcflib-790904320065e603c6af5b8a32f635134354467c-790904320065e603c6af5b8a32f635134354467c.tar.gz) = 121633 bytes
+SHA1 (vcflib-0.0.0.20180208-7e3d8066a6c6c0f22191a70d050ead23f9c453b3.tar.gz) = 20b09ad5b804af45ae2f762c6a110b751e78abf7
+RMD160 (vcflib-0.0.0.20180208-7e3d8066a6c6c0f22191a70d050ead23f9c453b3.tar.gz) = b82b051ab62173bee6145d3eded457bd7b2a31a0
+SHA512 (vcflib-0.0.0.20180208-7e3d8066a6c6c0f22191a70d050ead23f9c453b3.tar.gz) = 56a1b4fb49dfee966c131bfd81d9db970eb61967321a29769aae278c606193028f2d85a8ee943d9604938a7744b1e10207647f33456073036bc476c363bf4fc2
+Size (vcflib-0.0.0.20180208-7e3d8066a6c6c0f22191a70d050ead23f9c453b3.tar.gz) = 20139407 bytes
+SHA1 (patch-src_cdflib.cpp) = 1ad43c4f51e774d32891a50cba0c2ce233aa08f8
diff --git a/vcflib/files/Makefile.external-libs b/vcflib/files/Makefile.external-libs
new file mode 100644
index 0000000000..eb768d1cdd
--- /dev/null
+++ b/vcflib/files/Makefile.external-libs
@@ -0,0 +1,208 @@
+#OBJ_DIR = ./
+HEADERS = src/Variant.h \
+ src/split.h \
+ src/pdflib.hpp \
+ src/var.hpp \
+ src/cdflib.hpp \
+ src/rnglib.hpp \
+ src/join.h
+SOURCES = src/Variant.cpp \
+ src/rnglib.cpp \
+ src/var.cpp \
+ src/pdflib.cpp \
+ src/cdflib.cpp \
+ src/split.cpp
+OBJECTS= $(SOURCES:.cpp=.o)
+
+VCF_LIB_LOCAL:=$(shell pwd)
+BIN_DIR:=bin
+LIB_DIR:=lib
+SRC_DIR=src
+INC_DIR:=include
+OBJ_DIR:=obj
+
+LIB = libvcflib.a
+SOVERSION = 1
+SLIB = libvcflib.so.$(SOVERSION)
+
+# TODO
+#vcfstats.cpp
+
+BIN_SOURCES = src/vcfecho.cpp \
+ src/vcfnormalizesvs.cpp \
+ src/dumpContigsFromHeader.cpp \
+ src/bFst.cpp \
+ src/pVst.cpp \
+ src/hapLrt.cpp \
+ src/popStats.cpp \
+ src/wcFst.cpp \
+ src/iHS.cpp \
+ src/segmentFst.cpp \
+ src/segmentIhs.cpp \
+ src/genotypeSummary.cpp \
+ src/sequenceDiversity.cpp \
+ src/pFst.cpp \
+ src/smoother.cpp \
+ src/LD.cpp \
+ src/plotHaps.cpp \
+ src/abba-baba.cpp \
+ src/permuteGPAT++.cpp \
+ src/permuteSmooth.cpp \
+ src/normalize-iHS.cpp \
+ src/meltEHH.cpp \
+ src/vcfaltcount.cpp \
+ src/vcfhetcount.cpp \
+ src/vcfhethomratio.cpp \
+ src/vcffilter.cpp \
+ src/vcf2tsv.cpp \
+ src/vcfgenotypes.cpp \
+ src/vcfannotategenotypes.cpp \
+ src/vcfcommonsamples.cpp \
+ src/vcfremovesamples.cpp \
+ src/vcfkeepsamples.cpp \
+ src/vcfsamplenames.cpp \
+ src/vcfgenotypecompare.cpp \
+ src/vcffixup.cpp \
+ src/vcfclassify.cpp \
+ src/vcfsamplediff.cpp \
+ src/vcfremoveaberrantgenotypes.cpp \
+ src/vcfrandom.cpp \
+ src/vcfparsealts.cpp \
+ src/vcfstats.cpp \
+ src/vcfflatten.cpp \
+ src/vcfprimers.cpp \
+ src/vcfnumalt.cpp \
+ src/vcfcleancomplex.cpp \
+ src/vcfintersect.cpp \
+ src/vcfannotate.cpp \
+ src/vcfallelicprimitives.cpp \
+ src/vcfoverlay.cpp \
+ src/vcfaddinfo.cpp \
+ src/vcfkeepinfo.cpp \
+ src/vcfkeepgeno.cpp \
+ src/vcfafpath.cpp \
+ src/vcfcountalleles.cpp \
+ src/vcflength.cpp \
+ src/vcfdistance.cpp \
+ src/vcfrandomsample.cpp \
+ src/vcfentropy.cpp \
+ src/vcfglxgt.cpp \
+ src/vcfroc.cpp \
+ src/vcfcheck.cpp \
+ src/vcfstreamsort.cpp \
+ src/vcfuniq.cpp \
+ src/vcfuniqalleles.cpp \
+ src/vcfremap.cpp \
+ src/vcf2fasta.cpp \
+ src/vcfsitesummarize.cpp \
+ src/vcfbreakmulti.cpp \
+ src/vcfcreatemulti.cpp \
+ src/vcfevenregions.cpp \
+ src/vcfcat.cpp \
+ src/vcfgenosummarize.cpp \
+ src/vcfgenosamplenames.cpp \
+ src/vcfgeno2haplo.cpp \
+ src/vcfleftalign.cpp \
+ src/vcfcombine.cpp \
+ src/vcfgeno2alleles.cpp \
+ src/vcfindex.cpp \
+ src/vcf2dag.cpp \
+ src/vcfsample2info.cpp \
+ src/vcfqual2info.cpp \
+ src/vcfinfo2qual.cpp \
+ src/vcfglbound.cpp \
+ src/vcfunphase.cpp \
+ src/vcfnull2ref.cpp \
+ src/vcfinfosummarize.cpp
+
+# when we can figure out how to build on mac
+# src/vcfsom.cpp
+
+#BINS = $(BIN_SOURCES:.cpp=)
+BINS = $(addprefix bin/,$(notdir $(BIN_SOURCES:.cpp=)))
+SHORTBINS = $(notdir $(BIN_SOURCES:.cpp=))
+# Use ?= to allow overriding from the env or command-line.
+
+MAKE ?= make
+LOCALBASE ?= /usr/local
+LIB_PATH ?= ${LOCALBASE}/lib
+
+CC ?= cc
+CXX ?= c++
+CXXFLAGS ?= -O3
+CFLAGS += -D_FILE_OFFSET_BITS=64 -fPIC
+CXXFLAGS += $(CFLAGS) --std=c++11
+#CXXFLAGS += -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual
+
+DESTDIR ?= stage
+PREFIX ?= /usr/local
+STRIP ?= strip
+INSTALL ?= install -c
+MKDIR ?= mkdir -p
+AR ?= ar
+
+SSW = src/ssw.o src/ssw_cpp.o
+
+INCLUDES = -I${LOCALBASE}/include \
+ -I${LOCALBASE}/include/smithwaterman \
+ -I${LOCALBASE}/include/multichoose \
+ -I${LOCALBASE}/include/fastahack \
+ -I${LOCALBASE}/include/intervaltree
+LDFLAGS += -L. -lvcflib \
+ -L$(LIB_PATH) -lsw -ltabix -lhts -lfastahack -lfilevercmp \
+ -lpthread -lz -lm
+
+all: $(OBJECTS) $(BINS) $(LIB) $(SLIB)
+
+ssw.o: src/ssw.h
+ssw_cpp.o: src/ssw_cpp.h
+
+openmp:
+ $(MAKE) CXXFLAGS="$(CXXFLAGS) -fopenmp -D HAS_OPENMP"
+
+profiling:
+ $(MAKE) CXXFLAGS="$(CXXFLAGS) -g" all
+
+gprof:
+ $(MAKE) CXXFLAGS="$(CXXFLAGS) -pg" all
+
+$(OBJECTS): $(SOURCES) $(HEADERS)
+ $(CXX) -c -o $@ src/$(*F).cpp $(INCLUDES) $(CXXFLAGS)
+
+$(SHORTBINS):
+ $(MAKE) $(BIN_DIR)/$@
+
+$(BINS): $(BIN_SOURCES) $(LIB) $(OBJECTS) $(SSW) pre
+ $(CXX) src/$(notdir $@).cpp -o $@ $(INCLUDES) $(CXXFLAGS) $(LDFLAGS)
+
+$(LIB): $(OBJECTS) $(SSW)
+ ar rs $(LIB) $(OBJECTS) $(SSW)
+
+$(SLIB): $(OBJECTS) $(SSW)
+ $(CXX) -shared -Wl,-soname,$(SLIB) -o $(SLIB) $(OBJECTS) $(SSW)
+
+install: all
+ $(MKDIR) $(DESTDIR)$(PREFIX)/bin
+ $(MKDIR) $(DESTDIR)$(PREFIX)/include/vcflib
+ $(MKDIR) $(DESTDIR)$(PREFIX)/lib
+ $(INSTALL) bin/* $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -m644 src/*.h src/*.hpp $(DESTDIR)$(PREFIX)/include/vcflib
+ $(INSTALL) -m644 $(LIB) $(DESTDIR)$(PREFIX)/lib
+ $(INSTALL) $(SLIB) $(DESTDIR)$(PREFIX)/lib
+
+install-strip: install
+ $(STRIP) $(DESTDIR)$(PREFIX)/bin/* $(DESTDIR)$(PREFIX)/lib/$(SLIB)
+
+test: $(BINS)
+ @prove -Itests/lib -w tests/*.t
+
+clean:
+ rm -f $(BINS) $(OBJECTS)
+ rm -f ssw_cpp.o ssw.o
+ rm -f $(LIB)
+ rm -rf $(BIN_DIR)
+
+pre:
+ mkdir -p $(BIN_DIR)
+
+.PHONY: clean all test pre
diff --git a/vcflib/patches/patch-src_cdflib.cpp b/vcflib/patches/patch-src_cdflib.cpp
new file mode 100644
index 0000000000..466198c82a
--- /dev/null
+++ b/vcflib/patches/patch-src_cdflib.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Fix missing pointer dereference
+--- src/cdflib.cpp.orig 2018-03-09 20:31:19 UTC
++++ src/cdflib.cpp
+@@ -10040,7 +10040,7 @@ void negative_binomial_cdf_values ( int
+ 1, 2, 3,
+ 0, 1, 2 };
+
+- if ( n_data < 0 )
++ if ( *n_data < 0 )
+ {
+ *n_data = 0;
+ }
Home |
Main Index |
Thread Index |
Old Index