diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/flex/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/flex/package.py | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py index cddd72f434..a2e0c85903 100644 --- a/var/spack/repos/builtin/packages/flex/package.py +++ b/var/spack/repos/builtin/packages/flex/package.py @@ -29,25 +29,40 @@ class Flex(AutotoolsPackage): """Flex is a tool for generating scanners.""" homepage = "https://github.com/westes/flex" - url = "https://github.com/westes/flex/archive/v2.6.2.tar.gz" + url = "https://github.com/westes/flex/releases/download/v2.6.2/flex-2.6.2.tar.gz" - version('2.6.2', 'acde3a89ef2b376aac94586fd5fda460') - version('2.6.1', 'c4f31e0e4bd1711b7c91f16ef526ad90') + version('2.6.2', 'cc6d76c333db7653d5caf423a3335239') + version('2.6.1', '05bcd8fb629e0ae130311e8a6106fa82') version('2.6.0', '760be2ee9433e822b6eb65318311c19d') version('2.5.39', '5865e76ac69c05699f476515592750d7') - - depends_on("bison", type='build') - depends_on("m4", type='build') - depends_on('autoconf', type='build') - depends_on('libtool', type='build') - + + depends_on('bison', type='build') + depends_on('gettext@0.19:', type='build') + depends_on('help2man', type='build') + + # Older tarballs don't come with a configure script + depends_on('m4', type='build', when='@:2.6.0') + depends_on('autoconf', type='build', when='@:2.6.0') + depends_on('automake', type='build', when='@:2.6.0') + depends_on('libtool', type='build', when='@:2.6.0') + def url_for_version(self, version): - base_url = "https://github.com/westes/flex/archive" - if version >= Version("2.6.0"): - return "{0}/v{1}.tar.gz".format(base_url, version) + url = "https://github.com/westes/flex" + if version >= Version('2.6.1'): + url += "/releases/download/v{0}/flex-{0}.tar.gz".format(version) + elif version == Version('2.6.0'): + url += "/archive/v{0}.tar.gz".format(version) + elif version >= Version('2.5.37'): + url += "/archive/flex-{0}.tar.gz".format(version) else: - return "{0}/flex-{1}.tar.gz".format(base_url, version) - + url += "/archive/flex-{0}.tar.gz".format(version.dashed) + + return url + + def autoreconf(self, spec, prefix): + pass + + @when('@:2.6.0') def autoreconf(self, spec, prefix): - autogen = Executable('./autogen.sh') - autogen() + libtoolize('--install', '--force') + autoreconf('--install', '--force') |