public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alfredo Tupone" <tupone@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/gnat-gpl/, dev-lang/gnat-gpl/files/
Date: Sun, 26 Mar 2017 19:04:46 +0000 (UTC)	[thread overview]
Message-ID: <1490555069.042ca1aaa5c3982e07abf08d66ec4f54c781f8d1.tupone@gentoo> (raw)

commit:     042ca1aaa5c3982e07abf08d66ec4f54c781f8d1
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 26 19:04:29 2017 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Mar 26 19:04:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=042ca1aa

dev-lang/gnat-gpl: Add compiler description for gprbuild

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-lang/gnat-gpl/files/gnat-gpl.xml   | 93 ++++++++++++++++++++++++++++++++++
 dev-lang/gnat-gpl/gnat-gpl-2016.ebuild |  4 ++
 2 files changed, 97 insertions(+)

diff --git a/dev-lang/gnat-gpl/files/gnat-gpl.xml b/dev-lang/gnat-gpl/files/gnat-gpl.xml
new file mode 100644
index 00000000000..7a50db7ccd9
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gnat-gpl.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" ?>
+<gprconfig>
+  <compiler_description>
+    <name>GNAT-@VER@</name>
+    <executable prefix="1">gnatmake-@VER@</executable>
+    <version>
+      <external>${PREFIX}gnatls-@VER@ -v --version</external>
+      <grep regexp="^GNATLS.+?(\d+(\.\d+)?)" group="1"></grep>
+    </version>
+    <languages>Ada</languages>
+    <variable name="gcc_version">
+      <external>${PREFIX}gcc-@VER@ -v</external>
+      <grep regexp="^[-\w]*gcc \S+ (\S+)" group="1"></grep>
+    </variable>
+    <runtimes default="default,kernel,native">
+       <directory group="default" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/</directory>
+       <directory group="default" contents="^rts-">\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path</directory>
+       <directory group="2" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/</directory>
+       <directory group="1" >\.\./$TARGET/lib/gnat/(.*)/adalib/</directory>
+    </runtimes>
+    <target>
+      <external>${PREFIX}gcc-@VER@ -dumpmachine</external>
+      <grep regexp="[^\r\n]+"></grep>
+    </target>
+  </compiler_description>
+
+  <configuration>
+    <compilers>
+      <compiler name="GNAT-@VER@" />
+    </compilers>
+   <config>
+   package Naming is
+      for Spec_Suffix ("Ada") use ".ads";
+      for Body_Suffix ("Ada") use ".adb";
+      for Casing use "lowercase";
+      for Dot_Replacement use "-";
+   end Naming;
+
+   package Compiler is
+      for Driver                   ("Ada") use "${PATH(ada)}${PREFIX(ada)}gcc-@VER@";
+      for Language_Kind            ("Ada") use "unit_based";
+      for Dependency_Kind          ("Ada") use "ALI_File";
+      for Leading_Required_Switches        ("Ada") use
+	  ("-c", "-x", "ada", "-gnatA")
+             &amp; Compiler'Leading_Required_Switches ("Ada");
+      for Mapping_File_Switches    ("Ada") use ("-gnatem=");
+      for Mapping_Spec_Suffix      ("Ada") use "%s";
+      for Mapping_Body_Suffix      ("Ada") use "%b";
+      for Config_File_Switches     ("Ada") use ("-gnatec=");
+      for Include_Path_File     ("Ada") use "ADA_PRJ_INCLUDE_FILE";
+      for Multi_Unit_Switches ("Ada") use ("-gnateI");
+      for Multi_Unit_Object_Separator ("Ada") use "~";
+      for Config_Body_File_Name ("Ada") use
+           "pragma Source_File_Name_Project (%u, Body_File_Name => ""%f"");";
+      for Config_Spec_File_Name ("Ada") use
+           "pragma Source_File_Name_Project (%u, Spec_File_Name => ""%f"");";
+      for Config_Body_File_Name_Index ("Ada") use
+           "pragma Source_File_Name_Project (%u, Body_File_Name => ""%f"", Index => %i);";
+      for Config_Spec_File_Name_Index ("Ada") use
+           "pragma Source_File_Name_Project (%u, Spec_File_Name => ""%f"", Index => %i);";
+      for Config_Body_File_Name_Pattern ("Ada") use
+           "pragma Source_File_Name_Project " &amp;
+           "  (Body_File_Name  => ""*%b""," &amp;
+           "   Casing          => %c," &amp;
+           "   Dot_Replacement => ""%d"");";
+      for Config_Spec_File_Name_Pattern ("Ada") use
+           "pragma Source_File_Name_Project " &amp;
+           "  (Spec_File_Name  => ""*%s""," &amp;
+           "   Casing          => %c," &amp;
+           "   Dot_Replacement => ""%d"");";
+      for Config_File_Unique    ("Ada") use "False";
+      for PIC_Option      ("Ada") use ("-fPIC");
+   end Compiler;
+
+   package Binder is
+      for Objects_Path_File     ("Ada") use "ADA_PRJ_OBJECTS_FILE";
+      for Driver         ("Ada") use
+          "${GPRCONFIG_PREFIX}libexec/gprbuild/gprbind";
+   end Binder;
+
+   package Clean is
+      for Source_Artifact_Extensions ("Ada")
+         use (".dg", ".rep", ".stdout", ".stderr");
+      for Object_Artifact_Extensions ("Ada") use (".s", ".ci", ".gcno");
+   end Clean;
+
+   for Toolchain_Version     ("Ada") use "GNAT ${VERSION(ada)}";
+   for Runtime_Library_Dir   ("Ada") use "${RUNTIME_DIR(ada)}/adalib/";
+   for Runtime_Source_Dirs   ("Ada") use ("${RUNTIME_DIR(ada)}/adainclude/");
+   for Library_Encapsulated_Supported use "true";
+   </config>
+  </configuration>
+</gprconfig>

diff --git a/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild b/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild
index 83c7683a0e4..eb9823fe98b 100644
--- a/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild
+++ b/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild
@@ -89,6 +89,8 @@ src_unpack() {
 }
 
 src_prepare() {
+	sed -e "s:@VER@:${TOOLCHAIN_GCC_PV}:g" "${FILESDIR}"/${PN}.xml > ${P}.xml
+
 	mv ../gnat-gpl-${PV}-src/src/ada gcc/ || die
 	mv ../gcc-interface-${REL}-gpl-${PV}-src gcc/ada/gcc-interface || die
 
@@ -146,6 +148,8 @@ src_compile() {
 }
 
 src_install() {
+	insinto /usr/share/gprconfig
+	doins ${P}.xml
 	toolchain_src_install
 	cd "${D}"${BINPATH}
 	for x in gnat*; do


             reply	other threads:[~2017-03-26 19:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-26 19:04 Alfredo Tupone [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-11-26 19:47 [gentoo-commits] repo/gentoo:master commit in: dev-lang/gnat-gpl/, dev-lang/gnat-gpl/files/ Alfredo Tupone
2022-01-01 21:44 Alfredo Tupone
2021-07-11 16:52 Alfredo Tupone
2020-06-21 20:37 Sergei Trofimovich
2020-06-21 17:31 Sergei Trofimovich
2019-11-20 20:42 Alfredo Tupone
2019-11-20 19:38 Alfredo Tupone
2019-05-29 17:08 Alfredo Tupone
2018-11-17 14:08 Alfredo Tupone
2017-06-17 15:43 Alfredo Tupone
2017-03-11 20:46 Alfredo Tupone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490555069.042ca1aaa5c3982e07abf08d66ec4f54c781f8d1.tupone@gentoo \
    --to=tupone@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox