elfutils: update version and add variants (#8891)

* elfutils: update version and add variants

Add latest version 0.173.

Add variants bzip2, xz and zlib to support reading compressed DWARF
sections, default True.

Move maintainer-mode to a variant with default False.  This is only
useful for developers who want to modify the source for generated
files.

* Add dependency on zlib for reading compressed DWARF sections.

Add variants to use bzip2 and xz for compressed sections.

Remove maintainer mode and the dependencies on flex and bison.
These are not used for one-time builds.

Be sure to squash both the commits and the commit messages.
This commit is contained in:
Mark W. Krentel 2018-08-07 14:04:05 -05:00 committed by Adam J. Stewart
parent 203bd555a4
commit f152063898

View file

@ -39,13 +39,26 @@ class Elfutils(AutotoolsPackage):
list_url = "https://sourceware.org/elfutils/ftp"
list_depth = 1
version('0.173', '35decb1ebfb90d565e4c411bee4185cc')
version('0.170', '03599aee98c9b726c7a732a2dd0245d5')
version('0.168', '52adfa40758d0d39e5d5c57689bf38d6')
version('0.163', '77ce87f259987d2e54e4d87b86cbee41')
depends_on('flex', type='build')
depends_on('bison', type='build')
depends_on('gettext')
# Libraries for reading compressed DWARF sections.
variant('bzip2', default=False,
description='Support bzip2 compressed sections.')
variant('xz', default=False,
description='Support xz compressed sections.')
# Native language support from libintl.
variant('nls', default=True,
description='Enable Native Language Support.')
depends_on('bzip2', type='link', when='+bzip2')
depends_on('xz', type='link', when='+xz')
depends_on('zlib', type='link')
depends_on('gettext', when='+nls')
conflicts('%gcc@7.2.0:', when='@0.163')
provides('elf@1')
@ -57,8 +70,27 @@ class Elfutils(AutotoolsPackage):
conflicts('%clang')
def configure_args(self):
spec = self.spec
args = []
if '+bzip2' in spec:
args.append('--with-bzlib=%s' % spec['bzip2'].prefix)
else:
args.append('--without-bzlib')
if '+xz' in spec:
args.append('--with-lzma=%s' % spec['xz'].prefix)
else:
args.append('--without-lzma')
# zlib is required
args.append('--with-zlib=%s' % spec['zlib'].prefix)
if '+nls' in spec:
# configure doesn't use LIBS correctly
gettext_lib = self.spec['gettext'].prefix.lib,
return [
'LDFLAGS=-Wl,--no-as-needed -L%s -lintl' % gettext_lib,
'--enable-maintainer-mode']
args.append('LDFLAGS=-Wl,--no-as-needed -L%s -lintl' %
spec['gettext'].prefix.lib)
else:
args.append('--disable-nls')
return args