pkgsrc-WIP-changes archive

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

Import samtools-1.3 as wip/samtools.



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon4000%gmail.com@localhost>
Pushed By:	outpaddling
Date:		Wed May 11 09:42:57 2016 -0500
Changeset:	ccc9a4307307da8fccafe5bda5bfe88240eb8ef5

Added Files:
	samtools/DESCR
	samtools/Makefile
	samtools/PLIST
	samtools/TODO
	samtools/distinfo
	samtools/files/ax_with_curses.m4
	samtools/files/ax_with_htslib.m4
	samtools/files/pkg-message.in
	samtools/patches/patch-Makefile
	samtools/patches/patch-configure.ac
	samtools/patches/patch-dict.c
	samtools/patches/patch-errmod.c
	samtools/patches/patch-test_test.pl

Log Message:
Import samtools-1.3 as wip/samtools.

Samtools implements various utilities for post-processing alignments in the
SAM, BAM, and CRAM formats, including indexing, variant calling (in conjunction
with bcftools), and a simple alignment viewer.

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

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

diffstat:
 samtools/DESCR                      |   3 +
 samtools/Makefile                   |  67 +++++
 samtools/PLIST                      |  24 ++
 samtools/TODO                       |   1 +
 samtools/distinfo                   |  11 +
 samtools/files/ax_with_curses.m4    | 518 ++++++++++++++++++++++++++++++++++++
 samtools/files/ax_with_htslib.m4    | 140 ++++++++++
 samtools/files/pkg-message.in       |   7 +
 samtools/patches/patch-Makefile     |  64 +++++
 samtools/patches/patch-configure.ac |  22 ++
 samtools/patches/patch-dict.c       |  13 +
 samtools/patches/patch-errmod.c     |  19 ++
 samtools/patches/patch-test_test.pl |  33 +++
 13 files changed, 922 insertions(+)

diffs:
diff --git a/samtools/DESCR b/samtools/DESCR
new file mode 100644
index 0000000..23d11d1
--- /dev/null
+++ b/samtools/DESCR
@@ -0,0 +1,3 @@
+Samtools implements various utilities for post-processing alignments in the
+SAM, BAM, and CRAM formats, including indexing, variant calling (in conjunction
+with bcftools), and a simple alignment viewer.
diff --git a/samtools/Makefile b/samtools/Makefile
new file mode 100644
index 0000000..a69aa84
--- /dev/null
+++ b/samtools/Makefile
@@ -0,0 +1,67 @@
+# $NetBSD$
+#
+###########################################################
+#                  Generated by fbsd2pkg                  #
+#              Wed May 11 09:22:40 CDT 2016               #
+###########################################################
+
+###########################################################
+# Unconverted and partially converted FreeBSD port syntax:
+
+# TEST_DEPENDS=	bash:${PORTSDIR}/shells/bash
+#PLIST_SUB=	PORTVERSION="${PORTVERSION}"
+#TEST_TARGET=	test
+
+DISTNAME=	samtools-${PORTVERSION}
+CATEGORIES=	biology
+MASTER_SITES=	${MASTER_SITE_GITHUB:=samtools/}
+GITHUB_PROJECT=	samtools
+GITHUB_TAG=	${PORTVERSION}
+
+MAINTAINER=	bacon4000%gmail.com@localhost
+HOMEPAGE=	http://www.htslib.org/
+COMMENT=	Tools for manipulating next-generation sequencing data
+# LICENSE=	${WRKSRC}/LICENSE
+
+# Test and change if necessary.
+# MAKE_JOBS_SAFE=	no
+
+# Just assuming C and C++: Adjust this!
+USE_LANGUAGES=	c c++
+USE_TOOLS+=	autoconf automake autoreconf gmake perl:test
+GNU_CONFIGURE=	yes
+REPLACE_PERL=	misc/*.pl misc/plot-bamstats test/test.pl
+REPLACE_PYTHON=	misc/*.py
+
+SUBST_CLASSES+=		version
+SUBST_STAGE.version=	post-patch
+SUBST_SED.version+=	-e 's|@PORTVERSION@|${PORTVERSION}|g'
+SUBST_FILES.version+=	${WRKSRC}/configure.ac
+
+CPPFLAGS+=	-I${LOCALBASE}/include
+MAKE_ENV=	INSTALL_LIB="${INSTALL_LIB}" \
+		INSTALL_DATA="${INSTALL_DATA}" \
+		INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+		INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
+		INSTALL_DIR="${MKDIR}"
+
+FETCH_USING=	curl
+
+PORTVERSION=	1.3
+SITE_PERL=	${PREFIX}/share
+DATADIR=	${PREFIX}/share/samtools
+DOCSDIR=	${PREFIX}/share/doc/samtools
+EXAMPLESDIR=	${PREFIX}/share/examples/samtools
+
+post-patch:
+	${CP} ${FILESDIR}/ax_with_htslib.m4 ${WRKSRC}/
+	${CP} ${FILESDIR}/ax_with_curses.m4 ${WRKSRC}/
+
+pre-configure:
+	cd ${WRKSRC} && autoreconf -if
+
+.include "../../devel/ncurses/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../wip/htslib/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/samtools/PLIST b/samtools/PLIST
new file mode 100644
index 0000000..114d658
--- /dev/null
+++ b/samtools/PLIST
@@ -0,0 +1,24 @@
+@comment $NetBSD$
+bin/samtools
+bin/samtools_misc/ace2sam
+bin/samtools_misc/blast2sam.pl
+bin/samtools_misc/bowtie2sam.pl
+bin/samtools_misc/export2sam.pl
+bin/samtools_misc/interpolate_sam.pl
+bin/samtools_misc/maq2sam-long
+bin/samtools_misc/maq2sam-short
+bin/samtools_misc/md5fa
+bin/samtools_misc/md5sum-lite
+bin/samtools_misc/novo2sam.pl
+bin/samtools_misc/plot-bamstats
+bin/samtools_misc/psl2sam.pl
+bin/samtools_misc/sam2vcf.pl
+bin/samtools_misc/samtools.pl
+bin/samtools_misc/seq_cache_populate.pl
+bin/samtools_misc/soap2sam.pl
+bin/samtools_misc/varfilter.py
+bin/samtools_misc/wgsim
+bin/samtools_misc/wgsim_eval.pl
+bin/samtools_misc/zoom2sam.pl
+man/man1/samtools.1
+man/man1/wgsim.1
diff --git a/samtools/TODO b/samtools/TODO
new file mode 100644
index 0000000..b2e3b56
--- /dev/null
+++ b/samtools/TODO
@@ -0,0 +1 @@
+Clean up and test.
diff --git a/samtools/distinfo b/samtools/distinfo
new file mode 100644
index 0000000..259baa7
--- /dev/null
+++ b/samtools/distinfo
@@ -0,0 +1,11 @@
+$NetBSD$
+
+SHA1 (samtools-1.3.tar.gz) = 88aab7f6d606e9443569c42b4c1722abd71f8e29
+RMD160 (samtools-1.3.tar.gz) = c263141a599710598734b56f77e137e997ad59c4
+SHA512 (samtools-1.3.tar.gz) = 8d34a3b61069a09c8ed2ddd6e66bef5e26f97686dc866936468925182c4a964ae11b0dc728bf8187d63e10b5a83c490f2145569b6eaf4f305766100f12423198
+Size (samtools-1.3.tar.gz) = 3742904 bytes
+SHA1 (patch-Makefile) = 21fd9eee20da586d962a74dfea3ded77c7a1e897
+SHA1 (patch-configure.ac) = 990c8588e07ce03b74821a634c27b70c055a2a84
+SHA1 (patch-dict.c) = 74073ae914046ae8b812be190c358d3f2ad3530c
+SHA1 (patch-errmod.c) = 72a6fe984aa7b53ec2b6d7e7e12cffdf72ee12ff
+SHA1 (patch-test_test.pl) = 3245d783901f98ba19f90253a15e455cd52dfd26
diff --git a/samtools/files/ax_with_curses.m4 b/samtools/files/ax_with_curses.m4
new file mode 100644
index 0000000..e4cbd31
--- /dev/null
+++ b/samtools/files/ax_with_curses.m4
@@ -0,0 +1,518 @@
+# ===========================================================================
+#      http://www.gnu.org/software/autoconf-archive/ax_with_curses.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_WITH_CURSES
+#
+# DESCRIPTION
+#
+#   This macro checks whether a SysV or X/Open-compatible Curses library is
+#   present, along with the associated header file.  The NcursesW
+#   (wide-character) library is searched for first, followed by Ncurses,
+#   then the system-default plain Curses.  The first library found is the
+#   one returned.
+#
+#   The following options are understood: --with-ncursesw, --with-ncurses,
+#   --without-ncursesw, --without-ncurses.  The "--with" options force the
+#   macro to use that particular library, terminating with an error if not
+#   found.  The "--without" options simply skip the check for that library.
+#   The effect on the search pattern is:
+#
+#     (no options)                           - NcursesW, Ncurses, Curses
+#     --with-ncurses     --with-ncursesw     - NcursesW only [*]
+#     --without-ncurses  --with-ncursesw     - NcursesW only [*]
+#                        --with-ncursesw     - NcursesW only [*]
+#     --with-ncurses     --without-ncursesw  - Ncurses only [*]
+#     --with-ncurses                         - NcursesW, Ncurses [**]
+#     --without-ncurses  --without-ncursesw  - Curses only
+#                        --without-ncursesw  - Ncurses, Curses
+#     --without-ncurses                      - NcursesW, Curses
+#
+#   [*]  If the library is not found, abort the configure script.
+#
+#   [**] If the second library (Ncurses) is not found, abort configure.
+#
+#   The following preprocessor symbols may be defined by this macro if the
+#   appropriate conditions are met:
+#
+#     HAVE_CURSES             - if any SysV or X/Open Curses library found
+#     HAVE_CURSES_ENHANCED    - if library supports X/Open Enhanced functions
+#     HAVE_CURSES_COLOR       - if library supports color (enhanced functions)
+#     HAVE_CURSES_OBSOLETE    - if library supports certain obsolete features
+#     HAVE_NCURSESW           - if NcursesW (wide char) library is to be used
+#     HAVE_NCURSES            - if the Ncurses library is to be used
+#
+#     HAVE_CURSES_H           - if <curses.h> is present and should be used
+#     HAVE_NCURSESW_H         - if <ncursesw.h> should be used
+#     HAVE_NCURSES_H          - if <ncurses.h> should be used
+#     HAVE_NCURSESW_CURSES_H  - if <ncursesw/curses.h> should be used
+#     HAVE_NCURSES_CURSES_H   - if <ncurses/curses.h> should be used
+#
+#   (These preprocessor symbols are discussed later in this document.)
+#
+#   The following output variable is defined by this macro; it is precious
+#   and may be overridden on the ./configure command line:
+#
+#     CURSES_LIB  - library to add to xxx_LDADD
+#
+#   The library listed in CURSES_LIB is NOT added to LIBS by default. You
+#   need to add CURSES_LIB to the appropriate xxx_LDADD line in your
+#   Makefile.am.  For example:
+#
+#     prog_LDADD = @CURSES_LIB@
+#
+#   If CURSES_LIB is set on the configure command line (such as by running
+#   "./configure CURSES_LIB=-lmycurses"), then the only header searched for
+#   is <curses.h>.  The user may use the CPPFLAGS precious variable to
+#   override the standard #include search path.  If the user needs to
+#   specify an alternative path for a library (such as for a non-standard
+#   NcurseW), the user should use the LDFLAGS variable.
+#
+#   The following shell variables may be defined by this macro:
+#
+#     ax_cv_curses           - set to "yes" if any Curses library found
+#     ax_cv_curses_enhanced  - set to "yes" if Enhanced functions present
+#     ax_cv_curses_color     - set to "yes" if color functions present
+#     ax_cv_curses_obsolete  - set to "yes" if obsolete features present
+#
+#     ax_cv_ncursesw      - set to "yes" if NcursesW library found
+#     ax_cv_ncurses       - set to "yes" if Ncurses library found
+#     ax_cv_plaincurses   - set to "yes" if plain Curses library found
+#     ax_cv_curses_which  - set to "ncursesw", "ncurses", "plaincurses" or "no"
+#
+#   These variables can be used in your configure.ac to determine the level
+#   of support you need from the Curses library.  For example, if you must
+#   have either Ncurses or NcursesW, you could include:
+#
+#     AX_WITH_CURSES
+#     if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
+#         AC_MSG_ERROR([requires either NcursesW or Ncurses library])
+#     fi
+#
+#   If any Curses library will do (but one must be present and must support
+#   color), you could use:
+#
+#     AX_WITH_CURSES
+#     if test "x$ax_cv_curses" != xyes || test "x$ax_cv_curses_color" != xyes; then
+#         AC_MSG_ERROR([requires an X/Open-compatible Curses library with color])
+#     fi
+#
+#   Certain preprocessor symbols and shell variables defined by this macro
+#   can be used to determine various features of the Curses library.  In
+#   particular, HAVE_CURSES and ax_cv_curses are defined if the Curses
+#   library found conforms to the traditional SysV and/or X/Open Base Curses
+#   definition.  Any working Curses library conforms to this level.
+#
+#   HAVE_CURSES_ENHANCED and ax_cv_curses_enhanced are defined if the
+#   library supports the X/Open Enhanced Curses definition.  In particular,
+#   the wide-character types attr_t, cchar_t and wint_t, the functions
+#   wattr_set() and wget_wch() and the macros WA_NORMAL and _XOPEN_CURSES
+#   are checked.  The Ncurses library does NOT conform to this definition,
+#   although NcursesW does.
+#
+#   HAVE_CURSES_COLOR and ax_cv_curses_color are defined if the library
+#   supports color functions and macros such as COLOR_PAIR, A_COLOR,
+#   COLOR_WHITE, COLOR_RED and init_pair().  These are NOT part of the
+#   X/Open Base Curses definition, but are part of the Enhanced set of
+#   functions.  The Ncurses library DOES support these functions, as does
+#   NcursesW.
+#
+#   HAVE_CURSES_OBSOLETE and ax_cv_curses_obsolete are defined if the
+#   library supports certain features present in SysV and BSD Curses but not
+#   defined in the X/Open definition.  In particular, the functions
+#   getattrs(), getcurx() and getmaxx() are checked.
+#
+#   To use the HAVE_xxx_H preprocessor symbols, insert the following into
+#   your system.h (or equivalent) header file:
+#
+#     #if defined HAVE_NCURSESW_CURSES_H
+#     #  include <ncursesw/curses.h>
+#     #elif defined HAVE_NCURSESW_H
+#     #  include <ncursesw.h>
+#     #elif defined HAVE_NCURSES_CURSES_H
+#     #  include <ncurses/curses.h>
+#     #elif defined HAVE_NCURSES_H
+#     #  include <ncurses.h>
+#     #elif defined HAVE_CURSES_H
+#     #  include <curses.h>
+#     #else
+#     #  error "SysV or X/Open-compatible Curses header file required"
+#     #endif
+#
+#   For previous users of this macro: you should not need to change anything
+#   in your configure.ac or Makefile.am, as the previous (serial 10)
+#   semantics are still valid.  However, you should update your system.h (or
+#   equivalent) header file to the fragment shown above. You are encouraged
+#   also to make use of the extended functionality provided by this version
+#   of AX_WITH_CURSES, as well as in the additional macros
+#   AX_WITH_CURSES_PANEL, AX_WITH_CURSES_MENU and AX_WITH_CURSES_FORM.
+#
+# LICENSE
+#
+#   Copyright (c) 2009 Mark Pulford <mark%kyne.com.au@localhost>
+#   Copyright (c) 2009 Damian Pietras <daper%daper.net@localhost>
+#   Copyright (c) 2012 Reuben Thomas <rrt%sc3d.org@localhost>
+#   Copyright (c) 2011 John Zaitseff <J.Zaitseff%zap.org.au@localhost>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 15
+
+AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES])
+AC_DEFUN([AX_WITH_CURSES], [
+    AC_ARG_VAR([CURSES_LIB], [linker library for Curses, e.g. -lcurses])
+    AC_ARG_WITH([ncurses], [AS_HELP_STRING([--with-ncurses],
+        [force the use of Ncurses or NcursesW])],
+        [], [with_ncurses=check])
+    AC_ARG_WITH([ncursesw], [AS_HELP_STRING([--without-ncursesw],
+        [do not use NcursesW (wide character support)])],
+        [], [with_ncursesw=check])
+
+    ax_saved_LIBS=$LIBS
+    AS_IF([test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes],
+        [ax_with_plaincurses=no], [ax_with_plaincurses=check])
+
+    ax_cv_curses_which=no
+
+    # Test for NcursesW
+
+    AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncursesw" != xno], [
+        LIBS="$ax_saved_LIBS -lncursesw"
+
+        AC_CACHE_CHECK([for NcursesW wide-character library], [ax_cv_ncursesw], [
+            AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
+                [ax_cv_ncursesw=yes], [ax_cv_ncursesw=no])
+        ])
+        AS_IF([test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes], [
+            AC_MSG_ERROR([--with-ncursesw specified but could not find NcursesW library])
+        ])
+
+        AS_IF([test "x$ax_cv_ncursesw" = xyes], [
+            ax_cv_curses=yes
+            ax_cv_curses_which=ncursesw
+            CURSES_LIB="-lncursesw"
+            AC_DEFINE([HAVE_NCURSESW], [1], [Define to 1 if the NcursesW library is present])
+            AC_DEFINE([HAVE_CURSES],   [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
+
+            AC_CACHE_CHECK([for working ncursesw/curses.h], [ax_cv_header_ncursesw_curses_h], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                        @%:@define _XOPEN_SOURCE_EXTENDED 1
+                        @%:@include <ncursesw/curses.h>
+                    ]], [[
+                        chtype a = A_BOLD;
+                        int b = KEY_LEFT;
+                        chtype c = COLOR_PAIR(1) & A_COLOR;
+                        attr_t d = WA_NORMAL;
+                        cchar_t e;
+                        wint_t f;
+                        int g = getattrs(stdscr);
+                        int h = getcurx(stdscr) + getmaxx(stdscr);
+                        initscr();
+                        init_pair(1, COLOR_WHITE, COLOR_RED);
+                        wattr_set(stdscr, d, 0, NULL);
+                        wget_wch(stdscr, &f);
+                    ]])],
+                    [ax_cv_header_ncursesw_curses_h=yes],
+                    [ax_cv_header_ncursesw_curses_h=no])
+            ])
+            AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xyes], [
+                ax_cv_curses_enhanced=yes
+                ax_cv_curses_color=yes
+                ax_cv_curses_obsolete=yes
+                AC_DEFINE([HAVE_CURSES_ENHANCED],   [1], [Define to 1 if library supports X/Open Enhanced functions])
+                AC_DEFINE([HAVE_CURSES_COLOR],      [1], [Define to 1 if library supports color (enhanced functions)])
+                AC_DEFINE([HAVE_CURSES_OBSOLETE],   [1], [Define to 1 if library supports certain obsolete features])
+                AC_DEFINE([HAVE_NCURSESW_CURSES_H], [1], [Define to 1 if <ncursesw/curses.h> is present])
+            ])
+
+            AC_CACHE_CHECK([for working ncursesw.h], [ax_cv_header_ncursesw_h], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                        @%:@define _XOPEN_SOURCE_EXTENDED 1
+                        @%:@include <ncursesw.h>
+                    ]], [[
+                        chtype a = A_BOLD;
+                        int b = KEY_LEFT;
+                        chtype c = COLOR_PAIR(1) & A_COLOR;
+                        attr_t d = WA_NORMAL;
+                        cchar_t e;
+                        wint_t f;
+                        int g = getattrs(stdscr);
+                        int h = getcurx(stdscr) + getmaxx(stdscr);
+                        initscr();
+                        init_pair(1, COLOR_WHITE, COLOR_RED);
+                        wattr_set(stdscr, d, 0, NULL);
+                        wget_wch(stdscr, &f);
+                    ]])],
+                    [ax_cv_header_ncursesw_h=yes],
+                    [ax_cv_header_ncursesw_h=no])
+            ])
+            AS_IF([test "x$ax_cv_header_ncursesw_h" = xyes], [
+                ax_cv_curses_enhanced=yes
+                ax_cv_curses_color=yes
+                ax_cv_curses_obsolete=yes
+                AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
+                AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
+                AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
+                AC_DEFINE([HAVE_NCURSESW_H],      [1], [Define to 1 if <ncursesw.h> is present])
+            ])
+
+            AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h_with_ncursesw], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                        @%:@define _XOPEN_SOURCE_EXTENDED 1
+                        @%:@include <ncurses.h>
+                    ]], [[
+                        chtype a = A_BOLD;
+                        int b = KEY_LEFT;
+                        chtype c = COLOR_PAIR(1) & A_COLOR;
+                        attr_t d = WA_NORMAL;
+                        cchar_t e;
+                        wint_t f;
+                        int g = getattrs(stdscr);
+                        int h = getcurx(stdscr) + getmaxx(stdscr);
+                        initscr();
+                        init_pair(1, COLOR_WHITE, COLOR_RED);
+                        wattr_set(stdscr, d, 0, NULL);
+                        wget_wch(stdscr, &f);
+                    ]])],
+                    [ax_cv_header_ncurses_h_with_ncursesw=yes],
+                    [ax_cv_header_ncurses_h_with_ncursesw=no])
+            ])
+            AS_IF([test "x$ax_cv_header_ncurses_h_with_ncursesw" = xyes], [
+                ax_cv_curses_enhanced=yes
+                ax_cv_curses_color=yes
+                ax_cv_curses_obsolete=yes
+                AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
+                AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
+                AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
+                AC_DEFINE([HAVE_NCURSES_H],       [1], [Define to 1 if <ncurses.h> is present])
+            ])
+
+            AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xno && test "x$ax_cv_header_ncursesw_h" = xno && test "x$ax_cv_header_ncurses_h_with_ncursesw" = xno], [
+                AC_MSG_WARN([could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h])
+            ])
+        ])
+    ])
+
+    # Test for Ncurses
+
+    AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [
+        LIBS="$ax_saved_LIBS -lncurses"
+
+        AC_CACHE_CHECK([for Ncurses library], [ax_cv_ncurses], [
+            AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
+                [ax_cv_ncurses=yes], [ax_cv_ncurses=no])
+        ])
+        AS_IF([test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes], [
+            AC_MSG_ERROR([--with-ncurses specified but could not find Ncurses library])
+        ])
+
+        AS_IF([test "x$ax_cv_ncurses" = xyes], [
+            ax_cv_curses=yes
+            ax_cv_curses_which=ncurses
+            CURSES_LIB="-lncurses"
+            AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if the Ncurses library is present])
+            AC_DEFINE([HAVE_CURSES],  [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
+
+            AC_CACHE_CHECK([for working ncurses/curses.h], [ax_cv_header_ncurses_curses_h], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                        @%:@include <ncurses/curses.h>
+                    ]], [[
+                        chtype a = A_BOLD;
+                        int b = KEY_LEFT;
+                        chtype c = COLOR_PAIR(1) & A_COLOR;
+                        int g = getattrs(stdscr);
+                        int h = getcurx(stdscr) + getmaxx(stdscr);
+                        initscr();
+                        init_pair(1, COLOR_WHITE, COLOR_RED);
+                    ]])],
+                    [ax_cv_header_ncurses_curses_h=yes],
+                    [ax_cv_header_ncurses_curses_h=no])
+            ])
+            AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xyes], [
+                ax_cv_curses_color=yes
+                ax_cv_curses_obsolete=yes
+                AC_DEFINE([HAVE_CURSES_COLOR],     [1], [Define to 1 if library supports color (enhanced functions)])
+                AC_DEFINE([HAVE_CURSES_OBSOLETE],  [1], [Define to 1 if library supports certain obsolete features])
+                AC_DEFINE([HAVE_NCURSES_CURSES_H], [1], [Define to 1 if <ncurses/curses.h> is present])
+            ])
+
+            AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                        @%:@include <ncurses.h>
+                    ]], [[
+                        chtype a = A_BOLD;
+                        int b = KEY_LEFT;
+                        chtype c = COLOR_PAIR(1) & A_COLOR;
+                        int g = getattrs(stdscr);
+                        int h = getcurx(stdscr) + getmaxx(stdscr);
+                        initscr();
+                        init_pair(1, COLOR_WHITE, COLOR_RED);
+                    ]])],
+                    [ax_cv_header_ncurses_h=yes],
+                    [ax_cv_header_ncurses_h=no])
+            ])
+            AS_IF([test "x$ax_cv_header_ncurses_h" = xyes], [
+                ax_cv_curses_color=yes
+                ax_cv_curses_obsolete=yes
+                AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
+                AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
+                AC_DEFINE([HAVE_NCURSES_H],       [1], [Define to 1 if <ncurses.h> is present])
+            ])
+
+            AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xno && test "x$ax_cv_header_ncurses_h" = xno], [
+                AC_MSG_WARN([could not find a working ncurses/curses.h or ncurses.h])
+            ])
+        ])
+    ])
+
+    # Test for plain Curses (or if CURSES_LIB was set by user)
+
+    AS_IF([test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno], [
+        AS_IF([test "x$CURSES_LIB" != x], [
+            LIBS="$ax_saved_LIBS $CURSES_LIB"
+        ], [
+            LIBS="$ax_saved_LIBS -lcurses"
+        ])
+
+        AC_CACHE_CHECK([for Curses library], [ax_cv_plaincurses], [
+            AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
+                [ax_cv_plaincurses=yes], [ax_cv_plaincurses=no])
+        ])
+
+        AS_IF([test "x$ax_cv_plaincurses" = xyes], [
+            ax_cv_curses=yes
+            ax_cv_curses_which=plaincurses
+            AS_IF([test "x$CURSES_LIB" = x], [
+                CURSES_LIB="-lcurses"
+            ])
+            AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
+
+            # Check for base conformance (and header file)
+
+            AC_CACHE_CHECK([for working curses.h], [ax_cv_header_curses_h], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                        @%:@include <curses.h>
+                    ]], [[
+                        chtype a = A_BOLD;
+                        int b = KEY_LEFT;
+                        initscr();
+                    ]])],
+                    [ax_cv_header_curses_h=yes],
+                    [ax_cv_header_curses_h=no])
+            ])
+            AS_IF([test "x$ax_cv_header_curses_h" = xyes], [
+                AC_DEFINE([HAVE_CURSES_H], [1], [Define to 1 if <curses.h> is present])
+
+                # Check for X/Open Enhanced conformance
+
+                AC_CACHE_CHECK([for X/Open Enhanced Curses conformance], [ax_cv_plaincurses_enhanced], [
+                    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                            @%:@define _XOPEN_SOURCE_EXTENDED 1
+                            @%:@include <curses.h>
+                            @%:@ifndef _XOPEN_CURSES
+                            @%:@error "this Curses library is not enhanced"
+                            "this Curses library is not enhanced"
+                            @%:@endif
+                        ]], [[
+                            chtype a = A_BOLD;
+                            int b = KEY_LEFT;
+                            chtype c = COLOR_PAIR(1) & A_COLOR;
+                            attr_t d = WA_NORMAL;
+                            cchar_t e;
+                            wint_t f;
+                            initscr();
+                            init_pair(1, COLOR_WHITE, COLOR_RED);
+                            wattr_set(stdscr, d, 0, NULL);
+                            wget_wch(stdscr, &f);
+                        ]])],
+                        [ax_cv_plaincurses_enhanced=yes],
+                        [ax_cv_plaincurses_enhanced=no])
+                ])
+                AS_IF([test "x$ax_cv_plaincurses_enhanced" = xyes], [
+                    ax_cv_curses_enhanced=yes
+                    ax_cv_curses_color=yes
+                    AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
+                    AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
+                ])
+
+                # Check for color functions
+
+                AC_CACHE_CHECK([for Curses color functions], [ax_cv_plaincurses_color], [
+                    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                        @%:@define _XOPEN_SOURCE_EXTENDED 1
+                        @%:@include <curses.h>
+                        ]], [[
+                            chtype a = A_BOLD;
+                            int b = KEY_LEFT;
+                            chtype c = COLOR_PAIR(1) & A_COLOR;
+                            initscr();
+                            init_pair(1, COLOR_WHITE, COLOR_RED);
+                        ]])],
+                        [ax_cv_plaincurses_color=yes],
+                        [ax_cv_plaincurses_color=no])
+                ])
+                AS_IF([test "x$ax_cv_plaincurses_color" = xyes], [
+                    ax_cv_curses_color=yes
+                    AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
+                ])
+
+                # Check for obsolete functions
+
+                AC_CACHE_CHECK([for obsolete Curses functions], [ax_cv_plaincurses_obsolete], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                        @%:@include <curses.h>
+                    ]], [[
+                        chtype a = A_BOLD;
+                        int b = KEY_LEFT;
+                        int g = getattrs(stdscr);
+                        int h = getcurx(stdscr) + getmaxx(stdscr);
+                        initscr();
+                    ]])],
+                    [ax_cv_plaincurses_obsolete=yes],
+                    [ax_cv_plaincurses_obsolete=no])
+                ])
+                AS_IF([test "x$ax_cv_plaincurses_obsolete" = xyes], [
+                    ax_cv_curses_obsolete=yes
+                    AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
+                ])
+            ])
+
+            AS_IF([test "x$ax_cv_header_curses_h" = xno], [
+                AC_MSG_WARN([could not find a working curses.h])
+            ])
+        ])
+    ])
+
+    AS_IF([test "x$ax_cv_curses"          != xyes], [ax_cv_curses=no])
+    AS_IF([test "x$ax_cv_curses_enhanced" != xyes], [ax_cv_curses_enhanced=no])
+    AS_IF([test "x$ax_cv_curses_color"    != xyes], [ax_cv_curses_color=no])
+    AS_IF([test "x$ax_cv_curses_obsolete" != xyes], [ax_cv_curses_obsolete=no])
+
+    LIBS=$ax_saved_LIBS
+])dnl
diff --git a/samtools/files/ax_with_htslib.m4 b/samtools/files/ax_with_htslib.m4
new file mode 100644
index 0000000..f39e4eb
--- /dev/null
+++ b/samtools/files/ax_with_htslib.m4
@@ -0,0 +1,140 @@
+# ===========================================================================
+#      http://www.gnu.org/software/autoconf-archive/ax_with_htslib.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_WITH_HTSLIB
+#
+# DESCRIPTION
+#
+#   This macro checks whether HTSlib <http://www.htslib.org/> is installed
+#   or nearby, and adds a --with-htslib=DIR option to the configure script
+#   for specifying the location.  It locates either an installation prefix
+#   (with 'include' and 'lib' subdirectories) or an HTSlib source tree, as
+#   HTSlib is fast-moving and users may wish to use an in-development tree.
+#
+#   Different checks occur depending on the --with-htslib argument given:
+#
+#   With --with-htslib=DIR, checks whether DIR is a source tree or contains
+#     a working installation.
+#   By default, searches for a source tree (with a name matching htslib*)
+#     within or alongside $srcdir.  Produces AC_MSG_ERROR if there are
+#     several equally-likely candidates.  If there are none, checks for
+#     a working default installation.
+#   With --with-htslib=system, checks for a working default installation.
+#
+#   If a source tree is found or specified, it is added to AC_CONFIG_SUBDIRS
+#   (which unfortunately may cause a "you should use literals" warning when
+#   autoconf is run).
+#
+#   The following output variables are set by this macro:
+#
+#     HTSDIR              Directory containing HTSlib source tree
+#     HTSLIB_CPPFLAGS     Preprocessor flags for compiling with HTSlib
+#     HTSLIB_LDFLAGS      Linker flags for linking with HTSlib
+#
+#   The following shell variables may be defined:
+#
+#     ax_cv_htslib        Set to "yes" if HTSlib was found
+#     ax_cv_htslib_which  Set to "source", "install", or "none"
+#
+# LICENSE
+#
+#   Copyright (C) 2015 Genome Research Ltd
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
+
+#serial 1
+
+AC_DEFUN([AX_WITH_HTSLIB],
+[AC_ARG_WITH([htslib],
+  [AS_HELP_STRING([--with-htslib=DIR],
+    [use the HTSlib source tree or installation in DIR])
+dnl Not indented, to avoid extra whitespace outwith AS_HELP_STRING()
+AS_HELP_STRING([--with-htslib=system],
+    [use only a system HTSlib installation])],
+  [], [with_htslib=search])
+
+case $with_htslib in
+yes|search)
+  AC_MSG_CHECKING([location of HTSlib source tree])
+  case $srcdir in
+    .) srcp= ;;
+    *) srcp=$srcdir/ ;;
+  esac
+  found=
+  for dir in ${srcp}htslib* -- ${srcp}../htslib -- ${srcp}../htslib*
+  do
+    if test "$dir" = "--"; then
+      test -n "$found" && break
+    elif test -f "$dir/hts.c" && test -f "$dir/htslib/hts.h"; then
+      found="${found}1"
+      HTSDIR=$dir
+    fi
+  done
+  if test -z "$found"; then
+    AC_MSG_RESULT([none found])
+    ax_cv_htslib_which=system
+  elif test "$found" = 1; then
+    AC_MSG_RESULT([$HTSDIR])
+    ax_cv_htslib_which=source
+  else
+    AC_MSG_RESULT([several directories found])
+    AC_MSG_ERROR([use --with-htslib=DIR to select which HTSlib to use])
+  fi
+  ;;
+no) ax_cv_htslib_which=none ;;
+system) ax_cv_htslib_which=system ;;
+*)
+  HTSDIR=$with_htslib
+  if test -f "$HTSDIR/hts.c" && test -f "$HTSDIR/htslib/hts.h"; then
+    ax_cv_htslib_which=source
+  else
+    ax_cv_htslib_which=install
+  fi
+  ;;
+esac
+
+case $ax_cv_htslib_which in
+#source)
+#  ax_cv_htslib=yes
+#  HTSLIB_CPPFLAGS="-I$HTSDIR"
+#  HTSLIB_LDFLAGS="-L$HTSDIR"
+#  # We can't use a literal, because $HTSDIR is user-provided and variable
+#  AC_CONFIG_SUBDIRS($HTSDIR)
+#  ;;
+system)
+  AC_CHECK_HEADER([htslib/sam.h],
+    [AC_CHECK_LIB(hts, hts_version, [ax_cv_htslib=yes], [ax_cv_htslib=no])],
+    [ax_cv_htslib=no], [;])
+  ax_cv_htslib_which=install
+  HTSDIR=
+  HTSLIB_CPPFLAGS=
+  HTSLIB_LDFLAGS=
+  ;;
+install)
+  ax_saved_CPPFLAGS=$CPPFLAGS
+  ax_saved_LDFLAGS=$LDFLAGS
+  HTSLIB_CPPFLAGS="-I$HTSDIR/include"
+  HTSLIB_LDFLAGS="-L$HTSDIR/lib"
+  CPPFLAGS="$CPPFLAGS $HTSLIB_CPPFLAGS"
+  LDFLAGS="$LDFLAGS $HTSLIB_LDFLAGS"
+  AC_CHECK_HEADER([htslib/sam.h],
+    [AC_CHECK_LIB(hts, hts_version, [ax_cv_htslib=yes], [ax_cv_htslib=no])],
+    [ax_cv_htslib=no], [;])
+  HTSDIR=
+  CPPFLAGS=$ax_saved_CPPFLAGS
+  LDFLAGS=$ax_saved_LDFLAGS
+  ;;
+none)
+  ax_cv_htslib=no
+  ;;
+esac
+
+AC_SUBST([HTSDIR])
+AC_SUBST([HTSLIB_CPPFLAGS])
+AC_SUBST([HTSLIB_LDFLAGS])])
diff --git a/samtools/files/pkg-message.in b/samtools/files/pkg-message.in
new file mode 100644
index 0000000..a9ba5d2
--- /dev/null
+++ b/samtools/files/pkg-message.in
@@ -0,0 +1,7 @@
+The miscellaneous tools included with Samtools have been installed to
+%%PREFIX%%/bin/samtools_misc 
+
+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
+use them.
diff --git a/samtools/patches/patch-Makefile b/samtools/patches/patch-Makefile
new file mode 100644
index 0000000..f1d7985
--- /dev/null
+++ b/samtools/patches/patch-Makefile
@@ -0,0 +1,64 @@
+$NetBSD$
+
+# Respect build env
+--- Makefile.orig	2015-12-15 21:26:20 UTC
++++ Makefile
+@@ -39,18 +39,18 @@ AOBJS=      bam_index.o bam_plcmd.o sam_
+             bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o \
+             bam_quickcheck.o bam_addrprg.o
+ 
+-prefix      = /usr/local
++prefix      = ${STAGEDIR}${PREFIX}
+ exec_prefix = $(prefix)
+ bindir      = $(exec_prefix)/bin
+ datarootdir = $(prefix)/share
+-mandir      = $(datarootdir)/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
++#MKDIR_P = mkdir -p
++#INSTALL = install -p
++#INSTALL_PROGRAM = $(INSTALL)
++#INSTALL_DATA    = $(INSTALL) -m 644
++#INSTALL_DIR     = $(MKDIR_P) -m 755
+ 
+ 
+ PROGRAMS = samtools
+@@ -60,7 +60,6 @@ BUILT_MISC_PROGRAMS = \
+ 	misc/md5fa misc/md5sum-lite misc/wgsim
+ 
+ MISC_PROGRAMS = \
+-	$(BUILT_MISC_PROGRAMS) \
+ 	misc/blast2sam.pl misc/bowtie2sam.pl misc/export2sam.pl \
+ 	misc/interpolate_sam.pl misc/novo2sam.pl \
+ 	misc/plot-bamstats misc/psl2sam.pl \
+@@ -81,9 +80,9 @@ BUILT_TEST_PROGRAMS = \
+ all: $(PROGRAMS) $(BUILT_MISC_PROGRAMS) $(BUILT_TEST_PROGRAMS)
+ 
+ # TODO Use configure or htslib.pc to add -rdynamic/-ldl conditionally
+-ALL_CPPFLAGS = $(DFLAGS) -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS)
++ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS)
+ ALL_LDFLAGS  = -rdynamic $(HTSLIB_LDFLAGS) $(LDFLAGS)
+-ALL_LIBS     = -lz -ldl $(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.
+@@ -280,8 +279,10 @@ misc/maq2sam-long.o: misc/maq2sam.c
+ 
+ 
+ install: $(PROGRAMS) $(BUILT_MISC_PROGRAMS)
+-	$(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
+-	$(INSTALL_PROGRAM) $(PROGRAMS) $(MISC_PROGRAMS) $(DESTDIR)$(bindir)
++	$(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)/samtools_misc $(DESTDIR)$(man1dir) 
++	$(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir)
++	$(INSTALL_PROGRAM) $(BUILT_MISC_PROGRAMS) $(DESTDIR)$(bindir)/samtools_misc
++	$(INSTALL_SCRIPT) $(MISC_PROGRAMS) $(DESTDIR)$(bindir)/samtools_misc
+ 	$(INSTALL_DATA) samtools.1 misc/wgsim.1 $(DESTDIR)$(man1dir)
+ 
+ 
diff --git a/samtools/patches/patch-configure.ac b/samtools/patches/patch-configure.ac
new file mode 100644
index 0000000..d6432d7
--- /dev/null
+++ b/samtools/patches/patch-configure.ac
@@ -0,0 +1,22 @@
+$NetBSD$
+
+# Fix version check and add deps to configure script
+--- configure.ac.orig	2015-12-15 21:26:20 UTC
++++ configure.ac
+@@ -23,12 +23,15 @@
+ # DEALINGS IN THE SOFTWARE.
+ 
+ dnl Process this file with autoconf to produce a configure script
+-AC_INIT([Samtools], m4_esyscmd_s([make print-version]),
++AC_INIT([Samtools], [1.3],
+         [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([bamtk.c])
+ AC_CONFIG_HEADERS([config.h])
+ 
++m4_include([ax_with_htslib.m4])
++m4_include([ax_with_curses.m4])
++
+ dnl Copyright notice to be copied into the generated configure script
+ AC_COPYRIGHT([Portions copyright (C) 2015 Genome Research Ltd.
+ 
diff --git a/samtools/patches/patch-dict.c b/samtools/patches/patch-dict.c
new file mode 100644
index 0000000..f16a368
--- /dev/null
+++ b/samtools/patches/patch-dict.c
@@ -0,0 +1,13 @@
+$NetBSD$
+
+# FreeBSD header requirement
+--- dict.c.orig	2015-12-15 21:26:20 UTC
++++ dict.c
+@@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE.  */
+ #include <stdio.h>
+ #include <zlib.h>
+ #include <getopt.h>
++#include <unistd.h>
+ #include "htslib/kseq.h"
+ #include "htslib/hts.h"
+ 
diff --git a/samtools/patches/patch-errmod.c b/samtools/patches/patch-errmod.c
new file mode 100644
index 0000000..54b45ab
--- /dev/null
+++ b/samtools/patches/patch-errmod.c
@@ -0,0 +1,19 @@
+$NetBSD$
+
+# GCC based FreeBSD lacks some long double functions
+--- errmod.c.orig	2015-12-15 21:26:20 UTC
++++ errmod.c
+@@ -24,6 +24,13 @@ FROM, OUT OF OR IN CONNECTION WITH THE S
+ DEALINGS IN THE SOFTWARE.  */
+ 
+ #include <math.h>
++
++#include <sys/param.h>
++#if defined(__FreeBSD__) && (__FreeBSD_version < 1000034)
++#	define logl(x) log(x)
++#	define expl(x) exp(x)
++#endif
++
+ #include "errmod.h"
+ #include "htslib/ksort.h"
+ KSORT_INIT_GENERIC(uint16_t)
diff --git a/samtools/patches/patch-test_test.pl b/samtools/patches/patch-test_test.pl
new file mode 100644
index 0000000..2c965f6
--- /dev/null
+++ b/samtools/patches/patch-test_test.pl
@@ -0,0 +1,33 @@
+$NetBSD$
+
+# Fix hard-coded paths
+# FIXME: FreeBSD-specific: Use a SUBST for this instead
+--- test/test.pl.orig	2015-12-22 22:43:15 UTC
++++ test/test.pl
+@@ -136,7 +136,7 @@ sub _cmd
+     else
+     {
+         # child
+-        exec('/bin/bash', '-o','pipefail','-c', "($cmd) 2> $err_filename") or error("Cannot execute the command [/bin/sh -o pipefail -c $cmd]: $!");
++        exec('/usr/local/bin/bash', '-o','pipefail','-c', "($cmd) 2> $err_filename") or error("Cannot execute the command [/usr/local/bin/bash -o pipefail -c $cmd]: $!");
+     }
+ }
+ sub cmd
+@@ -560,7 +560,7 @@ sub test_usage
+     my $command = $args{cmd};
+     my $commandpath = $$opts{bin}."/".$command;
+     my ($ret,$out,$err) = _cmd("$commandpath $args{redirection}");
+-    if ( $err =~ m/\/bin\/bash.*no.*such/i ) { failed($opts,msg=>$test,reason=>"could not run $commandpath: $out"); return; }
++    if ( $err =~ m/\/usr\/local\/bin\/bash.*no.*such/i ) { failed($opts,msg=>$test,reason=>"could not run $commandpath: $out"); return; }
+ 
+     my @sections = ($err =~ m/(^[A-Za-z]+.*?)(?:(?=^[A-Za-z]+:)|\z)/msg);
+ 
+@@ -615,7 +615,7 @@ sub test_usage_subcommand
+     my $commandpath = $$opts{bin}."/".$command;
+     my ($ret,$out,$err) = _cmd("$commandpath $subcommand $args{redirection}");
+ 
+-    if ( $err =~ m/\/bin\/bash.*no.*such/i ) { failed($opts,msg=>$test,reason=>"could not run $commandpath $subcommand: $out"); return; }
++    if ( $err =~ m/\/usr\/local\/bin\/bash.*no.*such/i ) { failed($opts,msg=>$test,reason=>"could not run $commandpath $subcommand: $out"); return; }
+ 
+     if ( $err =~ m/not.*implemented/is ) { failed($opts,msg=>$test,reason=>"subcommand indicates it is not implemented",expect_fail=>1); return; }
+ 



Home | Main Index | Thread Index | Old Index