summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorBarry Britt <barry.britt@gmail.com>2017-05-06 12:05:12 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2017-05-06 12:05:12 -0500
commitc0a52cc59e65c48d095036a43c7e574aa088d0b3 (patch)
treec22c5f33220ce8a57ea16db2ac9f9f4824be5bcf /var
parent741e4df233482bedefc000387625663cf201c231 (diff)
downloadspack-c0a52cc59e65c48d095036a43c7e574aa088d0b3.tar.gz
spack-c0a52cc59e65c48d095036a43c7e574aa088d0b3.tar.bz2
spack-c0a52cc59e65c48d095036a43c7e574aa088d0b3.tar.xz
spack-c0a52cc59e65c48d095036a43c7e574aa088d0b3.zip
Updating bamtools to include a dependency for zlib. (#4031)
* Updating bamtools to include a dependency for zlib. In a standard compile, bamtools will fail if zlib headers are not installed on the target machine. In order to maintain compatibility with all systems -- and since zlib is included already as a dependency for cmake -- this patch adds zlib as a link dependency for the bamtools package. * Modified cmake rpath include. Bamtools has a non-standard library location, so we need to append $prefix/lib/bamtools to the rpath. Not sure there's a better way to do this... * Fixing syntax error in package.py Fixed a non-terminated parenthesis on line 46. * Updated bamtools to be a CMakePackage Removed extraneous code, and altered the package to extend cmake_args including the non-standard library location. * UpRemoving cmake dependency and removing blank line from end of file * Updates to cmake_args. Removed the duplicate definition of std_cmake_args in favor of simply overriding the CMAKE_INSTALL_RPATH variable that is provided. This should allow the package to be linked correctly to itself.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/bamtools/package.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/bamtools/package.py b/var/spack/repos/builtin/packages/bamtools/package.py
index 6ad90c779b..79e71cc0f2 100644
--- a/var/spack/repos/builtin/packages/bamtools/package.py
+++ b/var/spack/repos/builtin/packages/bamtools/package.py
@@ -23,9 +23,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import os
-class Bamtools(Package):
+class Bamtools(CMakePackage):
"""C++ API & command-line toolkit for working with BAM data."""
homepage = "https://github.com/pezmaster31/bamtools"
@@ -36,11 +37,11 @@ class Bamtools(Package):
version('2.3.0', 'd327df4ba037d6eb8beef65d7da75ebc')
version('2.2.3', '6eccd3e45e4ba12a68daa3298998e76d')
- depends_on('cmake', type='build')
+ depends_on('zlib', type='link')
- def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..', *std_cmake_args)
-
- make()
- make('install')
+ def cmake_args(self):
+ args = []
+ rpath = self.rpath
+ rpath.append(os.path.join(self.prefix.lib, "bamtools"))
+ args.append("-DCMAKE_INSTALL_RPATH=%s" % ':'.join(rpath))
+ return args