pkgsrc-WIP-changes archive

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

bwa: Test fixes to biology/bwa genome aligner



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Thu May 3 11:41:59 2018 -0500
Changeset:	91e32433e1a1220941148ff4292b748f7a34c43a

Modified Files:
	Makefile
Added Files:
	bwa/DESCR
	bwa/Makefile
	bwa/PLIST
	bwa/distinfo
	bwa/patches/patch-Makefile
	bwa/patches/patch-fastmap.c
	bwa/patches/patch-kopen.c

Log Message:
bwa: Test fixes to biology/bwa genome aligner

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

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

diffstat:
 Makefile                    |  1 +
 bwa/DESCR                   |  2 ++
 bwa/Makefile                | 31 +++++++++++++++++++++++++++++++
 bwa/PLIST                   |  5 +++++
 bwa/distinfo                |  9 +++++++++
 bwa/patches/patch-Makefile  | 44 ++++++++++++++++++++++++++++++++++++++++++++
 bwa/patches/patch-fastmap.c | 14 ++++++++++++++
 bwa/patches/patch-kopen.c   | 15 +++++++++++++++
 8 files changed, 121 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 119b5924ce..9e700841a5 100644
--- a/Makefile
+++ b/Makefile
@@ -295,6 +295,7 @@ SUBDIR+=	bugzilla
 SUBDIR+=	bullet
 SUBDIR+=	bup-git
 SUBDIR+=	busybox
+SUBDIR+=	bwa
 SUBDIR+=	bwm-ng
 SUBDIR+=	byzanz
 SUBDIR+=	c-news
diff --git a/bwa/DESCR b/bwa/DESCR
new file mode 100644
index 0000000000..1a8e65be4a
--- /dev/null
+++ b/bwa/DESCR
@@ -0,0 +1,2 @@
+BWA is a software package for mapping low-divergent sequences against a large
+reference genome, such as the human genome.
diff --git a/bwa/Makefile b/bwa/Makefile
new file mode 100644
index 0000000000..b382e4a148
--- /dev/null
+++ b/bwa/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.6 2017/12/27 23:44:01 he Exp $
+
+DISTNAME=	bwa-0.7.17
+CATEGORIES=	biology
+PKGREVISION=	1
+GITHUB_TAG=     v${PKGVERSION_NOREV}
+MASTER_SITES=	${MASTER_SITE_GITHUB:=lh3/}
+
+MAINTAINER=	bacon%NetBSD.org@localhost
+HOMEPAGE=	http://bio-bwa.sourceforge.net/
+COMMENT=	Map low-divergent sequences against a large reference genome
+LICENSE=	gnu-gpl-v3
+
+USE_TOOLS+=	perl:run gmake
+REPLACE_PERL=	*.pl
+
+INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1
+
+# unconditionally uses <emmintrin.h>
+ONLY_FOR_PLATFORM=	*-*-x86_64 *-*-i386 *-*-ia64
+
+CFLAGS.SunOS+=	-Du_int32_t=uint32_t
+LDFLAGS.SunOS+=	-lsocket -lnsl
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/bwa ${DESTDIR}${PREFIX}/bin
+	${INSTALL_SCRIPT} ${WRKSRC}/*.pl ${DESTDIR}${PREFIX}/bin
+	${INSTALL_MAN} ${WRKSRC}/*.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/bwa/PLIST b/bwa/PLIST
new file mode 100644
index 0000000000..e218473248
--- /dev/null
+++ b/bwa/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2015/10/14 17:12:52 leot Exp $
+bin/bwa
+bin/qualfa2fq.pl
+bin/xa2multi.pl
+man/man1/bwa.1
diff --git a/bwa/distinfo b/bwa/distinfo
new file mode 100644
index 0000000000..c4f8bfb22a
--- /dev/null
+++ b/bwa/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.6 2017/12/27 23:44:01 he Exp $
+
+SHA1 (bwa-0.7.17.tar.gz) = 77f9aac723110227ea51cb42011336d291d03723
+RMD160 (bwa-0.7.17.tar.gz) = d26a266387dee4fc9fcf6eef4f7ffcc076495c22
+SHA512 (bwa-0.7.17.tar.gz) = 114e61b7cc5edcb67172d1eca7be1fa670ea33dd48b5c02c98318e254871363775c0dab327fd7ee7023200a5fedc745fa01cbe0fd9550d783f091d4df6926f48
+Size (bwa-0.7.17.tar.gz) = 232593 bytes
+SHA1 (patch-Makefile) = 72ac08d92540a88da08bf4d988ca3f6132327a6a
+SHA1 (patch-fastmap.c) = e96f972a65ecc68c92eb82816e9e24b057435d1d
+SHA1 (patch-kopen.c) = ecc92efa3ebe4da484aa6760e23de9437b000644
diff --git a/bwa/patches/patch-Makefile b/bwa/patches/patch-Makefile
new file mode 100644
index 0000000000..280d2cfa63
--- /dev/null
+++ b/bwa/patches/patch-Makefile
@@ -0,0 +1,44 @@
+$NetBSD: patch-Makefile,v 1.2 2017/12/17 14:30:36 bacon Exp $
+
+Respect env, add librt for NetBSD
+--- Makefile.orig	2017-10-23 17:10:17.000000000 +0000
++++ Makefile
+@@ -1,6 +1,6 @@
+-CC=			gcc
++CC?=			gcc
+ #CC=			clang --analyze
+-CFLAGS=		-g -Wall -Wno-unused-function -O2
++CFLAGS?=		-g -Wall -Wno-unused-function -O2
+ WRAP_MALLOC=-DUSE_MALLOC_WRAPPERS
+ AR=			ar
+ DFLAGS=		-DHAVE_PTHREAD $(WRAP_MALLOC)
+@@ -12,11 +12,14 @@ AOBJS=		bwashm.o bwase.o bwaseqio.o bwtg
+ 			bwtsw2_chain.o fastmap.o bwtsw2_pair.o
+ PROG=		bwa
+ INCLUDES=	
+-LIBS=		-lm -lz -lpthread
++LDFLAGS+=	-lm -lz -lpthread
+ SUBDIRS=	.
+ 
+ ifeq ($(shell uname -s),Linux)
+-	LIBS += -lrt
++	LDFLAGS += -lrt
++endif
++ifeq ($(shell uname -s),NetBSD)
++	LDFLAGS += -lrt
+ endif
+ 
+ .SUFFIXES:.c .o .cc
+@@ -27,10 +30,10 @@ endif
+ all:$(PROG)
+ 
+ bwa:libbwa.a $(AOBJS) main.o
+-		$(CC) $(CFLAGS) $(DFLAGS) $(AOBJS) main.o -o $@ -L. -lbwa $(LIBS)
++		$(CC) $(CFLAGS) $(DFLAGS) $(AOBJS) main.o -o $@ -L. -lbwa $(LDFLAGS)
+ 
+ bwamem-lite:libbwa.a example.o
+-		$(CC) $(CFLAGS) $(DFLAGS) example.o -o $@ -L. -lbwa $(LIBS)
++		$(CC) $(CFLAGS) $(DFLAGS) example.o -o $@ -L. -lbwa $(LDFLAGS)
+ 
+ libbwa.a:$(LOBJS)
+ 		$(AR) -csru $@ $(LOBJS)
diff --git a/bwa/patches/patch-fastmap.c b/bwa/patches/patch-fastmap.c
new file mode 100644
index 0000000000..e46d21df34
--- /dev/null
+++ b/bwa/patches/patch-fastmap.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- fastmap.c.orig	2018-04-19 22:02:10.516983388 +0000
++++ fastmap.c
+@@ -130,7 +130,9 @@ int main_mem(int argc, char *argv[])
+ 
+ 	aux.opt = opt = mem_opt_init();
+ 	memset(&opt0, 0, sizeof(mem_opt_t));
++	fprintf(stderr, "argc = %d argv[1] = %s\n", argc, argv[1]);
+ 	while ((c = getopt(argc, argv, "51qpaMCSPVYjk:c:v:s:r:t:R:A:B:O:E:U:w:L:d:T:Q:D:m:I:N:o:f:W:x:G:h:y:K:X:H:")) >= 0) {
++		fprintf(stderr, "c = %d %c\n", c, c);
+ 		if (c == 'k') opt->min_seed_len = atoi(optarg), opt0.min_seed_len = 1;
+ 		else if (c == '1') no_mt_io = 1;
+ 		else if (c == 'x') mode = optarg;
diff --git a/bwa/patches/patch-kopen.c b/bwa/patches/patch-kopen.c
new file mode 100644
index 0000000000..bf3c18bf71
--- /dev/null
+++ b/bwa/patches/patch-kopen.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-kopen.c,v 1.3 2017/12/27 23:44:01 he Exp $
+
+Add includes for getting timevals and select prototype into scope.
+
+--- kopen.c.orig	2017-10-23 17:10:17.000000000 +0000
++++ kopen.c
+@@ -12,6 +12,8 @@
+ #include <netdb.h>
+ #include <arpa/inet.h>
+ #include <sys/socket.h>
++#include <sys/time.h>
++#include <sys/select.h>
+ #endif
+ 
+ #ifdef USE_MALLOC_WRAPPERS


Home | Main Index | Thread Index | Old Index