diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2008-07-30 18:15:19 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2008-07-30 18:15:19 +0000 |
commit | 526a9514da1660c103bdd2f0be4ad8fa1ed80819 (patch) | |
tree | 3a312896deee09fc926b2e92dc18122aa8cddf62 /rules/lua.make | |
parent | 7a58a4130bc5f0dd55baa6d48a55092af39040a3 (diff) | |
download | ptxdist-526a9514da1660c103bdd2f0be4ad8fa1ed80819.tar.gz ptxdist-526a9514da1660c103bdd2f0be4ad8fa1ed80819.tar.xz |
* lua: Add lua support to ptxdist 1.99
From: Erwin Rol <erwin@erwinrol.com>
This patch add lua support to ptxdist 1.99. It has a menu entry
under scripting languages. And a patch that makes it possible
to use autoconf to build.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@8698 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/lua.make')
-rw-r--r-- | rules/lua.make | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/rules/lua.make b/rules/lua.make new file mode 100644 index 000000000..292a09e0b --- /dev/null +++ b/rules/lua.make @@ -0,0 +1,131 @@ +# -*-makefile-*- +# $Id: template-make 8509 2008-06-12 12:45:40Z mkl $ +# +# Copyright (C) 2008 by Erwin Rol +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_LUA) += lua + +# +# Paths and names +# +LUA_VERSION := 5.1.3 +LUA := lua-$(LUA_VERSION) +LUA_SUFFIX := tar.gz +LUA_URL := http://www.lua.org/ftp//$(LUA).$(LUA_SUFFIX) +LUA_SOURCE := $(SRCDIR)/$(LUA).$(LUA_SUFFIX) +LUA_DIR := $(BUILDDIR)/$(LUA) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(LUA_SOURCE): + @$(call targetinfo) + @$(call get, LUA) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +$(STATEDIR)/lua.extract: + @$(call targetinfo) + @$(call clean, $(LUA_DIR)) + @$(call extract, LUA) + @$(call patchin, LUA) + cd $(LUA_DIR) && chmod +x configure + @$(call touch) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +LUA_PATH := PATH=$(CROSS_PATH) +LUA_ENV := $(CROSS_ENV) + +# +# autoconf +# +LUA_AUTOCONF := $(CROSS_AUTOCONF_USR) +ifdef PTXCONF_LUA_READLINE +LUA_AUTOCONF += --with-readline +else +LUA_AUTOCONF += --without-readline +endif + +$(STATEDIR)/lua.prepare: + @$(call targetinfo) + @$(call clean, $(LUA_DIR)/config.cache) + cd $(LUA_DIR) && \ + $(LUA_PATH) $(LUA_ENV) \ + ./configure $(LUA_AUTOCONF) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/lua.compile: + @$(call targetinfo) + cd $(LUA_DIR) && $(LUA_PATH) $(MAKE) $(PARALLELMFLAGS) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/lua.install: + @$(call targetinfo) + @$(call install, LUA) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/lua.targetinstall: + @$(call targetinfo) + + @$(call install_init, lua) + @$(call install_fixup, lua,PACKAGE,lua) + @$(call install_fixup, lua,PRIORITY,optional) + @$(call install_fixup, lua,VERSION,$(LUA_VERSION)) + @$(call install_fixup, lua,SECTION,base) + @$(call install_fixup, lua,AUTHOR,"Erwin Rol <erwin\@erwinrol.com>") + @$(call install_fixup, lua,DEPENDS,) + @$(call install_fixup, lua,DESCRIPTION,missing) + +ifdef PTXCONF_LUA_INSTALL_LUA + @$(call install_copy, lua, 0, 0, 0755, $(LUA_DIR)/src/lua, /usr/bin/lua) +endif +ifdef PTXCONF_LUA_INSTALL_LUAC + @$(call install_copy, lua, 0, 0, 0755, $(LUA_DIR)/src/luac, /usr/bin/luac) +endif +ifdef PTXCONF_LUA_INSTALL_LIBLUA + @$(call install_copy, lua, 0, 0, 0644, \ + $(LUA_DIR)/src/.libs/liblua-5.1.3.so, \ + /usr/lib/liblua-5.1.3.so) + @$(call install_link, lua, liblua-5.1.3.so, /usr/lib/liblua.so ) +endif + @$(call install_finish, lua) + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +lua_clean: + rm -rf $(STATEDIR)/lua.* + rm -rf $(PKGDIR)/lua_* + rm -rf $(LUA_DIR) + +# vim: syntax=make |