Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2016 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Id$ |
4 |
|
5 |
EAPI=6 |
6 |
|
7 |
inherit flag-o-matic |
8 |
|
9 |
MY_PN="MoarVM" |
10 |
|
11 |
DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6" |
12 |
HOMEPAGE="http://moarvm.org" |
13 |
SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz" |
14 |
LICENSE="Artistic-2" |
15 |
SLOT="0" |
16 |
KEYWORDS="~amd64 ~x86" |
17 |
IUSE="asan clang debug doc +jit static-libs +system-libs optimize ubsan" |
18 |
|
19 |
RDEPEND="system-libs? ( dev-libs/libatomic_ops |
20 |
dev-libs/libtommath |
21 |
dev-libs/libuv |
22 |
jit? ( dev-lang/lua:0[deprecated] |
23 |
dev-lua/LuaBitOp ) |
24 |
virtual/libffi ) |
25 |
" |
26 |
DEPEND="${RDEPEND} |
27 |
clang? ( >=sys-devel/clang-3.1 ) |
28 |
dev-lang/perl |
29 |
dev-perl/extutils-pkgconfig" |
30 |
|
31 |
REQUIRED_USE="asan? ( clang )" |
32 |
S="${WORKDIR}/MoarVM-${PV}" |
33 |
PATCHES=( "${FILESDIR}/Configure-2016.03.patch" ) |
34 |
DOCS=( CREDITS README.markdown ) |
35 |
|
36 |
src_prepare() { |
37 |
eapply "${PATCHES[@]}" |
38 |
eapply_user |
39 |
use doc && DOCS+=( docs/* ) |
40 |
} |
41 |
|
42 |
src_configure() { |
43 |
local myconfigargs=( |
44 |
"--prefix=/usr" |
45 |
"--libdir=$(get_libdir)" |
46 |
"--compiler=$(usex clang clang gcc)" |
47 |
"$(usex asan --asan)" |
48 |
"$(usex debug --debug --no-debug)" |
49 |
"$(usex jit --lua=/usr/bin/lua --no-jit)" |
50 |
"$(usex optimize --optimize --no-optimize)" |
51 |
"$(usex static-libs --static)" |
52 |
"$(usex system-libs --has-libtommath)" |
53 |
"$(usex system-libs --has-libuv)" |
54 |
"$(usex system-libs --has-libatomic_ops)" |
55 |
"$(usex system-libs --has-libffi)" |
56 |
"$(usex ubsan --ubsan)" |
57 |
) |
58 |
use optimize && filter-flags '-O*' |
59 |
|
60 |
perl Configure.pl "${myconfigargs[@]}" || die |
61 |
} |