Commit 0e9596f4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

contrib: luac: add luac cross-compiler

parent 153ebafd
......@@ -25,12 +25,12 @@ LUA_TARGET := solaris
endif
# Feel free to add autodetection if you need to...
PKGS += lua
PKGS += lua luac
ifeq ($(call need_pkg,"lua5.2"),)
PKGS_FOUND += lua
PKGS_FOUND += lua luac
endif
ifeq ($(call need_pkg,"lua5.1"),)
PKGS_FOUND += lua
PKGS_FOUND += lua luac
endif
$(TARBALLS)/lua-$(LUA_VERSION).tar.gz:
......@@ -81,3 +81,17 @@ ifdef HAVE_WIN32
cp $</etc/lua.pc "$(PREFIX)/lib/pkgconfig/"
endif
touch $@
luac: lua-$(LUA_VERSION).tar.gz .sum-lua
# DO NOT use the same intermediate directory as the lua target
rm -Rf -- $@-$(LUA_VERSION) $@
mkdir -- $@-$(LUA_VERSION)
tar -x -v -z -C $@-$(LUA_VERSION) --strip-components=1 -f $<
(cd luac-$(LUA_VERSION) && patch -p1) < $(SRC)/lua/luac-32bits.patch
mv luac-$(LUA_VERSION) luac
.luac: luac
cd $< && $(MAKE) generic
mkdir -p -- $(BUILDBINDIR)
cp -fv -- $</src/luac $(BUILDBINDIR)/$(HOST)-luac
touch $@
......@@ -32,6 +32,9 @@ CONTRIB_VIDEOLAN := http://downloads.videolan.org/pub/contrib
PREFIX ?= $(TOPDST)/$(HOST)
PREFIX := $(abspath $(PREFIX))
BUILDPREFIX ?= $(TOPDST)
BUILDPREFIX := $(abspath $(BUILDPREFIX))
BUILDBINDIR ?= $(BUILDPREFIX)/bin
ifneq ($(HOST),$(BUILD))
HAVE_CROSS_COMPILE = 1
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment