Skip to content

Commit

Permalink
dev-ada/libadalang: Fix test for new libgpr
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Tupone <[email protected]>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
  • Loading branch information
atupone committed Nov 14, 2018
1 parent 0702e38 commit e96e3f0
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
20 changes: 20 additions & 0 deletions dev-ada/libadalang/files/libadalang-2017-gentoo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/ada/testsuite/python_support/utils.py 2018-11-14 22:21:36.366873970 +0100
+++ b/ada/testsuite/python_support/utils.py 2018-11-14 22:21:59.397477086 +0100
@@ -28,6 +28,7 @@
library_kind = 'static' if LAL_DISABLE_SHARED else 'relocatable'
argv.extend([
'-XLIBRARY_TYPE={}'.format(library_kind),
+ '-XGPR_BUILD={}'.format(library_kind),
'-XXMLADA_BUILD={}'.format(library_kind),
])
subprocess.check_call(argv)
--- a/ada/testsuite/testsuite_support/base_driver.py 2018-11-14 22:22:37.698817058 +0100
+++ b/ada/testsuite/testsuite_support/base_driver.py 2018-11-14 22:30:37.631613448 +0100
@@ -310,6 +310,7 @@
"""
library_type = 'static' if self.disable_shared else 'relocatable'
return ['-XLIBRARY_TYPE={}'.format(library_type),
+ '-XGPR_BUILD={}'.format(library_type),
'-XXMLADA_BUILD={}'.format(library_type)]

#
51 changes: 51 additions & 0 deletions dev-ada/libadalang/libadalang-2017-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 1999-2018 Gentoo Authors
# 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"

LICENSE="GPL-3 gcc-runtime-library-exception-3.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gnat_2016 +gnat_2017"

RDEPEND="dev-python/pyyaml
dev-ada/gnatcoll[projects,shared,gnat_2016=,gnat_2017=]
${PYTHON_DEPS}"
DEPEND="${RDEPEND}
dev-ada/langkit"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

S="${WORKDIR}"/${PN}-gps-src

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

src_prepare() {
default
rm -r ada/testsuite/tests/acats_parse || die
}

src_configure() {
ada/manage.py generate || die
}

src_compile() {
ada/manage.py --verbosity=debug build || die
}

src_test () {
ada/manage.py test | grep FAILED && die
}

src_install () {
ada/manage.py install "${D}"usr
python_domodule build/python/libadalang.py
}

0 comments on commit e96e3f0

Please sign in to comment.