/[gentoo-x86]/dev-lang/luajit/luajit-1.1.6.ebuild
Gentoo

Contents of /dev-lang/luajit/luajit-1.1.6.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Oct 13 00:07:11 2010 UTC (3 years, 9 months ago) by rafaelmartins
Branch: MAIN
CVS Tags: HEAD
Initial commit. (bugs #313005 and #317707)

(Portage version: 2.2_rc89/cvs/Linux i686)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit pax-utils
8
9 MY_P="LuaJIT-${PV}"
10
11 DESCRIPTION="A Just-In-Time Compiler for the Lua programming language."
12 HOMEPAGE="http://luajit.org/"
13 SRC_URI="http://luajit.org/download/${MY_P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="1"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="readline"
19
20 DEPEND="readline? ( sys-libs/readline )"
21 RDEPEND="${DEPEND}"
22
23 S="${WORKDIR}/${MY_P}"
24
25 src_prepare(){
26 # fixing prefix
27 sed -i -e "s#/usr/local#${D}/usr#" Makefile \
28 || die "failed to fix prefix in Makefile"
29 sed -i -e 's#/usr/local/#/usr/#' src/luaconf.h \
30 || die "failed to fix prefix in luaconf.h"
31
32 # forcing the use of our CFLAGS
33 sed -i -e "s/\$(MYCFLAGS)/\$(MYCFLAGS) ${CFLAGS}/" src/Makefile \
34 || die "failed to force the use of the CFLAGS from the user"
35 }
36
37 src_compile(){
38 if use readline; then
39 emake linux_rl || die "emake failed."
40 else
41 emake linux || die "emake failed."
42 fi
43 }
44
45 src_install(){
46 einstall
47
48 # removing empty dir that was supposed to have the man pages.
49 # dev-lang/luajit:1 doesn't install man pages.
50 rm -rf "${D}usr/man"
51
52 mv "${D}usr/bin/luajit" "${D}usr/bin/luajit-${PV}" || die "mv failed!"
53 pax-mark m "${D}usr/bin/luajit-${PV}"
54 dosym "luajit-${PV}" "/usr/bin/luajit-${SLOT}"
55 }

  ViewVC Help
Powered by ViewVC 1.1.20