Fix building latest version of flex (#2401)

* Fix building latest version of flex

* Don't need when clause

* Remove perl deps, shebang too long
This commit is contained in:
Adam J. Stewart
2016-11-28 11:48:34 -06:00
committed by Todd Gamblin
parent a2e6de9b5d
commit 664939eeba
7 changed files with 96 additions and 57 deletions

View File

@@ -26,8 +26,9 @@
import sys
class M4(Package):
class M4(AutotoolsPackage):
"""GNU M4 is an implementation of the traditional Unix macro processor."""
homepage = "https://www.gnu.org/software/m4/m4.html"
url = "ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz"
@@ -40,19 +41,19 @@ class M4(Package):
depends_on('libsigsegv', when='+sigsegv')
def install(self, spec, prefix):
configure_args = []
if 'libsigsegv' in spec:
configure_args.append('--with-libsigsegv-prefix=%s' %
spec['libsigsegv'].prefix)
def configure_args(self):
spec = self.spec
args = ['--enable-c++']
if '+sigsegv' in spec:
args.append('--with-libsigsegv-prefix={0}'.format(
spec['libsigsegv'].prefix))
else:
configure_args.append('--without-libsigsegv-prefix')
args.append('--without-libsigsegv-prefix')
# http://lists.gnu.org/archive/html/bug-m4/2016-09/msg00002.html
if (sys.platform == "darwin") and (spec.satisfies('%gcc')) and \
(spec.architecture.platform_os.version == "10.12"):
configure_args.append('ac_cv_type_struct_sched_param=yes')
if (sys.platform == 'darwin') and (spec.satisfies('%gcc')) and \
(spec.architecture.platform_os.version == '10.12'):
args.append('ac_cv_type_struct_sched_param=yes')
configure("--prefix=%s" % prefix, *configure_args)
make()
make("install")
return args