Skip to contentSkip to conversation

rapidjson: new package

PATCH New spdawson at gmail.com 3 participants 5 messages Mar 28, 2013 – Apr 21, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rapidjson: new package

From: Simon Dawson <[email protected]>

---
 package/Config.in              |    1 +
 package/rapidjson/Config.in    |    6 ++++++
 package/rapidjson/rapidjson.mk |   34 ++++++++++++++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 package/rapidjson/Config.in
 create mode 100644 package/rapidjson/rapidjson.mk
package/Config.in +1 -0
index 463d1b9..3bd7844 100644
@@ -615,6 +615,7 @@ source "package/libxml2/Config.in"
 source "package/libxslt/Config.in"
 source "package/libyaml/Config.in"
 source "package/mxml/Config.in"
+source "package/rapidjson/Config.in"
 source "package/xerces/Config.in"
 source "package/yajl/Config.in"
 endmenu
package/rapidjson/Config.in new file +6 -0
new file mode 100644
index 0000000..d442797
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_RAPIDJSON
+	bool "rapidjson"
+	help
+	  A fast JSON parser/generator for C++ with both SAX/DOM style API.
+
+	  https://code.google.com/p/rapidjson/
package/rapidjson/rapidjson.mk new file +34 -0
new file mode 100644
index 0000000..cc260e9
@@ -0,0 +1,34 @@
+#############################################################
+#
+# rapidjson
+#
+#############################################################
+
+RAPIDJSON_VERSION = 0.11
+RAPIDJSON_SOURCE = rapidjson-$(RAPIDJSON_VERSION).zip
+RAPIDJSON_SITE = http://rapidjson.googlecode.com/files
+RAPIDJSON_LICENSE = MIT
+RAPIDJSON_LICENSE_FILES = license.txt
+RAPIDJSON_INSTALL_TARGET = NO
+RAPIDJSON_INSTALL_STAGING = YES
+
+define RAPIDJSON_EXTRACT_CMDS
+	unzip -d $(@D) $(DL_DIR)/$(RAPIDJSON_SOURCE)
+	mv $(@D)/rapidjson/* $(@D)
+	$(RM) -r $(@D)/rapidjson
+endef
+
+define RAPIDJSON_INSTALL_STAGING_CMDS
+	$(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/include/rapidjson
+	$(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/include/rapidjson/internal
+	$(INSTALL) -m 0644 $(@D)/include/rapidjson/*.h \
+		$(STAGING_DIR)/usr/include/rapidjson
+	$(INSTALL) -m 0644 $(@D)/include/rapidjson/internal/*.h \
+		$(STAGING_DIR)/usr/include/rapidjson/internal
+endef
+
+define RAPIDJSON_UNINSTALL_STAGING_CMDS
+	$(RM) -r $(STAGING_DIR)/usr/include/rapidjson
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 rapidjson: new package

Simon,

Quoted 9 lines · spdawson at gmail.com
package/rapidjson/rapidjson.mk new file +3 -0
new file mode 100644
index 0000000..cc260e9
@@ -0,0 +1,34 @@
+#############################################################
+#
+# rapidjson

package/rapidjson/rapidjson.mk line 13

Quoted 10 lines
package/rapidjson/rapidjson.mk new file +10 -0
+#
+#############################################################
+
+RAPIDJSON_VERSION = 0.11
+RAPIDJSON_SOURCE = rapidjson-$(RAPIDJSON_VERSION).zip
+RAPIDJSON_SITE = http://rapidjson.googlecode.com/files
+RAPIDJSON_LICENSE = MIT
+RAPIDJSON_LICENSE_FILES = license.txt
+RAPIDJSON_INSTALL_TARGET = NO
+RAPIDJSON_INSTALL_STAGING = YES

How does this thing work if you install only things in staging? Is it a code generator that runs on the host? And if so, shouldn't some stuff be installed in $(HOST_DIR) ?

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 rapidjson: new package

Hi Thomas,

Quoted 8 lines · Thomas Petazzoni

Simon,

package/rapidjson/rapidjson.mk line 13

Quoted 2 lines
package/rapidjson/rapidjson.mk new file +2 -0
+RAPIDJSON_INSTALL_TARGET = NO
+RAPIDJSON_INSTALL_STAGING = YES

How does this thing work if you install only things in staging? Is it a code generator that runs on the host? And if so, shouldn't some stuff be installed in $(HOST_DIR) ?

Thanks for looking at this. It is a header-only library. That being the case, should the headers also be installed under $(HOST_DIR)?

Simon.

#3 lore raw

PATCH 1/1 rapidjson: new package

Dear Simon Dawson,

Quoted 6 lines · Simon Dawson
Quoted 3 lines

How does this thing work if you install only things in staging? Is it a code generator that runs on the host? And if so, shouldn't some stuff be installed in $(HOST_DIR) ?

Thanks for looking at this. It is a header-only library. That being the case, should the headers also be installed under $(HOST_DIR)?

No, if it's a header only library, then what you've done is correct. Thanks for the explanation!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com