dev-ada/langkit: bump to 2019
authorTupone Alfredo <tupone@gentoo.org>
Sun, 9 Jun 2019 19:02:36 +0000 (21:02 +0200)
committerTupone Alfredo <tupone@gentoo.org>
Sun, 9 Jun 2019 19:02:36 +0000 (21:02 +0200)
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11

dev-ada/langkit/Manifest
dev-ada/langkit/files/langkit-2019-gentoo.patch [new file with mode: 0644]
dev-ada/langkit/langkit-2019.ebuild [new file with mode: 0644]

index bdd44e3183f9103a3c17dc3c5b064779e24fbfea..da77d80482bf937d1d167c0e6c495fd599281072 100644 (file)
@@ -1,2 +1,3 @@
+DIST langkit-2019-20190510-19B8C-src.tar.gz 699205 BLAKE2B 770f904cf2a2014dc6ed6383d3be51361a311d1feb5d594bf9e81ab80a01835ac0b24cd743539a70dff2120307b25a61f781586b504d910401018afcf3b8ae7b SHA512 fbaac1b6407292396711d3deba3a7b5eef6655b877c5515a3653699decdbb2c9824b42bb8e9680122a3ac6ac3eb605333eda7c0265fafd6ab2d117f932790b3b
 DIST langkit-gpl-2018.tar.gz 565649 BLAKE2B e18beea565351eb4b10baa9168db742598817d231c5eab578b17c2b0409ac77b9972f8f426499e086779eaeda0ac1ba11e5cb3b47ecab8e63674b7ef654b26b7 SHA512 62a8820c3fd3d44f6cd22e181f6eddcf52945c93ea5eb793a63b7f13e71705807170b0cc4c3873b127e3fafe751a5dd27da54087986f506f8500b916ef1f078f
 DIST langkit-gps-src-2017.tar.gz 364589 BLAKE2B 14d80e904ded20a73d65a5828157ea82672559b5bb47e465381989ad3a6e90f41bd0c6db0a5e4f7b7c532fd4f697f9bc8cb3163c6e61106d0d44da994b1c7b28 SHA512 1c86e60710e4def3d430372eed11bf1a27bf82e84c7b787c5a0be15229b6e5f786dbdf830a311423dd7539841de3076d370afc8b4c1b0cddd1bc379372dcdc95
diff --git a/dev-ada/langkit/files/langkit-2019-gentoo.patch b/dev-ada/langkit/files/langkit-2019-gentoo.patch
new file mode 100644 (file)
index 0000000..13a5eb9
--- /dev/null
@@ -0,0 +1,60 @@
+--- a/testsuite/testsuite_support/__init__.py  2019-06-09 12:47:22.832308224 +0200
++++ b/testsuite/testsuite_support/__init__.py  2019-06-09 12:48:27.768399377 +0200
+@@ -126,8 +126,10 @@
+         # Build Langkit_Support so that each testcase does not try to build it
+         # in parallel.
+         if not self.global_env['options'].disable_tear_up_builds:
+-            gargs = ['-p', '-P', self.langkit_support_project_file]
++            gargs = ['-p']
++            gargs = gargs + ['-XGPR_BUILD=relocatable']
++            gargs = gargs + ['-P', self.langkit_support_project_file]
+-            cargs = ['-cargs', '-O0', '-g', '-gnatwae']
++            cargs = ['-cargs', '-O0', '-g', '-gnatwa']
+             if self.coverage_enabled:
+                 gargs.append('--subdirs=gnatcov')
+                 cargs.extend(['-fdump-scos', '-fpreserve-control-flow'])
+--- a/langkit/support/langkit_support.gpr      2019-06-09 14:00:50.239979207 +0200
++++ b/langkit/support/langkit_support.gpr      2019-06-09 14:00:56.580879634 +0200
+@@ -8,7 +8,7 @@
+    for Object_Dir use "obj";
+    package Compiler is
+-      for Default_Switches ("Ada") use ("-gnatwae", "-gnatyg");
++      for Default_Switches ("Ada") use ("-gnatws", "-gnatyg");
+    end Compiler;
+ end Langkit_Support;
+--- a/langkit/templates/langkit_support_gpr.mako       2019-06-09 19:07:51.131902613 +0200
++++ b/langkit/templates/langkit_support_gpr.mako       2019-06-09 19:09:55.530096368 +0200
+@@ -61,7 +61,7 @@
+       case Build_Mode is
+          when "dev" =>
+             for Default_Switches ("Ada") use
+-               Common_Ada_Cargs & ("-g", "-O0", "-gnatwe", "-gnata");
++               Common_Ada_Cargs & ("-g", "-O0", "-gnatws", "-gnata");
+          when "prod" =>
+             --  Debug information is useful even with optimization for
+--- a/testsuite/testsuite_support/base_driver.py       2019-06-09 20:00:21.202461893 +0200
++++ b/testsuite/testsuite_support/base_driver.py       2019-06-09 20:01:04.516848550 +0200
+@@ -327,7 +327,9 @@
+         :param str project_file: Project file name.
+         """
+-        argv = ['gprbuild', '-P', project_file, '-p']
++        argv = ['gprbuild']
++        argv = argv + ['-XGPR_BUILD=relocatable']
++        argv = argv + ['-P', project_file, '-p']
+         cargs = ['-O0', '-g', '-gnata']
+         if self.coverage_enabled:
+             argv.append('--subdirs=gnatcov')
+--- a/langkit/libmanage.py     2019-06-09 20:40:14.885582672 +0200
++++ b/langkit/libmanage.py     2019-06-09 20:41:13.991738858 +0200
+@@ -745,6 +745,7 @@
+         result = ['-XBUILD_MODE={}'.format(build_mode),
+                   '-XLIBRARY_TYPE={}'.format(library_type),
+                   '-XGPR_BUILD={}'.format(library_type),
++                  '-XGNATCOLL_GMP_BUILD={}'.format(library_type),
+                   '-XXMLADA_BUILD={}'.format(library_type)]
+         enable_build_warnings = getattr(args, 'enable_build_warnings', False)
diff --git a/dev-ada/langkit/langkit-2019.ebuild b/dev-ada/langkit/langkit-2019.ebuild
new file mode 100644 (file)
index 0000000..b18dc16
--- /dev/null
@@ -0,0 +1,53 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1
+
+MYP=${P}-20190510-19B8C
+
+DESCRIPTION="A Python framework to generate language parsers"
+HOMEPAGE="https://www.adacore.com/community"
+SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf8f8a31e87a8f1c967d31
+       -> ${MYP}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+       dev-ada/gnatcoll-bindings[iconv,shared]
+       dev-python/mako
+       <dev-python/pyyaml-5
+       dev-python/enum34
+       dev-python/funcy
+       dev-python/docutils"
+
+DEPEND="${RDEPEND}
+       test? ( dev-ada/gnatcoll-bindings[gmp] )"
+
+S="${WORKDIR}"/${MYP}-src
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+src_prepare() {
+       default
+       # Can't make this test working
+       rm -r testsuite/tests/misc/link_two_libs || die
+}
+
+src_test() {
+       testsuite/testsuite.py --show-error-output | tee testsuite.log
+       grep -q FAILED testsuite.log && die "Test failed"
+}
+
+src_install() {
+       default
+       python_domodule langkit
+       python_doscript scripts/create-project.py
+}