diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/dyninst/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/dyninst/package.py | 88 |
1 files changed, 45 insertions, 43 deletions
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index 8a18b99940..9d9ab52669 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -1,27 +1,8 @@ -############################################################################## -# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. -# Produced at the Lawrence Livermore National Laboratory. +# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. # -# This file is part of Spack. -# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. -# LLNL-CODE-647188 -# -# For details, see https://github.com/spack/spack -# Please also see the NOTICE and LICENSE files for our notice and the LGPL. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License (as -# published by the Free Software Foundation) version 2.1, February 1999. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and -# conditions of the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -############################################################################## +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + from spack import * @@ -30,29 +11,38 @@ class Dyninst(Package): are executing without recompiling, re-linking, or re-executing.""" homepage = "https://paradyn.org" - url = "https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz" - list_url = "http://www.dyninst.org/downloads/dyninst-8.x" + git = "https://github.com/dyninst/dyninst.git" - version('9.3.2', 'a2bf03b6d1d424853e80d39b13e9c229') - version('9.3.0', 'edde7847dc673ca69bd59412af572450') - version('9.2.0', 'ad023f85e8e57837ed9de073b59d6bab', - url="https://github.com/dyninst/dyninst/archive/v9.2.0.tar.gz") - version('9.1.0', '5c64b77521457199db44bec82e4988ac', - url="http://www.paradyn.org/release9.1.0/DyninstAPI-9.1.0.tgz") - version('8.2.1', 'abf60b7faabe7a2e4b54395757be39c7', - url="http://www.paradyn.org/release8.2/DyninstAPI-8.2.1.tgz") - version('8.1.2', 'bf03b33375afa66fe0efa46ce3f4b17a', - url="http://www.paradyn.org/release8.1.2/DyninstAPI-8.1.2.tgz") - version('8.1.1', 'd1a04e995b7aa70960cd1d1fac8bd6ac', - url="http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz") + version('develop', branch='master') + version('10.0.0', tag='v10.0.0') + version('9.3.2', tag='v9.3.2') + version('9.3.0', tag='v9.3.0') + version('9.2.0', tag='v9.2.0') + version('9.1.0', tag='v9.1.0') + version('8.2.1', tag='v8.2.1') + version('8.1.2', tag='v8.1.2') + version('8.1.1', tag='v8.1.1') variant('stat_dysect', default=False, description="patch for STAT's DySectAPI") + # Dyninst depends on libelf and libdwarf prior to @9.3.0 + # Dyninst depends on elfutils and libdwarf from @9.3.0 to but + # not including @develop + # Dyninst depends on elfutils and elfutils libdw from @develop forward + # elf@0 is an abstaction for libelf + # elf@1 is an abstaction for elfutils depends_on("elf@0", type='link', when='@:9.2.99') + # The sorting algorithm puts numbered releases as newer than alphabetic + # releases, but spack has special logic in place to ensure that + # develop is considered newer than all other releases. + # So, develop is included in the elf@1 line below. depends_on("elf@1", type='link', when='@9.3.0:') - depends_on("libdwarf") + depends_on("libdwarf", when='@:9') depends_on("boost@1.42:") + depends_on('libiberty+pic') + depends_on("tbb@2018.6:", when='@develop') + depends_on("tbb@2018.6:", when='@10:') depends_on('cmake', type='build') patch('stat_dysect.patch', when='+stat_dysect') @@ -67,7 +57,8 @@ class Dyninst(Package): return libelf = spec['elf'].prefix - libdwarf = spec['libdwarf'].prefix + if spec.satisfies('@:9'): + libdwarf = spec['libdwarf'].prefix with working_dir('spack-build', create=True): args = ['..', @@ -77,10 +68,21 @@ class Dyninst(Package): '-DLIBELF_INCLUDE_DIR=%s' % join_path( libelf.include, 'libelf'), '-DLIBELF_LIBRARIES=%s' % join_path( - libelf.lib, 'libelf.so'), - '-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include, - '-DLIBDWARF_LIBRARIES=%s' % join_path( - libdwarf.lib, 'libdwarf.so')] + libelf.lib, "libelf." + dso_suffix)] + if spec.satisfies('@:9'): + args.append('-DLIBDWARF_INCLUDE_DIR=%s' % libdwarf.include) + args.append('-DLIBDWARF_LIBRARIES=%s' % join_path( + libdwarf.lib, "libdwarf." + dso_suffix)) + # For @develop + use elfutils libdw, libelf is an abstraction + # we are really using elfutils here + if spec.satisfies('@develop') or spec.satisfies('@10:'): + tbb = spec['tbb'].prefix + args.append('-DTBB_INCLUDE_DIRS=%s' % tbb.include) + args.append('-DTBB_LIBRARIES=%s' % join_path( + tbb.lib, "libtbb." + dso_suffix)) + args.append('-DLIBDWARF_INCLUDE_DIR=%s' % libelf.include) + args.append('-DLIBDWARF_LIBRARIES=%s' % join_path( + libelf.lib, "libdw." + dso_suffix)) if spec.satisfies('arch=linux-redhat7-ppc64le'): args.append('-Darch_ppc64_little_endian=1') args += std_cmake_args |