Fixed python dep.
(Portage version: 2.2.0_alpha41/hg/Linux x86_64, signed Manifest commit with key 0293536F)
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 # @MAINTAINER: rafael@rafaelmartins.com
7 # @BLURB: A utility eclass that should be inherited by anything that deals with
9 # @DESCRIPTION: Some useful functions for dealing with Lua. Based on Python eclass
13 if [[ -n "${NEED_LUA}" ]]; then
14 LUA_ATOM=">=dev-lang/lua-${NEED_LUA}"
16 LUA_ATOM="dev-lang/lua"
22 __lua_version_extract() {
24 export LUAVER_MAJOR=${verstr:0:1}
25 export LUAVER_MINOR=${verstr:2:1}
26 if [[ ${verstr:3:1} == . ]]; then
27 export LUAVER_MICRO=${verstr:4}
29 export LUAVER="${LUAVER_MAJOR}.${LUAVER_MINOR}"
33 [[ -n "${LUAVER}" ]] && return 0
35 lua=${lua:-/usr/bin/lua}
36 tmparr=( $(${lua} -v 2>&1 ) )
37 export LUAVER_ALL="${tmparr[1]}"
38 __lua_version_extract $LUAVER_ALL
41 __lua_install_paths() {
42 export LUA_LMOD="/usr/share/lua/${LUAVER}"
43 export LUA_CMOD="/usr/$(get_libdir)/lua/${LUAVER}"
47 lua_cmodules_install() {
48 local module=$(basename ${1})
49 einfo "Installing shared object module: ${2}/${module}"
50 install -Dm0755 "${1}" "${D}/${LUA_CMOD}/${2:-.}/${module}"
53 lua_lmodules_install() {
54 local module=$(basename ${1})
55 einfo "Installing Lua Module: ${2}/${module}"
56 install -Dm0644 "${1}" "${D}/${LUA_LMOD}/${2:-.}/${module}"