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.
This commit is contained in:
parent
741e4df233
commit
c0a52cc59e
@ -23,9 +23,10 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Bamtools(Package):
|
class Bamtools(CMakePackage):
|
||||||
"""C++ API & command-line toolkit for working with BAM data."""
|
"""C++ API & command-line toolkit for working with BAM data."""
|
||||||
|
|
||||||
homepage = "https://github.com/pezmaster31/bamtools"
|
homepage = "https://github.com/pezmaster31/bamtools"
|
||||||
@ -36,11 +37,11 @@ class Bamtools(Package):
|
|||||||
version('2.3.0', 'd327df4ba037d6eb8beef65d7da75ebc')
|
version('2.3.0', 'd327df4ba037d6eb8beef65d7da75ebc')
|
||||||
version('2.2.3', '6eccd3e45e4ba12a68daa3298998e76d')
|
version('2.2.3', '6eccd3e45e4ba12a68daa3298998e76d')
|
||||||
|
|
||||||
depends_on('cmake', type='build')
|
depends_on('zlib', type='link')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def cmake_args(self):
|
||||||
with working_dir('spack-build', create=True):
|
args = []
|
||||||
cmake('..', *std_cmake_args)
|
rpath = self.rpath
|
||||||
|
rpath.append(os.path.join(self.prefix.lib, "bamtools"))
|
||||||
make()
|
args.append("-DCMAKE_INSTALL_RPATH=%s" % ':'.join(rpath))
|
||||||
make('install')
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user