Created
May 15, 2010 14:27
-
-
Save thotypous/402216 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 1999-2009 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# $Header: $ | |
EAPI="2" | |
inherit pax-utils | |
DESCRIPTION="A Just-In-Time Compiler for the Lua* programming language." | |
HOMEPAGE="http://luajit.org/" | |
SRC_URI="http://luajit.org/download/${P}.tar.gz" | |
LICENSE="MIT" | |
SLOT="1" | |
KEYWORDS="~x86 ~amd64" | |
IUSE="readline" | |
DEPEND="readline? ( sys-libs/readline )" | |
RDEPEND="${DEPEND}" | |
src_prepare(){ | |
# fixing prefix | |
sed -i -e "s#/usr/local#${D}/usr#" Makefile || die "sed failed!" | |
sed -i -e 's#/usr/local/#/usr/#' src/luaconf.h || die "sed failed!" | |
# forcing the use of our CFLAGS | |
sed -i -e "s/\$(MYCFLAGS)/\$(MYCFLAGS) ${CFLAGS}/" src/Makefile || die "sed | |
failed!" | |
} | |
src_compile(){ | |
if use readline ; then | |
emake linux_rl | |
else | |
emake linux | |
fi | |
} | |
src_install(){ | |
einstall | |
mv "${D}usr/bin/luajit" "${D}usr/bin/luajit-${PV}" || die "mv failed!" | |
pax-mark m "${D}usr/bin/luajit-${PV}" | |
dosym "luajit-${PV}" "/usr/bin/luajit-${SLOT}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment