]> Pileus Git - ~andy/sunrise/blob - dev-lua/luvit/luvit-0.3.1-r1.ebuild
8135a1eceac0259fa190e0379d3d2f562e3d1279
[~andy/sunrise] / dev-lua / luvit / luvit-0.3.1-r1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=4
6
7 inherit eutils toolchain-funcs multilib
8
9 DESCRIPTION="Takes node.js' architecture and dependencies and fits it in the Lua language"
10 HOMEPAGE="http://luvit.io/"
11 SRC_URI="http://${PN}.io/dist/${PV}/${P}.tar.gz"
12
13 KEYWORDS="~amd64 ~x86"
14 SLOT="0"
15 IUSE=""
16 LICENSE="Apache-2.0 MIT"
17
18 # fails in portage environment
19 # succeeds if run manually
20 RESTRICT="test"
21
22 RDEPEND="dev-lang/luajit:2
23         dev-libs/openssl:0
24         >=dev-libs/yajl-2.0.2
25         >=dev-lua/luacrypto-0.3.1
26         net-libs/http-parser
27         =dev-libs/libuv-0.7.6_p20120404
28         sys-libs/zlib"
29 DEPEND="${RDEPEND}
30         virtual/pkgconfig"
31
32 src_prepare() {
33         epatch "${FILESDIR}"/${PVR}-makefile.patch
34
35         sed \
36                 -e "s:^YAJL_VERSION=.*:YAJL_VERSION=$(pkg-config --modversion yajl):" \
37                 -e "s:^LUAJIT_VERSION=.*:LUAJIT_VERSION=$(pkg-config --modversion luajit):" \
38                 -e "s:^UV_VERSION=.*:UV_VERSION=0.7.6_p20120404:" \
39                 -i Makefile || die "sed failed"
40 }
41
42 src_configure() {
43         # skip python build system
44         :
45 }
46
47 src_compile() {
48         rm -r deps || die
49
50         tc-export CC AR
51         emake PREFIX=/usr all
52 }
53
54 src_install() {
55         emake \
56                 PREFIX=/usr \
57                 LIBDIR=$(get_libdir) \
58                 DESTDIR="${D}" \
59                 install
60 }