diff mbox

[7/7] add a new recipe for jsoncpp v0.5.0. Recipe doesn't for the time being use scons at all since scons seem unable to cross build correctly.

Message ID 1370455890-18305-7-git-send-email-tom.gall@linaro.org
State New
Headers show

Commit Message

Tom Gall June 5, 2013, 6:11 p.m. UTC
Signed-off-by: Tom Gall <tom.gall@linaro.org>
---
 .../recipes-devtools/jsoncpp/jsoncpp_0.5.0.bb      |   42 ++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 meta-linaro/recipes-devtools/jsoncpp/jsoncpp_0.5.0.bb
diff mbox

Patch

diff --git a/meta-linaro/recipes-devtools/jsoncpp/jsoncpp_0.5.0.bb b/meta-linaro/recipes-devtools/jsoncpp/jsoncpp_0.5.0.bb
new file mode 100644
index 0000000..38ed7ec
--- /dev/null
+++ b/meta-linaro/recipes-devtools/jsoncpp/jsoncpp_0.5.0.bb
@@ -0,0 +1,42 @@ 
+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/"
+
+LICENSE = ""
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f7c191d0ae6a652f63b2d2bc1ea8bdab"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/jsoncpp/jsoncpp-src-${PV}.tar.gz"
+SECTION = "libs"
+
+PR = "r1"
+S = "${WORKDIR}/jsoncpp-src-${PV}"
+
+SRC_URI[md5sum] = "24482b67c1cb17aac1ed1814288a3a8f"
+SRC_URI[sha256sum] = "22b14ecd0de8cdad2b6b6839f6d0804d3b84e91f42861ebd843832a26a927433"
+
+EXTRA_OESCONS = "platform=linux-gcc"
+
+inherit scons
+
+scons_do_compile() {
+    
+    soname=libjsoncpp.so.${PV}
+    ${CXX} src/lib_json/*.cpp -Iinclude -shared -fPIC \
+			-Wl,-soname,${soname} -o ${soname} ${CXXFLAGS} ${LDFLAGS}
+}
+
+scons_do_install() {
+    soname=libjsoncpp.so.${PV}
+    install -d ${D}/usr/include/jsoncpp
+    install -d ${D}/usr/lib
+	install -m 0755 ${S}/include/json/autolink.h ${D}/usr/include/jasoncpp
+	install -m 0755 ${S}/include/json/config.h ${D}/usr/include/jasoncpp
+	install -m 0755 ${S}/include/json/features.h ${D}/usr/include/jasoncpp
+	install -m 0755 ${S}/include/json/forwards.h ${D}/usr/include/jasoncpp
+	install -m 0755 ${S}/include/json/json.h ${D}/usr/include/jasoncpp
+	install -m 0755 ${S}/include/json/reader.h ${D}/usr/include/jasoncpp
+	install -m 0755 ${S}/include/json/value.h ${D}/usr/include/jasoncpp
+	install -m 0755 ${S}/include/json/writer.h ${D}/usr/include/jasoncpp
+	install -m 0755 ${S}/${soname} ${D}/${libdir}
+	cd ${D}/${libdir}
+	ln -s ${soname} libjsoncpp.so
+}