2019-01-01 14:04:23 +08:00
|
|
|
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2018-07-06 10:34:38 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2019-08-08 03:18:36 +08:00
|
|
|
from glob import glob
|
|
|
|
|
2018-07-06 10:34:38 +08:00
|
|
|
from spack import *
|
|
|
|
|
|
|
|
|
|
|
|
class NcbiToolkit(AutotoolsPackage):
|
|
|
|
"""NCBI C++ Toolkit"""
|
|
|
|
|
|
|
|
homepage = "https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/"
|
2019-08-08 03:18:36 +08:00
|
|
|
url = "ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/CURRENT/ncbi_cxx--22_0_0.tar.gz"
|
|
|
|
|
|
|
|
version('22_0_0', 'e352d25b24c3a2d087c2cf3cedf6ea95',
|
|
|
|
url='ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/ARCHIVE/2019/Mar_28_2019/ncbi_cxx--22_0_0.tar.gz')
|
|
|
|
version('21_0_0', '14e021e08b1a78ac9cde98d0cab92098',
|
|
|
|
url='ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools++/ARCHIVE/2018/Apr_2_2018/ncbi_cxx--21_0_0.tar.gz')
|
2018-07-06 10:34:38 +08:00
|
|
|
|
2019-08-08 03:18:36 +08:00
|
|
|
variant('debug', default=False,
|
|
|
|
description='Build debug versions of libs and apps')
|
2018-07-06 10:34:38 +08:00
|
|
|
|
|
|
|
depends_on('boost@1.35.0:')
|
|
|
|
depends_on('bzip2')
|
2019-07-30 01:08:55 +08:00
|
|
|
depends_on('jpeg')
|
2018-07-06 10:34:38 +08:00
|
|
|
depends_on('libpng')
|
|
|
|
depends_on('libtiff')
|
|
|
|
depends_on('libxml2')
|
|
|
|
depends_on('libxslt@1.1.14:')
|
|
|
|
depends_on('lzo')
|
|
|
|
depends_on('pcre')
|
|
|
|
depends_on('giflib')
|
|
|
|
depends_on('sqlite@3.6.6:')
|
|
|
|
depends_on('zlib')
|
|
|
|
depends_on('samtools')
|
|
|
|
depends_on('bamtools')
|
|
|
|
|
|
|
|
def configure_args(self):
|
2019-08-08 03:18:36 +08:00
|
|
|
args = ['--without-sybase', '--without-fastcgi']
|
|
|
|
if '+debug' not in self.spec:
|
|
|
|
args += ['--without-debug']
|
|
|
|
return args
|
2018-07-06 10:34:38 +08:00
|
|
|
|
|
|
|
def patch(self):
|
|
|
|
with working_dir(join_path('src', 'util', 'image')):
|
|
|
|
filter_file(r'jpeg_start_compress(&cinfo, true)',
|
|
|
|
'jpeg_start_compress(&cinfo, TRUE)',
|
|
|
|
'image_io_jpeg.cpp', string=True)
|
2019-08-08 03:18:36 +08:00
|
|
|
# TODO: Convert these substitutions into BOOST_VERSION preprocessor
|
|
|
|
# patches to send upstream.
|
|
|
|
if self.spec.satisfies('^boost@1.69:'):
|
|
|
|
with working_dir(join_path('include', 'corelib')):
|
|
|
|
filter_file(r'(boost::unit_test::decorator::collector)',
|
|
|
|
r'\1_t', 'test_boost.hpp')
|
|
|
|
if self.spec.satisfies('^boost@1.70:'):
|
|
|
|
with working_dir(join_path('include', 'corelib')):
|
|
|
|
filter_file(('unit_test::ut_detail::'
|
|
|
|
'ignore_unused_variable_warning'),
|
|
|
|
'ignore_unused', 'test_boost.hpp', string=True)
|
|
|
|
with working_dir(join_path('src', 'corelib')):
|
|
|
|
for file_ in ['test_boost.cpp', 'teamcity_boost.cpp']:
|
|
|
|
filter_file(
|
|
|
|
r'(void log_build_info\s*\(.*ostream&[^)]*)\);',
|
|
|
|
r'\1, bool log_build_info = true);', file_)
|
|
|
|
filter_file(r'(::log_build_info\(.*ostream.*&[^)]+)\)',
|
|
|
|
r'\1, bool log_build_info)', file_)
|
|
|
|
filter_file(r'(log_build_info\(ostr)\)', r'\1, true)',
|
|
|
|
file_)
|
2018-07-06 10:34:38 +08:00
|
|
|
|
|
|
|
def build(self, spec, prefix):
|
2019-08-08 03:18:36 +08:00
|
|
|
with working_dir(join_path(glob(
|
|
|
|
'*MT64')[0], 'build')):
|
2018-07-06 10:34:38 +08:00
|
|
|
make('all_r')
|