summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/dyninst/package.py63
1 files changed, 41 insertions, 22 deletions
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py
index 1e370557f2..84a0575bc5 100644
--- a/var/spack/repos/builtin/packages/dyninst/package.py
+++ b/var/spack/repos/builtin/packages/dyninst/package.py
@@ -11,10 +11,11 @@ class Dyninst(CMakePackage):
"""API for dynamic binary instrumentation. Modify programs while they
are executing without recompiling, re-linking, or re-executing."""
- homepage = "https://paradyn.org"
+ homepage = "https://dyninst.org"
git = "https://github.com/dyninst/dyninst.git"
version('develop', branch='master')
+ version('10.1.0', tag='v10.1.0')
version('10.0.0', tag='v10.0.0')
version('9.3.2', tag='v9.3.2')
version('9.3.0', tag='v9.3.0')
@@ -34,7 +35,8 @@ class Dyninst(CMakePackage):
boost_libs = '+atomic+chrono+date_time+filesystem+system+thread+timer'
- depends_on('boost@1.61.0:1.69.99' + boost_libs)
+ depends_on('boost@1.61.0:' + boost_libs, when='@10.1.0:')
+ depends_on('boost@1.61.0:1.69.99' + boost_libs, when='@:10.0.99')
depends_on('libiberty+pic')
# Dyninst uses elf@1 (elfutils) starting with 9.3.0, and used
@@ -44,12 +46,13 @@ class Dyninst(CMakePackage):
# Dyninst uses libdw from elfutils (same elf@1) starting with
# 10.x, and used libdwarf before that.
- depends_on('libdwarf', when='@:9.99')
+ depends_on('libdwarf', when='@:9.99.99')
- depends_on('tbb@2018.6:', when='@10.0:')
+ depends_on('tbb@2018.6:', when='@10.0.0:')
- depends_on('cmake@3.4.0:', type='build', when='@10.0:')
- depends_on('cmake@2.8:', type='build', when='@:9.99')
+ depends_on('cmake@3.4.0:', type='build', when='@10.1.0:')
+ depends_on('cmake@3.0.0:', type='build', when='@10.0.0:10.0.99')
+ depends_on('cmake@2.8:', type='build', when='@:9.99.99')
patch('stat_dysect.patch', when='+stat_dysect')
patch('stackanalysis_h.patch', when='@9.2.0')
@@ -64,6 +67,32 @@ class Dyninst(CMakePackage):
filter_file('USE_COTIRE true', 'USE_COTIRE false',
'cmake/shared.cmake')
+ # New style cmake args, starting with 10.1.
+ @when('@10.1.0:')
+ def cmake_args(self):
+ spec = self.spec
+
+ args = [
+ '-DBoost_ROOT_DIR=%s' % spec['boost'].prefix,
+ '-DElfUtils_ROOT_DIR=%s' % spec['elf'].prefix,
+ '-DLibIberty_ROOT_DIR=%s' % spec['libiberty'].prefix,
+ '-DTBB_ROOT_DIR=%s' % spec['tbb'].prefix,
+ ]
+
+ if '+openmp' in spec:
+ args.append('-DUSE_OpenMP=ON')
+ else:
+ args.append('-DUSE_OpenMP=OFF')
+
+ if '+static' in spec:
+ args.append('-DENABLE_STATIC_LIBS=YES')
+ else:
+ args.append('-DENABLE_STATIC_LIBS=NO')
+
+ return args
+
+ # Old style cmake args, up through 10.0.
+ @when('@:10.0.99')
def cmake_args(self):
spec = self.spec
@@ -84,23 +113,13 @@ class Dyninst(CMakePackage):
args = [
'-DPATH_BOOST=%s' % spec['boost'].prefix,
'-DIBERTY_LIBRARIES=%s' % spec['libiberty'].libs,
- ]
- # 10.1 changed the spelling of LibElf and LibDwarf.
- if spec.satisfies('@10.1.0:'):
- args.extend([
- '-DLibElf_INCLUDE_DIR=%s' % elf_include,
- '-DLibElf_LIBRARIES=%s' % spec['elf'].libs,
- '-DLibDwarf_INCLUDE_DIR=%s' % dwarf_include,
- '-DLibDwarf_LIBRARIES=%s' % dwarf_lib,
- ])
- else:
- args.extend([
- '-DLIBELF_INCLUDE_DIR=%s' % elf_include,
- '-DLIBELF_LIBRARIES=%s' % spec['elf'].libs,
- '-DLIBDWARF_INCLUDE_DIR=%s' % dwarf_include,
- '-DLIBDWARF_LIBRARIES=%s' % dwarf_lib,
- ])
+ '-DLIBELF_INCLUDE_DIR=%s' % elf_include,
+ '-DLIBELF_LIBRARIES=%s' % spec['elf'].libs,
+
+ '-DLIBDWARF_INCLUDE_DIR=%s' % dwarf_include,
+ '-DLIBDWARF_LIBRARIES=%s' % dwarf_lib,
+ ]
# TBB include and lib directories, version 10.x or later.
if spec.satisfies('@10.0.0:'):