From 61e2cb56a440e0f1f3ddf84fdfeb048d8fb80443 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 1 Aug 2014 09:04:36 -0700 Subject: Got version 1.2.1 building, but 1.3 and onwards are different. --- var/spack/packages/otf2/package.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'var') diff --git a/var/spack/packages/otf2/package.py b/var/spack/packages/otf2/package.py index 6e8c398d7d..7e28414623 100644 --- a/var/spack/packages/otf2/package.py +++ b/var/spack/packages/otf2/package.py @@ -4,7 +4,7 @@ from spack import * import os class Otf2(Package): - """The Open Trace Format 2 is a highly scalable, memory efficient event + """The Open Trace Format 2 is a highly scalable, memory efficient event trace data format plus support library.""" homepage = "http://www.vi-hps.org/score-p" @@ -17,20 +17,26 @@ class Otf2(Package): version('1.2.1', '8fb3e11fb7489896596ae2c7c83d7fc8', url="http://www.vi-hps.org/upload/packages/otf2/otf2-1.2.1.tar.gz") + + @when('@:1.2') + def version_specific_args(self, args): + return ["--with-platform=disabled"] + + @when('@1.3:') + def version_specific_args(self, args): + # TODO: figure out what scorep's build does as of otf2 1.3 + return [] + + def install(self, spec, prefix): # FIXME: Modify the configure line to suit your build system here. cc = os.environ["SPACK_CC"] configure_args=["--prefix=%s" % prefix, - "--enable-shared"] - - if spec.satisfies('%gcc'): - configure_args.append('--with-nocross-compiler-suite=gcc') - if spec.satisfies('%intel'): - configure_args.append('--with-nocross-compiler-suite=intel') - if spec.satisfies('%pgi'): - configure_args.append('--with-nocross-compiler-suite=pgi') - + "--enable-shared"]) + + configure_args.extend(self.version_specific_args()) + configure(*configure_args) # FIXME: Add logic to build and install here -- cgit v1.2.3-70-g09d2