(no subject)
---
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.
PATCH 1/1 New package: lua-cjson [v2]
--- 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
package/Config.in +1 -0
@@ -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"
package/lua-cjson/Config.in new file +13 -0
@@ -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
package/lua-cjson/lua-cjson.mk new file +32 -0
@@ -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))
Signature · 1 line
1.7.9.5
PATCH 1/1 New package: lua-cjson [v2]
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
endefFran?ois
2012/7/16 Danomi Manchego <[email protected]>:
Quoted 85 lines
Signed-off-by Danomi Manchego <[email protected]>--- 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.mkpackage/Config.in +1
-0@@ -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"package/lua-cjson/Config.in new file +13
-0@@ -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.phppackage/lua-cjson/lua-cjson.mk new file +32
-1@@ -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
PATCH 1/1 New package: lua-cjson [v2]
Fran?ois,
Quoted 2 lines
- the variable
LUA_CJSON_SOURCEis useless, because the default scheme (packagename-$(LIBFOO_VERSION).tar.gz) is used
True.
Quoted 6 lines
- PREFIX=$(STAGING_DIR)/usr in
LUA_CJSON_BUILD_CMDSis uselessa 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 -
Quoted 98 lines · Fran?ois Perrad
in lua-cjson.mk :
- the variableLUA_CJSON_SOURCEis useless, because the default scheme (packagename-$(LIBFOO_VERSION).tar.gz) is used
- PREFIX=$(STAGING_DIR)/usr inLUA_CJSON_BUILD_CMDSis uselessa good use of PREFIX & DESTDIR is, for example :
define LUA_FOO_INSTALL_TARGET_CMDS $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX="/usr" install endefFran?ois
2012/7/16 Danomi Manchego <[email protected]>:
Quoted 27 lines
Signed-off-by Danomi Manchego <[email protected]>--- 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.mkpackage/Config.in +1
-0@@ -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"package/lua-cjson/Config.in new file +0
-0package/lua-cjson/Config.in line 4
Quoted 4 lines
package/lua-cjson/Config.in new file +4
-0@@ -0,0 +1,13 @@ +config BR2_PACKAGE_LUA_CJSON + bool "lua_cjson" + help + The Lua CJSON module provides JSON support for Lua. Itfeatures:
package/lua-cjson/Config.in line 6
Quoted 2 lines
package/lua-cjson/Config.in new file +2
-0+ - Fast, standards compliant encoding/parsing routines + - Full support for JSON with UTF-8, including decodingsurrogate pairs
package/lua-cjson/
Quoted 8 lines
package/lua-cjson/Config.in new file +7
-0+ - 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.phppackage/lua-cjson/ renamed from package/lua-cjson/lua-cjson.mk +0
-0lua-cjson.mk
Quoted 16 lines
new file mode 100644
index 0000000..05087eapackage/lua-cjson/lua-cjson.mk new file +11
-0@@ -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_CMDSpackage/lua-cjson/lua-cjson.mk line 21
Quoted 10 lines
package/lua-cjson/lua-cjson.mk new file +10
-0+ $(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
Quoted 14 lines
package/lua-cjson/lua-cjson.mk new file +11
-1+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
Quoted 5 lines
Quoted 4 lines
_______________________________________________
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>
[Buildroot] [UNSURE]Re: [PATCH] New package: lua-cjson [v2]
2012/7/17 Danomi Manchego <[email protected]>:
Quoted 25 lines
Fran?ois,
Quoted 2 lines
- the variable
LUA_CJSON_SOURCEis useless, because the default scheme (packagename-$(LIBFOO_VERSION).tar.gz) is usedTrue.
Quoted 6 lines
- PREFIX=$(STAGING_DIR)/usr in
LUA_CJSON_BUILD_CMDSis uselessa good use of PREFIX & DESTDIR is, for example :
define LUA_FOO_INSTALL_TARGET_CMDS $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX="/usr" install endefNot quite true. If you look at the
Makefilein 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 $@ $<
Quoted 5 lines
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_CFLAGSorLUA_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
Quoted 18 lines
Danomi -
Quoted 13 lines · Fran?ois Perrad
in lua-cjson.mk :
- the variableLUA_CJSON_SOURCEis useless, because the default scheme (packagename-$(LIBFOO_VERSION).tar.gz) is used
- PREFIX=$(STAGING_DIR)/usr inLUA_CJSON_BUILD_CMDSis uselessa good use of PREFIX & DESTDIR is, for example :
define LUA_FOO_INSTALL_TARGET_CMDS $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX="/usr" install endefFran?ois
Thomas Petazzoni
AppliedPATCH 1/1 New package: lua-cjson [v2]
In reply to Danomi ManchegoLe Sun, 15 Jul 2012 23:00:27 -0400,
Danomi Manchego <[email protected]> a ?crit :
Quoted 8 lines
Signed-off-by Danomi Manchego <[email protected]>--- 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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com