summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/pegtl/package.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/pegtl/package.py b/var/spack/repos/builtin/packages/pegtl/package.py
index 46b65c666d..85a008a119 100644
--- a/var/spack/repos/builtin/packages/pegtl/package.py
+++ b/var/spack/repos/builtin/packages/pegtl/package.py
@@ -27,7 +27,7 @@ from spack import *
# package has a Makefile, but only to build examples
-class Pegtl(Package):
+class Pegtl(CMakePackage):
"""The Parsing Expression Grammar Template Library (PEGTL) is a
zero-dependency C++11 header-only library for creating parsers
according to a Parsing Expression Grammar (PEG).
@@ -36,9 +36,15 @@ class Pegtl(Package):
homepage = "https://github.com/taocpp/PEGTL"
url = "https://github.com/taocpp/PEGTL/tarball/1.3.1"
- version('1.3.1', '11efc4beac8f4f5153466d56074e9f0c')
+ version('develop', git='https://github.com/taocpp/PEGTL', branch='master')
+ version('2.1.4', 'e5288b6968e6e910287fce93dc5557bf')
+ version('2.0.0', 'c772828e7188459338a920c21f9896db')
- def install(self, spec, prefix):
- mkdirp(prefix.include)
- install_tree('pegtl', join_path(prefix.include, 'pegtl'))
- install('pegtl.hh', prefix.include)
+ variant('debug', default=False, description='Build debug version')
+
+ def build_type(self):
+ spec = self.spec
+ if '+debug' in spec:
+ return 'Debug'
+ else:
+ return 'Release'