Index: Makefile =================================================================== --- Makefile (revision 452329) +++ Makefile (working copy) @@ -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 @@ 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 @@ 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 @@ 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 Index: distinfo =================================================================== --- distinfo (revision 452329) +++ distinfo (working copy) @@ -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 Index: files/patch-Makefile =================================================================== --- files/patch-Makefile (revision 452329) +++ files/patch-Makefile (working copy) @@ -1,19 +1,9 @@ ---- 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) +@@ -22,10 +22,10 @@ + # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + # DEALINGS IN THE SOFTWARE. - # 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 - -CC = gcc -CPPFLAGS = -CFLAGS = -g -Wall -Wc++-compat -O2 @@ -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} - all:$(PROG) plugins -@@ -181,7 +174,7 @@ test/test-rbuf: test/test-rbuf.o - $(CC) $(LDFLAGS) -o $@ $^ -lm $(LIBS) + PROGRAMS = bcftools + MISC_SCRIPTS = \ +@@ -77,7 +76,7 @@ all: $(PROGRAMS) $(TEST_PROGRAMS) plugin - 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) + ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS) + ALL_LDFLAGS = $(HTSLIB_LDFLAGS) $(LDFLAGS) +-ALL_LIBS = -lz -ldl $(LIBS) ++ALL_LIBS = -lz $(LIBS) - 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 + # 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 + + 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) Index: files/patch-configure.ac =================================================================== --- files/patch-configure.ac (revision 0) +++ files/patch-configure.ac (working copy) @@ -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]) Property changes on: files/patch-configure.ac ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-misc_run-roh.pl =================================================================== --- files/patch-misc_run-roh.pl (revision 0) +++ files/patch-misc_run-roh.pl (working copy) @@ -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; } Property changes on: files/patch-misc_run-roh.pl ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-prob1.c =================================================================== --- files/patch-prob1.c (revision 452329) +++ files/patch-prob1.c (working copy) @@ -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 Index: files/patch-test_test.pl =================================================================== --- files/patch-test_test.pl (revision 452329) +++ files/patch-test_test.pl (working copy) @@ -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"); Index: files/pkg-message.in =================================================================== --- files/pkg-message.in (revision 452329) +++ files/pkg-message.in (working copy) @@ -3,5 +3,5 @@ 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. Index: pkg-plist =================================================================== --- pkg-plist (revision 452329) +++ pkg-plist (working copy) @@ -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