parent
5320268033
commit
e53a98cb4f
1 changed files with 8 additions and 4 deletions
|
@ -2,12 +2,10 @@
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from llnl.util.filesystem import fix_darwin_install_name
|
import llnl.util.filesystem as fs
|
||||||
|
|
||||||
|
|
||||||
class Papi(AutotoolsPackage):
|
class Papi(AutotoolsPackage):
|
||||||
|
@ -68,6 +66,12 @@ def configure_args(self):
|
||||||
options.append('--with-components={0}'.format(' '.join(variants)))
|
options.append('--with-components={0}'.format(' '.join(variants)))
|
||||||
return options
|
return options
|
||||||
|
|
||||||
|
@run_before('configure')
|
||||||
|
def fortran_check(self):
|
||||||
|
if not self.compiler.fc:
|
||||||
|
msg = 'PAPI requires a Fortran compiler to build'
|
||||||
|
raise RuntimeError(msg)
|
||||||
|
|
||||||
@run_before('configure')
|
@run_before('configure')
|
||||||
def component_configure(self):
|
def component_configure(self):
|
||||||
configure_script = Executable('./configure')
|
configure_script = Executable('./configure')
|
||||||
|
@ -92,4 +96,4 @@ def fix_darwin_install(self):
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
os.rename(join_path(self.prefix.lib, 'libpapi.so'),
|
os.rename(join_path(self.prefix.lib, 'libpapi.so'),
|
||||||
join_path(self.prefix.lib, 'libpapi.dylib'))
|
join_path(self.prefix.lib, 'libpapi.dylib'))
|
||||||
fix_darwin_install_name(self.prefix.lib)
|
fs.fix_darwin_install_name(self.prefix.lib)
|
||||||
|
|
Loading…
Reference in a new issue