lua: use standard prefix for Lua libraries
cover lua: use standard prefix for Lua libraries
Hi,
this patch series should fix wrong path in default configuration of Lua, where uses wrong /usr/local/{lib,share} in it's module/script search path. This patch changes it to the usage of the standard /usr/{lib,share} directories. Please apply. Thanks.
-- ynezz
Petr Štetiar (3):
lua5.1: use standard prefix for Lua libraries
lua-filesystem: use standard prefix for Lua libraries
lua-rs232: use standard prefix for Lua libraries
recipes/lua/lua-filesystem_1.5.0.bb | 8 +++++--- recipes/lua/lua-rs232_1.0.0.bb | 4 +++- recipes/lua/lua5.1/no-usr-local.patch | 13 +++++++++++++ recipes/lua/lua5.1_5.1.4.bb | 3 ++- 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 recipes/lua/lua5.1/no-usr-local.patch
PATCH 1/3 lua5.1: use standard prefix for Lua libraries
In default configuration Lua uses wrong /usr/local/{lib,share} in it's module/script search path. This patch change it to the usage of the standard /usr/{lib,share} directories.
--- recipes/lua/lua5.1/no-usr-local.patch | 13 +++++++++++++ recipes/lua/lua5.1_5.1.4.bb | 3 ++- 2 files changed, 15 insertions(+), 1 deletions(-) create mode 100644 recipes/lua/lua5.1/no-usr-local.patch
recipes/lua/lua5.1/no-usr-local.patch new file +13 -0
@@ -0,0 +1,13 @@ +Index: lua-5.1.4/src/luaconf.h +=================================================================== +--- lua-5.1.4.orig/src/luaconf.h 2010-10-17 21:13:01.000000000 +0200 ++++ lua-5.1.4/src/luaconf.h 2010-10-17 21:13:17.000000000 +0200 +@@ -95,7 +95,7 @@ + ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" + + #else +-#define LUA_ROOT "/usr/local/" ++#define LUA_ROOT "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \
recipes/lua/lua5.1_5.1.4.bb +2 -1
@@ -4,9 +4,10 @@ LICENSE = "MIT" HOMEPAGE = "http://www.lua.org/" DEPENDS += "readline" -PR = "r7" +PR = "r8" SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \ file://bitwise_operators.patch \ + file://no-usr-local.patch \ file://lua5.1.pc \ " S = "${WORKDIR}/lua-${PV}"
Signature · 1 line
1.7.0.4
PATCH 2/3 lua-filesystem: use standard prefix for Lua libraries
In reply to Petr Štetiar--- recipes/lua/lua-filesystem_1.5.0.bb | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
recipes/lua/lua-filesystem_1.5.0.bb +5 -3
@@ -2,6 +2,8 @@ DESCRIPTION = "LuaFileSystem is a Lua library with set of functions related to f LICENSE = "MIT" HOMEPAGE = "http://keplerproject.org/luafilesystem" +PR = "r1" + DEPENDS += "lua5.1" SRC_URI = "git://github.com/keplerproject/luafilesystem.git;protocol=git \
@@ -10,16 +12,16 @@ SRC_URI = "git://github.com/keplerproject/luafilesystem.git;protocol=git \ SRCREV = "ae5a05deec8a3737bd6972213b5495108b6566cc" S = "${WORKDIR}/git/" -LUA_LIB_DIR = "/usr/local/lib/lua/5.1" +LUA_LIB_DIR = "/usr/lib/lua/5.1" PACKAGES = "${PN} ${PN}-dbg" FILES_${PN}-dbg = "${LUA_LIB_DIR}/.debug/lfs.so" FILES_${PN} = "${LUA_LIB_DIR}/lfs.so" -EXTRA_OEMAKE = "PREFIX='${D}/usr/local' MYFLAGS='${CFLAGS} ${LDFLAGS}'" +EXTRA_OEMAKE = "PREFIX='${D}/usr' MYFLAGS='${CFLAGS} ${LDFLAGS}'" do_install() { - oe_runmake install PREFIX=${D}/usr/local + oe_runmake install PREFIX=${D}/usr install -d ${D}/${docdir}/${PN}-${PV} install -m 0644 doc/us/* ${D}/${docdir}/${PN}-${PV} }
Signature · 1 line
1.7.0.4
PATCH 3/3 lua-rs232: use standard prefix for Lua libraries
In reply to Petr Štetiar--- recipes/lua/lua-rs232_1.0.0.bb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
recipes/lua/lua-rs232_1.0.0.bb +3 -1
@@ -2,6 +2,8 @@ DESCRIPTION = "Lua bindings for librs232 - library for serial communications ove HOMEPAGE = "http://github.com/ynezz/librs232" LICENSE = "MIT" +PR = "r1" + DEPENDS += "lua5.1" RDEPENDS_${PN} += "librs232"
@@ -12,7 +14,7 @@ S = "${WORKDIR}/git/" inherit autotools -LUA_LIB_DIR = "/usr/local/lib/lua/5.1" +LUA_LIB_DIR = "/usr/lib/lua/5.1" LUA_LIB = "luars232.so" PACKAGES = "${PN} ${PN}-dbg"
Signature · 1 line
1.7.0.4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 6 lines · Petr Štetiar
Hi,
this patch series should fix wrong path in default configuration of Lua, where uses wrong
/usr/local/{lib,share}in it's module/script search path. This patch changes it to the usage of the standard/usr/{lib,share}directories. Please apply. Thanks.
What about the following:
Replace no-usr-local.patch with:
do_configure_prepend() {
sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
}And then do:
LUA_LIB_DIR = "${libdir}/lua/5.1"
That would even make it work with that crazy micro distro that has no /usr :)
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMu1szMkyGM64RGpERAlufAKC9fU32pwlUpgftYegwgR9lKezGEQCfXcf1 x+ACokVW12Pi4WaWaDJ+4/0=
=nDaF
-----END PGP SIGNATURE-----
Koen Kooi <[email protected]> [2010-10-17 22:23:15]:
[snip]
Quoted 4 lines
LUA_LIB_DIR= "${libdir}/lua/5.1"That would even make it work with that crazy micro distro that has no /usr :)
Ah, nice. Thanks.
-- ynezz
PATCH v2 1/3 lua5.1: use standard prefix for Lua libraries
In reply to Petr ŠtetiarIn default configuration Lua uses wrong /usr/local/{lib,share} in it's module/script search path. This patch change it to the usage of the standard /usr/{lib,share} directories.
--- recipes/lua/lua5.1_5.1.4.bb | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
recipes/lua/lua5.1_5.1.4.bb +5 -1
@@ -4,7 +4,7 @@ LICENSE = "MIT" HOMEPAGE = "http://www.lua.org/" DEPENDS += "readline" -PR = "r7" +PR = "r8" SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz \ file://bitwise_operators.patch \ file://lua5.1.pc \
@@ -20,6 +20,10 @@ SRC_URI_append_linux-uclibceabi = "${UCLIBC_PATCHES}" TARGET_CC_ARCH += " -fPIC ${LDFLAGS}" EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -DLUA_USE_LINUX -fPIC' MYLDFLAGS='${LDFLAGS}'" +do_configure_prepend() { + sed -i -e s:/usr/local:${prefix}:g src/luaconf.h +} + do_compile () { cp ${WORKDIR}/lua5.1.pc ${S}/ oe_runmake linux
Signature · 1 line
1.7.0.4
PATCH v2 2/3 lua-filesystem: use standard prefix for Lua libraries
--- recipes/lua/lua-filesystem_1.5.0.bb | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
recipes/lua/lua-filesystem_1.5.0.bb +5 -3
@@ -2,6 +2,8 @@ DESCRIPTION = "LuaFileSystem is a Lua library with set of functions related to f LICENSE = "MIT" HOMEPAGE = "http://keplerproject.org/luafilesystem" +PR = "r1" + DEPENDS += "lua5.1" SRC_URI = "git://github.com/keplerproject/luafilesystem.git;protocol=git \
@@ -10,16 +12,16 @@ SRC_URI = "git://github.com/keplerproject/luafilesystem.git;protocol=git \ SRCREV = "ae5a05deec8a3737bd6972213b5495108b6566cc" S = "${WORKDIR}/git/" -LUA_LIB_DIR = "/usr/local/lib/lua/5.1" +LUA_LIB_DIR = "${libdir}/lua/5.1" PACKAGES = "${PN} ${PN}-dbg" FILES_${PN}-dbg = "${LUA_LIB_DIR}/.debug/lfs.so" FILES_${PN} = "${LUA_LIB_DIR}/lfs.so" -EXTRA_OEMAKE = "PREFIX='${D}/usr/local' MYFLAGS='${CFLAGS} ${LDFLAGS}'" +EXTRA_OEMAKE = "PREFIX='${D}/usr' MYFLAGS='${CFLAGS} ${LDFLAGS}'" do_install() { - oe_runmake install PREFIX=${D}/usr/local + oe_runmake install PREFIX=${D}/usr install -d ${D}/${docdir}/${PN}-${PV} install -m 0644 doc/us/* ${D}/${docdir}/${PN}-${PV} }
Signature · 1 line
1.7.0.4
Re: [PATCH v2 2/3] lua-filesystem: use standard prefix for Lua libraries
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
recipes/lua/lua-filesystem_1.5.0.bb SRC_URI = "git://github.com/keplerproject/luafilesystem.git;protocol=git \ · line 21
Quoted 2 lines · Petr Štetiar
recipes/lua/lua-filesystem_1.5.0.bb +1
-1-EXTRA_OEMAKE = "PREFIX='${D}/usr/local' MYFLAGS='${CFLAGS} ${LDFLAGS}'" +EXTRA_OEMAKE = "PREFIX='${D}/usr' MYFLAGS='${CFLAGS} ${LDFLAGS}'"
PREFIX='${D}${prefix}'
recipes/lua/lua-filesystem_1.5.0.bb SRC_URI = "git://github.com/keplerproject/luafilesystem.git;protocol=git \ · line 24
Quoted 3 lines
do_install(){recipes/lua/lua-filesystem_1.5.0.bb +1
-1- oe_runmake install PREFIX=${D}/usr/local + oe_runmake install PREFIX=${D}/usr
oe_runmake install PREFIX=${D}${prefix}
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMu/T1MkyGM64RGpERAmnhAJ9dXwnUl/CPQwD8Z20E2YkUYryUMgCfYl5G F/7y9EUbGAPD8tX1Bofb6B0=
=EB/K
-----END PGP SIGNATURE-----
PATCH v3 1/1 lua-filesystem: use standard prefix for Lua libraries
In reply to Petr Štetiar--- recipes/lua/lua-filesystem_1.5.0.bb | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
recipes/lua/lua-filesystem_1.5.0.bb +5 -3
@@ -2,6 +2,8 @@ DESCRIPTION = "LuaFileSystem is a Lua library with set of functions related to f LICENSE = "MIT" HOMEPAGE = "http://keplerproject.org/luafilesystem" +PR = "r1" + DEPENDS += "lua5.1" SRC_URI = "git://github.com/keplerproject/luafilesystem.git;protocol=git \
@@ -10,16 +12,16 @@ SRC_URI = "git://github.com/keplerproject/luafilesystem.git;protocol=git \ SRCREV = "ae5a05deec8a3737bd6972213b5495108b6566cc" S = "${WORKDIR}/git/" -LUA_LIB_DIR = "/usr/local/lib/lua/5.1" +LUA_LIB_DIR = "${libdir}/lua/5.1" PACKAGES = "${PN} ${PN}-dbg" FILES_${PN}-dbg = "${LUA_LIB_DIR}/.debug/lfs.so" FILES_${PN} = "${LUA_LIB_DIR}/lfs.so" -EXTRA_OEMAKE = "PREFIX='${D}/usr/local' MYFLAGS='${CFLAGS} ${LDFLAGS}'" +EXTRA_OEMAKE = "PREFIX='${D}/${prefix}' MYFLAGS='${CFLAGS} ${LDFLAGS}'" do_install() { - oe_runmake install PREFIX=${D}/usr/local + oe_runmake install PREFIX=${D}/${prefix} install -d ${D}/${docdir}/${PN}-${PV} install -m 0644 doc/us/* ${D}/${docdir}/${PN}-${PV} }
Signature · 1 line
1.7.0.4
PATCH v2 3/3 lua-rs232: use standard prefix for Lua libraries
In reply to Petr Štetiar--- recipes/lua/lua-rs232_1.0.0.bb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
recipes/lua/lua-rs232_1.0.0.bb +3 -1
@@ -2,6 +2,8 @@ DESCRIPTION = "Lua bindings for librs232 - library for serial communications ove HOMEPAGE = "http://github.com/ynezz/librs232" LICENSE = "MIT" +PR = "r1" + DEPENDS += "lua5.1" RDEPENDS_${PN} += "librs232"
@@ -12,7 +14,7 @@ S = "${WORKDIR}/git/" inherit autotools -LUA_LIB_DIR = "/usr/local/lib/lua/5.1" +LUA_LIB_DIR = "${libdir}/lua/5.1" LUA_LIB = "luars232.so" PACKAGES = "${PN} ${PN}-dbg"
Signature · 1 line
1.7.0.4
Ping.