autotools : set Executable() in dependent modules

This commit is contained in:
alalazo 2016-06-26 17:36:33 +02:00
parent 055f7f4ab6
commit acd9014553
3 changed files with 56 additions and 15 deletions

View file

@ -24,18 +24,36 @@
##############################################################################
from spack import *
class Autoconf(Package):
"""Autoconf -- system configuration part of autotools"""
homepage = "https://www.gnu.org/software/autoconf/"
url = "http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz"
"""
Autoconf -- system configuration part of autotools
"""
homepage = 'https://www.gnu.org/software/autoconf/'
url = 'http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz'
version('2.69', '82d05e03b93e45f5a39b828dc9c6c29b')
version('2.62', '6c1f3b3734999035d77da5024aab4fbd')
depends_on("m4")
depends_on('m4')
def _make_executable(self, name):
return Executable(join_path(self.prefix.bin, name))
def setup_dependent_package(self, module, dependent_spec):
# Autoconf is very likely to be a build dependency,
# so we add the tools it provides to the dependent module
executables = ['autoconf',
'autoheader',
'autom4te',
'autoreconf',
'autoscan',
'autoupdate',
'ifnames']
for name in executables:
setattr(module, name, self._make_executable(name))
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")

View file

@ -24,10 +24,13 @@
##############################################################################
from spack import *
class Automake(Package):
"""Automake -- make file builder part of autotools"""
homepage = "http://www.gnu.org/software/automake/"
url = "http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz"
"""
Automake -- make file builder part of autotools
"""
homepage = 'http://www.gnu.org/software/automake/'
url = 'http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz'
version('1.15', '716946a105ca228ab545fc37a70df3a3')
version('1.14.1', 'd052a3e884631b9c7892f2efce542d75')
@ -35,8 +38,17 @@ class Automake(Package):
depends_on('autoconf')
def _make_executable(self, name):
return Executable(join_path(self.prefix.bin, name))
def setup_dependent_package(self, module, dependent_spec):
# Automake is very likely to be a build dependency,
# so we add the tools it provides to the dependent module
executables = ['aclocal', 'automake']
for name in executables:
setattr(module, name, self._make_executable(name))
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")

View file

@ -25,17 +25,28 @@
from spack import *
class Libtool(Package):
"""libtool -- library building part of autotools"""
homepage = "https://www.gnu.org/software/libtool/"
url = "http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz"
"""
libtool -- library building part of autotools
"""
homepage = 'https://www.gnu.org/software/libtool/'
url = 'http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz'
version('2.4.6', 'addf44b646ddb4e3919805aa88fa7c5e')
version('2.4.2', 'd2f3b7d4627e69e13514a40e72a24d50')
depends_on('m4')
def _make_executable(self, name):
return Executable(join_path(self.prefix.bin, name))
def setup_dependent_package(self, module, dependent_spec):
# Automake is very likely to be a build dependency,
# so we add the tools it provides to the dependent module
executables = ['libtoolize', 'libtool']
for name in executables:
setattr(module, name, self._make_executable(name))
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")