summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTupone Alfredo <tupone@gentoo.org>2018-10-27 22:27:04 +0200
committerTupone Alfredo <tupone@gentoo.org>2018-10-27 22:27:04 +0200
commite7d7485e2922d66450f2cecbc8967f81f168646b (patch)
tree8f81cbf26423a971851a54d2d7e2abf200c7f1d4
parentsys-fs/shake: EAPI-6 bump (diff)
downloadgentoo-e7d7485e2922d66450f2cecbc8967f81f168646b.tar.gz
gentoo-e7d7485e2922d66450f2cecbc8967f81f168646b.tar.bz2
gentoo-e7d7485e2922d66450f2cecbc8967f81f168646b.zip
dev-ada/gprbuild: Fix configuration for 2017 version too
Signed-off-by: Alfredo Tupone <tupone@gentoo.org> Package-Manager: Portage-2.3.49, Repoman-2.3.11
-rw-r--r--dev-ada/gprbuild/files/gprbuild-2017-config.patch113
-rw-r--r--dev-ada/gprbuild/gprbuild-2017-r1.ebuild89
2 files changed, 202 insertions, 0 deletions
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 000000000000..72f1fd829c1c
--- /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 000000000000..1f443284e879
--- /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
+}