pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bcftools: Upgrade to 1.10.2 and clean up



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Tue Jul 21 16:09:17 2020 -0500
Changeset:	e867210a68d5a4527e047df889e8907566a6c4d2

Modified Files:
	bcftools/Makefile
	bcftools/PLIST
	bcftools/distinfo
	bcftools/patches/patch-Makefile
	bcftools/patches/patch-misc_run-roh.pl
Added Files:
	bcftools/patches/patch-test_test.pl
Removed Files:
	bcftools/patches/patch-configure.ac

Log Message:
bcftools: Upgrade to 1.10.2 and clean up

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e867210a68d5a4527e047df889e8907566a6c4d2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 bcftools/Makefile                      | 38 ++++++---------------
 bcftools/PLIST                         |  9 +++++
 bcftools/distinfo                      | 14 ++++----
 bcftools/patches/patch-Makefile        | 61 +++++++++++++---------------------
 bcftools/patches/patch-configure.ac    | 15 ---------
 bcftools/patches/patch-misc_run-roh.pl | 17 +++++++---
 bcftools/patches/patch-test_test.pl    | 42 +++++++++++++++++++++++
 7 files changed, 105 insertions(+), 91 deletions(-)

diffs:
diff --git a/bcftools/Makefile b/bcftools/Makefile
index baf79bb9b7..d302472e15 100644
--- a/bcftools/Makefile
+++ b/bcftools/Makefile
@@ -1,22 +1,9 @@
 # $NetBSD$
-#
-###########################################################
-#                  Generated by fbsd2pkg                  #
-#              Sat Nov 10 09:59:07 CST 2018               #
-###########################################################
 
-###########################################################
-# Unconverted and partially converted FreeBSD port syntax:
-
-# TEST_DEPENDS=	bash:shells/bash
-# Unknown tool: USE_TOOLS=	localbase
-#USE_LDCONFIG=	${PREFIX}/libexec/${PORTNAME}
-
-DISTNAME=	bcftools-${PV}
+DISTNAME=	bcftools-1.10.2
 CATEGORIES=	biology
 MASTER_SITES=	${MASTER_SITE_GITHUB:=samtools/}
 GITHUB_PROJECT=	bcftools
-GITHUB_TAG=	${PV}
 
 MAINTAINER=	bacon%NetBSD.org@localhost
 HOMEPAGE=	https://www.htslib.org/
@@ -28,33 +15,30 @@ REPLACE_PYTHON=	misc/*.py
 
 SUBST_CLASSES+=		version
 SUBST_STAGE.version=	pre-configure
-SUBST_SED.version+=	-e 's|@PORTVERSION@|${PV}|g'
-SUBST_FILES.version+=	${WRKSRC}/configure.ac
+SUBST_SED.version=	-e "s|m4_esyscmd_s(\[./version.sh 2>/dev/null\])|[${PKGVERSION_NOREV}]|"
+SUBST_FILES.version+=	configure.ac
 
 USE_LANGUAGES=	c c++
-USE_TOOLS+=	autoconf automake autoreconf gmake perl
+USE_TOOLS+=	autoconf automake autoreconf bash gmake perl
 GNU_CONFIGURE=	yes
 MAKE_ENV+=	USE_GPL=1
 
-PV=		1.9
-
 pre-configure:
-	cd ${WRKSRC} && autoreconf -if
+	(cd ${WRKSRC} && autoreconf -if)
 
 post-install:
-	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/color-chrs.pl \
+	${MV} ${DESTDIR}${PREFIX}/bin/color-chrs.pl \
 		${DESTDIR}${PREFIX}/bin/color-chrs
-	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/guess-ploidy.py\
+	${MV} ${DESTDIR}${PREFIX}/bin/guess-ploidy.py\
 	       ${DESTDIR}${PREFIX}/bin/guess-ploidy
-	${MV} /${DESTDIR}${PREFIX}/bin/samtools_misc/plot-roh.py \
+	${MV} ${DESTDIR}${PREFIX}/bin/plot-roh.py \
 		${DESTDIR}${PREFIX}/bin/plot-roh
-	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/run-roh.pl \
+	${MV} ${DESTDIR}${PREFIX}/bin/run-roh.pl \
 		${DESTDIR}${PREFIX}/bin/run-roh
-	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/vcfutils.pl \
+	${MV} ${DESTDIR}${PREFIX}/bin/vcfutils.pl \
 		${DESTDIR}${PREFIX}/bin/vcfutils
-	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/plot-vcfstats \
+	${MV} ${DESTDIR}${PREFIX}/bin/plot-vcfstats \
 		${DESTDIR}${PREFIX}/bin/
-	${RMDIR} ${DESTDIR}${PREFIX}/bin/samtools_misc/
 
 .include "../../biology/htslib/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
diff --git a/bcftools/PLIST b/bcftools/PLIST
index b5e0ac006c..d0a6ac2119 100644
--- a/bcftools/PLIST
+++ b/bcftools/PLIST
@@ -9,7 +9,9 @@ bin/vcfutils
 libexec/bcftools/GTisec.so
 libexec/bcftools/GTsubset.so
 libexec/bcftools/ad-bias.so
+libexec/bcftools/add-variantkey.so
 libexec/bcftools/af-dist.so
+libexec/bcftools/allele-length.so
 libexec/bcftools/check-ploidy.so
 libexec/bcftools/check-sparsity.so
 libexec/bcftools/color-chrs.so
@@ -23,15 +25,22 @@ libexec/bcftools/fixploidy.so
 libexec/bcftools/fixref.so
 libexec/bcftools/frameshifts.so
 libexec/bcftools/guess-ploidy.so
+libexec/bcftools/gvcfz.so
 libexec/bcftools/impute-info.so
+libexec/bcftools/indel-stats.so
 libexec/bcftools/isecGT.so
 libexec/bcftools/mendelian.so
 libexec/bcftools/missing2ref.so
+libexec/bcftools/parental-origin.so
 libexec/bcftools/prune.so
+libexec/bcftools/remove-overlaps.so
 libexec/bcftools/setGT.so
 libexec/bcftools/smpl-stats.so
+libexec/bcftools/split-vep.so
 libexec/bcftools/split.so
 libexec/bcftools/tag2tag.so
+libexec/bcftools/trio-dnm.so
 libexec/bcftools/trio-stats.so
 libexec/bcftools/trio-switch-rate.so
+libexec/bcftools/variantkey-hex.so
 man/man1/bcftools.1
diff --git a/bcftools/distinfo b/bcftools/distinfo
index c486cff017..3bfd9db0fd 100644
--- a/bcftools/distinfo
+++ b/bcftools/distinfo
@@ -1,9 +1,9 @@
 $NetBSD$
 
-SHA1 (bcftools-1.9.tar.gz) = 9537a1746b4e434a85dd6ef21ffd5f6ef72f3c5f
-RMD160 (bcftools-1.9.tar.gz) = cd39632d3b998792e5ba43abd46153d2206ae3ef
-SHA512 (bcftools-1.9.tar.gz) = c7da82c78690789c53f4c07c6ac6436cc3eebc5d5df613cee30e9bb6f552763df4aaa1593e715ea5d1825e76d2a6c87dbe5b484805b57ac37243c7ef9131dab8
-Size (bcftools-1.9.tar.gz) = 2394968 bytes
-SHA1 (patch-Makefile) = 09eaeb4d4a422d1d450085cda0350cd874bd04dd
-SHA1 (patch-configure.ac) = 3813b1350d802728d958dc3d3fbe13525f8db942
-SHA1 (patch-misc_run-roh.pl) = aaf7ed9f048a75684f41ae33ecedc03c81937b11
+SHA1 (bcftools-1.10.2.tar.gz) = b19c9ba06b1c8e8f135c1e0ab0e4ff713a291bf4
+RMD160 (bcftools-1.10.2.tar.gz) = 7713e8c5bd4195eb610544adb26158c16525fdac
+SHA512 (bcftools-1.10.2.tar.gz) = 12c004603db557ac69098e83ad3aaa5762b02b4718b79f3dc259fbcc5c74b8dad3726b5f61efb57f0b8e3d0349577f7934240f36c82bd98849885a5593791995
+Size (bcftools-1.10.2.tar.gz) = 2880994 bytes
+SHA1 (patch-Makefile) = 1f1397e9b0389a7b4fccc9eae87981e7ce1d7980
+SHA1 (patch-misc_run-roh.pl) = 8a29ee7b1001af6670955f174ce4dbab31f05659
+SHA1 (patch-test_test.pl) = 5fc3896d9013a6d5caa24a4d3e6798905d1243e1
diff --git a/bcftools/patches/patch-Makefile b/bcftools/patches/patch-Makefile
index bce061c787..95228d8f42 100644
--- a/bcftools/patches/patch-Makefile
+++ b/bcftools/patches/patch-Makefile
@@ -1,43 +1,46 @@
 $NetBSD$
 
-# Respect env
+# Respect pkgsrc env
 
---- Makefile.orig	2018-07-18 08:34:29 UTC
+--- Makefile.orig	2019-12-19 09:57:32.000000000 +0000
 +++ Makefile
-@@ -22,10 +22,10 @@
+@@ -22,12 +22,12 @@
  # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  # DEALINGS IN THE SOFTWARE.
  
 -CC       = gcc
+-AR       = ar
+-RANLIB   = ranlib
 -CPPFLAGS =
--CFLAGS   = -g -Wall -Wc++-compat -O2
+-CFLAGS   = -g -Wall -O2
 -LDFLAGS  =
-+CC       ?= cc
-+CPPFLAGS +=
-+CFLAGS   += -Wall
-+LDFLAGS  +=
++CC       ?= gcc
++AR       ?= ar
++RANLIB   ?= ranlib
++# CPPFLAGS =
++CFLAGS   ?= -g -Wall -O2
++# LDFLAGS  =
  LIBS     =
  
  DYNAMIC_FLAGS = -rdynamic
-@@ -42,26 +42,25 @@ OBJS     = main.o vcfindex.o tabix.o \
-            vcfsort.o \
+@@ -45,12 +45,12 @@ OBJS     = main.o vcfindex.o tabix.o \
             ccall.o em.o prob1.o kmin.o # the original samtools calling
+ PLUGIN_OBJS = vcfplugin.o
  
 -prefix      = /usr/local
-+prefix      = ${PREFIX}
- exec_prefix = $(prefix)
+-exec_prefix = $(prefix)
++PREFIX      ?= /usr/local
++exec_prefix = $(PREFIX)
  bindir      = $(exec_prefix)/bin
  libdir      = $(exec_prefix)/lib
  libexecdir  = $(exec_prefix)/libexec
 -mandir      = $(prefix)/share/man
-+mandir      = $(prefix)/man
++mandir      = $(PREFIX)/share/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
+@@ -59,12 +59,11 @@ pluginpath  = $(plugindir)
+ misc_bindir = $(bindir)
  
  MKDIR_P = mkdir -p
 -INSTALL = install -p
@@ -54,30 +57,12 @@ $NetBSD$
  
  PROGRAMS = bcftools
  MISC_SCRIPTS = \
-@@ -77,7 +76,7 @@ all: $(PROGRAMS) $(TEST_PROGRAMS) plugin
+@@ -78,7 +77,7 @@ TEST_PROGRAMS = test/test-rbuf test/test
  
  ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS)
  ALL_LDFLAGS  = $(HTSLIB_LDFLAGS) $(LDFLAGS)
--ALL_LIBS     = -lz -ldl $(LIBS)
+-ALL_LIBS     = -lz $(DL_LIBS) $(LIBS)
 +ALL_LIBS     = -lz $(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
+ all: $(PROGRAMS) $(TEST_PROGRAMS) plugins
  
- bcftools: $(OBJS) $(HTSLIB)
-@@ -278,7 +277,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: $(PROGRAMS) $(PLUGINS)
--	$(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(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/bcftools/patches/patch-configure.ac b/bcftools/patches/patch-configure.ac
deleted file mode 100644
index ee184943ee..0000000000
--- a/bcftools/patches/patch-configure.ac
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-# Portability
-
---- configure.ac.orig	2018-07-18 08:34:29 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([./version.sh 2>/dev/null]),
-+AC_INIT([BCFtools], [@PORTVERSION@],
-         [samtools-help%lists.sourceforge.net@localhost], [], [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/bcftools/patches/patch-misc_run-roh.pl b/bcftools/patches/patch-misc_run-roh.pl
index 7579ec8ebf..a441e19f69 100644
--- a/bcftools/patches/patch-misc_run-roh.pl
+++ b/bcftools/patches/patch-misc_run-roh.pl
@@ -1,15 +1,24 @@
 $NetBSD$
 
-# Portability
+# bash path
 
---- misc/run-roh.pl.orig	2017-10-18 09:33:24 UTC
+--- misc/run-roh.pl.orig	2019-12-19 09:57:32.000000000 +0000
 +++ misc/run-roh.pl
-@@ -97,7 +97,7 @@ sub cmd
+@@ -110,7 +110,7 @@ sub cmd
+ 
+     if ( $args{verbose} ) { print STDERR $cmd,"\n"; }
+ 
+-    # Why not to use backticks? Perl calls /bin/sh, which is often bash. To get the correct
++    # Why not to use backticks? Perl calls bash, which is often bash. To get the correct
+     #   status of failing pipes, it must be called with the pipefail option.
+ 
+     my $kid_io;
+@@ -127,7 +127,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]: $!");
++        exec('bash', '-c', $cmd) or error("Failed to run the command [bash -c $cmd]: $!");
      }
  
      if ( exists($args{exit_on_error}) && !$args{exit_on_error} ) { return @out; }
diff --git a/bcftools/patches/patch-test_test.pl b/bcftools/patches/patch-test_test.pl
new file mode 100644
index 0000000000..ae6bd1a5dc
--- /dev/null
+++ b/bcftools/patches/patch-test_test.pl
@@ -0,0 +1,42 @@
+$NetBSD$
+
+# Portable bash path
+
+--- test/test.pl.orig	2020-07-21 20:47:32.977230067 +0000
++++ test/test.pl
+@@ -610,7 +610,7 @@ sub _cmd
+     else
+     {
+         # child
+-        exec('/bin/bash', '-o','pipefail','-c', $cmd) or error("Cannot execute the command [/bin/sh -o pipefail -c $cmd]: $!");
++        exec('bash', '-o','pipefail','-c', $cmd) or error("Cannot execute the command [/bin/sh -o pipefail -c $cmd]: $!");
+     }
+     return ($? >> 8, join('',@out));
+ }
+@@ -622,7 +622,7 @@ sub _cmd3
+     my $pid = fork();
+     if ( !$pid )
+     {
+-        exec('/bin/bash', '-o','pipefail','-c', "($cmd) 2>$tmp.e >$tmp.o");
++        exec('bash', '-o','pipefail','-c', "($cmd) 2>$tmp.e >$tmp.o");
+     }
+     waitpid($pid,0);
+ 
+@@ -1063,7 +1063,7 @@ sub test_usage
+     my $command = $args{cmd};
+     my $commandpath = $$opts{bin}."/".$command;
+     my ($ret,$out) = _cmd("$commandpath $args{redirection} 2>&1");
+-    if ( $out =~ m/\/bin\/bash.*no.*such/i ) { failed($opts,$test,"could not run $commandpath: $out"); return; }
++    if ( $out =~ m/bash.*no.*such/i ) { failed($opts,$test,"could not run $commandpath: $out"); return; }
+ 
+     my @sections = ($out =~ m/(^[A-Za-z]+.*?)(?:(?=^[A-Za-z]+:)|\z)/msg);
+ 
+@@ -1118,7 +1118,7 @@ sub test_usage_subcommand
+     my $subcommand = $args{subcmd};
+     my $commandpath = $$opts{bin}."/".$command;
+     my ($ret,$out) = _cmd("$commandpath $subcommand $args{redirection} 2>&1");
+-    if ( $out =~ m/\/bin\/bash.*no.*such/i ) { failed($opts,$test,"could not run $commandpath $subcommand: $out"); return; }
++    if ( $out =~ m/bash.*no.*such/i ) { failed($opts,$test,"could not run $commandpath $subcommand: $out"); return; }
+ 
+     my @sections = ($out =~ m/(^[A-Za-z]+.*?)(?:(?=^[A-Za-z]+:)|\z)/msg);
+ 


Home | Main Index | Thread Index | Old Index