Patchwork [1/3] Added lua recipe

login
register
mail settings
Submitter christian.braunersorensen@prevas.dk
Date Feb. 26, 2013, 10:16 a.m.
Message ID <5d99968f5165bb1a09b40ad2fadca44264b40fde.1361873632.git.christian.braunersorensen@prevas.dk>
Download mbox | patch
Permalink /patch/223170/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

christian.braunersorensen@prevas.dk - Feb. 26, 2013, 10:16 a.m.
From: Christian Sørensen <christian.braunersorensen@prevas.dk>

---
 recipes/lua/lua_5.2.1.oe     | 29 +++++++++++++++++++++++++++++
 recipes/lua/lua_5.2.1.oe.sig |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 recipes/lua/lua_5.2.1.oe
 create mode 100644 recipes/lua/lua_5.2.1.oe.sig
Esben Haabendal - March 4, 2013, 9:05 a.m.
<christian.braunersorensen@prevas.dk> writes:

> From: Christian Sørensen <christian.braunersorensen@prevas.dk>
>
> ---
>  recipes/lua/lua_5.2.1.oe     | 29 +++++++++++++++++++++++++++++
>  recipes/lua/lua_5.2.1.oe.sig |  1 +
>  2 files changed, 30 insertions(+)
>  create mode 100644 recipes/lua/lua_5.2.1.oe
>  create mode 100644 recipes/lua/lua_5.2.1.oe.sig

I will split out the core of the recipe into a lua.inc file, so it is
easier to add new versions in the future.

> diff --git a/recipes/lua/lua_5.2.1.oe b/recipes/lua/lua_5.2.1.oe
> new file mode 100644
> index 0000000..8d1cf2a
> --- /dev/null
> +++ b/recipes/lua/lua_5.2.1.oe
> @@ -0,0 +1,29 @@
> +DESRIPTION = "Lua 5.2.1"
> +LICENCE = "MIT"
> +
> +inherit c make auto-package-utils
> +
> +SRC_URI = "http://www.lua.org/ftp/lua-5.2.1.tar.gz"
> +DEPENDS += "readline-dev ncurses-dev \

You don't need to (and should not) add readline-dev and ncurses-dev
to DEPENDS.  Depending on libreadline and libncurses are supposed to
handle this.  And both recipes seems to be working as expected.
Depending on libreadline gives you readline-libreadline, which pulls in
readline-libreadline-dev, which pulls in readline-dev, and similar for
ncurses.

If this was not the case, the readline or ncurses recipe should be
fixed.

> +		libm libdl libreadline libncurses"
> +
> +do_compile () {
> +	cd src && make linux CC="${CC}" AR="${AR} rcu"
> +}
> +
> +do_install[prefuncs] += "do_install_fix_dirs"
> +do_install_fix_dirs () {
> +	sed -i -e 's/\(INSTALL_TOP= \).*/\1\$\{DESTDIR\}\/usr/' ${S}/Makefile
> +}
> +
> +do_install[postfuncs] += "do_install_fix_mandir"
> +do_install_fix_mandir () {
> +	mkdir -p ${D}${mandir}
> +	mv ${D}/usr/man/* ${D}${mandir}
> +}
> +
> +AUTO_PACKAGE_UTILS = "lua luac"
> +
> +RDEPENDS_LUA = "libm libdl libreadline libncurses libc"
> +RDEPENDS_${PN}-lua = "${RDEPENDS_LUA}"
> +RDEPENDS_${PN}-luac = "${RDEPENDS_LUA}"
> diff --git a/recipes/lua/lua_5.2.1.oe.sig b/recipes/lua/lua_5.2.1.oe.sig
> new file mode 100644
> index 0000000..49c16a1
> --- /dev/null
> +++ b/recipes/lua/lua_5.2.1.oe.sig
> @@ -0,0 +1 @@
> +6bb1b0a39b6a5484b71a83323c690154f86b2021  lua-5.2.1.tar.gz

I will be merging with the changes explained above.

/Esben
Esben Haabendal - March 4, 2013, 3:12 p.m.
Esben Haabendal <esben.haabendal@dev.prevas.dk> writes:

> <christian.braunersorensen@prevas.dk> writes:
>
>> From: Christian Sørensen <christian.braunersorensen@prevas.dk>
>>
>> ---
>>  recipes/lua/lua_5.2.1.oe     | 29 +++++++++++++++++++++++++++++
>>  recipes/lua/lua_5.2.1.oe.sig |  1 +
>>  2 files changed, 30 insertions(+)
>>  create mode 100644 recipes/lua/lua_5.2.1.oe
>>  create mode 100644 recipes/lua/lua_5.2.1.oe.sig
>
> I will split out the core of the recipe into a lua.inc file, so it is
> easier to add new versions in the future.
>
>> diff --git a/recipes/lua/lua_5.2.1.oe b/recipes/lua/lua_5.2.1.oe
>> new file mode 100644
>> index 0000000..8d1cf2a
>> --- /dev/null
>> +++ b/recipes/lua/lua_5.2.1.oe
>> @@ -0,0 +1,29 @@
>> +DESRIPTION = "Lua 5.2.1"
>> +LICENCE = "MIT"
>> +
>> +inherit c make auto-package-utils
>> +
>> +SRC_URI = "http://www.lua.org/ftp/lua-5.2.1.tar.gz"
>> +DEPENDS += "readline-dev ncurses-dev \
>
> You don't need to (and should not) add readline-dev and ncurses-dev
> to DEPENDS.  Depending on libreadline and libncurses are supposed to
> handle this.  And both recipes seems to be working as expected.
> Depending on libreadline gives you readline-libreadline, which pulls in
> readline-libreadline-dev, which pulls in readline-dev, and similar for
> ncurses.
>
> If this was not the case, the readline or ncurses recipe should be
> fixed.
>
>> +		libm libdl libreadline libncurses"
>> +
>> +do_compile () {
>> +	cd src && make linux CC="${CC}" AR="${AR} rcu"
>> +}
>> +
>> +do_install[prefuncs] += "do_install_fix_dirs"
>> +do_install_fix_dirs () {
>> +	sed -i -e 's/\(INSTALL_TOP= \).*/\1\$\{DESTDIR\}\/usr/' ${S}/Makefile
>> +}
>> +
>> +do_install[postfuncs] += "do_install_fix_mandir"
>> +do_install_fix_mandir () {
>> +	mkdir -p ${D}${mandir}
>> +	mv ${D}/usr/man/* ${D}${mandir}
>> +}
>> +
>> +AUTO_PACKAGE_UTILS = "lua luac"
>> +
>> +RDEPENDS_LUA = "libm libdl libreadline libncurses libc"
>> +RDEPENDS_${PN}-lua = "${RDEPENDS_LUA}"
>> +RDEPENDS_${PN}-luac = "${RDEPENDS_LUA}"
>> diff --git a/recipes/lua/lua_5.2.1.oe.sig b/recipes/lua/lua_5.2.1.oe.sig
>> new file mode 100644
>> index 0000000..49c16a1
>> --- /dev/null
>> +++ b/recipes/lua/lua_5.2.1.oe.sig
>> @@ -0,0 +1 @@
>> +6bb1b0a39b6a5484b71a83323c690154f86b2021  lua-5.2.1.tar.gz
>
> I will be merging with the changes explained above.

Merged to master, thanks.

/Esben

Patch

diff --git a/recipes/lua/lua_5.2.1.oe b/recipes/lua/lua_5.2.1.oe
new file mode 100644
index 0000000..8d1cf2a
--- /dev/null
+++ b/recipes/lua/lua_5.2.1.oe
@@ -0,0 +1,29 @@ 
+DESRIPTION = "Lua 5.2.1"
+LICENCE = "MIT"
+
+inherit c make auto-package-utils
+
+SRC_URI = "http://www.lua.org/ftp/lua-5.2.1.tar.gz"
+DEPENDS += "readline-dev ncurses-dev \
+		libm libdl libreadline libncurses"
+
+do_compile () {
+	cd src && make linux CC="${CC}" AR="${AR} rcu"
+}
+
+do_install[prefuncs] += "do_install_fix_dirs"
+do_install_fix_dirs () {
+	sed -i -e 's/\(INSTALL_TOP= \).*/\1\$\{DESTDIR\}\/usr/' ${S}/Makefile
+}
+
+do_install[postfuncs] += "do_install_fix_mandir"
+do_install_fix_mandir () {
+	mkdir -p ${D}${mandir}
+	mv ${D}/usr/man/* ${D}${mandir}
+}
+
+AUTO_PACKAGE_UTILS = "lua luac"
+
+RDEPENDS_LUA = "libm libdl libreadline libncurses libc"
+RDEPENDS_${PN}-lua = "${RDEPENDS_LUA}"
+RDEPENDS_${PN}-luac = "${RDEPENDS_LUA}"
diff --git a/recipes/lua/lua_5.2.1.oe.sig b/recipes/lua/lua_5.2.1.oe.sig
new file mode 100644
index 0000000..49c16a1
--- /dev/null
+++ b/recipes/lua/lua_5.2.1.oe.sig
@@ -0,0 +1 @@ 
+6bb1b0a39b6a5484b71a83323c690154f86b2021  lua-5.2.1.tar.gz