From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9673E138334 for ; Sun, 14 Oct 2018 18:52:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5E394E07ED; Sun, 14 Oct 2018 18:52:20 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 151C2E07ED for ; Sun, 14 Oct 2018 18:52:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6527A335CD2 for ; Sun, 14 Oct 2018 18:52:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9A93E3D4 for ; Sun, 14 Oct 2018 18:52:14 +0000 (UTC) From: "Alfredo Tupone" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alfredo Tupone" Message-ID: <1539543121.41f88706dedf15129fff2b8fbd661cc529a0884f.tupone@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ada/gprbuild/, dev-ada/gprbuild/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-ada/gprbuild/files/gprbuild-2018.xml dev-ada/gprbuild/gprbuild-2018-r1.ebuild X-VCS-Directories: dev-ada/gprbuild/files/ dev-ada/gprbuild/ X-VCS-Committer: tupone X-VCS-Committer-Name: Alfredo Tupone X-VCS-Revision: 41f88706dedf15129fff2b8fbd661cc529a0884f X-VCS-Branch: master Date: Sun, 14 Oct 2018 18:52:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c3ae60f0-cc30-4ecf-8f62-96ee66a21bd6 X-Archives-Hash: 54a7b41e0ea479446f8c4d84206b88af commit: 41f88706dedf15129fff2b8fbd661cc529a0884f Author: Tupone Alfredo gentoo org> AuthorDate: Sun Oct 14 18:52:01 2018 +0000 Commit: Alfredo Tupone gentoo org> CommitDate: Sun Oct 14 18:52:01 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41f88706 dev-ada/gprbuild: C files compiled only with gnat provided compiler Signed-off-by: Alfredo Tupone gentoo.org> Package-Manager: Portage-2.3.49, Repoman-2.3.11 dev-ada/gprbuild/files/gprbuild-2018.xml | 93 ++++++++++++++++++++++++++++++++ dev-ada/gprbuild/gprbuild-2018-r1.ebuild | 89 ++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) diff --git a/dev-ada/gprbuild/files/gprbuild-2018.xml b/dev-ada/gprbuild/files/gprbuild-2018.xml new file mode 100644 index 00000000000..56c4f896919 --- /dev/null +++ b/dev-ada/gprbuild/files/gprbuild-2018.xml @@ -0,0 +1,93 @@ + + + + GNAT-@VER@ + gnatls-@VER@ + + ${PREFIX}gnatls-@VER@ -v --version + + + Ada + + ${PREFIX}gcc-@VER@ -v + + + + \.\./lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/ + \.\./lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path + \.\./lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/ + \.\./$TARGET/lib/gnat/(.*)/adalib/ + + + ${PREFIX}gcc-@VER@ -dumpmachine + + + + + + + + + + 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") + & 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 " & + " (Body_File_Name => ""*%b""," & + " Casing => %c," & + " Dot_Replacement => ""%d"");"; + for Config_Spec_File_Name_Pattern ("Ada") use + "pragma Source_File_Name_Project " & + " (Spec_File_Name => ""*%s""," & + " Casing => %c," & + " 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") & ("--RTS=${RUNTIME_DIR(ada)}"); + for Driver ("C") use "${PATH(c)}${PREFIX(c)}gcc-@VER@"; + for Leading_Required_Switches ("C") use + ("-c", "-x", "c") & Compiler'Leading_Required_Switches ("C"); + for Include_Switches_Via_Spec ("C") use ("cc1", "-I"); + for Max_Command_Line_Length use "8192"; + for Response_File_Format ("C") use "GCC_GNU"; + for Dependency_Switches ("C") use ("-MMD", "-MF", ""); + for PIC_Option ("C") 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"; + for Switches ("Ada") use ("--gnatbind_path=gnatbind-@VER@"); + for Required_Switches ("Ada") use + Binder'Required_Switches ("Ada") & ("--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"; + + + diff --git a/dev-ada/gprbuild/gprbuild-2018-r1.ebuild b/dev-ada/gprbuild/gprbuild-2018-r1.ebuild new file mode 100644 index 00000000000..3f325332e8e --- /dev/null +++ b/dev-ada/gprbuild/gprbuild-2018-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/5b0819dfc7a447df26c27a68 + -> ${MYP}-src.tar.gz + http://mirrors.cdn.adacore.com/art/5b0819dec7a447df26c27a40 + -> 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 ) + gnat_2018? ( dev-lang/gnat-gpl:7.3.1 )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}"/${MYP}-src + +REQUIRED_USE="!gnat_2016 ^^ ( gnat_2017 gnat_2018 )" +PATCHES=( "${FILESDIR}"/${P}-gentoo.patch ) + +src_prepare() { + if use gnat_2016; then + GCC_PV=4.9.4 + elif use gnat_2017; then + GCC_PV=6.3.0 + else + GCC_PV=7.3.1 + fi + sed -e "s:@VER@:${GCC_PV}:g" "${FILESDIR}"/${P}.xml > gnat-${GCC_PV}.xml + rm share/gprconfig/c.xml || die + default + sed -i \ + -e "s:@GNATBIND@:gnatbind-${GCC_PV}:g" \ + src/gprlib.adb \ + || die + sed -i \ + -e "s:\"-Wl,-r\":\"-r\":g" \ + share/gprconfig/linker.xml \ + || 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 + insinto /usr/share/gprconfig + doins gnat-${GCC_PV}.xml + einstalldocs +}