svn commit: r388638 - in head/biology: . bcftools bcftools/files
Kurt Jaeger
pi at FreeBSD.org
Fri Jun 5 21:01:17 UTC 2015
Author: pi
Date: Fri Jun 5 21:01:13 2015
New Revision: 388638
URL: https://svnweb.freebsd.org/changeset/ports/388638
Log:
New port: biology/bcftools
BCFtools is a set of utilities that manipulate variant calls in the
Variant Call Format (VCF) and its binary counterpart BCF. All
commands work transparently with both VCFs and BCFs, both
uncompressed and BGZF-compressed.
WWW: http://www.htslib.org/
PR: 199747
Submitted by: cartwright at asu.edu
Added:
head/biology/bcftools/
head/biology/bcftools/Makefile (contents, props changed)
head/biology/bcftools/distinfo (contents, props changed)
head/biology/bcftools/files/
head/biology/bcftools/files/patch-Makefile (contents, props changed)
head/biology/bcftools/files/patch-plugins_fixploidy.mk (contents, props changed)
head/biology/bcftools/files/patch-plugins_vcf2sex.mk (contents, props changed)
head/biology/bcftools/files/patch-prob1.c (contents, props changed)
head/biology/bcftools/files/pkg-message.in (contents, props changed)
head/biology/bcftools/pkg-descr (contents, props changed)
head/biology/bcftools/pkg-plist (contents, props changed)
Modified:
head/biology/Makefile
Modified: head/biology/Makefile
==============================================================================
--- head/biology/Makefile Fri Jun 5 20:39:57 2015 (r388637)
+++ head/biology/Makefile Fri Jun 5 21:01:13 2015 (r388638)
@@ -7,6 +7,7 @@
SUBDIR += artemis
SUBDIR += avida
SUBDIR += babel
+ SUBDIR += bcftools
SUBDIR += biococoa
SUBDIR += biojava
SUBDIR += blat
Added: head/biology/bcftools/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/bcftools/Makefile Fri Jun 5 21:01:13 2015 (r388638)
@@ -0,0 +1,48 @@
+# Created by: Reed A. Cartwright <cartwright at asu.edu>
+# $FreeBSD$
+
+PORTNAME= bcftools
+PORTVERSION= 1.2
+CATEGORIES= biology
+
+MAINTAINER= cartwright at asu.edu
+COMMENT= Tools for manipulating next-generation sequencing data
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= htslib>=1.2:${PORTSDIR}/biology/htslib
+LIB_DEPENDS= libhts.so:${PORTSDIR}/biology/htslib
+
+USE_GITHUB= yes
+GH_ACCOUNT= samtools
+
+USES= gmake shebangfix
+SUB_FILES= pkg-message
+SHEBANG_FILES= vcfutils.pl
+
+OPTIONS_DEFINE= GPL
+GPL_DESC= Enable modules that rely on GPL code
+OPTIONS_DEFAULT= GPL
+
+GPL_LIB_DEPENDS= libgsl.so:${PORTSDIR}/math/gsl
+
+.include <bsd.port.options.mk>
+
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
+MAKE_ENV= INSTALL_LIB="${INSTALL_LIB}" \
+ INSTALL_DATA="${INSTALL_DATA}" \
+ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+ INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
+ INSTALL_DIR="${MKDIR}"
+
+.if ${PORT_OPTIONS:MGPL}
+MAKE_ENV+= USE_GPL=1
+LICENSE= GPLv3
+.endif
+
+PLIST_SUB= PORTVERSION="${PORTVERSION}"
+
+.include <bsd.port.mk>
Added: head/biology/bcftools/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/bcftools/distinfo Fri Jun 5 21:01:13 2015 (r388638)
@@ -0,0 +1,2 @@
+SHA256 (samtools-bcftools-1.2_GH0.tar.gz) = 90ccd7dccfb0b2848b71f32fff073c420260e857b7feeb89c1fb4bfaba49bfba
+SIZE (samtools-bcftools-1.2_GH0.tar.gz) = 511625
Added: head/biology/bcftools/files/patch-Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/bcftools/files/patch-Makefile Fri Jun 5 21:01:13 2015 (r388638)
@@ -0,0 +1,84 @@
+--- Makefile.orig 2015-02-02 15:40:17 UTC
++++ Makefile
+@@ -29,14 +29,13 @@ TEST_PROG= test/test-rbuf
+ all: $(PROG) $(TEST_PROG)
+
+ # Adjust $(HTSDIR) to point to your top-level htslib directory
+-HTSDIR = ../htslib
+-include $(HTSDIR)/htslib.mk
+-HTSLIB = $(HTSDIR)/libhts.a
++HTSDIR = $(prefix)/include
++HTSLIB = -lhts
+ BGZIP = $(HTSDIR)/bgzip
+ TABIX = $(HTSDIR)/tabix
+
+-CC = gcc
+-CFLAGS = -g -Wall -Wc++-compat -O2
++CC ?= cc
++CFLAGS += -Wall
+ DFLAGS =
+ OBJS = main.o vcfindex.o tabix.o \
+ vcfstats.o vcfisec.o vcfmerge.o vcfquery.o vcffilter.o filter.o vcfsom.o \
+@@ -52,22 +51,15 @@ INCLUDES = -I. -I$(HTSDIR)
+ ifdef USE_GPL
+ CFLAGS += -DUSE_GPL
+ OBJS += polysomy.o
+- LDLIBS = -lgsl -lcblas
++ LDLIBS += -lgsl -lgslcblas
+ endif
+
+-prefix = /usr/local
++prefix = ${STAGEDIR}${PREFIX}
+ exec_prefix = $(prefix)
+ bindir = $(exec_prefix)/bin
+-mandir = $(prefix)/share/man
++mandir = $(prefix)/man
+ man1dir = $(mandir)/man1
+
+-MKDIR_P = mkdir -p
+-INSTALL = install -p
+-INSTALL_PROGRAM = $(INSTALL)
+-INSTALL_DATA = $(INSTALL) -m 644
+-INSTALL_DIR = $(MKDIR_P) -m 755
+-
+-
+ all:$(PROG) plugins
+
+ # See htslib/Makefile
+@@ -102,8 +94,8 @@ PLUGINC = $(foreach dir, plugins, $(wild
+ PLUGINS = $(PLUGINC:.c=.so)
+ PLUGINM = $(PLUGINC:.c=.mk)
+
+-%.so: %.c version.h version.c $(HTSDIR)/libhts.so
+- $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ version.c $< -L$(HTSDIR) -lhts
++%.so: %.c version.h version.c
++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) -fPIC -shared -o $@ version.c $< -lhts
+
+ -include $(PLUGINM)
+
+@@ -156,10 +148,10 @@ version.o: version.h version.c
+ test/test-rbuf.o: test/test-rbuf.c rbuf.h
+
+ test/test-rbuf: test/test-rbuf.o
+- $(CC) $(CFLAGS) -o $@ -lm -ldl $<
++ $(CC) $(CFLAGS) -o $@ -lm $<
+
+-bcftools: $(HTSLIB) $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread -lz -lm -ldl $(LDLIBS)
++bcftools: $(OBJS)
++ $(CC) -pthread $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -lz -lm $(LDLIBS)
+
+ doc/bcftools.1: doc/bcftools.txt
+ cd doc && a2x -adate="$(DOC_DATE)" -aversion=$(DOC_VERSION) --doctype manpage --format manpage bcftools.txt
+@@ -170,8 +162,9 @@ doc/bcftools.html: doc/bcftools.txt
+ docs: doc/bcftools.1 doc/bcftools.html
+
+ install: $(PROG) doc/bcftools.1
+- $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
+- $(INSTALL_PROGRAM) $(PROG) plot-vcfstats vcfutils.pl $(DESTDIR)$(bindir)
++ $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)/samtools_misc $(DESTDIR)$(man1dir)
++ $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)
++ $(INSTALL_SCRIPT) plot-vcfstats vcfutils.pl $(DESTDIR)$(bindir)/samtools_misc
+ $(INSTALL_DATA) doc/bcftools.1 $(DESTDIR)$(man1dir)
+
+ clean: testclean clean-plugins
Added: head/biology/bcftools/files/patch-plugins_fixploidy.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/bcftools/files/patch-plugins_fixploidy.mk Fri Jun 5 21:01:13 2015 (r388638)
@@ -0,0 +1,7 @@
+--- plugins/fixploidy.mk.orig 2015-02-02 15:40:17 UTC
++++ plugins/fixploidy.mk
+@@ -1,2 +1,2 @@
+-plugins/fixploidy.so: plugins/fixploidy.c version.h version.c ploidy.h ploidy.c $(HTSDIR)/libhts.so
+- $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -L$(HTSDIR) -lhts
++plugins/fixploidy.so: plugins/fixploidy.c version.h version.c ploidy.h ploidy.c
++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -lhts
Added: head/biology/bcftools/files/patch-plugins_vcf2sex.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/bcftools/files/patch-plugins_vcf2sex.mk Fri Jun 5 21:01:13 2015 (r388638)
@@ -0,0 +1,7 @@
+--- plugins/vcf2sex.mk.orig 2015-02-02 15:40:17 UTC
++++ plugins/vcf2sex.mk
+@@ -1,2 +1,2 @@
+-plugins/vcf2sex.so: plugins/vcf2sex.c version.h version.c ploidy.h ploidy.c $(HTSDIR)/libhts.so
+- $(CC) $(CFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -L$(HTSDIR) -lhts
++plugins/vcf2sex.so: plugins/vcf2sex.c version.h version.c ploidy.h ploidy.c
++ $(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) -fPIC -shared -o $@ ploidy.c version.c $< -lhts
Added: head/biology/bcftools/files/patch-prob1.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/bcftools/files/patch-prob1.c Fri Jun 5 21:01:13 2015 (r388638)
@@ -0,0 +1,17 @@
+--- prob1.c.orig 2015-04-28 01:28:23 UTC
++++ prob1.c
+@@ -33,6 +33,14 @@ THE SOFTWARE. */
+ #include <zlib.h>
+ #include "prob1.h"
+
++#include <sys/param.h>
++#ifdef __FreeBSD__
++# if __FreeBSD_version < 1000034
++# define logl(x) log(x)
++# define expl(x) exp(x)
++# endif
++#endif
++
+ // #include "kstring.h"
+ // #include "kseq.h"
+ // KSTREAM_INIT(gzFile, gzread, 16384)
Added: head/biology/bcftools/files/pkg-message.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/bcftools/files/pkg-message.in Fri Jun 5 21:01:13 2015 (r388638)
@@ -0,0 +1,2 @@
+
+Add %%PREFIX%%/bin/samtools_misc to your path to use miscellaneous tools.
Added: head/biology/bcftools/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/bcftools/pkg-descr Fri Jun 5 21:01:13 2015 (r388638)
@@ -0,0 +1,6 @@
+BCFtools is a set of utilities that manipulate variant calls in the
+Variant Call Format (VCF) and its binary counterpart BCF. All
+commands work transparently with both VCFs and BCFs, both
+uncompressed and BGZF-compressed.
+
+WWW: http://www.htslib.org/
Added: head/biology/bcftools/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/biology/bcftools/pkg-plist Fri Jun 5 21:01:13 2015 (r388638)
@@ -0,0 +1,4 @@
+bin/bcftools
+bin/samtools_misc/plot-vcfstats
+bin/samtools_misc/vcfutils.pl
+man/man1/bcftools.1.gz
More information about the svn-ports-head
mailing list