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-ada/gprbuild/, dev-ada/gprbuild/files/
Date: Sat, 27 Oct 2018 20:27:16 +0000 (UTC)	[thread overview]
Message-ID: <1540672024.e7d7485e2922d66450f2cecbc8967f81f168646b.tupone@gentoo> (raw)

commit:     e7d7485e2922d66450f2cecbc8967f81f168646b
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 27 20:27:04 2018 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sat Oct 27 20:27:04 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7d7485e

dev-ada/gprbuild: Fix configuration for 2017 version too

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11

 dev-ada/gprbuild/files/gprbuild-2017-config.patch | 113 ++++++++++++++++++++++
 dev-ada/gprbuild/gprbuild-2017-r1.ebuild          |  89 +++++++++++++++++
 2 files changed, 202 insertions(+)

diff --git a/dev-ada/gprbuild/files/gprbuild-2017-config.patch b/dev-ada/gprbuild/files/gprbuild-2017-config.patch
new file mode 100644
index 00000000000..72f1fd829c1
--- /dev/null
+++ b/dev-ada/gprbuild/files/gprbuild-2017-config.patch
@@ -0,0 +1,113 @@
+--- a/share/gprconfig/compilers.xml	2018-10-27 09:04:53.830077299 +0200
++++ b/share/gprconfig/compilers.xml	2018-10-27 09:05:14.883724079 +0200
+@@ -20,15 +20,15 @@
+   <!--    GCC 3.x & 4.x (not for GNAT Pro)-->
+   <compiler_description>
+     <name>GCC</name>
+-    <executable prefix="1">(.*-wrs-.*|.*-sysgo.*|.*-elf-.*|.*-eabi-.*|.*-eabispe-.*|avr-.*|.*-elinos-linux.*|.*-generic-linux-gnu-|.*-pc-mingw32.*|.*-xcoff-.*|arm-linux-androideabi-|arm-linux-gnueabi-|arm-linux-gnueabihf-|e500v2-gnu-linux-|powerpc-.*-linux.*-|.*-darwin.*-|aarch64-linux-gnu-)?gcc</executable>
++    <executable prefix="1">(.*-wrs-.*|.*-sysgo.*|.*-elf-.*|.*-eabi-.*|.*-eabispe-.*|avr-.*|.*-elinos-linux.*|.*-generic-linux-gnu-|.*-pc-mingw32.*|.*-xcoff-.*|arm-linux-androideabi-|arm-linux-gnueabi-|arm-linux-gnueabihf-|e500v2-gnu-linux-|powerpc-.*-linux.*-|.*-darwin.*-|aarch64-linux-gnu-)?gcc-@VER@</executable>
+     <version>
+-      <external>${PREFIX}gcc -v</external>
++      <external>${PREFIX}gcc-@VER@ -v</external>
+       <nogrep regexp="for GNAT Pro"></nogrep>
+       <grep regexp="^gcc \S+ (\S+)" group="1"></grep>
+     </version>
+     <languages>C</languages>
+     <target>
+-      <external>${PREFIX}gcc -dumpmachine</external>
++      <external>${PREFIX}gcc-@VER@ -dumpmachine</external>
+       <grep regexp="[^\r\n]+"></grep>
+     </target>
+   </compiler_description>
+@@ -325,14 +325,14 @@
+    -->
+   <compiler_description>
+     <name>GNAT</name>
+-    <executable prefix="1">(.*-wrs-.*|.*-sysgo.*|.*-elf-.*|.*-eabi-.*|.*-eabispe-.*|avr-.*|.*-elinos-linux.*|.*-generic-linux-gnu-|.*-pc-mingw32.*|.*-xcoff-.*|arm-linux-androideabi-|arm-linux-gnueabi-|arm-linux-gnueabihf-|e500v2-gnu-linux-|powerpc-.*-linux.*-|.*-darwin.*-|aarch64-linux-gnu-)?gnatls</executable>
++    <executable prefix="1">(.*-wrs-.*|.*-sysgo.*|.*-elf-.*|.*-eabi-.*|.*-eabispe-.*|avr-.*|.*-elinos-linux.*|.*-generic-linux-gnu-|.*-pc-mingw32.*|.*-xcoff-.*|arm-linux-androideabi-|arm-linux-gnueabi-|arm-linux-gnueabihf-|e500v2-gnu-linux-|powerpc-.*-linux.*-|.*-darwin.*-|aarch64-linux-gnu-)?gnatls-@VER@</executable>
+     <version>
+-      <external>${PREFIX}gnatls -v --version</external>
++      <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 -v</external>
++      <external>${PREFIX}gcc-@VER@ -v</external>
+       <grep regexp="^[-\w]*gcc \S+ (\S+)" group="1"></grep>
+     </variable>
+     <runtimes default="default,kernel,native">
+@@ -342,7 +342,7 @@
+        <directory group="1" >\.\./$TARGET/lib/gnat/(.*)/adalib/</directory>
+     </runtimes>
+     <target>
+-      <external>${PREFIX}gcc -dumpmachine</external>
++      <external>${PREFIX}gcc-@VER@ -dumpmachine</external>
+       <grep regexp="[^\r\n]+"></grep>
+     </target>
+   </compiler_description>
+@@ -509,21 +509,6 @@
+     </target>
+   </compiler_description>
+ 
+-  <!-- LLVM Compiler -->
+-  <compiler_description>
+-    <name>LLVM</name>
+-    <executable>clang</executable>
+-    <version>
+-      <external>clang -v</external>
+-      <grep regexp=".*(LLVM|clang) version ([0-9.]*)" group="2"></grep>
+-    </version>
+-    <languages>C</languages>
+-    <target>
+-      <external>clang -dumpmachine</external>
+-      <grep regexp="[^\r\n]+"></grep>
+-    </target>
+-  </compiler_description>
+-
+   <!--  Windres compiler -->
+   <compiler_description>
+     <name>WINDRES</name>
+--- a/share/gprconfig/gnat.xml	2018-10-27 09:38:31.615357671 +0200
++++ b/share/gprconfig/gnat.xml	2018-10-27 09:40:54.603044560 +0200
+@@ -60,7 +60,7 @@
+    &filter_gnat;
+    <config>
+    package Compiler is
+-      for Driver                   ("Ada") use "${PATH(ada)}${PREFIX(ada)}gcc";
++      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
+@@ -77,6 +77,9 @@
+       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)}";
+--- a/share/gprconfig/c.xml	2018-10-27 09:42:01.327035277 +0200
++++ b/share/gprconfig/c.xml	2018-10-27 09:42:16.529803718 +0200
+@@ -14,7 +14,7 @@
+      </compilers>
+      <config>
+    package Compiler is
+-      for Driver              ("C") use "${PATH(c)}${PREFIX(c)}gcc";
++      for Driver              ("C") use "${PATH(c)}${PREFIX(c)}gcc-@VER@";
+    end Compiler;
+      </config>
+    </configuration>
+--- a/share/gprconfig/linker.xml	2018-10-27 09:43:17.934862859 +0200
++++ b/share/gprconfig/linker.xml	2018-10-27 09:43:54.127304471 +0200
+@@ -742,7 +742,7 @@
+    for Shared_Library_Suffix use ".sl";
+    for Library_Auto_Init_Supported use "true";
+    for Run_Path_Option  use ("-Wl,+b,");
+-   for Library_Partial_Linker use ("gcc", "-nostdlib", "-Wl,-r", "-o");
++   for Library_Partial_Linker use ("gcc-@VER@", "-nostdlib", "-Wl,-r", "-o");
+ 
+    package Linker is
+       for Max_Command_Line_Length use "5000";

diff --git a/dev-ada/gprbuild/gprbuild-2017-r1.ebuild b/dev-ada/gprbuild/gprbuild-2017-r1.ebuild
new file mode 100644
index 00000000000..1f443284e87
--- /dev/null
+++ b/dev-ada/gprbuild/gprbuild-2017-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs multiprocessing
+
+MYP=${PN}-gpl-${PV}
+
+DESCRIPTION="Multi-Language Management"
+HOMEPAGE="http://libre.adacore.com/"
+SRC_URI="
+	http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deecff7
+		-> ${MYP}-src.tar.gz
+	http://mirrors.cdn.adacore.com/art/591aeb88c7a4473fcbb154f8
+		-> xmlada-gpl-${PV}-src.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnat_2016 +gnat_2017 gnat_2018"
+
+DEPEND="gnat_2016? ( dev-lang/gnat-gpl:4.9.4 )
+	gnat_2017? ( dev-lang/gnat-gpl:6.3.0 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${MYP}-src
+
+REQUIRED_USE="^^ ( gnat_2016 gnat_2017 )"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-gentoo.patch
+	"${FILESDIR}"/${P}-config.patch
+)
+
+src_prepare() {
+	if use gnat_2016; then
+		GCC_PV=4.9.4
+	else
+		GCC_PV=6.3.0
+	fi
+	default
+	sed -i \
+		-e "s:@VER@:${GCC_PV}:g" \
+		share/gprconfig/compilers.xml \
+		share/gprconfig/gnat.xml \
+		share/gprconfig/c.xml \
+		share/gprconfig/linker.xml \
+		|| die
+	sed -i \
+		-e "s:@GNATBIND@:gnatbind-${GCC_PV}:g" \
+		src/gprlib.adb \
+		|| die
+}
+
+src_configure() {
+	emake prefix="${D}"usr setup
+}
+
+bin_progs="gprbuild gprconfig gprclean gprinstall gprname gprls"
+lib_progs="gprlib gprbind"
+
+src_compile() {
+	GCC=${CHOST}-gcc-${GCC_PV}
+	GNATMAKE=${CHOST}-gnatmake-${GCC_PV}
+	local xmlada_src="../xmlada-gpl-${PV}-src"
+	incflags="-Isrc -Igpr/src -I${xmlada_src}/sax -I${xmlada_src}/dom \
+		-I${xmlada_src}/schema -I${xmlada_src}/unicode \
+		-I${xmlada_src}/input_sources"
+	${GCC} -c ${CFLAGS} gpr/src/gpr_imports.c -o gpr_imports.o || die
+	for bin in ${bin_progs}; do
+		${GNATMAKE} -j$(makeopts_jobs) ${incflags} $ADAFLAGS ${bin}-main \
+			-o ${bin} -largs gpr_imports.o || die
+	done
+	for lib in $lib_progs; do
+		${GNATMAKE} -j$(makeopts_jobs) ${incflags} ${lib} $ADAFLAGS \
+			-largs gpr_imports.o || die
+	done
+}
+
+src_install() {
+	dobin ${bin_progs}
+	exeinto /usr/libexec/gprbuild
+	doexe ${lib_progs}
+	insinto /usr/share/gprconfig
+	doins share/gprconfig/*
+	insinto /usr/share/gpr
+	doins share/_default.gpr
+	einstalldocs
+}


             reply	other threads:[~2018-10-27 20:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-27 20:27 Alfredo Tupone [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-19 22:07 [gentoo-commits] repo/gentoo:master commit in: dev-ada/gprbuild/, dev-ada/gprbuild/files/ Alfredo Tupone
2021-11-25  7:34 Alfredo Tupone
2021-11-13  8:35 Alfredo Tupone
2021-05-12 19:00 Alfredo Tupone
2020-06-09 11:36 Alfredo Tupone
2018-11-26 20:55 Alfredo Tupone
2018-10-14 18:52 Alfredo Tupone
2017-06-22 20:02 Alfredo Tupone
2017-05-07 20:21 Alfredo Tupone
2017-03-29 19:27 Alfredo Tupone
2017-03-28  7:41 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=1540672024.e7d7485e2922d66450f2cecbc8967f81f168646b.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