Merge branch 'adamjstewart-features/libsigsegv' into develop

This commit is contained in:
Todd Gamblin 2016-03-05 15:15:08 -08:00
commit c59546fae0
2 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,15 @@
from spack import *
class Libsigsegv(Package):
"""GNU libsigsegv is a library for handling page faults in user mode."""
homepage = "https://www.gnu.org/software/libsigsegv/"
url = "ftp://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz"
version('2.10', '7f96fb1f65b3b8cbc1582fb7be774f0f')
def install(self, spec, prefix):
configure('--prefix=%s' % prefix,
'--enable-shared')
make()
make("install")

View file

@ -7,7 +7,17 @@ class M4(Package):
version('1.4.17', 'a5e9954b1dae036762f7b13673a2cf76')
variant('sigsegv', default=True, description="Build the libsigsegv dependency")
depends_on('libsigsegv', when='+sigsegv')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
configure_args = []
if 'libsigsegv' in spec:
configure_args.append('--with-libsigsegv-prefix=%s' % spec['libsigsegv'].prefix)
else:
configure_args.append('--without-libsigsegv-prefix')
configure("--prefix=%s" % prefix, *configure_args)
make()
make("install")