this release includes my 2 requests, see http://www.freelists.org/post/luajit/LuaJIT-on-Buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
===================================================================
--- a/src/luaconf.h
+++ b/src/luaconf.h
-@@ -22,9 +22,9 @@
- #define LUA_CPATH_DEFAULT \
- ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
- #else
+@@ -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_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-beta10/"
+ #define LUA_JDIR LUA_XROOT "share/luajit-2.0.0-beta11/"
#define LUA_XPATH \
===================================================================
--- a/src/Makefile
+++ b/src/Makefile
-@@ -629,7 +629,7 @@
+@@ -669,7 +669,7 @@
$(LUAJIT_T): $(TARGET_O) $(LUAJIT_O) $(TARGET_DEP)
$(E) "LINK $@"
===================================================================
--- a/src/Makefile
+++ b/src/Makefile
-@@ -625,12 +625,10 @@
+@@ -665,12 +665,10 @@
$(LUAJIT_SO): $(LJVMCORE_O)
$(E) "DYNLINK $@"
$(Q)$(TARGET_LD) $(TARGET_ASHLDFLAGS) -o $@ $(LJVMCORE_DYNO) $(TARGET_ALIBS)
===================================================================
--- a/Makefile
+++ b/Makefile
-@@ -41,8 +41,7 @@
+@@ -43,8 +43,7 @@
INSTALL_MAN= $(INSTALL_SHARE)/man/man1
INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig
INSTALL_ANAME= libluajit-$(ABIVER).a
INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER)
INSTALL_SOSHORT= libluajit-$(ABIVER).so
-@@ -56,7 +55,6 @@
+@@ -58,7 +57,6 @@
INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT)
INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT)
INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME)
INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME)
INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \
-@@ -114,13 +112,6 @@
+@@ -120,13 +118,6 @@
$(RM) $(FILE_PC).tmp
cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC)
- cd lib && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
+ cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
- @echo "==== Successfully installed LuaJIT $(VERSION) to $(PREFIX) ===="
- @echo ""
- @echo "Note: the beta releases deliberately do NOT install a symlink for luajit"
- @echo " $(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)"
- @echo ""
- ##############################################################################
-
+ uninstall:
+ @echo "==== Uninstalling LuaJIT $(VERSION) from $(PREFIX) ===="
#
#############################################################
-LUAJIT_VERSION = 2.0.0-beta10
+LUAJIT_VERSION = 2.0.0-beta11
LUAJIT_SOURCE = LuaJIT-$(LUAJIT_VERSION).tar.gz
LUAJIT_SITE = http://luajit.org/download
LUAJIT_LICENSE = MIT
LUAJIT_INSTALL_STAGING = YES
-define LUAJIT_NOLARGEFILE_FIX_MAKEFILE
- $(SED) 's/TARGET_XCFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE/TARGET_XCFLAGS=/' $(@D)/src/Makefile
-endef
-
ifneq ($(BR2_LARGEFILE),y)
-LUAJIT_POST_PATCH_HOOKS += LUAJIT_NOLARGEFILE_FIX_MAKEFILE
+LUAJIT_NO_LARGEFILE = TARGET_LFSFLAGS=
endif
# The luajit build procedure requires the host compiler to have the
HOST_CC="$(LUAJIT_HOST_CC)" \
HOST_CFLAGS="$(HOST_CFLAGS)" \
HOST_LDFLAGS="$(HOST_LDFLAGS)" \
+ $(LUAJIT_NO_LARGEFILE) \
-C $(@D) amalg
endef
$(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" -C $(@D) install
endef
+define LUAJIT_UNINSTALL_STAGING_CMDS
+ $(MAKE) PREFIX="/usr" DESTDIR="$(STAGING_DIR)" -C $(@D) uninstall
+endef
+
+define LUAJIT_UNINSTALL_TARGET_CMDS
+ $(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" -C $(@D) uninstall
+endef
+
define LUAJIT_CLEAN_CMDS
-$(MAKE) -C $(@D) clean
endef