summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Martins <rafaelmartins@gentoo.org>2010-10-13 00:07:11 +0000
committerRafael Martins <rafaelmartins@gentoo.org>2010-10-13 00:07:11 +0000
commit4b1e8b9245808dbf0002ad676b13a4538dee9946 (patch)
tree1ce22f96bfb1ef72e4c6dd4dc39a4f686b2ad51f /dev-lang/luajit/luajit-1.1.6.ebuild
parentInitial import (diff)
downloadgentoo-2-4b1e8b9245808dbf0002ad676b13a4538dee9946.tar.gz
gentoo-2-4b1e8b9245808dbf0002ad676b13a4538dee9946.tar.bz2
gentoo-2-4b1e8b9245808dbf0002ad676b13a4538dee9946.zip
Initial commit. (bugs #313005 and #317707)
(Portage version: 2.2_rc89/cvs/Linux i686)
Diffstat (limited to 'dev-lang/luajit/luajit-1.1.6.ebuild')
-rw-r--r--dev-lang/luajit/luajit-1.1.6.ebuild55
1 files changed, 55 insertions, 0 deletions
diff --git a/dev-lang/luajit/luajit-1.1.6.ebuild b/dev-lang/luajit/luajit-1.1.6.ebuild
new file mode 100644
index 000000000000..f3dc4e4b68c3
--- /dev/null
+++ b/dev-lang/luajit/luajit-1.1.6.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/luajit/luajit-1.1.6.ebuild,v 1.1 2010/10/13 00:07:11 rafaelmartins Exp $
+
+EAPI="2"
+
+inherit pax-utils
+
+MY_P="LuaJIT-${PV}"
+
+DESCRIPTION="A Just-In-Time Compiler for the Lua programming language."
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="1"
+KEYWORDS="~amd64 ~x86"
+IUSE="readline"
+
+DEPEND="readline? ( sys-libs/readline )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ # fixing prefix
+ sed -i -e "s#/usr/local#${D}/usr#" Makefile \
+ || die "failed to fix prefix in Makefile"
+ sed -i -e 's#/usr/local/#/usr/#' src/luaconf.h \
+ || die "failed to fix prefix in luaconf.h"
+
+ # forcing the use of our CFLAGS
+ sed -i -e "s/\$(MYCFLAGS)/\$(MYCFLAGS) ${CFLAGS}/" src/Makefile \
+ || die "failed to force the use of the CFLAGS from the user"
+}
+
+src_compile(){
+ if use readline; then
+ emake linux_rl || die "emake failed."
+ else
+ emake linux || die "emake failed."
+ fi
+}
+
+src_install(){
+ einstall
+
+ # removing empty dir that was supposed to have the man pages.
+ # dev-lang/luajit:1 doesn't install man pages.
+ rm -rf "${D}usr/man"
+
+ 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}"
+}