lua*: restore version in module paths
authorFrancois Perrad <fperrad@gmail.com>
Sat, 11 Jan 2014 15:42:05 +0000 (16:42 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 13 Jan 2014 22:16:18 +0000 (23:16 +0100)
(like in upstream)

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
21 files changed:
package/cgilua/cgilua.mk
package/copas/copas.mk
package/coxpcall/coxpcall.mk
package/lbase64/lbase64.mk
package/lua-ev/lua-ev.mk
package/lua-msgpack-native/lua-msgpack-native.mk
package/lua/lua-01-root-path.patch
package/luabitop/luabitop.mk
package/luacjson/luacjson.mk
package/luaexpat/luaexpat.mk
package/luaexpatutils/luaexpatutils.mk
package/luafilesystem/luafilesystem.mk
package/luajit/luajit-01-root-path.patch [deleted file]
package/luaposix/luaposix.mk
package/luasec/luasec.mk
package/luasocket/luasocket.mk
package/luasql/luasql.mk
package/orbit/orbit.mk
package/rings/rings.mk
package/wsapi/wsapi.mk
package/xavante/xavante.mk

index bf6ce4eb85aaee024cc3804e6a3f1f13887b01c6..3dd2d7754dc8bff889dfbf8c20a92025c2d16d69 100644 (file)
@@ -9,7 +9,7 @@ CGILUA_SITE = http://github.com/downloads/keplerproject/cgilua
 CGILUA_LICENSE = MIT
 
 define CGILUA_INSTALL_TARGET_CMDS
-       $(MAKE) -C $(@D) install LUA_DIR="$(TARGET_DIR)/usr/share/lua"
+       $(MAKE) PREFIX="$(TARGET_DIR)/usr" -C $(@D) install
 endef
 
 $(eval $(generic-package))
index 61eac58c04e29c0f0c0c10cb81d032add9d77d04..b8cd4259450665f0fdf4a4fd2d4f689713f10185 100644 (file)
@@ -10,7 +10,7 @@ COPAS_LICENSE = MIT
 
 define COPAS_INSTALL_TARGET_CMDS
        $(INSTALL) -m 0644 -D $(@D)/src/copas/copas.lua \
-               $(TARGET_DIR)/usr/share/lua/copas.lua
+               $(TARGET_DIR)/usr/share/lua/5.1/copas.lua
 endef
 
 $(eval $(generic-package))
index 0df7be668550d5ff0f96071aa8601b1769253fbb..de954619354496cbe529570a309890b1f36932ac 100644 (file)
@@ -10,7 +10,7 @@ COXPCALL_LICENSE = MIT
 
 define COXPCALL_INSTALL_TARGET_CMDS
        $(INSTALL) -m 0644 -D $(@D)/src/coxpcall.lua \
-               $(TARGET_DIR)/usr/share/lua/coxpcall.lua
+               $(TARGET_DIR)/usr/share/lua/5.1/coxpcall.lua
 endef
 
 $(eval $(generic-package))
index 605dcf75b304efa9e9af5a5b84d057f338b1c80f..cb8ef17289e0b0f4b6a1b9e171b1626b36876e30 100644 (file)
@@ -18,7 +18,7 @@ endef
 
 define LBASE64_INSTALL_TARGET_CMDS
        $(INSTALL) -D -m 0755 $(@D)/base64.so \
-               $(TARGET_DIR)/usr/lib/lua/base64.so
+               $(TARGET_DIR)/usr/lib/lua/5.1/base64.so
 endef
 
 $(eval $(generic-package))
index 298bcf2c38d9b15b4a6148b0bd79265591a823bb..1236d77d73cbc74ce60711d985f022f61de5f668 100644 (file)
@@ -9,6 +9,6 @@ LUA_EV_SITE = $(call github,brimworks,lua-ev,$(LUA_EV_VERSION))
 LUA_EV_DEPENDENCIES = luainterpreter libev
 LUA_EV_LICENSE = MIT
 LUA_EV_LICENSE_FILES = README
-LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua"
+LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua/5.1"
 
 $(eval $(cmake-package))
index 2c1dede5bca21c533b8757139b72e603572521b1..d4547aef6a8f6c776ee8f78e80abd9dc0db040d4 100644 (file)
@@ -15,7 +15,7 @@ define LUA_MSGPACK_NATIVE_BUILD_CMDS
 endef
 
 define LUA_MSGPACK_NATIVE_INSTALL_TARGET_CMDS
-       $(INSTALL) -m 755 -D $(@D)/msgpack.so $(TARGET_DIR)/usr/lib/lua/msgpack.so
+       $(INSTALL) -m 755 -D $(@D)/msgpack.so $(TARGET_DIR)/usr/lib/lua/5.1/msgpack.so
 endef
 
 $(eval $(generic-package))
index f82c9c5f0e22dd2a0cb921a3b79eefe018c0a95c..fd0da6eb57880f88c3e25821ab89c085c6ef2e87 100644 (file)
@@ -1,5 +1,4 @@
 Adjust installation location to /usr.
-Remove version in module paths.
 
 Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
 
@@ -7,7 +6,7 @@ Index: b/etc/lua.pc
 ===================================================================
 --- a/etc/lua.pc
 +++ b/etc/lua.pc
-@@ -8,13 +8,13 @@
+@@ -8,7 +8,7 @@
  R= 5.1.5
  
  # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
@@ -16,28 +15,16 @@ Index: b/etc/lua.pc
  INSTALL_BIN= ${prefix}/bin
  INSTALL_INC= ${prefix}/include
  INSTALL_LIB= ${prefix}/lib
- INSTALL_MAN= ${prefix}/man/man1
--INSTALL_LMOD= ${prefix}/share/lua/${V}
--INSTALL_CMOD= ${prefix}/lib/lua/${V}
-+INSTALL_LMOD= ${prefix}/share/lua
-+INSTALL_CMOD= ${prefix}/lib/lua
- # canonical vars
- exec_prefix=${prefix}
 Index: b/src/luaconf.h
 ===================================================================
 --- a/src/luaconf.h
 +++ b/src/luaconf.h
-@@ -94,9 +94,9 @@
+@@ -94,7 +94,7 @@
        ".\\?.dll;"  LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
  
  #else
 -#define LUA_ROOT      "/usr/local/"
--#define LUA_LDIR      LUA_ROOT "share/lua/5.1/"
--#define LUA_CDIR      LUA_ROOT "lib/lua/5.1/"
 +#define LUA_ROOT      "/usr/"
-+#define LUA_LDIR      LUA_ROOT "share/lua/"
-+#define LUA_CDIR      LUA_ROOT "lib/lua/"
+ #define LUA_LDIR      LUA_ROOT "share/lua/5.1/"
+ #define LUA_CDIR      LUA_ROOT "lib/lua/5.1/"
  #define LUA_PATH_DEFAULT  \
-               "./?.lua;"  LUA_LDIR"?.lua;"  LUA_LDIR"?/init.lua;" \
-                           LUA_CDIR"?.lua;"  LUA_CDIR"?/init.lua"
index 7addbe69359226385ae4d1c20b87967295fa1353..083be3572ca370b1eaeb916e915c95ff8333b84c 100644 (file)
@@ -12,12 +12,11 @@ LUABITOP_LICENSE_FILES = README
 LUABITOP_DEPENDENCIES = lua
 
 define LUABITOP_BUILD_CMDS
-       $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
+       $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) INCLUDES="-I$(STAGING_DIR)/usr/include"
 endef
 
 define LUABITOP_INSTALL_TARGET_CMDS
-       mkdir -p $(TARGET_DIR)/usr/lib/lua
-       $(INSTALL) -p $(@D)/bit.so $(TARGET_DIR)/usr/lib/lua
+       $(INSTALL) -p $(@D)/bit.so $(TARGET_DIR)/usr/lib/lua/5.1
 endef
 
 $(eval $(generic-package))
index fcb8a9a75a9a86606d7c90326709c7531cd7e68b..86be87555be0be447f2f8427a7843fbb37d460bc 100644 (file)
@@ -21,7 +21,7 @@ define LUACJSON_BUILD_CMDS
 endef
 
 define LUACJSON_INSTALL_TARGET_CMDS
-       install -D -m 0644 $(@D)/cjson.so $(TARGET_DIR)/usr/lib/lua/cjson.so
+       $(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install
 endef
 
 $(eval $(generic-package))
index 65d4355d3dee20b271839aee46ef350b8408c830..734478a7acf97591614e3a625aa26e8d4e37eef8 100644 (file)
@@ -11,7 +11,7 @@ LUAEXPAT_LICENSE      = MIT
 
 
 LUAEXPAT_MFLAGS += LUA_VERSION_NUM=501
-LUAEXPAT_MFLAGS += LUA_INC=$(STAGING_DIR)/usr/include/lua
+LUAEXPAT_MFLAGS += LUA_INC=$(STAGING_DIR)/usr/include
 LUAEXPAT_MFLAGS += EXPAT_INC=$(STAGING_DIR)/usr/include
 LUAEXPAT_MFLAGS += LIBNAME=lxp.so
 LUAEXPAT_MFLAGS += LIB_OPTION="-shared -fPIC $(TARGET_CFLAGS)"
@@ -23,8 +23,8 @@ define LUAEXPAT_BUILD_CMDS
 endef
 
 define LUAEXPAT_INSTALL_TARGET_CMDS
-       $(INSTALL) -D $(@D)/src/lxp.so $(TARGET_DIR)/usr/lib/lua/lxp.so
-       $(INSTALL) -D -m 0644 $(@D)/src/lxp/lom.lua $(TARGET_DIR)/usr/share/lua/lxp/lom.lua
+       $(INSTALL) -D $(@D)/src/lxp.so $(TARGET_DIR)/usr/lib/lua/5.1/lxp.so
+       $(INSTALL) -D -m 0644 $(@D)/src/lxp/lom.lua $(TARGET_DIR)/usr/share/lua/5.1/lxp/lom.lua
 endef
 
 $(eval $(generic-package))
index bdbbdd297a45a7a2d944c8d64937e213a49c400c..93cf6219555e8fa2a808bbcc7d62b856ad743545 100644 (file)
@@ -11,7 +11,7 @@ LUAEXPATUTILS_DEPENDENCIES = luaexpat
 
 define LUAEXPATUTILS_INSTALL_TARGET_CMDS
        $(INSTALL) -m 0644 -D $(@D)/lua/doc.lua \
-               $(TARGET_DIR)/usr/share/lua/lxp/doc.lua
+               $(TARGET_DIR)/usr/share/lua/5.1/lxp/doc.lua
 endef
 
 $(eval $(generic-package))
index c928c6ee52179d9eddbc4c23bdd3fd414f8cc5d9..908d02e2ab1efad0a0052d5ab4278d4fa38f8f08 100644 (file)
@@ -18,7 +18,7 @@ define LUAFILESYSTEM_BUILD_CMDS
 endef
 
 define LUAFILESYSTEM_INSTALL_TARGET_CMDS
-       $(INSTALL) -D $(@D)/src/lfs.so $(TARGET_DIR)/usr/lib/lua/lfs.so
+       $(INSTALL) -D $(@D)/src/lfs.so $(TARGET_DIR)/usr/lib/lua/5.1/lfs.so
 endef
 
 $(eval $(generic-package))
diff --git a/package/luajit/luajit-01-root-path.patch b/package/luajit/luajit-01-root-path.patch
deleted file mode 100644 (file)
index cc2f04f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-Adjust installation location to /usr
-
-Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/src/luaconf.h
-===================================================================
---- a/src/luaconf.h
-+++ b/src/luaconf.h
-@@ -26,9 +26,9 @@
- ** Note to distribution maintainers: do NOT patch the following line!
- ** Please read ../doc/install.html#distro and pass PREFIX=/usr instead.
- */
--#define LUA_ROOT      "/usr/local/"
--#define LUA_LDIR      LUA_ROOT "share/lua/5.1/"
--#define LUA_CDIR      LUA_ROOT "lib/lua/5.1/"
-+#define LUA_ROOT      "/usr/"
-+#define LUA_LDIR      LUA_ROOT "share/lua/"
-+#define LUA_CDIR      LUA_ROOT "lib/lua/"
- #ifdef LUA_XROOT
- #define LUA_JDIR      LUA_XROOT "share/luajit-2.0.0/"
- #define LUA_XPATH \
index b398c8c98e1b170e04def0d59a6fb9928c8dead2..b018995d9e9f83d5726b24daa938d3b83c162d4a 100644 (file)
@@ -10,7 +10,7 @@ LUAPOSIX_SOURCE = release-v$(LUAPOSIX_VERSION).tar.gz
 LUAPOSIX_LICENSE = MIT
 LUAPOSIX_LICENSE_FILES = COPYING
 LUAPOSIX_DEPENDENCIES = luainterpreter host-lua
-LUAPOSIX_CONF_OPT = --libdir="/usr/lib/lua" --datarootdir="/usr/share/lua"
+LUAPOSIX_CONF_OPT = --libdir="/usr/lib/lua/5.1" --datarootdir="/usr/share/lua/5.1"
 
 ifeq ($(BR2_PACKAGE_NCURSES),y)
     LUAPOSIX_DEPENDENCIES += ncurses
index d89f61dbb3c64c61ed6cfbe93a546cf1da30e83b..a2a2cc2998d657be3e0be6f6fd5c4819d1ccc8c1 100644 (file)
@@ -17,11 +17,9 @@ define LUASEC_BUILD_CMDS
 endef
 
 define LUASEC_INSTALL_TARGET_CMDS
-       mkdir -p $(TARGET_DIR)/usr/share/lua
-       mkdir -p $(TARGET_DIR)/usr/lib/lua
        $(MAKE) -C $(@D) \
-               LUAPATH="$(TARGET_DIR)/usr/share/lua" \
-               LUACPATH="$(TARGET_DIR)/usr/lib/lua" install
+               LUAPATH="$(TARGET_DIR)/usr/share/lua/5.1" \
+               LUACPATH="$(TARGET_DIR)/usr/lib/lua/5.1" install
 endef
 
 $(eval $(generic-package))
index 6a2d4c8b6b6cc161eeac88789b69849b183f9fa6..a55fe178e2adb0f54488d7d14181572e2ff493a8 100644 (file)
@@ -18,8 +18,8 @@ endef
 
 define LUASOCKET_INSTALL_TARGET_CMDS
        $(MAKE) -C $(@D) -f makefile \
-               INSTALL_TOP_SHARE="$(TARGET_DIR)/usr/share/lua" \
-               INSTALL_TOP_LIB="$(TARGET_DIR)/usr/lib/lua" install
+               INSTALL_TOP_SHARE="$(TARGET_DIR)/usr/share/lua/5.1" \
+               INSTALL_TOP_LIB="$(TARGET_DIR)/usr/lib/lua/5.1" install
 endef
 
 $(eval $(generic-package))
index 62d0cf80fc09e13d67ed41b50722f0d1b5cbae13..a1447cc22be3324dd28a887302feea3da4b478f9 100644 (file)
@@ -27,9 +27,8 @@ define LUASQL_BUILD_CMDS
 endef
 
 define LUASQL_INSTALL_TARGET_CMDS
-       $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) PREFIX=/usr \
-               LUA_DIR="$(TARGET_DIR)/usr/share/lua" \
-               LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" install
+       $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) \
+               PREFIX="$(TARGET_DIR)/usr" install
 endef
 
 $(eval $(generic-package))
index ba1142fe35fd83162414dac5098f23fb1fb9aa7d..711589665fe561bce695ffbd713fe08ea9ccc898 100644 (file)
@@ -11,7 +11,7 @@ ORBIT_LICENSE_FILES = doc/us/license.md
 
 define ORBIT_INSTALL_TARGET_CMDS
        $(MAKE) -C $(@D) \
-               LUA_DIR=$(TARGET_DIR)/usr/share/lua/ \
+               LUA_DIR=$(TARGET_DIR)/usr/share/lua/5.1/ \
                BIN_DIR=$(TARGET_DIR)/usr/bin \
                install
 endef
index 47d25b6781e78fdc1c8daaeecb7258ac88cda7d9..fe1c2b2e7c90f8dfbcdfced64cc4e83652d096f8 100644 (file)
@@ -14,8 +14,7 @@ define RINGS_BUILD_CMDS
 endef
 
 define RINGS_INSTALL_TARGET_CMDS
-       $(MAKE) -C $(@D) LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" \
-               LUA_DIR="$(TARGET_DIR)/usr/share/lua" install
+       $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)/usr" install
 endef
 
 $(eval $(generic-package))
index ba917a62483563e004b94713fa2e418bcf1535c4..46baebf84c72682445b76e66b2f6ff397569a83d 100644 (file)
@@ -9,9 +9,9 @@ WSAPI_SITE = http://github.com/downloads/keplerproject/wsapi
 WSAPI_LICENSE = MIT
 
 define WSAPI_INSTALL_TARGET_CMDS
-       mkdir -p $(TARGET_DIR)/usr/share/lua/wsapi
+       mkdir -p $(TARGET_DIR)/usr/share/lua/5.1/wsapi
        $(INSTALL) -m 0644 -D $(@D)/src/wsapi/*.lua \
-               $(TARGET_DIR)/usr/share/lua/wsapi
+               $(TARGET_DIR)/usr/share/lua/5.1/wsapi
 endef
 
 $(eval $(generic-package))
index 9381c0289bec05bc60c1e231ad741cc3951f9b98..7c01ee61ea20f319475387cb074ffa190140a56b 100644 (file)
@@ -9,9 +9,7 @@ XAVANTE_SITE = http://github.com/downloads/keplerproject/xavante
 XAVANTE_LICENSE = MIT
 
 define XAVANTE_INSTALL_TARGET_CMDS
-       $(MAKE) -C $(@D) PREFIX=/usr \
-               LUA_DIR="$(TARGET_DIR)/usr/share/lua" \
-               LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" install
+       $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)/usr" install
 endef
 
 $(eval $(generic-package))