summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGeorge Hartzell <hartzell@alerce.com>2017-10-29 14:40:00 -0700
committerChristoph Junghans <christoph.junghans@gmail.com>2017-10-29 15:40:00 -0600
commite6bc45a04a676ab74df471e46c2c136dd1be107c (patch)
treeb253bcc2e981d9496c139dfee2e6db64e999e97e /var
parent957ded209a64b4d904e21b9a72a76c36d2eb8279 (diff)
downloadspack-e6bc45a04a676ab74df471e46c2c136dd1be107c.tar.gz
spack-e6bc45a04a676ab74df471e46c2c136dd1be107c.tar.bz2
spack-e6bc45a04a676ab74df471e46c2c136dd1be107c.tar.xz
spack-e6bc45a04a676ab74df471e46c2c136dd1be107c.zip
Add bowtie2@2.3.0, fix dependencies and sbangs (#5834)
* Add bowtie2@2.3.0, fix dependencies and sbangs Add support for bowtie2@2.3.0 - digest - a patch for 2.3.0 that parallels the existing package. Truth be told it builds (for me) without this, but I'm assuming that they're there for a reason...). - tune up dependencies - need tbb - don't need readline or zlib Several things were installed with sbang's that use `/usr/bin/env` to fine perl or python. Fix the dependency and clean up the sbang lines. * Fix python exe name, avoid path banging I'd cut and pasted the python bit from the perl bit and missed one reference to perl. While I'm there, use the cleaner `spec['perl'].command` instead of banging together the path from its bits. * Fix up the "when" constraints on the dependencies Get the edge cases right. - 2.2.5 doesn't need tbb, 2.3.[01] do. - 2.3.1 needs readline and zlib.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/bowtie2/bowtie2-2.3.0.patch16
-rw-r--r--var/spack/repos/builtin/packages/bowtie2/package.py31
2 files changed, 44 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.3.0.patch b/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.3.0.patch
new file mode 100644
index 0000000000..58bcee6572
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bowtie2/bowtie2-2.3.0.patch
@@ -0,0 +1,16 @@
+--- Makefile.orig 2017-10-19 16:22:27.589185696 -0700
++++ Makefile 2017-10-19 16:23:26.094227199 -0700
+@@ -25,10 +25,10 @@
+ bindir = $(prefix)/bin
+
+ INC =
+-GCC_PREFIX = $(shell dirname `which gcc`)
++GCC_PREFIX =
+ GCC_SUFFIX =
+-CC ?= $(GCC_PREFIX)/gcc$(GCC_SUFFIX)
+-CPP ?= $(GCC_PREFIX)/g++$(GCC_SUFFIX)
++CC = cc
++CPP = c++
+ CXX ?= $(CPP)
+ HEADERS = $(wildcard *.h)
+ BOWTIE_MM = 1
diff --git a/var/spack/repos/builtin/packages/bowtie2/package.py b/var/spack/repos/builtin/packages/bowtie2/package.py
index bd6e956b80..067c6c52cc 100644
--- a/var/spack/repos/builtin/packages/bowtie2/package.py
+++ b/var/spack/repos/builtin/packages/bowtie2/package.py
@@ -34,18 +34,43 @@ class Bowtie2(Package):
url = "http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/2.3.1/bowtie2-2.3.1-source.zip"
version('2.3.1', 'b4efa22612e98e0c23de3d2c9f2f2478')
+ version('2.3.0', '3ab33f30f00f3c30fec1355b4e569ea2')
version('2.2.5', '51fa97a862d248d7ee660efc1147c75f')
- depends_on('tbb', when='@2.3.1')
- depends_on('readline')
- depends_on('zlib')
+ depends_on('tbb', when='@2.3.0:')
+ depends_on('readline', when='@2.3.1:')
+ depends_on('perl', type='run')
+ depends_on('python', type='run')
+ depends_on('zlib', when='@2.3.1:')
patch('bowtie2-2.2.5.patch', when='@2.2.5', level=0)
patch('bowtie2-2.3.1.patch', when='@2.3.1', level=0)
+ patch('bowtie2-2.3.0.patch', when='@2.3.0', level=0)
# seems to have trouble with 6's -std=gnu++14
conflicts('%gcc@6:')
+ @run_before('install')
+ def filter_sbang(self):
+ """Run before install so that the standard Spack sbang install hook
+ can fix up the path to the perl|python binary.
+ """
+
+ with working_dir(self.stage.source_path):
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': False}
+
+ match = '^#!/usr/bin/env perl'
+ perl = self.spec['perl'].command
+ substitute = "#!{perl}".format(perl=perl)
+ files = ['bowtie2', ]
+ filter_file(match, substitute, *files, **kwargs)
+
+ match = '^#!/usr/bin/env python'
+ python = self.spec['python'].command
+ substitute = "#!{python}".format(python=python)
+ files = ['bowtie2-build', 'bowtie2-inspect']
+ filter_file(match, substitute, *files, **kwargs)
+
def install(self, spec, prefix):
make()
mkdirp(prefix.bin)