Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Mar 2019 17:30:25 +0000 (UTC)
From:      "Jason W. Bacon" <jwb@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r496155 - in head/biology/bowtie2: . files
Message-ID:  <201903181730.x2IHUPBC081535@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jwb
Date: Mon Mar 18 17:30:25 2019
New Revision: 496155
URL: https://svnweb.freebsd.org/changeset/ports/496155

Log:
  biology/bowtie2: Upgrade to 2.3.5
  
  -   Add bowtie2-test script
  -   Separate Makefile patches into a static patch for upstream and reinplace
      for ports-specifics
  -   Allow aarch64 per upstream Makefile (untested)

Added:
  head/biology/bowtie2/files/bowtie2-test.in   (contents, props changed)
Modified:
  head/biology/bowtie2/Makefile
  head/biology/bowtie2/distinfo
  head/biology/bowtie2/files/patch-Makefile
  head/biology/bowtie2/pkg-plist

Modified: head/biology/bowtie2/Makefile
==============================================================================
--- head/biology/bowtie2/Makefile	Mon Mar 18 17:28:08 2019	(r496154)
+++ head/biology/bowtie2/Makefile	Mon Mar 18 17:30:25 2019	(r496155)
@@ -1,10 +1,9 @@
 # $FreeBSD$
 
-PORTNAME=	bowtie2
-PORTVERSION=	2.3.3.1
+PORTNAME=		bowtie2
 DISTVERSIONPREFIX=	v
-PORTREVISION=	2
-CATEGORIES=	biology
+DISTVERSION=		2.3.5
+CATEGORIES=		biology perl5 python
 
 MAINTAINER=	jwb@FreeBSD.org
 COMMENT=	Ultrafast, memory-efficient short read aligner
@@ -13,20 +12,28 @@ LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
 # May also work on other 64-bit platforms, but untested
-ONLY_FOR_ARCHS=	amd64
+ONLY_FOR_ARCHS=	aarch64 amd64
 LIB_DEPENDS=	libtbb.so:devel/tbb
 
-USES=		gmake perl5 python shebangfix
+USES=		gmake localbase:ldflags perl5 python shebangfix
 USE_PERL5=	run
-SHEBANG_FILES=	bowtie2-build bowtie2-inspect scripts/*.pl
-
 USE_GITHUB=	yes
+
+SHEBANG_FILES=	bowtie2 bowtie2-build bowtie2-inspect scripts/*.pl
 GH_ACCOUNT=	BenLangmead
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 
+SUB_FILES=	bowtie2-test
+
+pre-configure:
+	@${REINPLACE_CMD} \
+		-e 's|^RELEASE_FLAGS|# RELEASE_FLAGS|' \
+		-e 's|tbbmalloc_proxy|tbbmalloc|' \
+		${WRKSRC}/Makefile
+
 post-install:
-	${MKDIR} ${STAGEDIR}${DATADIR}/scripts
+	@${MKDIR} ${STAGEDIR}${DATADIR}/scripts
 	${INSTALL_PROGRAM} \
 		${WRKSRC}/bowtie2*-s \
 		${WRKSRC}/bowtie2*-l \
@@ -35,6 +42,7 @@ post-install:
 		${WRKSRC}/scripts/*.sh \
 		${WRKSRC}/scripts/*.pl \
 		${STAGEDIR}${DATADIR}/scripts
+	${INSTALL_SCRIPT} ${WRKDIR}/bowtie2-test ${STAGEDIR}${PREFIX}/bin
 
 post-install-DOCS-on:
 	(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})

Modified: head/biology/bowtie2/distinfo
==============================================================================
--- head/biology/bowtie2/distinfo	Mon Mar 18 17:28:08 2019	(r496154)
+++ head/biology/bowtie2/distinfo	Mon Mar 18 17:30:25 2019	(r496155)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1511991430
-SHA256 (BenLangmead-bowtie2-v2.3.3.1_GH0.tar.gz) = 8b9c0b9c595ebcddcac5feaf6acb44b2294d6deb91de107596ecad242a1a58e9
-SIZE (BenLangmead-bowtie2-v2.3.3.1_GH0.tar.gz) = 5796279
+TIMESTAMP = 1552832567
+SHA256 (BenLangmead-bowtie2-v2.3.5_GH0.tar.gz) = c5daeb0249e98dfe8f70dac7d660b100365a00a22df4cad94d3e383f489911ae
+SIZE (BenLangmead-bowtie2-v2.3.5_GH0.tar.gz) = 10584383

Added: head/biology/bowtie2/files/bowtie2-test.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/bowtie2/files/bowtie2-test.in	Mon Mar 18 17:30:25 2019	(r496155)
@@ -0,0 +1,69 @@
+#!/bin/sh -e
+
+##########################################################################
+#   Script description:
+#       Test bowtie2 on examples provided
+#       http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml
+#       
+#   History:
+#   Date        Name        Modification
+#   2019-03-17  Jason Bacon Begin
+##########################################################################
+
+usage()
+{
+    printf "Usage: $0 \n"
+    exit 1
+}
+
+
+##########################################################################
+#   Main
+##########################################################################
+
+if [ $# != 0 ]; then
+    usage
+fi
+
+##########################################################################
+#   Function description:
+#       Pause until user presses return
+##########################################################################
+
+pause()
+{
+    local junk
+    
+    printf "Press return to continue..."
+    read junk
+}
+
+cat << EOM
+
+This script follows the bowtie2 "Getting Started" section of the manual:
+
+http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml
+
+EOM
+pause
+
+examples_dir=%%EXAMPLESDIR%%
+bowtie2-build $examples_dir/reference/lambda_virus.fa \
+    lambda_virus
+printf "Done indexing...\n"
+pause
+
+bowtie2 -x lambda_virus -U $examples_dir/reads/reads_1.fq -S eg1.sam
+printf "Done with alignment.\n"
+pause
+more eg1.sam
+
+bowtie2 -x lambda_virus -1 $examples_dir/reads/reads_1.fq -2 $examples_dir/reads/reads_2.fq -S eg2.sam
+printf "Done with paired end example.\n"
+pause
+more eg2.sam
+
+bowtie2 --local -x lambda_virus -U $examples_dir/reads/longreads.fq -S eg3.sam
+printf "Done with local alignment example.\n"
+pause
+more eg3.sam

Modified: head/biology/bowtie2/files/patch-Makefile
==============================================================================
--- head/biology/bowtie2/files/patch-Makefile	Mon Mar 18 17:28:08 2019	(r496154)
+++ head/biology/bowtie2/files/patch-Makefile	Mon Mar 18 17:30:25 2019	(r496155)
@@ -1,34 +1,24 @@
---- Makefile.orig	2017-10-05 16:45:18 UTC
+--- Makefile.orig	2019-03-16 04:14:43 UTC
 +++ Makefile
-@@ -21,10 +21,11 @@
+@@ -21,8 +21,9 @@
  # Makefile for bowtie, bowtie2-build, bowtie2-inspect
  #
  
--prefix = /usr/local
--bindir = $(prefix)/bin
-+PREFIX ?= /usr/local
-+bindir = $(PREFIX)/bin
+-prefix := /usr/local
+-bindir := $(prefix)/bin
++# Use PREFIX (upper case) provided by many package managers
++PREXIX ?= /usr/local
++bindir := $(PREFIX)/bin
  
- INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include)
-+INC += -I${LOCALBASE}/include
- LIBS = $(LDFLAGS) $(if $(RELEASE_BUILD),-L$(CURDIR)/.lib) -lz
- GCC_PREFIX = $(shell dirname `which gcc`)
- GCC_SUFFIX =
-@@ -98,7 +99,7 @@ endif
- 
- #default is to use Intel TBB
- ifneq (1,$(NO_TBB))
--	LIBS += $(PTHREAD_LIB) -ltbb -ltbbmalloc$(if $(RELEASE_BUILD),,_proxy)
-+	LIBS += $(PTHREAD_LIB) -L${LOCALBASE}/lib -ltbb -ltbbmalloc
- 	override EXTRA_FLAGS += -DWITH_TBB
- else
- 	LIBS += $(PTHREAD_LIB)
-@@ -189,7 +190,7 @@ SSE_FLAG=-msse2
- 
- DEBUG_FLAGS    = -O0 -g3 -m64 $(SSE_FLAG)
- DEBUG_DEFS     = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\""
--RELEASE_FLAGS  = -O3 -m64 $(SSE_FLAG) -funroll-loops -g3
-+RELEASE_FLAGS  = $(CXXFLAGS) $(SSE_FLAG) -funroll-loops
- RELEASE_DEFS   = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\""
- NOASSERT_FLAGS = -DNDEBUG
- FILE_FLAGS     = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+ LDLIBS := -lz
+ GCC_PREFIX := $(shell dirname `which gcc`)
+@@ -30,7 +31,8 @@ GCC_SUFFIX :=
+ CC ?= $(GCC_PREFIX)/gcc$(GCC_SUFFIX)
+ CPP ?= $(GCC_PREFIX)/g++$(GCC_SUFFIX)
+ CXX ?= $(CPP)
+-CXXFLAGS += -std=c++98
++# long long is unsupported in c++98
++# CXXFLAGS += -std=c++98
+ ifeq (aarch64,$(shell uname -m))
+ 	CXXFLAGS += -fopenmp-simd -DWITH_AARCH64
+ 	CPPFLAGS += -Ithird_party/simde

Modified: head/biology/bowtie2/pkg-plist
==============================================================================
--- head/biology/bowtie2/pkg-plist	Mon Mar 18 17:28:08 2019	(r496154)
+++ head/biology/bowtie2/pkg-plist	Mon Mar 18 17:30:25 2019	(r496155)
@@ -7,6 +7,7 @@ bin/bowtie2-build-s
 bin/bowtie2-inspect
 bin/bowtie2-inspect-l
 bin/bowtie2-inspect-s
+bin/bowtie2-test
 %%DATADIR%%/scripts/convert_quals.pl
 %%DATADIR%%/scripts/gen_2b_occ_lookup.pl
 %%DATADIR%%/scripts/gen_occ_lookup.pl
@@ -56,6 +57,8 @@ bin/bowtie2-inspect-s
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/index/lambda_virus.4.bt2
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/index/lambda_virus.rev.1.bt2
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/index/lambda_virus.rev.2.bt2
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/combined_reads.bam
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/conversion_utilities.sh
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/longreads.fq
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/reads_1.fq
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/reads/reads_2.fq



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903181730.x2IHUPBC081535>