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 /meta-oe/recipes-devtools/jsoncpp | |
parent | 1c8afeed179495a53e7b782b994e4a1f00f15536 (diff) | |
download | meta-openembedded-contrib-34baf3328fea094184c58e566f49ab32ad2f0470.tar.gz |
jsoncpp: Add new recipe
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/jsoncpp')
-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 @@ +Issue: Build error in TDK DS_stub + +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, + from /home/ubuntu/work/daisy-rdk/build-qemux86hyb/tmp/sysroots/qemux86hyb/usr/include/c++/string:38, + from /home/ubuntu/work/daisy-rdk/build-qemux86hyb/tmp/sysroots/qemux86hyb/usr/include/json/value.h:12, + from /home/ubuntu/work/daisy-rdk/build-qemux86hyb/tmp/sysroots/qemux86hyb/usr/include/json/json.h:10, + from ./include/DeviceSettingsAgent.h:15, + from src/DeviceSettingsAgent.cpp:13: +/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 "(" + #if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) + +The issue was jsoncpp has features.h which was conflicting with the system +header file features.h. + +So renamed the header file features.h in jsoncpp to json-features.h so +as to localize the effect of this change within jsoncpp. + + Signed-off-by: Ridish Aravindan <ridish.ra@lnttechservices.com> + +Index: jsoncpp-src-0.6.0-rc2/include/json/json-features.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ jsoncpp-src-0.6.0-rc2/include/json/json-features.h 2014-08-27 06:41:40.000000000 +0000 +@@ -0,0 +1,49 @@ ++// Copyright 2007-2010 Baptiste Lepilleur ++// Distributed under MIT license, or public domain if desired and ++// recognized in your jurisdiction. ++// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE ++ ++#ifndef CPPTL_JSON_FEATURES_H_INCLUDED ++# define CPPTL_JSON_FEATURES_H_INCLUDED ++ ++#if !defined(JSON_IS_AMALGAMATION) ++# include "forwards.h" ++#endif // if !defined(JSON_IS_AMALGAMATION) ++ ++namespace Json { ++ ++ /** \brief Configuration passed to reader and writer. ++ * This configuration object can be used to force the Reader or Writer ++ * to behave in a standard conforming way. ++ */ ++ class JSON_API Features ++ { ++ public: ++ /** \brief A configuration that allows all features and assumes all strings are UTF-8. ++ * - C & C++ comments are allowed ++ * - Root object can be any JSON value ++ * - Assumes Value strings are encoded in UTF-8 ++ */ ++ static Features all(); ++ ++ /** \brief A configuration that is strictly compatible with the JSON specification. ++ * - Comments are forbidden. ++ * - Root object must be either an array or an object value. ++ * - Assumes Value strings are encoded in UTF-8 ++ */ ++ static Features strictMode(); ++ ++ /** \brief Initialize the configuration like JsonConfig::allFeatures; ++ */ ++ Features(); ++ ++ /// \c true if comments are allowed. Default: \c true. ++ bool allowComments_; ++ ++ /// \c true if root must be either an array or an object value. Default: \c false. ++ bool strictRoot_; ++ }; ++ ++} // namespace Json ++ ++#endif // CPPTL_JSON_FEATURES_H_INCLUDED +Index: jsoncpp-src-0.6.0-rc2/include/json/json.h +=================================================================== +--- jsoncpp-src-0.6.0-rc2.orig/include/json/json.h 2011-05-02 21:47:24.000000000 +0000 ++++ jsoncpp-src-0.6.0-rc2/include/json/json.h 2014-08-27 06:39:13.000000000 +0000 +@@ -10,6 +10,6 @@ + # include "value.h" + # include "reader.h" + # include "writer.h" +-# include "features.h" ++# include "json-features.h" + + #endif // JSON_JSON_H_INCLUDED +Index: jsoncpp-src-0.6.0-rc2/include/json/reader.h +=================================================================== +--- jsoncpp-src-0.6.0-rc2.orig/include/json/reader.h 2011-05-02 21:47:24.000000000 +0000 ++++ jsoncpp-src-0.6.0-rc2/include/json/reader.h 2014-08-27 06:39:32.000000000 +0000 +@@ -7,7 +7,7 @@ + # define CPPTL_JSON_READER_H_INCLUDED + + #if !defined(JSON_IS_AMALGAMATION) +-# include "features.h" ++# include "json-features.h" + # include "value.h" + #endif // if !defined(JSON_IS_AMALGAMATION) + # include <deque> +Index: jsoncpp-src-0.6.0-rc2/include/json/features.h +=================================================================== +--- jsoncpp-src-0.6.0-rc2.orig/include/json/features.h 2011-05-02 21:46:58.000000000 +0000 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,49 +0,0 @@ +-// Copyright 2007-2010 Baptiste Lepilleur +-// Distributed under MIT license, or public domain if desired and +-// recognized in your jurisdiction. +-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE +- +-#ifndef CPPTL_JSON_FEATURES_H_INCLUDED +-# define CPPTL_JSON_FEATURES_H_INCLUDED +- +-#if !defined(JSON_IS_AMALGAMATION) +-# include "forwards.h" +-#endif // if !defined(JSON_IS_AMALGAMATION) +- +-namespace Json { +- +- /** \brief Configuration passed to reader and writer. +- * This configuration object can be used to force the Reader or Writer +- * to behave in a standard conforming way. +- */ +- class JSON_API Features +- { +- public: +- /** \brief A configuration that allows all features and assumes all strings are UTF-8. +- * - C & C++ comments are allowed +- * - Root object can be any JSON value +- * - Assumes Value strings are encoded in UTF-8 +- */ +- static Features all(); +- +- /** \brief A configuration that is strictly compatible with the JSON specification. +- * - Comments are forbidden. +- * - Root object must be either an array or an object value. +- * - Assumes Value strings are encoded in UTF-8 +- */ +- static Features strictMode(); +- +- /** \brief Initialize the configuration like JsonConfig::allFeatures; +- */ +- Features(); +- +- /// \c true if comments are allowed. Default: \c true. +- bool allowComments_; +- +- /// \c true if root must be either an array or an object value. Default: \c false. +- bool strictRoot_; +- }; +- +-} // namespace Json +- +-#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 @@ +SUMMARY = "JSON C++ lib used to read and write json file." +DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \ + and writer in C++. JSON (JavaScript Object Notation) is a \ + lightweight data-interchange format. It is easy for humans to \ + read and write. It is easy for machines to parse and generate." + +HOMEPAGE = "http://sourceforge.net/projects/jsoncpp/" + +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c56ee55c03a55f8105b969d8270632ce" + +SRCREV = "d8cd848ede1071a25846cd90b4fddf269d868ff1" +SRC_URI = "git://github.com/open-source-parsers/jsoncpp \ +" + +S = "${WORKDIR}/git" +inherit cmake + +EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DJSONCPP_WITH_TESTS=OFF" |