blob: 4171d257c9070545b5c06d61d5886e4a6ed31e17 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Uriparser(CMakePackage):
"""uriparser is a strictly RFC 3986 compliant URI parsing and handling
library written in C89 ("ANSI C")."""
homepage = "https://uriparser.github.io/"
url = "https://github.com/uriparser/uriparser/releases/download/uriparser-0.9.3/uriparser-0.9.3.tar.gz"
version('0.9.3', sha256='6cef39d6eaf1a48504ee0264ce85f078758057dafb1edd0a898183b55ff76014')
variant('docs', default=False, description='Build API documentation')
depends_on('cmake@3.3:', type='build')
depends_on('googletest@1.8.1', type='link')
depends_on('doxygen', when='+docs', type='build')
depends_on('graphviz', when='+docs', type='build')
def cmake_args(self):
args = []
if self.run_tests:
args.append('-DURIPARSER_BUILD_TESTS:BOOL=ON')
else:
args.append('-DURIPARSER_BUILD_TESTS:BOOL=OFF')
if '+docs' in self.spec:
args.append('-DURIPARSER_BUILD_DOCS:BOOL=ON')
else:
args.append('-DURIPARSER_BUILD_DOCS:BOOL=OFF')
return args
|