Skip installing libpciaccess on Darwin

This commit is contained in:
Erik Schnetter 2015-12-22 16:24:05 -05:00
parent 6dc1fc03c1
commit 6831ee6f0a
2 changed files with 8 additions and 2 deletions

View File

@ -21,8 +21,7 @@ class Hwloc(Package):
url='http://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.1.tar.bz2')
version('1.9', '1f9f9155682fe8946a97c08896109508')
# libpciaccess is not supported on OS X
depends_on('libpciaccess', when='=linux')
depends_on('libpciaccess')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)

View File

@ -1,4 +1,5 @@
from spack import *
import os.path
class Libpciaccess(Package):
"""Generic PCI access library."""
@ -13,6 +14,12 @@ class Libpciaccess(Package):
depends_on('libtool')
def install(self, spec, prefix):
# libpciaccess does not support OS X
if spec.satisfies('=darwin-x86_64'):
# create a dummy directory
mkdir(prefix.lib)
return
from subprocess import call
call(["./autogen.sh"])
configure("--prefix=%s" % prefix)