diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-11-21 11:59:38 -0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-11-26 01:07:21 +0100 |
commit | 34baf3328fea094184c58e566f49ab32ad2f0470 (patch) | |
tree | c6f11327bb82a403f1d0099275a6e9b1d7ef1b4e | |
parent | 1c8afeed179495a53e7b782b994e4a1f00f15536 (diff) | |
download | meta-openembedded-34baf3328fea094184c58e566f49ab32ad2f0470.tar.gz |
jsoncpp: Add new recipe
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-jsoncpp-rename-features-header-file.patch | 152 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.7.7.bb | 21 |
2 files changed, 173 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-jsoncpp-rename-features-header-file.patch b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-jsoncpp-rename-features-header-file.patch new file mode 100644 index 0000000000..f1397ea46f --- /dev/null +++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-jsoncpp-rename-features-header-file.patch | |||
@@ -0,0 +1,152 @@ | |||
1 | Issue: Build error in TDK DS_stub | ||
2 | |||
3 | In file included from /home/ubuntu/work/daisy-rdk/build-qemux86hyb/tmp/sysroots/qemux86hyb/usr/include/c++/i586-rdk-linux/bits/c++config.h:426:0, | ||
4 | from /home/ubuntu/work/daisy-rdk/build-qemux86hyb/tmp/sysroots/qemux86hyb/usr/include/c++/string:38, | ||
5 | from /home/ubuntu/work/daisy-rdk/build-qemux86hyb/tmp/sysroots/qemux86hyb/usr/include/json/value.h:12, | ||
6 | from /home/ubuntu/work/daisy-rdk/build-qemux86hyb/tmp/sysroots/qemux86hyb/usr/include/json/json.h:10, | ||
7 | from ./include/DeviceSettingsAgent.h:15, | ||
8 | from src/DeviceSettingsAgent.cpp:13: | ||
9 | /home/ubuntu/work/daisy-rdk/build-qemux86hyb/tmp/sysroots/qemux86hyb/usr/include/c++/i586-rdk-linux/bits/os_defines.h:44:19: error: missing binary operator before token "(" | ||
10 | #if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) | ||
11 | |||
12 | The issue was jsoncpp has features.h which was conflicting with the system | ||
13 | header file features.h. | ||
14 | |||
15 | So renamed the header file features.h in jsoncpp to json-features.h so | ||
16 | as to localize the effect of this change within jsoncpp. | ||
17 | |||
18 | Signed-off-by: Ridish Aravindan <ridish.ra@lnttechservices.com> | ||
19 | |||
20 | Index: jsoncpp-src-0.6.0-rc2/include/json/json-features.h | ||
21 | =================================================================== | ||
22 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
23 | +++ jsoncpp-src-0.6.0-rc2/include/json/json-features.h 2014-08-27 06:41:40.000000000 +0000 | ||
24 | @@ -0,0 +1,49 @@ | ||
25 | +// Copyright 2007-2010 Baptiste Lepilleur | ||
26 | +// Distributed under MIT license, or public domain if desired and | ||
27 | +// recognized in your jurisdiction. | ||
28 | +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE | ||
29 | + | ||
30 | +#ifndef CPPTL_JSON_FEATURES_H_INCLUDED | ||
31 | +# define CPPTL_JSON_FEATURES_H_INCLUDED | ||
32 | + | ||
33 | +#if !defined(JSON_IS_AMALGAMATION) | ||
34 | +# include "forwards.h" | ||
35 | +#endif // if !defined(JSON_IS_AMALGAMATION) | ||
36 | + | ||
37 | +namespace Json { | ||
38 | + | ||
39 | + /** \brief Configuration passed to reader and writer. | ||
40 | + * This configuration object can be used to force the Reader or Writer | ||
41 | + * to behave in a standard conforming way. | ||
42 | + */ | ||
43 | + class JSON_API Features | ||
44 | + { | ||
45 | + public: | ||
46 | + /** \brief A configuration that allows all features and assumes all strings are UTF-8. | ||
47 | + * - C & C++ comments are allowed | ||
48 | + * - Root object can be any JSON value | ||
49 | + * - Assumes Value strings are encoded in UTF-8 | ||
50 | + */ | ||
51 | + static Features all(); | ||
52 | + | ||
53 | + /** \brief A configuration that is strictly compatible with the JSON specification. | ||
54 | + * - Comments are forbidden. | ||
55 | + * - Root object must be either an array or an object value. | ||
56 | + * - Assumes Value strings are encoded in UTF-8 | ||
57 | + */ | ||
58 | + static Features strictMode(); | ||
59 | + | ||
60 | + /** \brief Initialize the configuration like JsonConfig::allFeatures; | ||
61 | + */ | ||
62 | + Features(); | ||
63 | + | ||
64 | + /// \c true if comments are allowed. Default: \c true. | ||
65 | + bool allowComments_; | ||
66 | + | ||
67 | + /// \c true if root must be either an array or an object value. Default: \c false. | ||
68 | + bool strictRoot_; | ||
69 | + }; | ||
70 | + | ||
71 | +} // namespace Json | ||
72 | + | ||
73 | +#endif // CPPTL_JSON_FEATURES_H_INCLUDED | ||
74 | Index: jsoncpp-src-0.6.0-rc2/include/json/json.h | ||
75 | =================================================================== | ||
76 | --- jsoncpp-src-0.6.0-rc2.orig/include/json/json.h 2011-05-02 21:47:24.000000000 +0000 | ||
77 | +++ jsoncpp-src-0.6.0-rc2/include/json/json.h 2014-08-27 06:39:13.000000000 +0000 | ||
78 | @@ -10,6 +10,6 @@ | ||
79 | # include "value.h" | ||
80 | # include "reader.h" | ||
81 | # include "writer.h" | ||
82 | -# include "features.h" | ||
83 | +# include "json-features.h" | ||
84 | |||
85 | #endif // JSON_JSON_H_INCLUDED | ||
86 | Index: jsoncpp-src-0.6.0-rc2/include/json/reader.h | ||
87 | =================================================================== | ||
88 | --- jsoncpp-src-0.6.0-rc2.orig/include/json/reader.h 2011-05-02 21:47:24.000000000 +0000 | ||
89 | +++ jsoncpp-src-0.6.0-rc2/include/json/reader.h 2014-08-27 06:39:32.000000000 +0000 | ||
90 | @@ -7,7 +7,7 @@ | ||
91 | # define CPPTL_JSON_READER_H_INCLUDED | ||
92 | |||
93 | #if !defined(JSON_IS_AMALGAMATION) | ||
94 | -# include "features.h" | ||
95 | +# include "json-features.h" | ||
96 | # include "value.h" | ||
97 | #endif // if !defined(JSON_IS_AMALGAMATION) | ||
98 | # include <deque> | ||
99 | Index: jsoncpp-src-0.6.0-rc2/include/json/features.h | ||
100 | =================================================================== | ||
101 | --- jsoncpp-src-0.6.0-rc2.orig/include/json/features.h 2011-05-02 21:46:58.000000000 +0000 | ||
102 | +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
103 | @@ -1,49 +0,0 @@ | ||
104 | -// Copyright 2007-2010 Baptiste Lepilleur | ||
105 | -// Distributed under MIT license, or public domain if desired and | ||
106 | -// recognized in your jurisdiction. | ||
107 | -// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE | ||
108 | - | ||
109 | -#ifndef CPPTL_JSON_FEATURES_H_INCLUDED | ||
110 | -# define CPPTL_JSON_FEATURES_H_INCLUDED | ||
111 | - | ||
112 | -#if !defined(JSON_IS_AMALGAMATION) | ||
113 | -# include "forwards.h" | ||
114 | -#endif // if !defined(JSON_IS_AMALGAMATION) | ||
115 | - | ||
116 | -namespace Json { | ||
117 | - | ||
118 | - /** \brief Configuration passed to reader and writer. | ||
119 | - * This configuration object can be used to force the Reader or Writer | ||
120 | - * to behave in a standard conforming way. | ||
121 | - */ | ||
122 | - class JSON_API Features | ||
123 | - { | ||
124 | - public: | ||
125 | - /** \brief A configuration that allows all features and assumes all strings are UTF-8. | ||
126 | - * - C & C++ comments are allowed | ||
127 | - * - Root object can be any JSON value | ||
128 | - * - Assumes Value strings are encoded in UTF-8 | ||
129 | - */ | ||
130 | - static Features all(); | ||
131 | - | ||
132 | - /** \brief A configuration that is strictly compatible with the JSON specification. | ||
133 | - * - Comments are forbidden. | ||
134 | - * - Root object must be either an array or an object value. | ||
135 | - * - Assumes Value strings are encoded in UTF-8 | ||
136 | - */ | ||
137 | - static Features strictMode(); | ||
138 | - | ||
139 | - /** \brief Initialize the configuration like JsonConfig::allFeatures; | ||
140 | - */ | ||
141 | - Features(); | ||
142 | - | ||
143 | - /// \c true if comments are allowed. Default: \c true. | ||
144 | - bool allowComments_; | ||
145 | - | ||
146 | - /// \c true if root must be either an array or an object value. Default: \c false. | ||
147 | - bool strictRoot_; | ||
148 | - }; | ||
149 | - | ||
150 | -} // namespace Json | ||
151 | - | ||
152 | -#endif // CPPTL_JSON_FEATURES_H_INCLUDED | ||
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.7.7.bb b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.7.7.bb new file mode 100644 index 0000000000..17947e3720 --- /dev/null +++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.7.7.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | SUMMARY = "JSON C++ lib used to read and write json file." | ||
2 | DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \ | ||
3 | and writer in C++. JSON (JavaScript Object Notation) is a \ | ||
4 | lightweight data-interchange format. It is easy for humans to \ | ||
5 | read and write. It is easy for machines to parse and generate." | ||
6 | |||
7 | HOMEPAGE = "http://sourceforge.net/projects/jsoncpp/" | ||
8 | |||
9 | SECTION = "libs" | ||
10 | |||
11 | LICENSE = "MIT" | ||
12 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c56ee55c03a55f8105b969d8270632ce" | ||
13 | |||
14 | SRCREV = "d8cd848ede1071a25846cd90b4fddf269d868ff1" | ||
15 | SRC_URI = "git://github.com/open-source-parsers/jsoncpp \ | ||
16 | " | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | inherit cmake | ||
20 | |||
21 | EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_TESTS=OFF" | ||