From b62401ec8f1119225a7a1086a684d2a5203ef4c8 Mon Sep 17 00:00:00 2001 From: Martin Aumüller Date: Mon, 23 Nov 2020 12:28:11 +0100 Subject: ispc: external find support, added master branch version (#20033) Co-authored-by: Massimiliano Culpo --- var/spack/repos/builtin/packages/ispc/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/repos/builtin/packages/ispc/package.py b/var/spack/repos/builtin/packages/ispc/package.py index 4532e45243..263cbc13bc 100644 --- a/var/spack/repos/builtin/packages/ispc/package.py +++ b/var/spack/repos/builtin/packages/ispc/package.py @@ -9,6 +9,7 @@ from spack import * +import re class Ispc(CMakePackage): @@ -18,8 +19,12 @@ class Ispc(CMakePackage): homepage = "https://ispc.github.io" url = "https://github.com/ispc/ispc/tarball/v1.14.1" + git = "https://github.com/ispc/ispc" maintainers = ['aumuell'] + executables = ['^ispc$'] + + version('master', branch='master') version('1.14.1', sha256='ca12f26dafbc4ef9605487d03a2156331c1351a4ffefc9bab4d896a466880794') version('1.14.0', sha256='1ed72542f56738c632bb02fb0dd56ad8aec3e2487839ebbc0def8334f305a4c7') version('1.13.0', sha256='aca595508b51dd1ff065c406a3fd7c93822320c510077dd4d97a2b98a23f097a') @@ -34,6 +39,7 @@ class Ispc(CMakePackage): depends_on('llvm@10:10.999', when='@1.13:1.13.999') patch('don-t-assume-that-ncurses-zlib-are-system-libraries.patch', + when='@1.14:1.14.999', sha256='d3ccf547d3ba59779fd375e10417a436318f2200d160febb9f830a26f0daefdc') patch('fix-linking-against-llvm-10.patch', when='@1.13:1.13.999', @@ -47,3 +53,10 @@ class Ispc(CMakePackage): args.append('-DISPC_INCLUDE_TESTS=OFF') args.append('-DISPC_INCLUDE_UTILS=OFF') return args + + @classmethod + def determine_version(cls, exe): + output = Executable(exe)('--version', output=str, error=str) + match = re.search(r'^Intel.*[iI][sS][pP][cC]\),\s+(\S+)\s+\(build.*\)', + output) + return match.group(1) if match else None -- cgit v1.2.3-70-g09d2