forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libadalang-2017.ebuild
73 lines (61 loc) · 2.04 KB
/
libadalang-2017.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit python-single-r1
DESCRIPTION="high performance semantic engine for the Ada programming language"
HOMEPAGE="https://libre.adacore.com/"
SRC_URI="http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deed042
-> ${P}-src.tar.gz
mirror://sourceforge/quex/quex-0.65.4.tar.gz
http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deed044
-> langkit-gps-src-${PV}.tar.gz"
LICENSE="GPL-3 gcc-runtime-library-exception-3.1"
SLOT="0"
KEYWORDS="~amd64"
IUSE="gnat_2016 gnat_2017"
RDEPEND="dev-python/pyyaml
${PYTHON_DEPS}"
DEPEND="${RDEPEND}
dev-python/virtualenv
dev-ada/gnatcoll[projects,shared,gnat_2016=,gnat_2017=]
dev-python/docutils
dev-python/mako
dev-python/enum34
dev-python/funcy"
#REQUIRED_USE="gnat_2016 !gnat_2017 ${PYTHON_REQUIRED_USE}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
S="${WORKDIR}"
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
src_prepare() {
default
rm -r ${PN}-gps-src/ada/testsuite/tests/{acats_parse,stylechecks} || die
}
src_compile() {
cd ${PN}-gps-src
mkdir bin
ln -sf /usr/bin/gnatbind-4.9.4 bin/gnatbind
PATH=$PATH:${PWD}/bin \
QUEX_PATH="${WORKDIR}"/quex-0.65.4 \
PYTHONPATH=${PYTHONPATH}:"${WORKDIR}"/langkit-gps-src \
GCC=${CHOST}-gcc-4.9.4 ada/manage.py make || die
}
src_test () {
local myDir="${WORKDIR}"/${PN}-gps-src
cd ${PN}-gps-src/ada/testsuite
ln -sf "${myDir}"/build/include/libadalang.h c_support/libadalang.h
#./testsuite.py --show-error-output |& grep FAILED && die "Test failed"
GPR_PROJECT_PATH="${myDir}"/build/lib/gnat \
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:"${myDir}"/build/lib/libadalang.relocatable \
PYTHONPATH="${myDir}"/build/python \
PATH=${PATH}:"${myDir}"/build/bin ./testsuite.py --show-error-output
rm c_support/libadalang.h
cd -
}
src_install () {
cd ${PN}-gps-src
QUEX_PATH="${WORKDIR}"/quex-0.65.4 \
PYTHONPATH=${PYTHONPATH}:"${WORKDIR}"/langkit-gps-src \
ada/manage.py install "${D}"usr
python_domodule build/python/libadalang.py
}