Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] jsmn: new package
@ 2017-01-28 10:03 Thomas Petazzoni
  2017-01-28 13:37 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2017-01-28 10:03 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=c8bd91bf8958b9644b9fe1965dd81b19507f0a7f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: David Bachelart <david.bachelart@bbright.com>
[Thomas:
 - fix license, it's MIT, not BSD
 - use TARGET_CONFIGURE_OPTS instead of manually passing CC and AR
 - use full destination path
 - keep only sha256 hash
 - rewrap Config.in help text]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Config.in      |  1 +
 package/jsmn/Config.in |  8 ++++++++
 package/jsmn/jsmn.hash |  2 ++
 package/jsmn/jsmn.mk   | 24 ++++++++++++++++++++++++
 4 files changed, 35 insertions(+)

diff --git a/package/Config.in b/package/Config.in
index 0dded56..6ce19df 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1126,6 +1126,7 @@ menu "JSON/XML"
 	source "package/expat/Config.in"
 	source "package/ezxml/Config.in"
 	source "package/jansson/Config.in"
+	source "package/jsmn/Config.in"
 	source "package/json-c/Config.in"
 	source "package/json-glib/Config.in"
 	source "package/jsoncpp/Config.in"
diff --git a/package/jsmn/Config.in b/package/jsmn/Config.in
new file mode 100644
index 0000000..ab14273
--- /dev/null
+++ b/package/jsmn/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_JSMN
+	bool "jsmn"
+	help
+	  jsmn (pronounced like 'jasmine') is a minimalistic JSON
+	  parser in C. It can be easily integrated into
+	  resource-limited or embedded projects.
+
+	  https://github.com/zserge/jsmn/
diff --git a/package/jsmn/jsmn.hash b/package/jsmn/jsmn.hash
new file mode 100644
index 0000000..91f6420
--- /dev/null
+++ b/package/jsmn/jsmn.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256  e08993848b2abab62aa9572a560bb6e5ed4762f8537cd67c4de6cb17e17090a0    jsmn-6021415cc75e7922d45b12935f56348b064d8a7f.tar.gz
diff --git a/package/jsmn/jsmn.mk b/package/jsmn/jsmn.mk
new file mode 100644
index 0000000..30dd9c8
--- /dev/null
+++ b/package/jsmn/jsmn.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# jsmn
+#
+################################################################################
+
+JSMN_VERSION = 6021415cc75e7922d45b12935f56348b064d8a7f
+JSMN_SITE = $(call github,zserge,jsmn,$(JSMN_VERSION))
+JSMN_LICENSE = MIT
+JSMN_LICENSE_FILES = LICENSE
+# static library only
+JSMN_INSTALL_STAGING = YES
+JSMN_INSTALL_TARGET = NO
+
+define JSMN_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+endef
+
+define JSMN_INSTALL_STAGING_CMDS
+	$(INSTALL) -m 0644 $(@D)/libjsmn.a $(STAGING_DIR)/usr/lib/libjsmn.a
+	$(INSTALL) -m 0644 $(@D)/jsmn.h $(STAGING_DIR)/usr/include/jsmn.h
+endef
+
+$(eval $(generic-package))

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [git commit] jsmn: new package
  2017-01-28 10:03 [Buildroot] [git commit] jsmn: new package Thomas Petazzoni
@ 2017-01-28 13:37 ` Peter Korsgaard
  2017-01-29 13:11   ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2017-01-28 13:37 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > commit: https://git.buildroot.net/buildroot/commit/?id=c8bd91bf8958b9644b9fe1965dd81b19507f0a7f
 > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

 > Signed-off-by: David Bachelart <david.bachelart@bbright.com>
 > [Thomas:
 >  - fix license, it's MIT, not BSD
 >  - use TARGET_CONFIGURE_OPTS instead of manually passing CC and AR
 >  - use full destination path
 >  - keep only sha256 hash
 >  - rewrap Config.in help text]
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

[snip]

 > +define JSMN_INSTALL_STAGING_CMDS
 > +	$(INSTALL) -m 0644 $(@D)/libjsmn.a $(STAGING_DIR)/usr/lib/libjsmn.a
 > +	$(INSTALL) -m 0644 $(@D)/jsmn.h $(STAGING_DIR)/usr/include/jsmn.h

We normally use install -D to create the destination directories if
needed. I agree that these directories are very likely to be created
already, but for consistency -D would be nice.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [git commit] jsmn: new package
  2017-01-28 13:37 ` Peter Korsgaard
@ 2017-01-29 13:11   ` Thomas Petazzoni
  2017-01-29 21:39     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2017-01-29 13:11 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 28 Jan 2017 14:37:22 +0100, Peter Korsgaard wrote:

>  > +define JSMN_INSTALL_STAGING_CMDS
>  > +	$(INSTALL) -m 0644 $(@D)/libjsmn.a $(STAGING_DIR)/usr/lib/libjsmn.a
>  > +	$(INSTALL) -m 0644 $(@D)/jsmn.h $(STAGING_DIR)/usr/include/jsmn.h  
> 
> We normally use install -D to create the destination directories if
> needed. I agree that these directories are very likely to be created
> already, but for consistency -D would be nice.

Gaah. I knew I had done it. But it ended up in the wrong commit :-/

See
https://git.buildroot.org/buildroot/commit/?id=f9edac7ec45958ebd22f156f7ca859e1dbf0673a.

That's what happens when applying patches between two flights in an
airport I guess :-/

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [git commit] jsmn: new package
  2017-01-29 13:11   ` Thomas Petazzoni
@ 2017-01-29 21:39     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2017-01-29 21:39 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 >> We normally use install -D to create the destination directories if
 >> needed. I agree that these directories are very likely to be created
 >> already, but for consistency -D would be nice.

 > Gaah. I knew I had done it. But it ended up in the wrong commit :-/

 > See
 > https://git.buildroot.org/buildroot/commit/?id=f9edac7ec45958ebd22f156f7ca859e1dbf0673a.

Ahh yes.

 > That's what happens when applying patches between two flights in an
 > airport I guess :-/

Thanks for handling patches while you're on the go, and have a safe
trip!
-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-29 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-28 10:03 [Buildroot] [git commit] jsmn: new package Thomas Petazzoni
2017-01-28 13:37 ` Peter Korsgaard
2017-01-29 13:11   ` Thomas Petazzoni
2017-01-29 21:39     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox