summaryrefslogtreecommitdiff
blob: a07971aa8bbf95bbed42ad8fc99a032ed6af4d46 (plain)
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
# 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 autotools

MYP=${PN}-gpl-${PV}-src

DESCRIPTION="The GNAT Programming Studio"
HOMEPAGE="http://libre.adacore.com/tools/gps/"
SRC_URI="http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deed03b
	-> ${MYP}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

RDEPEND="${PYTHON_DEPS}
	>=dev-ada/gnatcoll-2017[gtk,iconv,projects,pygobject,shared,sqlite,tools]
	>=dev-ada/gtkada-2017
	dev-ada/libadalang
	dev-libs/gobject-introspection
	dev-libs/libffi
	sys-devel/llvm:=
	sys-devel/clang:=
	x11-themes/adwaita-icon-theme
	x11-themes/hicolor-icon-theme
	dev-python/pep8[${PYTHON_USEDEP}]
	dev-python/jedi[${PYTHON_USEDEP}]"

DEPEND="${RDEPEND}"

S="${WORKDIR}"/${MYP}

PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )

pkg_setup() {
	GCC=${ADA:-$(tc-getCC)}
	GNATLS="${GCC/gcc/gnatls}"
	GNAT="${GCC/gcc/gnat}"
	GNATMAKE="${GCC/gcc/gnatmake}"
	if [[ -z "$(type ${GNATLS} 2>/dev/null)" ]] ; then
		eerror "You need a gcc compiler that provides the Ada Compiler:"
		eerror "1) use gcc-config to select the right compiler or"
		eerror "2) set ADA=gcc-6.3.0 in make.conf"
		die "ada compiler not available"
	fi
	python-single-r1_pkg_setup
}

src_prepare() {
	default
	mv configure.{in,ac} || die
	sed -i \
		-e "s:@GNATMAKE@:${GNATMAKE}:g" \
		-e "s:@GNAT@:${GNAT}:g" \
		aclocal.m4 \
		|| die
	eautoreconf
}

src_compile() {
	emake GPRBUILD_FLAGS="-v ${MAKEOPTS}"
}