From e675706170643a93bff6fb0d1cdff39de857013a Mon Sep 17 00:00:00 2001 From: DPorts Builder Date: Tue, 31 Oct 2017 19:47:46 -0700 Subject: [PATCH] Update biology/bcftools to version 1.6 --- biology/bcftools/Makefile | 23 +++-- biology/bcftools/distinfo | 6 +- biology/bcftools/files/patch-Makefile | 91 ++++++++++---------- biology/bcftools/files/patch-configure.ac | 11 +++ biology/bcftools/files/patch-misc_run-roh.pl | 11 +++ biology/bcftools/files/patch-prob1.c | 2 +- biology/bcftools/files/patch-test_test.pl | 8 +- biology/bcftools/files/pkg-message.in | 2 +- biology/bcftools/pkg-plist | 15 +++- 9 files changed, 101 insertions(+), 68 deletions(-) create mode 100644 biology/bcftools/files/patch-configure.ac create mode 100644 biology/bcftools/files/patch-misc_run-roh.pl diff --git a/biology/bcftools/Makefile b/biology/bcftools/Makefile index da04d2ad072..7f3f88d1a42 100644 --- a/biology/bcftools/Makefile +++ b/biology/bcftools/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= bcftools -PORTVERSION= 1.3.1 -PORTREVISION= 2 +PORTVERSION= 1.6 CATEGORIES= biology MAINTAINER= cartwright@asu.edu @@ -12,7 +11,7 @@ COMMENT= Tools for manipulating next-generation sequencing data LICENSE= MIT # LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= htslib>=1.3:biology/htslib +BUILD_DEPENDS= htslib>=1.6:biology/htslib LIB_DEPENDS= libhts.so:biology/htslib TEST_DEPENDS= bash:shells/bash @@ -21,10 +20,12 @@ CONFLICTS_BUILD=openssl USE_GITHUB= yes GH_ACCOUNT= samtools -USES= gmake perl5 shebangfix +USES= autoreconf gmake perl5 python shebangfix USE_PERL5= test +PYTHON_NO_DEPENDS= yes +GNU_CONFIGURE= yes SUB_FILES= pkg-message -SHEBANG_FILES= vcfutils.pl plot-vcfstats plugins/color-chrs.pl test/test.pl +SHEBANG_FILES= misc/* test/test.pl OPTIONS_DEFINE= GPL GPL_DESC= Enable modules that rely on GPL code @@ -37,19 +38,15 @@ GPL_LIB_DEPENDS= libgsl.so:math/gsl 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}" - TEST_TARGET= test +post-patch: + @${GREP} -q '@PORTVERSION@' ${WRKSRC}/configure.ac || (echo "@PORTVERSION@ in file/patch-configure.ac is overwritten probably due to using 'make makepatch'"; exit 1) + @${REINPLACE_CMD} -e 's|@PORTVERSION@|${PORTVERSION}|g' ${WRKSRC}/configure.ac + .include diff --git a/biology/bcftools/distinfo b/biology/bcftools/distinfo index 2d4c03eecc9..0f73a563097 100644 --- a/biology/bcftools/distinfo +++ b/biology/bcftools/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1463692643 -SHA256 (samtools-bcftools-1.3.1_GH0.tar.gz) = 99a5cc05faa974f5ddbeebf346bb51a806bdaaf8e2f6adc3bead28551983e77e -SIZE (samtools-bcftools-1.3.1_GH0.tar.gz) = 958207 +TIMESTAMP = 1508307708 +SHA256 (samtools-bcftools-1.6_GH0.tar.gz) = afb2a96d3419fbe77fab5c501dc28bc5e691145353ac5600909a75c0e625f025 +SIZE (samtools-bcftools-1.6_GH0.tar.gz) = 2333330 diff --git a/biology/bcftools/files/patch-Makefile b/biology/bcftools/files/patch-Makefile index 1d241001fd5..a79ce1aa448 100644 --- a/biology/bcftools/files/patch-Makefile +++ b/biology/bcftools/files/patch-Makefile @@ -1,18 +1,8 @@ ---- Makefile.orig 2015-12-15 21:42:34 UTC +--- Makefile.orig 2017-09-28 11:22:48 UTC +++ Makefile -@@ -29,16 +29,15 @@ 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 --BGZIP = $(HTSDIR)/bgzip --TABIX = $(HTSDIR)/tabix -+HTSDIR = $(prefix)/include -+HTSLIB = -lhts -+BGZIP = $(HTSDIR)/../bin/bgzip -+TABIX = $(HTSDIR)/../bin/tabix +@@ -22,10 +22,10 @@ + # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + # DEALINGS IN THE SOFTWARE. -CC = gcc -CPPFLAGS = @@ -24,17 +14,13 @@ +LDFLAGS += LIBS = - OBJS = main.o vcfindex.o tabix.o \ -@@ -57,26 +56,20 @@ GSL_LIBS = - ifdef USE_GPL - EXTRA_CPPFLAGS += -DUSE_GPL - OBJS += polysomy.o peakfit.o -- GSL_LIBS = -lgsl -lcblas -+ GSL_LIBS = -lgsl -lgslcblas - endif + DYNAMIC_FLAGS = -rdynamic +@@ -42,26 +42,25 @@ OBJS = main.o vcfindex.o tabix.o \ + vcfsort.o \ + ccall.o em.o prob1.o kmin.o # the original samtools calling -prefix = /usr/local -+prefix = ${STAGEDIR}${PREFIX} ++prefix = ${PREFIX} exec_prefix = $(prefix) bindir = $(exec_prefix)/bin libdir = $(exec_prefix)/lib @@ -42,37 +28,52 @@ -mandir = $(prefix)/share/man +mandir = $(prefix)/man man1dir = $(mandir)/man1 - + # Installation location for $(PLUGINS) plugindir = $(libexecdir)/bcftools pluginpath = $(plugindir) + # Installation location for $(MISC_PROGRAMS) and $(MISC_SCRIPTS) +-misc_bindir = $(bindir) ++misc_bindir = $(bindir)/samtools_misc --MKDIR_P = mkdir -p + MKDIR_P = mkdir -p -INSTALL = install -p --INSTALL_PROGRAM = $(INSTALL) -INSTALL_DATA = $(INSTALL) -m 644 -INSTALL_DIR = $(MKDIR_P) -m 755 -- - MISC_PROGRAMS = plot-vcfstats vcfutils.pl plugins/color-chrs.pl +-INSTALL_MAN = $(INSTALL_DATA) +-INSTALL_PROGRAM = $(INSTALL) +-INSTALL_SCRIPT = $(INSTALL_PROGRAM) ++INSTALL_DATA = ${BSD_INSTALL_DATA} ++INSTALL_DIR = $(MKDIR_P) ++INSTALL_MAN = ${BSD_INSTALL_MAN} ++INSTALL_PROGRAM = ${BSD_INSTALL_PROGRAM} ++INSTALL_SCRIPT = ${BSD_INSTALL_SCRIPT} + + PROGRAMS = bcftools + MISC_SCRIPTS = \ +@@ -77,7 +76,7 @@ all: $(PROGRAMS) $(TEST_PROGRAMS) plugin - all:$(PROG) plugins -@@ -181,7 +174,7 @@ test/test-rbuf: test/test-rbuf.o - $(CC) $(LDFLAGS) -o $@ $^ -lm $(LIBS) + ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS) + ALL_LDFLAGS = $(HTSLIB_LDFLAGS) $(LDFLAGS) +-ALL_LIBS = -lz -ldl $(LIBS) ++ALL_LIBS = -lz $(LIBS) - bcftools: $(HTSLIB) $(OBJS) -- $(CC) -rdynamic $(LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread -lz -lm -ldl $(GSL_LIBS) $(LIBS) -+ $(CC) -rdynamic $(LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -pthread -lz -lm $(GSL_LIBS) $(LIBS) + # Usually config.mk and config.h are generated by running configure + # or config.status, but if those aren't used create defaults here. +@@ -131,7 +130,7 @@ print-version: + ifdef USE_GPL + main.o : EXTRA_CPPFLAGS += -DUSE_GPL + OBJS += polysomy.o peakfit.o +- GSL_LIBS ?= -lgsl -lcblas ++ GSL_LIBS ?= -lgsl -lgslcblas + endif - doc/bcftools.1: doc/bcftools.txt - cd doc && a2x -adate="$(DOC_DATE)" -aversion=$(DOC_VERSION) --doctype manpage --format manpage bcftools.txt -@@ -198,8 +191,9 @@ docs: doc/bcftools.1 doc/bcftools.html + bcftools: $(OBJS) $(HTSLIB) +@@ -273,7 +272,7 @@ docs: doc/bcftools.1 doc/bcftools.html # Since there is no make dependency, bcftools.1 can be out-of-date and # make docs can be run to update if asciidoc is available - install: $(PROG) + install: $(PROG) $(PLUGINS) - $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(plugindir) -- $(INSTALL_PROGRAM) $(PROG) $(MISC_PROGRAMS) $(DESTDIR)$(bindir) -+ $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)/samtools_misc $(DESTDIR)$(man1dir) $(DESTDIR)$(plugindir) -+ $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir) -+ $(INSTALL_SCRIPT) $(MISC_PROGRAMS) $(DESTDIR)$(bindir)/samtools_misc - $(INSTALL_DATA) doc/bcftools.1 $(DESTDIR)$(man1dir) - $(INSTALL_PROGRAM) plugins/*.so $(DESTDIR)$(plugindir) - ++ $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(misc_bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(plugindir) + $(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir) + $(INSTALL_SCRIPT) $(MISC_SCRIPTS) $(DESTDIR)$(misc_bindir) + $(INSTALL_MAN) doc/bcftools.1 $(DESTDIR)$(man1dir) diff --git a/biology/bcftools/files/patch-configure.ac b/biology/bcftools/files/patch-configure.ac new file mode 100644 index 00000000000..40dd18b1099 --- /dev/null +++ b/biology/bcftools/files/patch-configure.ac @@ -0,0 +1,11 @@ +--- configure.ac.orig 2017-09-28 11:22:48 UTC ++++ configure.ac +@@ -23,7 +23,7 @@ + # DEALINGS IN THE SOFTWARE. + + dnl Process this file with autoconf to produce a configure script +-AC_INIT([BCFtools], m4_esyscmd_s([make print-version]), ++AC_INIT([BCFtools], [@PORTVERSION@], + [samtools-help@lists.sourceforge.net], [], [http://www.htslib.org/]) + AC_PREREQ([2.63]) dnl This version introduced 4-argument AC_CHECK_HEADER + AC_CONFIG_SRCDIR([main.c]) diff --git a/biology/bcftools/files/patch-misc_run-roh.pl b/biology/bcftools/files/patch-misc_run-roh.pl new file mode 100644 index 00000000000..4b5cd620028 --- /dev/null +++ b/biology/bcftools/files/patch-misc_run-roh.pl @@ -0,0 +1,11 @@ +--- misc/run-roh.pl.orig 2017-10-18 09:33:24 UTC ++++ misc/run-roh.pl +@@ -97,7 +97,7 @@ sub cmd + else + { + # child +- exec('/bin/bash', '-o','pipefail','-c', $cmd) or error("Failed to run the command [/bin/sh -o pipefail -c $cmd]: $!"); ++ exec('/bin/sh', '-c', $cmd) or error("Failed to run the command [/bin/sh -c $cmd]: $!"); + } + + if ( exists($args{exit_on_error}) && !$args{exit_on_error} ) { return @out; } diff --git a/biology/bcftools/files/patch-prob1.c b/biology/bcftools/files/patch-prob1.c index 04694984b8c..9fdaa65b4f5 100644 --- a/biology/bcftools/files/patch-prob1.c +++ b/biology/bcftools/files/patch-prob1.c @@ -1,4 +1,4 @@ ---- prob1.c.orig 2015-12-15 21:42:34 UTC +--- prob1.c.orig 2017-09-28 11:22:48 UTC +++ prob1.c @@ -33,6 +33,12 @@ THE SOFTWARE. */ #include diff --git a/biology/bcftools/files/patch-test_test.pl b/biology/bcftools/files/patch-test_test.pl index e5c436a3775..a42f062d310 100644 --- a/biology/bcftools/files/patch-test_test.pl +++ b/biology/bcftools/files/patch-test_test.pl @@ -1,6 +1,6 @@ ---- test/test.pl.orig 2015-12-22 22:45:13 UTC +--- test/test.pl.orig 2017-10-18 09:33:24 UTC +++ test/test.pl -@@ -290,7 +290,7 @@ sub _cmd +@@ -381,7 +381,7 @@ sub _cmd else { # child @@ -9,7 +9,7 @@ } return ($? >> 8, join('',@out)); } -@@ -657,7 +657,7 @@ sub test_usage +@@ -782,7 +782,7 @@ sub test_usage my $command = $args{cmd}; my $commandpath = $$opts{bin}."/".$command; my ($ret,$out) = _cmd("$commandpath $args{redirection} 2>&1"); @@ -18,7 +18,7 @@ my @sections = ($out =~ m/(^[A-Za-z]+.*?)(?:(?=^[A-Za-z]+:)|\z)/msg); -@@ -708,7 +708,7 @@ sub test_usage_subcommand +@@ -833,7 +833,7 @@ sub test_usage_subcommand my $subcommand = $args{subcmd}; my $commandpath = $$opts{bin}."/".$command; my ($ret,$out) = _cmd("$commandpath $subcommand $args{redirection} 2>&1"); diff --git a/biology/bcftools/files/pkg-message.in b/biology/bcftools/files/pkg-message.in index 508265e42c5..ef35a871f42 100644 --- a/biology/bcftools/files/pkg-message.in +++ b/biology/bcftools/files/pkg-message.in @@ -3,5 +3,5 @@ The miscellaneous tools included with Bcftools have been installed to Add that directory to your path if you want to use these tools. -Some of these tools depend on Perl5, and it will need to be installed to +Some of these tools depend on Perl5/Python, and it will need to be installed to use them. diff --git a/biology/bcftools/pkg-plist b/biology/bcftools/pkg-plist index a005b7adb72..3c946a32d96 100644 --- a/biology/bcftools/pkg-plist +++ b/biology/bcftools/pkg-plist @@ -1,19 +1,32 @@ bin/bcftools bin/samtools_misc/color-chrs.pl +bin/samtools_misc/guess-ploidy.py +bin/samtools_misc/plot-roh.py bin/samtools_misc/plot-vcfstats +bin/samtools_misc/run-roh.pl bin/samtools_misc/vcfutils.pl libexec/bcftools/GTisec.so +libexec/bcftools/GTsubset.so +libexec/bcftools/ad-bias.so +libexec/bcftools/af-dist.so +libexec/bcftools/check-ploidy.so +libexec/bcftools/check-sparsity.so libexec/bcftools/color-chrs.so libexec/bcftools/counts.so libexec/bcftools/dosage.so libexec/bcftools/fill-AN-AC.so +libexec/bcftools/fill-from-fasta.so libexec/bcftools/fill-tags.so libexec/bcftools/fixploidy.so +libexec/bcftools/fixref.so libexec/bcftools/frameshifts.so +libexec/bcftools/guess-ploidy.so libexec/bcftools/impute-info.so +libexec/bcftools/isecGT.so libexec/bcftools/mendelian.so libexec/bcftools/missing2ref.so +libexec/bcftools/prune.so libexec/bcftools/setGT.so libexec/bcftools/tag2tag.so -libexec/bcftools/vcf2sex.so +libexec/bcftools/trio-switch-rate.so man/man1/bcftools.1.gz -- 2.41.0