# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 [[ "${PV}" = *9999* ]] && live=git-r3 inherit eutils toolchain-funcs ${live} DESCRIPTION="POSIX binding, including curses, for Lua 5.1 and 5.2" HOMEPAGE="https://github.com/luaposix/luaposix" if [[ "${PV}" = *9999* ]] ; then EGIT_REPO_URI="https://github.com/luaposix/${PN}.git" else SRC_URI="https://github.com/luaposix/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" fi LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~ia64" IUSE="luajit ncurses ncursesw" DEPEND="!luajit? ( >=dev-lang/lua-5.1 ) luajit? ( dev-lang/luajit:2 )" RDEPEND="${DEPEND} !luajit? ( || ( >=dev-lang/lua-5.2 dev-lua/LuaBitOp ) )" DEPEND="${DEPEND} dev-lua/LDoc" DOCS=( "README.md" "NEWS" ) src_prepare() { if [[ -n ${EVCS_OFFLINE} ]]; then die "Unfortunately, upstream uses buildsystem which depends on external submodules, so you won't be able to build package in offline mode. Sorry." fi ./bootstrap } src_configure() { local lua=lua pkg_config="$(tc-getPKG_CONFIG)" use luajit && lua=luajit econf \ LUA="${lua}" \ LUA_INCLUDE="-I$(${pkg_config} --variable includedir ${lua})" \ --datadir="$(${pkg_config} --variable INSTALL_LMOD ${lua})" \ --libdir="$(${pkg_config} --variable INSTALL_CMOD ${lua})" \ $(use_with ncurses) \ $(use_with ncursesw) } src_compile() { emake -j1 }