[vlc-commits] contrib: luac: add luac cross-compiler
Rémi Denis-Courmont
git at videolan.org
Sat Aug 6 15:38:55 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 6 16:09:12 2016 +0300| [0e9596f4f84ca05e48de238a16c0a496eb84983d] | committer: Rémi Denis-Courmont
contrib: luac: add luac cross-compiler
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0e9596f4f84ca05e48de238a16c0a496eb84983d
---
contrib/src/lua/rules.mak | 20 +++++++++++++++++---
contrib/src/main.mak | 3 +++
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index 5883418..0d3390f 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -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 $@
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 6f57cad..fad1d15 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -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
More information about the vlc-commits
mailing list