Add more modifications for changing the krell packages from Package to CMakePackage.
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
##############################################################################
 | 
					##############################################################################
 | 
				
			||||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
 | 
					# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
 | 
				
			||||||
# Produced at the Lawrence Livermore National Laboratory.
 | 
					# Produced at the Lawrence Livermore National Laboratory.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This file is part of Spack.
 | 
					# This file is part of Spack.
 | 
				
			||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
					# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
				
			||||||
##############################################################################
 | 
					##############################################################################
 | 
				
			||||||
##########################################################################
 | 
					##########################################################################
 | 
				
			||||||
# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
 | 
					# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This program is free software; you can redistribute it and/or modify it under
 | 
					# This program is free software; you can redistribute it and/or modify it under
 | 
				
			||||||
# the terms of the GNU General Public License as published by the Free Software
 | 
					# the terms of the GNU General Public License as published by the Free Software
 | 
				
			||||||
@@ -50,10 +50,6 @@ class CbtfArgonavis(CMakePackage):
 | 
				
			|||||||
    """
 | 
					    """
 | 
				
			||||||
    homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
 | 
					    homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Mirror access template example
 | 
					 | 
				
			||||||
    # url = "file:/home/jeg/cbtf-argonavis-1.8.1.tar.gz"
 | 
					 | 
				
			||||||
    # version('1.8.1', 'b63db444fff92370a88197882a8d54d0')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    version('1.8', branch='master',
 | 
					    version('1.8', branch='master',
 | 
				
			||||||
            git='https://github.com/OpenSpeedShop/cbtf-argonavis.git')
 | 
					            git='https://github.com/OpenSpeedShop/cbtf-argonavis.git')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -69,23 +65,8 @@ class CbtfArgonavis(CMakePackage):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    build_directory = 'build_cbtf_argonavis'
 | 
					    build_directory = 'build_cbtf_argonavis'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # We have converted from Package type to CMakePackage type for all the Krell projects.
 | 
					 | 
				
			||||||
    # Comments from Pull Request (#4765):
 | 
					 | 
				
			||||||
    # CMakePackage is completely different from the old Package class. Previously, you had 
 | 
					 | 
				
			||||||
    # a single install() phase to override. Now you have 3 phases: cmake(), build(), and install(). 
 | 
					 | 
				
			||||||
    # By default, cmake() runs cmake ... with some common arguments, which you can add to by 
 | 
					 | 
				
			||||||
    # overriding cmake_args(). build() runs make, and install() runs make install. 
 | 
					 | 
				
			||||||
    # So you need to add the appropriate flags to cmake_args() and remove the calls to make. 
 | 
					 | 
				
			||||||
    # See any other CMakePackage for examples.
 | 
					 | 
				
			||||||
    # CMakePackage is documented: 
 | 
					 | 
				
			||||||
    # http://spack.readthedocs.io/en/latest/spack.build_systems.html?highlight= \
 | 
					 | 
				
			||||||
    # CMakePackage#module-spack.build_systems.cmake
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def build_type(self):
 | 
					    def build_type(self):
 | 
				
			||||||
        if '+debug' in self.spec:
 | 
					        return 'None'
 | 
				
			||||||
            return 'Debug'
 | 
					 | 
				
			||||||
        else:
 | 
					 | 
				
			||||||
            return 'Release'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cmake_args(self):
 | 
					    def cmake_args(self):
 | 
				
			||||||
        spec = self.spec
 | 
					        spec = self.spec
 | 
				
			||||||
@@ -97,15 +78,12 @@ def cmake_args(self):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        cmake_args = []
 | 
					        cmake_args = []
 | 
				
			||||||
        cmake_args.extend(
 | 
					        cmake_args.extend(
 | 
				
			||||||
            ['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
 | 
					            ['-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
 | 
				
			||||||
             '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path,
 | 
					 | 
				
			||||||
             '-DCUDA_DIR=%s' % spec['cuda'].prefix,
 | 
					             '-DCUDA_DIR=%s' % spec['cuda'].prefix,
 | 
				
			||||||
             '-DCUDA_INSTALL_PATH=%s' % spec['cuda'].prefix,
 | 
					             '-DCUDA_INSTALL_PATH=%s' % spec['cuda'].prefix,
 | 
				
			||||||
             '-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix,
 | 
					             '-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix,
 | 
				
			||||||
             '-DCUPTI_DIR=%s' % join_path(
 | 
					             '-DCUPTI_DIR=%s' %spec['cuda'].prefix.extras.CUPTI,
 | 
				
			||||||
                 spec['cuda'].prefix + '/extras/CUPTI'),
 | 
					             '-DCUPTI_ROOT=%s' %spec['cuda'].prefix.extras.CUPTI,
 | 
				
			||||||
             '-DCUPTI_ROOT=%s' % join_path(
 | 
					 | 
				
			||||||
                 spec['cuda'].prefix + '/extras/CUPTI'),
 | 
					 | 
				
			||||||
             '-DPAPI_ROOT=%s' % spec['papi'].prefix,
 | 
					             '-DPAPI_ROOT=%s' % spec['papi'].prefix,
 | 
				
			||||||
             '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
 | 
					             '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
 | 
				
			||||||
             '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
 | 
					             '-DCBTF_KRELL_DIR=%s' % spec['cbtf-krell'].prefix,
 | 
				
			||||||
@@ -115,13 +93,10 @@ def cmake_args(self):
 | 
				
			|||||||
             '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
 | 
					             '-DMRNET_DIR=%s' % spec['mrnet'].prefix,
 | 
				
			||||||
             '-DBoost_NO_SYSTEM_PATHS=ON'])
 | 
					             '-DBoost_NO_SYSTEM_PATHS=ON'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Add in the standard cmake arguments
 | 
					 | 
				
			||||||
        cmake_args.extend(std_cmake_args)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        # Adjust the standard cmake arguments to what we want the build
 | 
					        # Adjust the standard cmake arguments to what we want the build
 | 
				
			||||||
        # type, etc to be
 | 
					        # type, etc to be
 | 
				
			||||||
        self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
					        self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
        return(cmake_args)
 | 
					        return cmake_args
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
					    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
				
			||||||
        # Sets build type parameters into cmakeOptions the options that will
 | 
					        # Sets build type parameters into cmakeOptions the options that will
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -52,10 +52,6 @@ class CbtfKrell(CMakePackage):
 | 
				
			|||||||
    """
 | 
					    """
 | 
				
			||||||
    homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
 | 
					    homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # optional mirror access template
 | 
					 | 
				
			||||||
    # url      = "file:/home/jeg/cbtf-krell-1.6.tar.gz"
 | 
					 | 
				
			||||||
    # version('1.6', 'edeb61cd488f16e7b124f77db9ce762d')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    version('1.8', branch='master',
 | 
					    version('1.8', branch='master',
 | 
				
			||||||
            git='https://github.com/OpenSpeedShop/cbtf-krell.git')
 | 
					            git='https://github.com/OpenSpeedShop/cbtf-krell.git')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -106,18 +102,6 @@ class CbtfKrell(CMakePackage):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    build_directory = 'build_cbtf_krell'
 | 
					    build_directory = 'build_cbtf_krell'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # We have converted from Package type to CMakePackage type for all the Krell projects.
 | 
					 | 
				
			||||||
    # Comments from Pull Request (#4765):
 | 
					 | 
				
			||||||
    # CMakePackage is completely different from the old Package class. Previously, you had 
 | 
					 | 
				
			||||||
    # a single install() phase to override. Now you have 3 phases: cmake(), build(), and install(). 
 | 
					 | 
				
			||||||
    # By default, cmake() runs cmake ... with some common arguments, which you can add to by 
 | 
					 | 
				
			||||||
    # overriding cmake_args(). build() runs make, and install() runs make install. 
 | 
					 | 
				
			||||||
    # So you need to add the appropriate flags to cmake_args() and remove the calls to make. 
 | 
					 | 
				
			||||||
    # See any other CMakePackage for examples.
 | 
					 | 
				
			||||||
    # CMakePackage is documented: 
 | 
					 | 
				
			||||||
    # http://spack.readthedocs.io/en/latest/spack.build_systems.html?highlight= \
 | 
					 | 
				
			||||||
    # CMakePackage#module-spack.build_systems.cmake
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
					    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
				
			||||||
        # Sets build type parameters into cmakeOptions the options that will
 | 
					        # Sets build type parameters into cmakeOptions the options that will
 | 
				
			||||||
        # enable the cbtf-krell built type settings
 | 
					        # enable the cbtf-krell built type settings
 | 
				
			||||||
@@ -172,25 +156,16 @@ def set_mpi_cmakeOptions(self, spec, cmakeOptions):
 | 
				
			|||||||
        cmakeOptions.extend(MPIOptions)
 | 
					        cmakeOptions.extend(MPIOptions)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def build_type(self):
 | 
					    def build_type(self):
 | 
				
			||||||
        if '+debug' in self.spec:
 | 
					        return 'None'
 | 
				
			||||||
            return 'Debug'
 | 
					 | 
				
			||||||
        else:
 | 
					 | 
				
			||||||
            return 'Release'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cmake_args(self):
 | 
					    def cmake_args(self):
 | 
				
			||||||
        spec = self.spec
 | 
					        spec = self.spec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Add in paths for finding package config files that tell us
 | 
					        # Add in paths for finding package config files that tell us
 | 
				
			||||||
        # where to find these packages
 | 
					        # where to find these packages
 | 
				
			||||||
        # cmake_prefix_path = \
 | 
					 | 
				
			||||||
        #     join_path(spec['cbtf'].prefix) + ':' + \
 | 
					 | 
				
			||||||
        #     join_path(spec['dyninst'].prefix)
 | 
					 | 
				
			||||||
        # '-DCMAKE_PREFIX_PATH=%s' % cmake_prefix_path
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        cmake_args = []
 | 
					        cmake_args = []
 | 
				
			||||||
        cmake_args.extend(
 | 
					        cmake_args.extend(
 | 
				
			||||||
            ['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
 | 
					            ['-DCBTF_DIR=%s' % spec['cbtf'].prefix,
 | 
				
			||||||
             '-DCBTF_DIR=%s' % spec['cbtf'].prefix,
 | 
					 | 
				
			||||||
             '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
 | 
					             '-DBINUTILS_DIR=%s' % spec['binutils'].prefix,
 | 
				
			||||||
             '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
 | 
					             '-DLIBMONITOR_DIR=%s' % spec['libmonitor'].prefix,
 | 
				
			||||||
             '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
 | 
					             '-DLIBUNWIND_DIR=%s' % spec['libunwind'].prefix,
 | 
				
			||||||
@@ -203,20 +178,8 @@ def cmake_args(self):
 | 
				
			|||||||
        # Add any MPI implementations coming from variant settings
 | 
					        # Add any MPI implementations coming from variant settings
 | 
				
			||||||
        self.set_mpi_cmakeOptions(spec, cmake_args)
 | 
					        self.set_mpi_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Add in the standard cmake arguments
 | 
					 | 
				
			||||||
        cmake_args.extend(std_cmake_args)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        # Adjust the standard cmake arguments to what we want the build
 | 
					        # Adjust the standard cmake arguments to what we want the build
 | 
				
			||||||
        # type, etc to be
 | 
					        # type, etc to be
 | 
				
			||||||
        self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
					        self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return cmake_args
 | 
					        return cmake_args
 | 
				
			||||||
 | 
					 | 
				
			||||||
#    def cmake(self, spec, prefix):
 | 
					 | 
				
			||||||
#        cmake('..', *cmake_args)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#    def build(self, spec, prefix):
 | 
					 | 
				
			||||||
#        make(parallel=False)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#    def install(self, spec, prefix):
 | 
					 | 
				
			||||||
#        # Install cbtf-krell
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
##############################################################################
 | 
					##############################################################################
 | 
				
			||||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
 | 
					# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
 | 
				
			||||||
# Produced at the Lawrence Livermore National Laboratory.
 | 
					# Produced at the Lawrence Livermore National Laboratory.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This file is part of Spack.
 | 
					# This file is part of Spack.
 | 
				
			||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
					# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
				
			||||||
##############################################################################
 | 
					##############################################################################
 | 
				
			||||||
##########################################################################
 | 
					##########################################################################
 | 
				
			||||||
# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
 | 
					# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This program is free software; you can redistribute it and/or modify it under
 | 
					# This program is free software; you can redistribute it and/or modify it under
 | 
				
			||||||
# the terms of the GNU General Public License as published by the Free Software
 | 
					# the terms of the GNU General Public License as published by the Free Software
 | 
				
			||||||
@@ -48,10 +48,6 @@ class CbtfLanl(CMakePackage):
 | 
				
			|||||||
       command monitoring tool."""
 | 
					       command monitoring tool."""
 | 
				
			||||||
    homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
 | 
					    homepage = "http://sourceforge.net/p/cbtf/wiki/Home/"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Mirror access template example
 | 
					 | 
				
			||||||
    # url      = "file:/g/g24/jeg/cbtf-lanl-1.6.tar.gz"
 | 
					 | 
				
			||||||
    # version('1.6', 'c3f78f967b0a42c6734ce4be0e602426')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    version('1.8', branch='master',
 | 
					    version('1.8', branch='master',
 | 
				
			||||||
            git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl')
 | 
					            git='http://git.code.sf.net/p/cbtf-lanl/cbtf-lanl')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -66,23 +62,8 @@ class CbtfLanl(CMakePackage):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    build_directory = 'build_cbtf_lanl'
 | 
					    build_directory = 'build_cbtf_lanl'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # We have converted from Package type to CMakePackage type for all the Krell projects.
 | 
					 | 
				
			||||||
    # Comments from Pull Request (#4765):
 | 
					 | 
				
			||||||
    # CMakePackage is completely different from the old Package class. Previously, you had 
 | 
					 | 
				
			||||||
    # a single install() phase to override. Now you have 3 phases: cmake(), build(), and install(). 
 | 
					 | 
				
			||||||
    # By default, cmake() runs cmake ... with some common arguments, which you can add to by 
 | 
					 | 
				
			||||||
    # overriding cmake_args(). build() runs make, and install() runs make install. 
 | 
					 | 
				
			||||||
    # So you need to add the appropriate flags to cmake_args() and remove the calls to make. 
 | 
					 | 
				
			||||||
    # See any other CMakePackage for examples.
 | 
					 | 
				
			||||||
    # CMakePackage is documented: 
 | 
					 | 
				
			||||||
    # http://spack.readthedocs.io/en/latest/spack.build_systems.html?highlight= \
 | 
					 | 
				
			||||||
    # CMakePackage#module-spack.build_systems.cmake
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def build_type(self):
 | 
					    def build_type(self):
 | 
				
			||||||
        if '+debug' in self.spec:
 | 
					        return 'None'
 | 
				
			||||||
            return 'Debug'
 | 
					 | 
				
			||||||
        else:
 | 
					 | 
				
			||||||
            return 'Release'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cmake_args(self):
 | 
					    def cmake_args(self):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -95,8 +76,7 @@ def cmake_args(self):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        cmake_args = []
 | 
					        cmake_args = []
 | 
				
			||||||
        cmake_args.extend(
 | 
					        cmake_args.extend(
 | 
				
			||||||
            ['-DCMAKE_INSTALL_PREFIX=%s'   % prefix,
 | 
					            ['-DCBTF_DIR=%s'               % spec['cbtf'].prefix,
 | 
				
			||||||
             '-DCBTF_DIR=%s'               % spec['cbtf'].prefix,
 | 
					 | 
				
			||||||
             '-DCBTF_KRELL_DIR=%s'         % spec['cbtf-krell'].prefix,
 | 
					             '-DCBTF_KRELL_DIR=%s'         % spec['cbtf-krell'].prefix,
 | 
				
			||||||
             '-DMRNET_DIR=%s'              % spec['mrnet'].prefix,
 | 
					             '-DMRNET_DIR=%s'              % spec['mrnet'].prefix,
 | 
				
			||||||
             '-DXERCESC_DIR=%s'            % spec['xerces-c'].prefix,
 | 
					             '-DXERCESC_DIR=%s'            % spec['xerces-c'].prefix,
 | 
				
			||||||
@@ -104,13 +84,10 @@ def cmake_args(self):
 | 
				
			|||||||
             '-DCMAKE_MODULE_PATH=%s'      % join_path(
 | 
					             '-DCMAKE_MODULE_PATH=%s'      % join_path(
 | 
				
			||||||
                 prefix.share, 'KrellInstitute', 'cmake')])
 | 
					                 prefix.share, 'KrellInstitute', 'cmake')])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Add in the standard cmake arguments
 | 
					 | 
				
			||||||
        cmake_args.extend(std_cmake_args)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        # Adjust the standard cmake arguments to what we want the build
 | 
					        # Adjust the standard cmake arguments to what we want the build
 | 
				
			||||||
        # type, etc to be
 | 
					        # type, etc to be
 | 
				
			||||||
        self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
					        self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
        return(cmake_args)
 | 
					        return cmake_args 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
					    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
				
			||||||
        # Sets build type parameters into cmakeOptions the options that will
 | 
					        # Sets build type parameters into cmakeOptions the options that will
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
##############################################################################
 | 
					##############################################################################
 | 
				
			||||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
 | 
					# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
 | 
				
			||||||
# Produced at the Lawrence Livermore National Laboratory.
 | 
					# Produced at the Lawrence Livermore National Laboratory.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This file is part of Spack.
 | 
					# This file is part of Spack.
 | 
				
			||||||
@@ -52,10 +52,6 @@ class Cbtf(CMakePackage):
 | 
				
			|||||||
    """
 | 
					    """
 | 
				
			||||||
    homepage = "http://sourceforge.net/p/cbtf/wiki/Home"
 | 
					    homepage = "http://sourceforge.net/p/cbtf/wiki/Home"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Mirror access template example
 | 
					 | 
				
			||||||
    # url      = "file:/home/jeg/cbtf-1.6.tar.gz"
 | 
					 | 
				
			||||||
    # version('1.6', 'c1ef4e5aa4e470dffb042abdba0b9987')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # Use when the git repository is available
 | 
					    # Use when the git repository is available
 | 
				
			||||||
    version('1.8', branch='master',
 | 
					    version('1.8', branch='master',
 | 
				
			||||||
            git='https://github.com/OpenSpeedShop/cbtf.git')
 | 
					            git='https://github.com/OpenSpeedShop/cbtf.git')
 | 
				
			||||||
@@ -74,23 +70,8 @@ class Cbtf(CMakePackage):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    build_directory = 'build_cbtf'
 | 
					    build_directory = 'build_cbtf'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # We have converted from Package type to CMakePackage type for all the Krell projects.
 | 
					 | 
				
			||||||
    # Comments from Pull Request (#4765):
 | 
					 | 
				
			||||||
    # CMakePackage is completely different from the old Package class. Previously, you had 
 | 
					 | 
				
			||||||
    # a single install() phase to override. Now you have 3 phases: cmake(), build(), and install(). 
 | 
					 | 
				
			||||||
    # By default, cmake() runs cmake ... with some common arguments, which you can add to by 
 | 
					 | 
				
			||||||
    # overriding cmake_args(). build() runs make, and install() runs make install. 
 | 
					 | 
				
			||||||
    # So you need to add the appropriate flags to cmake_args() and remove the calls to make. 
 | 
					 | 
				
			||||||
    # See any other CMakePackage for examples.
 | 
					 | 
				
			||||||
    # CMakePackage is documented: 
 | 
					 | 
				
			||||||
    # http://spack.readthedocs.io/en/latest/spack.build_systems.html?highlight= \
 | 
					 | 
				
			||||||
    # CMakePackage#module-spack.build_systems.cmake
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def build_type(self):
 | 
					    def build_type(self):
 | 
				
			||||||
        if '+debug' in self.spec:
 | 
					        return 'None'
 | 
				
			||||||
            return 'Debug'
 | 
					 | 
				
			||||||
        else:
 | 
					 | 
				
			||||||
            return 'Release'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cmake_args(self):
 | 
					    def cmake_args(self):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -107,8 +88,7 @@ def cmake_args(self):
 | 
				
			|||||||
            # FIXME
 | 
					            # FIXME
 | 
				
			||||||
            cmake_args = []
 | 
					            cmake_args = []
 | 
				
			||||||
            cmake_args.extend(
 | 
					            cmake_args.extend(
 | 
				
			||||||
                ['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
 | 
					                ['-DBoost_NO_SYSTEM_PATHS=TRUE',
 | 
				
			||||||
                 '-DBoost_NO_SYSTEM_PATHS=TRUE',
 | 
					 | 
				
			||||||
                 '-DXERCESC_DIR=%s'         % spec['xerces-c'].prefix,
 | 
					                 '-DXERCESC_DIR=%s'         % spec['xerces-c'].prefix,
 | 
				
			||||||
                 '-DBOOST_ROOT=%s'          % spec['boost'].prefix,
 | 
					                 '-DBOOST_ROOT=%s'          % spec['boost'].prefix,
 | 
				
			||||||
                 '-DMRNET_DIR=%s'           % spec['mrnet'].prefix,
 | 
					                 '-DMRNET_DIR=%s'           % spec['mrnet'].prefix,
 | 
				
			||||||
@@ -125,8 +105,7 @@ def cmake_args(self):
 | 
				
			|||||||
        else:
 | 
					        else:
 | 
				
			||||||
            cmake_args = []
 | 
					            cmake_args = []
 | 
				
			||||||
            cmake_args.extend(
 | 
					            cmake_args.extend(
 | 
				
			||||||
                ['-DCMAKE_INSTALL_PREFIX=%s' % prefix,
 | 
					                ['-DBoost_NO_SYSTEM_PATHS=TRUE',
 | 
				
			||||||
                 '-DBoost_NO_SYSTEM_PATHS=TRUE',
 | 
					 | 
				
			||||||
                 '-DXERCESC_DIR=%s'         % spec['xerces-c'].prefix,
 | 
					                 '-DXERCESC_DIR=%s'         % spec['xerces-c'].prefix,
 | 
				
			||||||
                 '-DBOOST_ROOT=%s'          % spec['boost'].prefix,
 | 
					                 '-DBOOST_ROOT=%s'          % spec['boost'].prefix,
 | 
				
			||||||
                 '-DMRNET_DIR=%s'           % spec['mrnet'].prefix,
 | 
					                 '-DMRNET_DIR=%s'           % spec['mrnet'].prefix,
 | 
				
			||||||
@@ -140,7 +119,7 @@ def cmake_args(self):
 | 
				
			|||||||
            # type, etc to be
 | 
					            # type, etc to be
 | 
				
			||||||
            self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
					            self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return(cmake_args)
 | 
					        return cmake_args
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
					    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
				
			||||||
        # Sets build type parameters into cmakeOptions the options that will
 | 
					        # Sets build type parameters into cmakeOptions the options that will
 | 
				
			||||||
@@ -165,11 +144,3 @@ def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        cmakeOptions.extend(BuildTypeOptions)
 | 
					        cmakeOptions.extend(BuildTypeOptions)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#    def install(self, spec, prefix):
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#                # Invoke cmake
 | 
					 | 
				
			||||||
#                cmake('..', *cmakeOptions)
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#            make("clean")
 | 
					 | 
				
			||||||
#            make()
 | 
					 | 
				
			||||||
#            make("install")
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
##############################################################################
 | 
					##############################################################################
 | 
				
			||||||
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
 | 
					# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
 | 
				
			||||||
# Produced at the Lawrence Livermore National Laboratory.
 | 
					# Produced at the Lawrence Livermore National Laboratory.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This file is part of Spack.
 | 
					# This file is part of Spack.
 | 
				
			||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
					# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 | 
				
			||||||
##############################################################################
 | 
					##############################################################################
 | 
				
			||||||
##############################################################################
 | 
					##############################################################################
 | 
				
			||||||
# Copyright (c) 2015-2016 Krell Institute. All Rights Reserved.
 | 
					# Copyright (c) 2015-2017 Krell Institute. All Rights Reserved.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This program is free software; you can redistribute it and/or modify it
 | 
					# This program is free software; you can redistribute it and/or modify it
 | 
				
			||||||
# under the terms of the GNU General Public License as published by the Free
 | 
					# under the terms of the GNU General Public License as published by the Free
 | 
				
			||||||
@@ -61,15 +61,11 @@ class Openspeedshop(CMakePackage):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    homepage = "http://www.openspeedshop.org"
 | 
					    homepage = "http://www.openspeedshop.org"
 | 
				
			||||||
    url = "https://github.com/OpenSpeedShop"
 | 
					    url = "https://github.com/OpenSpeedShop"
 | 
				
			||||||
    version('2.2', '16cb051179c2038de4e8a845edf1d573')
 | 
					
 | 
				
			||||||
    # Use when the git repository is available
 | 
					    # Use when the git repository is available
 | 
				
			||||||
    version('2.3', branch='master',
 | 
					    version('2.3', branch='master',
 | 
				
			||||||
            git='https://github.com/OpenSpeedShop/openspeedshop.git')
 | 
					            git='https://github.com/OpenSpeedShop/openspeedshop.git')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Optional mirror template
 | 
					 | 
				
			||||||
    # url = "file:/home/jeg/OpenSpeedShop_ROOT/SOURCES/openspeedshop-2.3.tar.gz"
 | 
					 | 
				
			||||||
    # version('2.3', '517a7798507241ad8abd8b0626a4d2cf')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    variant('offline', default=False,
 | 
					    variant('offline', default=False,
 | 
				
			||||||
            description="build with offline instrumentor enabled.")
 | 
					            description="build with offline instrumentor enabled.")
 | 
				
			||||||
    variant('cbtf', default=True,
 | 
					    variant('cbtf', default=True,
 | 
				
			||||||
@@ -142,23 +138,8 @@ class Openspeedshop(CMakePackage):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    build_directory = 'build_openspeedshop'
 | 
					    build_directory = 'build_openspeedshop'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # We have converted from Package type to CMakePackage type for all the Krell projects.
 | 
					 | 
				
			||||||
    # Comments from Pull Request (#4765):
 | 
					 | 
				
			||||||
    # CMakePackage is completely different from the old Package class. Previously, you had 
 | 
					 | 
				
			||||||
    # a single install() phase to override. Now you have 3 phases: cmake(), build(), and install(). 
 | 
					 | 
				
			||||||
    # By default, cmake() runs cmake ... with some common arguments, which you can add to by 
 | 
					 | 
				
			||||||
    # overriding cmake_args(). build() runs make, and install() runs make install. 
 | 
					 | 
				
			||||||
    # So you need to add the appropriate flags to cmake_args() and remove the calls to make. 
 | 
					 | 
				
			||||||
    # See any other CMakePackage for examples.
 | 
					 | 
				
			||||||
    # CMakePackage is documented: 
 | 
					 | 
				
			||||||
    # http://spack.readthedocs.io/en/latest/spack.build_systems.html?highlight= \
 | 
					 | 
				
			||||||
    # CMakePackage#module-spack.build_systems.cmake
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def build_type(self):
 | 
					    def build_type(self):
 | 
				
			||||||
        if '+debug' in self.spec:
 | 
					        return 'None'
 | 
				
			||||||
            return 'Debug'
 | 
					 | 
				
			||||||
        else:
 | 
					 | 
				
			||||||
            return 'Release'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cmake_args(self):
 | 
					    def cmake_args(self):
 | 
				
			||||||
        spec = self.spec
 | 
					        spec = self.spec
 | 
				
			||||||
@@ -169,7 +150,6 @@ def cmake_args(self):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                cmake_args = []
 | 
					                cmake_args = []
 | 
				
			||||||
                cmake_args.extend([
 | 
					                cmake_args.extend([
 | 
				
			||||||
                    '-DCMAKE_INSTALL_PREFIX=%s' % prefix,
 | 
					 | 
				
			||||||
                    '-DINSTRUMENTOR=%s'     % instrumentor_setting,
 | 
					                    '-DINSTRUMENTOR=%s'     % instrumentor_setting,
 | 
				
			||||||
                    '-DLIBMONITOR_DIR=%s'   % spec['libmonitor'].prefix,
 | 
					                    '-DLIBMONITOR_DIR=%s'   % spec['libmonitor'].prefix,
 | 
				
			||||||
                    '-DLIBUNWIND_DIR=%s'    % spec['libunwind'].prefix,
 | 
					                    '-DLIBUNWIND_DIR=%s'    % spec['libunwind'].prefix,
 | 
				
			||||||
@@ -177,7 +157,6 @@ def cmake_args(self):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                # Add any MPI implementations coming from variant settings
 | 
					                # Add any MPI implementations coming from variant settings
 | 
				
			||||||
                self.set_mpi_cmakeOptions(spec, cmake_args)
 | 
					                self.set_mpi_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
                cmake_args.extend(std_cmake_args)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                # Adjust the build options to the favored
 | 
					                # Adjust the build options to the favored
 | 
				
			||||||
                # ones for this build
 | 
					                # ones for this build
 | 
				
			||||||
@@ -191,9 +170,7 @@ def cmake_args(self):
 | 
				
			|||||||
                self.set_defaultbase_cmakeOptions(spec, cmake_args)
 | 
					                self.set_defaultbase_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                cmake_args.extend(
 | 
					                cmake_args.extend(
 | 
				
			||||||
                    ['-DCMAKE_INSTALL_PREFIX=%s'
 | 
					                    ['-DCMAKE_PREFIX_PATH=%s'
 | 
				
			||||||
                        % prefix,
 | 
					 | 
				
			||||||
                     '-DCMAKE_PREFIX_PATH=%s'
 | 
					 | 
				
			||||||
                        % cmake_prefix_path,
 | 
					                        % cmake_prefix_path,
 | 
				
			||||||
                     '-DINSTRUMENTOR=%s'
 | 
					                     '-DINSTRUMENTOR=%s'
 | 
				
			||||||
                        % instrumentor_setting,
 | 
					                        % instrumentor_setting,
 | 
				
			||||||
@@ -210,7 +187,6 @@ def cmake_args(self):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                # Add any MPI implementations coming from variant settings
 | 
					                # Add any MPI implementations coming from variant settings
 | 
				
			||||||
                self.set_mpi_cmakeOptions(spec, cmake_args)
 | 
					                self.set_mpi_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
                cmake_args.extend(std_cmake_args)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                # Adjust the build options to the favored
 | 
					                # Adjust the build options to the favored
 | 
				
			||||||
                # ones for this build
 | 
					                # ones for this build
 | 
				
			||||||
@@ -218,7 +194,6 @@ def cmake_args(self):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        elif '+cbtf' in spec:
 | 
					        elif '+cbtf' in spec:
 | 
				
			||||||
            instrumentor_setting = "cbtf"
 | 
					            instrumentor_setting = "cbtf"
 | 
				
			||||||
            # resolve_symbols = "symtabapi"
 | 
					 | 
				
			||||||
            cmake_prefix_path = join_path(spec['cbtf'].prefix) \
 | 
					            cmake_prefix_path = join_path(spec['cbtf'].prefix) \
 | 
				
			||||||
                + ':' + join_path(spec['cbtf-krell'].prefix)\
 | 
					                + ':' + join_path(spec['cbtf-krell'].prefix)\
 | 
				
			||||||
                + ':' + join_path(spec['dyninst'].prefix)
 | 
					                + ':' + join_path(spec['dyninst'].prefix)
 | 
				
			||||||
@@ -229,9 +204,7 @@ def cmake_args(self):
 | 
				
			|||||||
                self.set_defaultbase_cmakeOptions(spec, cmake_args)
 | 
					                self.set_defaultbase_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                cmake_args.extend(
 | 
					                cmake_args.extend(
 | 
				
			||||||
                    ['-DCMAKE_INSTALL_PREFIX=%s'
 | 
					                    ['-DCMAKE_PREFIX_PATH=%s'
 | 
				
			||||||
                        % prefix,
 | 
					 | 
				
			||||||
                     '-DCMAKE_PREFIX_PATH=%s'
 | 
					 | 
				
			||||||
                        % cmake_prefix_path,
 | 
					                        % cmake_prefix_path,
 | 
				
			||||||
                     '-DINSTRUMENTOR=%s'
 | 
					                     '-DINSTRUMENTOR=%s'
 | 
				
			||||||
                        % instrumentor_setting,
 | 
					                        % instrumentor_setting,
 | 
				
			||||||
@@ -254,9 +227,7 @@ def cmake_args(self):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                if '+noqt3gui' in self.spec:
 | 
					                if '+noqt3gui' in self.spec:
 | 
				
			||||||
                    cmake_args.extend(
 | 
					                    cmake_args.extend(
 | 
				
			||||||
                        ['-DCMAKE_INSTALL_PREFIX=%s'
 | 
					                        ['-DCMAKE_PREFIX_PATH=%s'
 | 
				
			||||||
                            % prefix,
 | 
					 | 
				
			||||||
                         '-DCMAKE_PREFIX_PATH=%s'
 | 
					 | 
				
			||||||
                            % cmake_prefix_path,
 | 
					                            % cmake_prefix_path,
 | 
				
			||||||
                         '-DINSTRUMENTOR=%s'
 | 
					                         '-DINSTRUMENTOR=%s'
 | 
				
			||||||
                            % instrumentor_setting,
 | 
					                            % instrumentor_setting,
 | 
				
			||||||
@@ -270,9 +241,7 @@ def cmake_args(self):
 | 
				
			|||||||
                            % spec['mrnet'].prefix])
 | 
					                            % spec['mrnet'].prefix])
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                    cmake_args.extend(
 | 
					                    cmake_args.extend(
 | 
				
			||||||
                        ['-DCMAKE_INSTALL_PREFIX=%s'
 | 
					                        ['-DCMAKE_PREFIX_PATH=%s'
 | 
				
			||||||
                            % prefix,
 | 
					 | 
				
			||||||
                         '-DCMAKE_PREFIX_PATH=%s'
 | 
					 | 
				
			||||||
                            % cmake_prefix_path,
 | 
					                            % cmake_prefix_path,
 | 
				
			||||||
                         '-DINSTRUMENTOR=%s'
 | 
					                         '-DINSTRUMENTOR=%s'
 | 
				
			||||||
                            % instrumentor_setting,
 | 
					                            % instrumentor_setting,
 | 
				
			||||||
@@ -290,7 +259,8 @@ def cmake_args(self):
 | 
				
			|||||||
                # Adjust the build options to the favored
 | 
					                # Adjust the build options to the favored
 | 
				
			||||||
                # ones for this build
 | 
					                # ones for this build
 | 
				
			||||||
                self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
					                self.adjustBuildTypeParams_cmakeOptions(spec, cmake_args)
 | 
				
			||||||
        return(cmake_args)
 | 
					
 | 
				
			||||||
 | 
					        return cmake_args 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
					    def adjustBuildTypeParams_cmakeOptions(self, spec, cmakeOptions):
 | 
				
			||||||
        # Sets build type parameters into cmakeOptions the
 | 
					        # Sets build type parameters into cmakeOptions the
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user