summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTupone Alfredo <tupone@gentoo.org>2017-06-23 21:39:54 +0200
committerTupone Alfredo <tupone@gentoo.org>2017-06-23 21:41:16 +0200
commit6ee3ef271a151c6e2351ffa3ec38d49f1b30cdcf (patch)
tree39ca786a013fe3518017a4bd029c9abda25eb55f /dev-ada
parentdev-python/os-vif: 1.4.1 stable amd64 and x86 (diff)
downloadgentoo-6ee3ef271a151c6e2351ffa3ec38d49f1b30cdcf.tar.gz
gentoo-6ee3ef271a151c6e2351ffa3ec38d49f1b30cdcf.tar.bz2
gentoo-6ee3ef271a151c6e2351ffa3ec38d49f1b30cdcf.zip
dev-ada/gprbuild: Add compiler description file
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/gprbuild/files/gprbuild-2017.xml85
-rw-r--r--dev-ada/gprbuild/gprbuild-2017.ebuild9
2 files changed, 94 insertions, 0 deletions
diff --git a/dev-ada/gprbuild/files/gprbuild-2017.xml b/dev-ada/gprbuild/files/gprbuild-2017.xml
new file mode 100644
index 00000000000..9e1e47b512e
--- /dev/null
+++ b/dev-ada/gprbuild/files/gprbuild-2017.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" ?>
+<gprconfig>
+ <compiler_description>
+ <name>GNAT-@VER@</name>
+ <executable prefix="1">gnatls-@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 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");
+ for Leading_Required_Switches ("Ada") use
+ Compiler'Leading_Required_Switches ("Ada") &amp; ("--RTS=${RUNTIME_DIR(ada)}");
+ end Compiler;
+
+ package Binder is
+ for Objects_Path_File ("Ada") use "ADA_PRJ_OBJECTS_FILE";
+ for Driver ("Ada") use
+ "${GPRCONFIG_PREFIX}libexec/gprbuild/gprbind";
+ for Switches ("Ada") use ("--gnatbind_path=gnatbind-@VER@");
+ for Required_Switches ("Ada") use
+ Binder'Required_Switches ("Ada") &amp; ("--RTS=${RUNTIME_DIR(ada)}");
+ end Binder;
+
+ for Toolchain_Version ("Ada") use "GNAT ${VERSION(ada)}";
+
+for Runtime_Dir ("Ada") use "${RUNTIME_DIR(ada)}";
+ for Library_Encapsulated_Supported use "true";
+ </config>
+ </configuration>
+</gprconfig>
diff --git a/dev-ada/gprbuild/gprbuild-2017.ebuild b/dev-ada/gprbuild/gprbuild-2017.ebuild
index 3165385d33c..0f7b634ec96 100644
--- a/dev-ada/gprbuild/gprbuild-2017.ebuild
+++ b/dev-ada/gprbuild/gprbuild-2017.ebuild
@@ -49,6 +49,13 @@ pkg_setup() {
fi
}
+src_prepare() {
+ gnatbase=$(basename ${GCC})
+ GCC_PV=${gnatbase#*gcc-}
+ sed -e "s:@VER@:${GCC_PV}:g" "${FILESDIR}"/${P}.xml > gnat-${GCC_PV}.xml
+ default
+}
+
src_configure() {
emake prefix="${D}"usr setup
}
@@ -108,5 +115,7 @@ src_install() {
done
rm "${D}"usr/doinstall || die
fi
+ insinto /usr/share/gprconfig
+ doins gnat-${GCC_PV}.xml
einstalldocs
}