pkgsrc-WIP-changes archive

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

samtools: Patch Makefile to respect pkgsrc env, add bash for test target



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Tue Jul 21 15:34:40 2020 -0500
Changeset:	8f6ec6fcd2062ff4d26adaeeef570950feb38a60

Modified Files:
	samtools/Makefile
	samtools/distinfo
Added Files:
	samtools/patches/patch-Makefile
	samtools/patches/patch-test_test.pl

Log Message:
samtools: Patch Makefile to respect pkgsrc env, add bash for test target

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

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

diffstat:
 samtools/Makefile                   |  2 +-
 samtools/distinfo                   |  2 ++
 samtools/patches/patch-Makefile     | 56 +++++++++++++++++++++++++++++++++++++
 samtools/patches/patch-test_test.pl | 24 ++++++++++++++++
 4 files changed, 83 insertions(+), 1 deletion(-)

diffs:
diff --git a/samtools/Makefile b/samtools/Makefile
index ad66069a74..e86426ce1e 100644
--- a/samtools/Makefile
+++ b/samtools/Makefile
@@ -9,7 +9,7 @@ HOMEPAGE=	https://www.htslib.org/
 COMMENT=	Tools for manipulating next-generation sequencing data
 LICENSE=	mit
 
-USE_TOOLS+=		autoconf automake autoreconf gmake perl
+USE_TOOLS+=		autoconf automake autoreconf bash gmake perl
 GNU_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--with-htslib=system
 TEST_TARGET=		test
diff --git a/samtools/distinfo b/samtools/distinfo
index 05156ee999..d8be5c7954 100644
--- a/samtools/distinfo
+++ b/samtools/distinfo
@@ -4,3 +4,5 @@ SHA1 (samtools-1.10.tar.gz) = 98b24393629d63f2203f59c108b840b1e046f209
 RMD160 (samtools-1.10.tar.gz) = e8d91dfc0970a0faa85d45962f76f831af331007
 SHA512 (samtools-1.10.tar.gz) = 7760a1e8a89780ac80053b136930a8ed0cc130b72c9f66cdc9c211e93b6bcc8923140e7caae9824c81caa4a2bfab3a14280e3e7d7245abeaa6f91f0f96123fda
 Size (samtools-1.10.tar.gz) = 4457760 bytes
+SHA1 (patch-Makefile) = 409ef37ff0730257d82989d866c8cba705e3ef8a
+SHA1 (patch-test_test.pl) = c9b254f5119bd78119e61db78bbbda5699b86598
diff --git a/samtools/patches/patch-Makefile b/samtools/patches/patch-Makefile
new file mode 100644
index 0000000000..700da6f837
--- /dev/null
+++ b/samtools/patches/patch-Makefile
@@ -0,0 +1,56 @@
+$NetBSD$
+
+# Respect pkgsrc env
+
+--- Makefile.orig	2020-07-21 20:20:56.996788479 +0000
++++ Makefile
+@@ -21,12 +21,12 @@
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ # DEALINGS IN THE SOFTWARE.
+ 
+-CC       = gcc
+-AR       = ar
+-CPPFLAGS =
++CC       ?= gcc
++AR       ?= ar
++# CPPFLAGS =
+ #CFLAGS   = -g -Wall -O2 -pedantic -std=c99 -D_XOPEN_SOURCE=600
+-CFLAGS   = -g -Wall -O2
+-LDFLAGS  =
++CFLAGS   ?= -g -Wall -O2
++#LDFLAGS  =
+ LIBS     =
+ 
+ LZ4DIR   = ./lz4
+@@ -47,10 +47,10 @@ AOBJS=      bam_index.o bam_plcmd.o sam_
+             bam_quickcheck.o bam_addrprg.o bam_markdup.o tmp_file.o
+ LZ4OBJS  =  $(LZ4DIR)/lz4.o
+ 
+-prefix      = /usr/local
+-exec_prefix = $(prefix)
++PREFIX      ?= /usr/local
++exec_prefix = $(PREFIX)
+ bindir      = $(exec_prefix)/bin
+-datarootdir = $(prefix)/share
++datarootdir = $(PREFIX)/share
+ mandir      = $(datarootdir)/man
+ man1dir     = $(mandir)/man1
+ 
+@@ -58,12 +58,11 @@ man1dir     = $(mandir)/man1
+ misc_bindir = $(bindir)
+ 
+ MKDIR_P = mkdir -p
+-INSTALL = install -p
+-INSTALL_DATA    = $(INSTALL) -m 644
+-INSTALL_DIR     = $(MKDIR_P) -m 755
+-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 = samtools
diff --git a/samtools/patches/patch-test_test.pl b/samtools/patches/patch-test_test.pl
new file mode 100644
index 0000000000..48a756b3e0
--- /dev/null
+++ b/samtools/patches/patch-test_test.pl
@@ -0,0 +1,24 @@
+$NetBSD$
+
+# bash path
+
+--- test/test.pl.orig	2019-12-06 16:40:42.000000000 +0000
++++ test/test.pl
+@@ -907,7 +907,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/\/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);
+ 
+@@ -965,7 +965,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/\/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