cjson: bump to version v1.0.2
PATCH v4 1/1 cjson: bump to version v1.0.2
This is a major update in cjson:
- project site moved from sourceforge to github
- project recommends to use the new cmake buildsystem instead of the legacy make
- BR2_STATIC_LIBS is now OK (README does not mention issue anymore)
- As include path and library name have changed, tinycbor has to be updated
- As cjson can now be built as a static library, fix a bug in json2cbor compilation from tinycbor package
---
Changes v3 -> v4 (after review of Thomas Petazzoni):
- Fix static compilation of json2cbor in tinycbor
Changes v2 -> v3 (after review of Thomas Petazzoni):
- Update commit message
- Merge tinycbor patch inside cjson patch
Changes v1 -> v2 (after review of Danomi Manchego):
- Retrieve cjson version v1.0.1 instead of v1.0.0
package/cjson/Config.in | 4 +- package/cjson/cjson.hash | 2 + package/cjson/cjson.mk | 22 +------ .../tinycbor/0001-Update-cjson-include-path.patch | 69 ++++++++++++++++++++++ .../0002-Fix-static-compilation-of-json2cbor.patch | 29 +++++++++ 5 files changed, 104 insertions(+), 22 deletions(-) create mode 100644 package/cjson/cjson.hash create mode 100644 package/tinycbor/0001-Update-cjson-include-path.patch create mode 100644 package/tinycbor/0002-Fix-static-compilation-of-json2cbor.patch
package/cjson/Config.in +1 -3
@@ -1,9 +1,7 @@ config BR2_PACKAGE_CJSON bool "cJSON" - # For static build with cJSON.c directly see README - depends on !BR2_STATIC_LIBS help An ultra-lightweight, portable, single-file, simple-as-can-be ANSI-C compliant JSON parser, under MIT license. - http://cjson.sourceforge.net/ + https://github.com/DaveGamble/cJSON
package/cjson/cjson.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed: +sha256 5c3a4a77796b230efbd74369b0974d14ac0408f2677bd116d4a4b5894b9be372 cjson-v1.0.2.tar.gz
package/cjson/cjson.mk +3 -19
@@ -4,26 +4,10 @@ # ################################################################################ -CJSON_VERSION = 58 -CJSON_SITE_METHOD = svn -CJSON_SITE = http://svn.code.sf.net/p/cjson/code +CJSON_VERSION = v1.0.2 +CJSON_SITE = $(call github,DaveGamble,cjson,$(CJSON_VERSION)) CJSON_INSTALL_STAGING = YES CJSON_LICENSE = MIT CJSON_LICENSE_FILES = LICENSE -define CJSON_BUILD_CMDS - cd $(@D) && $(TARGET_CC) $(TARGET_CFLAGS) -shared -fPIC -lm \ - cJSON.c -o libcJSON.so -endef - -define CJSON_INSTALL_STAGING_CMDS - $(INSTALL) -D $(@D)/cJSON.h $(STAGING_DIR)/usr/include/cJSON.h - $(INSTALL) -D $(@D)/libcJSON.so $(STAGING_DIR)/usr/lib/libcJSON.so -endef - -define CJSON_INSTALL_TARGET_CMDS - $(INSTALL) -D $(@D)/cJSON.h $(TARGET_DIR)/usr/include/cJSON.h - $(INSTALL) -D $(@D)/libcJSON.so $(TARGET_DIR)/usr/lib/libcJSON.so -endef - -$(eval $(generic-package)) +$(eval $(cmake-package))
package/tinycbor/0001-Update-cjson-include-path.patch new file +69 -0
69 lines not on this page · raw message
package/tinycbor/0002-Fix-static-compilation-of-json2cbor.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 1be7da8d81bbd52d722ec60250567ea876f6f4b5 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sat, 3 Dec 2016 20:15:41 +0100 +Subject: [PATCH] Fix static compilation of json2cbor + +json2cbor depends on cjson so tools/json2cbor/json2cbor.o must before +-lcjson + +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 905fbdf..7b5fefc 100644 +--- a/Makefile ++++ b/Makefile +@@ -115,7 +115,7 @@ bin/cbordump: $(CBORDUMP_SOURCES:.c=.o) lib/libtinycbor.a | bin + $(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS) -lm + + bin/json2cbor: $(JSON2CBOR_SOURCES:.c=.o) lib/libtinycbor.a | bin +- $(CC) -o $@ $(LDFLAGS) $(LDFLAGS_CJSON) $^ $(LDLIBS) -lm ++ $(CC) -o $@ $(LDFLAGS) $^ $(LDFLAGS_CJSON) $(LDLIBS) -lm + + tinycbor.pc: tinycbor.pc.in + $(SED) > $@ < $< \ +-- +2.5.0 +
Signature · 1 line
2.5.0
Thomas Petazzoni
AppliedPATCH v4 1/1 cjson: bump to version v1.0.2
Hello,
Quoted 10 lines · Fabrice Fontaine
This is a major update in cjson:
- project site moved from sourceforge to github
- project recommends to use the new cmake buildsystem instead of the legacy make
-BR2_STATIC_LIBSis now OK (README does not mention issue anymore)
- As include path and library name have changed, tinycbor has to be updated
- As cjson can now be built as a static library, fix a bug in json2cbor compilation from tinycbor package
Quoted 4 lines
Signed-off-by Fabrice Fontaine <[email protected]>---
Changes v3 -> v4 (after review of Thomas Petazzoni):
- Fix static compilation of json2cbor in tinycbor
Applied to master, thanks. Please submit the tinycbor patches to the upstream project. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com