-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibjsoncpp.py
More file actions
30 lines (25 loc) · 881 Bytes
/
libjsoncpp.py
File metadata and controls
30 lines (25 loc) · 881 Bytes
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
""" Formula for building libjsoncpp """
import os
from pakit import Git, Recipe
class Libjsoncpp(Recipe):
"""
An open source JSON parser for C++
"""
def __init__(self):
super(Libjsoncpp, self).__init__()
self.src = 'https://github.com/open-source-parsers/jsoncpp'
self.homepage = self.src
self.repos = {
'stable': Git(self.src, tag='0.10.5'),
'unstable': Git(self.src, branch='0.y.z'),
}
self.opts = {
'cmake': '-DCMAKE_BUILD_TYPE=release '
'-DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON'
}
def build(self):
self.cmd('cmake -DCMAKE_INSTALL_PREFIX={prefix} {cmake} .')
self.cmd('make install')
def verify(self):
libpath = os.path.join(self.opts['link'], 'lib', 'libjsoncpp.a')
assert os.path.exists(libpath)