* [Buildroot] (no subject) @ 2012-07-16 3:00 Danomi Manchego 2012-07-16 3:00 ` [Buildroot] [PATCH] New package: lua-cjson [v2] Danomi Manchego 0 siblings, 1 reply; 6+ messages in thread From: Danomi Manchego @ 2012-07-16 3:00 UTC (permalink / raw) To: buildroot --- v2: remove "depends on BR2_PACKAGE_LUA", since this dependency against Lua is implicit, because of the sub menu for Lua packages in package/Config.in. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] New package: lua-cjson [v2] 2012-07-16 3:00 [Buildroot] (no subject) Danomi Manchego @ 2012-07-16 3:00 ` Danomi Manchego 2012-07-16 14:29 ` François Perrad 2012-07-17 21:33 ` [Buildroot] " Thomas Petazzoni 0 siblings, 2 replies; 6+ messages in thread From: Danomi Manchego @ 2012-07-16 3:00 UTC (permalink / raw) To: buildroot Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> --- package/Config.in | 1 + package/lua-cjson/Config.in | 13 +++++++++++++ package/lua-cjson/lua-cjson.mk | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 package/lua-cjson/Config.in create mode 100644 package/lua-cjson/lua-cjson.mk diff --git a/package/Config.in b/package/Config.in index 99257b4..9cbf1e2 100644 --- a/package/Config.in +++ b/package/Config.in @@ -250,6 +250,7 @@ menu "LUA libraries/modules" source "package/cgilua/Config.in" source "package/copas/Config.in" source "package/coxpcall/Config.in" +source "package/lua-cjson/Config.in" source "package/luafilesystem/Config.in" source "package/luasocket/Config.in" source "package/rings/Config.in" diff --git a/package/lua-cjson/Config.in b/package/lua-cjson/Config.in new file mode 100644 index 0000000..c9d6abd --- /dev/null +++ b/package/lua-cjson/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LUA_CJSON + bool "lua_cjson" + help + The Lua CJSON module provides JSON support for Lua. It features: + - Fast, standards compliant encoding/parsing routines + - Full support for JSON with UTF-8, including decoding surrogate pairs + - Optional run-time support for common exceptions to the JSON + specification (infinity, NaN, ...) + - No dependencies on other libraries + + (C-module) + + http://www.kyne.com.au/~mark/software/lua-cjson.php diff --git a/package/lua-cjson/lua-cjson.mk b/package/lua-cjson/lua-cjson.mk new file mode 100644 index 0000000..05087ea --- /dev/null +++ b/package/lua-cjson/lua-cjson.mk @@ -0,0 +1,32 @@ +############################################################# +# +# lua-cjson +# +############################################################# +LUA_CJSON_VERSION = 2.1.0 +LUA_CJSON_SOURCE = lua-cjson-$(LUA_CJSON_VERSION).tar.gz +LUA_CJSON_SITE = http://www.kyne.com.au/~mark/software/download +LUA_CJSON_DEPENDENCIES = lua + +define LUA_CJSON_BUILD_CMDS + $(MAKE) -C $(@D) \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC)" \ + LD="$(TARGET_LD)" \ + PREFIX=$(STAGING_DIR)/usr +endef + +define LUA_CJSON_INSTALL_TARGET_CMDS + install -D -m 0644 $(@D)/cjson.so $(TARGET_DIR)/usr/lib/lua/cjson.so +endef + +define LUA_CJSON_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +define LUA_CJSON_UNINSTALL_TARGET_CMDS + rm -f "$(TARGET_DIR)/usr/lib/lua/cjson.so" +endef + +$(eval $(call GENTARGETS)) -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] New package: lua-cjson [v2] 2012-07-16 3:00 ` [Buildroot] [PATCH] New package: lua-cjson [v2] Danomi Manchego @ 2012-07-16 14:29 ` François Perrad 2012-07-16 23:23 ` Danomi Manchego 2012-07-17 21:33 ` [Buildroot] " Thomas Petazzoni 1 sibling, 1 reply; 6+ messages in thread From: François Perrad @ 2012-07-16 14:29 UTC (permalink / raw) To: buildroot in lua-cjson.mk : - the variable LUA_CJSON_SOURCE is useless, because the default scheme (packagename-$(LIBFOO_VERSION).tar.gz) is used - PREFIX=$(STAGING_DIR)/usr in LUA_CJSON_BUILD_CMDS is useless a good use of PREFIX & DESTDIR is, for example : define LUA_FOO_INSTALL_TARGET_CMDS $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX="/usr" install endef Fran?ois 2012/7/16 Danomi Manchego <danomimanchego123@gmail.com>: > Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> > --- > package/Config.in | 1 + > package/lua-cjson/Config.in | 13 +++++++++++++ > package/lua-cjson/lua-cjson.mk | 32 ++++++++++++++++++++++++++++++++ > 3 files changed, 46 insertions(+) > create mode 100644 package/lua-cjson/Config.in > create mode 100644 package/lua-cjson/lua-cjson.mk > > diff --git a/package/Config.in b/package/Config.in > index 99257b4..9cbf1e2 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -250,6 +250,7 @@ menu "LUA libraries/modules" > source "package/cgilua/Config.in" > source "package/copas/Config.in" > source "package/coxpcall/Config.in" > +source "package/lua-cjson/Config.in" > source "package/luafilesystem/Config.in" > source "package/luasocket/Config.in" > source "package/rings/Config.in" > diff --git a/package/lua-cjson/Config.in b/package/lua-cjson/Config.in > new file mode 100644 > index 0000000..c9d6abd > --- /dev/null > +++ b/package/lua-cjson/Config.in > @@ -0,0 +1,13 @@ > +config BR2_PACKAGE_LUA_CJSON > + bool "lua_cjson" > + help > + The Lua CJSON module provides JSON support for Lua. It features: > + - Fast, standards compliant encoding/parsing routines > + - Full support for JSON with UTF-8, including decoding surrogate pairs > + - Optional run-time support for common exceptions to the JSON > + specification (infinity, NaN, ...) > + - No dependencies on other libraries > + > + (C-module) > + > + http://www.kyne.com.au/~mark/software/lua-cjson.php > diff --git a/package/lua-cjson/lua-cjson.mk b/package/lua-cjson/lua-cjson.mk > new file mode 100644 > index 0000000..05087ea > --- /dev/null > +++ b/package/lua-cjson/lua-cjson.mk > @@ -0,0 +1,32 @@ > +############################################################# > +# > +# lua-cjson > +# > +############################################################# > +LUA_CJSON_VERSION = 2.1.0 > +LUA_CJSON_SOURCE = lua-cjson-$(LUA_CJSON_VERSION).tar.gz > +LUA_CJSON_SITE = http://www.kyne.com.au/~mark/software/download > +LUA_CJSON_DEPENDENCIES = lua > + > +define LUA_CJSON_BUILD_CMDS > + $(MAKE) -C $(@D) \ > + CFLAGS="$(TARGET_CFLAGS)" \ > + LDFLAGS="$(TARGET_LDFLAGS)" \ > + CC="$(TARGET_CC)" \ > + LD="$(TARGET_LD)" \ > + PREFIX=$(STAGING_DIR)/usr > +endef > + > +define LUA_CJSON_INSTALL_TARGET_CMDS > + install -D -m 0644 $(@D)/cjson.so $(TARGET_DIR)/usr/lib/lua/cjson.so > +endef > + > +define LUA_CJSON_CLEAN_CMDS > + $(MAKE) -C $(@D) clean > +endef > + > +define LUA_CJSON_UNINSTALL_TARGET_CMDS > + rm -f "$(TARGET_DIR)/usr/lib/lua/cjson.so" > +endef > + > +$(eval $(call GENTARGETS)) > -- > 1.7.9.5 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] New package: lua-cjson [v2] 2012-07-16 14:29 ` François Perrad @ 2012-07-16 23:23 ` Danomi Manchego 2012-07-17 8:03 ` [Buildroot] [UNSURE]Re: " François Perrad 0 siblings, 1 reply; 6+ messages in thread From: Danomi Manchego @ 2012-07-16 23:23 UTC (permalink / raw) To: buildroot Fran?ois, > - the variable LUA_CJSON_SOURCE is useless, because the default scheme > (packagename-$(LIBFOO_VERSION).tar.gz) is used True. > - PREFIX=$(STAGING_DIR)/usr in LUA_CJSON_BUILD_CMDS is useless > > a good use of PREFIX & DESTDIR is, for example : > define LUA_FOO_INSTALL_TARGET_CMDS > $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX="/usr" install > endef Not quite true. If you look at the Makefile in lua-cjson, you will see that DESTDIR is only used for the install targets, which I have avoided in the .mk. But the PREFIX is used in the build phase for -I: LUA_INCLUDE_DIR = $(PREFIX)/include ... BUILD_CFLAGS = -I$(LUA_INCLUDE_DIR) $(CJSON_CFLAGS) ... .c.o: $(CC) -c $(CFLAGS) $(CPPFLAGS) $(BUILD_CFLAGS) -o $@ $< Since we need header files to come from staging rather than /usr, I set PREFIX=$(STAGING_DIR)/usr. If you prefer, I can override BUILD_CFLAGS or LUA_INCLUDE_DIR, but I think that proper compilation is obtained with the file as-is. Danomi - On Mon, Jul 16, 2012 at 10:29 AM, Fran?ois Perrad <francois.perrad@gadz.org>wrote: > in lua-cjson.mk : > - the variable LUA_CJSON_SOURCE is useless, because the default scheme > (packagename-$(LIBFOO_VERSION).tar.gz) is used > - PREFIX=$(STAGING_DIR)/usr in LUA_CJSON_BUILD_CMDS is useless > > a good use of PREFIX & DESTDIR is, for example : > define LUA_FOO_INSTALL_TARGET_CMDS > $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX="/usr" install > endef > > Fran?ois > > 2012/7/16 Danomi Manchego <danomimanchego123@gmail.com>: > > Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> > > --- > > package/Config.in | 1 + > > package/lua-cjson/Config.in | 13 +++++++++++++ > > package/lua-cjson/lua-cjson.mk | 32 ++++++++++++++++++++++++++++++++ > > 3 files changed, 46 insertions(+) > > create mode 100644 package/lua-cjson/Config.in > > create mode 100644 package/lua-cjson/lua-cjson.mk > > > > diff --git a/package/Config.in b/package/Config.in > > index 99257b4..9cbf1e2 100644 > > --- a/package/Config.in > > +++ b/package/Config.in > > @@ -250,6 +250,7 @@ menu "LUA libraries/modules" > > source "package/cgilua/Config.in" > > source "package/copas/Config.in" > > source "package/coxpcall/Config.in" > > +source "package/lua-cjson/Config.in" > > source "package/luafilesystem/Config.in" > > source "package/luasocket/Config.in" > > source "package/rings/Config.in" > > diff --git a/package/lua-cjson/Config.in b/package/lua-cjson/Config.in > > new file mode 100644 > > index 0000000..c9d6abd > > --- /dev/null > > +++ b/package/lua-cjson/Config.in > > @@ -0,0 +1,13 @@ > > +config BR2_PACKAGE_LUA_CJSON > > + bool "lua_cjson" > > + help > > + The Lua CJSON module provides JSON support for Lua. It > features: > > + - Fast, standards compliant encoding/parsing routines > > + - Full support for JSON with UTF-8, including decoding > surrogate pairs > > + - Optional run-time support for common exceptions to the JSON > > + specification (infinity, NaN, ...) > > + - No dependencies on other libraries > > + > > + (C-module) > > + > > + http://www.kyne.com.au/~mark/software/lua-cjson.php > > diff --git a/package/lua-cjson/lua-cjson.mk b/package/lua-cjson/ > lua-cjson.mk > > new file mode 100644 > > index 0000000..05087ea > > --- /dev/null > > +++ b/package/lua-cjson/lua-cjson.mk > > @@ -0,0 +1,32 @@ > > +############################################################# > > +# > > +# lua-cjson > > +# > > +############################################################# > > +LUA_CJSON_VERSION = 2.1.0 > > +LUA_CJSON_SOURCE = lua-cjson-$(LUA_CJSON_VERSION).tar.gz > > +LUA_CJSON_SITE = http://www.kyne.com.au/~mark/software/download > > +LUA_CJSON_DEPENDENCIES = lua > > + > > +define LUA_CJSON_BUILD_CMDS > > + $(MAKE) -C $(@D) \ > > + CFLAGS="$(TARGET_CFLAGS)" \ > > + LDFLAGS="$(TARGET_LDFLAGS)" \ > > + CC="$(TARGET_CC)" \ > > + LD="$(TARGET_LD)" \ > > + PREFIX=$(STAGING_DIR)/usr > > +endef > > + > > +define LUA_CJSON_INSTALL_TARGET_CMDS > > + install -D -m 0644 $(@D)/cjson.so > $(TARGET_DIR)/usr/lib/lua/cjson.so > > +endef > > + > > +define LUA_CJSON_CLEAN_CMDS > > + $(MAKE) -C $(@D) clean > > +endef > > + > > +define LUA_CJSON_UNINSTALL_TARGET_CMDS > > + rm -f "$(TARGET_DIR)/usr/lib/lua/cjson.so" > > +endef > > + > > +$(eval $(call GENTARGETS)) > > -- > > 1.7.9.5 > > > > _______________________________________________ > > buildroot mailing list > > buildroot at busybox.net > > http://lists.busybox.net/mailman/listinfo/buildroot > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120716/d1193a8d/attachment.html> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [UNSURE]Re: [PATCH] New package: lua-cjson [v2] 2012-07-16 23:23 ` Danomi Manchego @ 2012-07-17 8:03 ` François Perrad 0 siblings, 0 replies; 6+ messages in thread From: François Perrad @ 2012-07-17 8:03 UTC (permalink / raw) To: buildroot 2012/7/17 Danomi Manchego <danomimanchego123@gmail.com>: > Fran?ois, > >> - the variable LUA_CJSON_SOURCE is useless, because the default scheme >> (packagename-$(LIBFOO_VERSION).tar.gz) is used > > True. > >> - PREFIX=$(STAGING_DIR)/usr in LUA_CJSON_BUILD_CMDS is useless >> >> a good use of PREFIX & DESTDIR is, for example : >> define LUA_FOO_INSTALL_TARGET_CMDS >> $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX="/usr" install >> endef > > Not quite true. If you look at the Makefile in lua-cjson, you will see that > DESTDIR is only used for the install targets, which I have avoided in the > .mk. But the PREFIX is used in the build phase for -I: > > LUA_INCLUDE_DIR = $(PREFIX)/include > ... > BUILD_CFLAGS = -I$(LUA_INCLUDE_DIR) $(CJSON_CFLAGS) > ... > .c.o: > $(CC) -c $(CFLAGS) $(CPPFLAGS) $(BUILD_CFLAGS) -o $@ $< > > Since we need header files to come from staging rather than /usr, I set > PREFIX=$(STAGING_DIR)/usr. If you prefer, I can override BUILD_CFLAGS or > LUA_INCLUDE_DIR, but I think that proper compilation is obtained with the > file as-is. > in order to explain your intention, I prefer LUA_INCLUDE_DIR="$(STAGING_DIR)/usr/include" Fran?ois > Danomi - > > > On Mon, Jul 16, 2012 at 10:29 AM, Fran?ois Perrad <francois.perrad@gadz.org> > wrote: >> >> in lua-cjson.mk : >> - the variable LUA_CJSON_SOURCE is useless, because the default scheme >> (packagename-$(LIBFOO_VERSION).tar.gz) is used >> - PREFIX=$(STAGING_DIR)/usr in LUA_CJSON_BUILD_CMDS is useless >> >> a good use of PREFIX & DESTDIR is, for example : >> define LUA_FOO_INSTALL_TARGET_CMDS >> $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX="/usr" install >> endef >> >> Fran?ois >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] New package: lua-cjson [v2] 2012-07-16 3:00 ` [Buildroot] [PATCH] New package: lua-cjson [v2] Danomi Manchego 2012-07-16 14:29 ` François Perrad @ 2012-07-17 21:33 ` Thomas Petazzoni 1 sibling, 0 replies; 6+ messages in thread From: Thomas Petazzoni @ 2012-07-17 21:33 UTC (permalink / raw) To: buildroot Le Sun, 15 Jul 2012 23:00:27 -0400, Danomi Manchego <danomimanchego123@gmail.com> a ?crit : > Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> > --- > package/Config.in | 1 + > package/lua-cjson/Config.in | 13 +++++++++++++ > package/lua-cjson/lua-cjson.mk | 32 ++++++++++++++++++++++++++++++++ > 3 files changed, 46 insertions(+) > create mode 100644 package/lua-cjson/Config.in > create mode 100644 package/lua-cjson/lua-cjson.mk Applied, thanks. I have renamed the package to just luacjson, for consistency with other lua* modules. I've also removed useless quotes in LUA_CJSON_UNINSTALL_TARGET_CMDS, and used the new generic-package macro instead of GENTARGETS. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-07-17 21:33 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-07-16 3:00 [Buildroot] (no subject) Danomi Manchego 2012-07-16 3:00 ` [Buildroot] [PATCH] New package: lua-cjson [v2] Danomi Manchego 2012-07-16 14:29 ` François Perrad 2012-07-16 23:23 ` Danomi Manchego 2012-07-17 8:03 ` [Buildroot] [UNSURE]Re: " François Perrad 2012-07-17 21:33 ` [Buildroot] " Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox