Skip to contentSkip to conversation

benejson: fix for non-wchar toolchains

PATCH New Gustavo Zacarias 2 participants 3 messages Jan 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 benejson: fix for non-wchar toolchains

wchar needs to be disabled in order for it to build on !wchar. Fixes:
http://autobuild.buildroot.net/results/71f/71f19d5056b56d40463b9fef7fa859e0025c4991/

---
 package/benejson/benejson.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
package/benejson/benejson.mk +9 -1
index 75753d2..2b8d09d 100644
@@ -9,9 +9,17 @@ BENEJSON_SITE = $(call github,codehero,benejson,$(BENEJSON_VERSION))
 BENEJSON_LICENSE = MIT
 BENEJSON_LICENSE_FILES = LICENSE
 BENEJSON_INSTALL_STAGING = YES
-
 BENEJSON_DEPENDENCIES = host-scons
 
+# wchar support needs to be manually disabled
+ifeq ($(BR2_USE_WCHAR),)
+define BENEJSON_DISABLE_WCHAR
+	$(SED) 's,^#define BNJ_WCHAR_SUPPORT,#undef BNJ_WCHAR_SUPPORT,' \
+		$(@D)/benejson/benejson.h
+endef
+BENEJSON_POST_PATCH_HOOKS += BENEJSON_DISABLE_WCHAR
+endif
+
 define BENEJSON_BUILD_CMDS
 	(cd $(@D); \
 		$(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \
Signature · 1 line
2.0.5
#1 lore raw

PATCH 2/2 benejson: needs c++

pull.cpp doesn't look like vanilla C
Fixes local tests (no autobuilder tests to show off atm).

---
 package/benejson/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/benejson/Config.in +4 -0
index 4e8ee2c..cb86d67 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_BENEJSON
 	bool "benejson"
+	depends on BR2_INSTALL_LIBSTDCPP
 	help
 	  benejson is a buffering SAX-style JSON parser library.
 	  The library package contains 3 major components:
@@ -9,3 +10,6 @@ config BR2_PACKAGE_BENEJSON
 	  - Core: The parsing core with minimal dependencies
 
 	  https://codehero.github.io/benejson/
+
+comment "benejson needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
Signature · 1 line
2.0.5
#2 lore raw

PATCH 1/2 benejson: fix for non-wchar toolchains

In reply to Gustavo Zacarias
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

wchar needs to be disabled in order for it to build on !wchar. Fixes:
http://autobuild.buildroot.net/results/71f/71f19d5056b56d40463b9fef7fa859e0025c4991/

Committed both, thanks.

Signature · 1 line
Bye, Peter Korsgaard