From 2d535a0cf60f54e3fd5057aa3d4e4c05df6a6e63 Mon Sep 17 00:00:00 2001 From: Tupone Alfredo Date: Mon, 19 Jun 2017 22:19:09 +0200 Subject: dev-ada/gprbuild: Add version 2017 Package-Manager: Portage-2.3.5, Repoman-2.3.1 --- dev-ada/gprbuild/Manifest | 2 + dev-ada/gprbuild/files/gprbuild-2017-gentoo.patch | 23 +++++ dev-ada/gprbuild/gprbuild-2016.ebuild | 2 +- dev-ada/gprbuild/gprbuild-2017.ebuild | 112 ++++++++++++++++++++++ dev-ada/gprbuild/gprbuild-9999.ebuild | 4 +- 5 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 dev-ada/gprbuild/files/gprbuild-2017-gentoo.patch create mode 100644 dev-ada/gprbuild/gprbuild-2017.ebuild (limited to 'dev-ada') diff --git a/dev-ada/gprbuild/Manifest b/dev-ada/gprbuild/Manifest index 1642070972ef..dab1b96f734e 100644 --- a/dev-ada/gprbuild/Manifest +++ b/dev-ada/gprbuild/Manifest @@ -1,2 +1,4 @@ DIST gprbuild-gpl-2016-src.tar.gz 2142261 SHA256 d51659454bc0aaf1a9a9f1d05aab469a1f3d900065a4542123d3a59ab067275d SHA512 6b9e00248aaee90f3c00e7ce442c2b551b8532ec4d94a4471858d117feb27e91fd6d218995d4b71ee3f1f0677e9547d562fc2cda9ba80c3f6eb8d840ed56eb7e WHIRLPOOL 2afb9d3188f9498cf9cf9a6605081e27a843a15e4c4d5541616b8818757c6f8d458e8d6fbe97bcfc0607ac98d58ec2e4830d17aefd26458b3adcf1489a646945 +DIST gprbuild-gpl-2017-src.tar.gz 2454957 SHA256 0d0a48b8744e4f7230a85008d8213b583459046395704e8ab8c5cabedbf7c616 SHA512 12f3682d64ce0718de4940c1e71a4380b20021805d88543842dbf3b5ce5d518c23a6b2d868565579baf81efa1d8cf05c7778253162f0df5d7adc0eb1865c9f88 WHIRLPOOL 905b3a6d64a7f8a6970586b5d1c010badcc24c42e4b406ed7508e0470920b86d0992e80dc2326b10a314cb27519944f5199a7f0d75e72dae8fb096180c22a781 DIST xmlada-gpl-2016-src.tar.gz 1440671 SHA256 ea64d8da2c5fb01a257fc5bf474b8d4ec40b01dc15b320b9fe260ff2db668ba4 SHA512 d1d7c3d91731394235aed4b80c91b1babe30d5f184282fae8087ee556318475e3923ed628b805693fc89a4d9bb219b0fb0937bc5024a742226da0245d36ed652 WHIRLPOOL b6ebb927d801394ad0b62d9538142c420ab33627582059466d4f64b12c3a45b1b5b489019aef715a59101370220a78507fe03d97c9e67233dfcc4f3aad1f16d7 +DIST xmlada-gpl-2017-src.tar.gz 1578393 SHA256 9b103157eb3ecd697b597ad4e60f56f39028bc2d6ea513d2dce8a3b0e65ac54b SHA512 371f6adc01550a4bb13204ec0404dc1165438db595f4346813e5a23a155de74c857c40c55adde173919c2fe35b3b91d78b235c9718ee86bc848e62ddfd7fa2b4 WHIRLPOOL 4b2da3fb799f8def6eb6383a9483258340368cc80e96e8ffab207c3c8849c1279a80cf68ca47c8a20ce91c084041bdfa95128a14321454055534d804272ef4dd diff --git a/dev-ada/gprbuild/files/gprbuild-2017-gentoo.patch b/dev-ada/gprbuild/files/gprbuild-2017-gentoo.patch new file mode 100644 index 000000000000..70491e177a77 --- /dev/null +++ b/dev-ada/gprbuild/files/gprbuild-2017-gentoo.patch @@ -0,0 +1,23 @@ +--- gprbuild-2017/gpr/gpr.gpr.old 2017-05-27 20:59:07.061135892 +0200 ++++ gprbuild-2017/gpr/gpr.gpr 2017-05-27 20:59:38.022638398 +0200 +@@ -67,6 +67,7 @@ + for Switches ("gpr*.ad?") use + Compiler'Default_Switches ("Ada") & ("-g1"); + end case; ++ for Driver ("C") use External ("CC", "gcc"); + end Compiler; + + end GPR; +--- gprbuild-17.0/src/gprbuild-post_compile.adb.old 2017-05-18 14:17:06.114797015 +0200 ++++ gprbuild-17.0/src/gprbuild-post_compile.adb 2017-05-18 14:18:55.466956852 +0200 +@@ -4744,7 +4744,9 @@ + No_Create => Proj.Is_Aggregated); + end if; + +- Shared_Libs := not Is_Static (Proj.Proj); ++ if not Is_Static (Proj.Proj) then ++ Shared_Libs := True; ++ end if; + + end if; + end if; diff --git a/dev-ada/gprbuild/gprbuild-2016.ebuild b/dev-ada/gprbuild/gprbuild-2016.ebuild index b021ddc60478..a3691ac46ffa 100644 --- a/dev-ada/gprbuild/gprbuild-2016.ebuild +++ b/dev-ada/gprbuild/gprbuild-2016.ebuild @@ -21,7 +21,7 @@ SLOT="0" KEYWORDS="~amd64" IUSE="bootstrap +shared static static-pic" -DEPEND="dev-lang/gnat-gpl +DEPEND="dev-lang/gnat-gpl:= !bootstrap? ( dev-ada/xmlada )" RDEPEND="${DEPEND}" diff --git a/dev-ada/gprbuild/gprbuild-2017.ebuild b/dev-ada/gprbuild/gprbuild-2017.ebuild new file mode 100644 index 000000000000..3165385d33c2 --- /dev/null +++ b/dev-ada/gprbuild/gprbuild-2017.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2017 Gentoo Foundation +# 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 + bootstrap? ( + http://mirrors.cdn.adacore.com/art/591aeb88c7a4473fcbb154f8 + -> xmlada-gpl-${PV}-src.tar.gz )" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="bootstrap +shared static static-pic" + +DEPEND="dev-lang/gnat-gpl:= + !bootstrap? ( dev-ada/xmlada[static] )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}"/${MYP}-src + +REQUIRED_USE="bootstrap? ( !shared !static !static-pic )" +PATCHES=( "${FILESDIR}"/${P}-gentoo.patch ) + +pkg_setup() { + if use bootstrap; then + GCC=${ADA:-$(tc-getCC)} + gnatbase=$(basename ${GCC}) + gnatpath=$(dirname ${GCC}) + + GNATMAKE="${gnatbase/gcc/gnatmake}" + if [[ ${gnatpath} != "." ]] ; then + GNATMAKE="${gnatpath}/${GNATMAKE}" + fi + + if [[ -z "$(type ${GNATMAKE} 2>/dev/null)" ]] ; then + eerror "You need a gcc compiler that provides the Ada Compiler:" + eerror "1) use gcc-config to select the right compiler or" + eerror "2) set ADA in make.conf" + die "ada compiler not available" + fi + fi +} + +src_configure() { + emake prefix="${D}"usr setup +} + +bin_progs="gprbuild gprconfig gprclean gprinstall gprname gprls" +lib_progs="gprlib gprbind" + +src_compile() { + if use bootstrap; then + 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 + else + gprbuild -p -m -j$(makeopts_jobs) -XBUILD=production -v \ + gprbuild.gpr -XLIBRARY_TYPE=static -XXMLADA_BUILD=static \ + -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} || die + if use shared; then + gprbuild -p -m -j$(makeopts_jobs) -XBUILD=production -v \ + -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable \ + gpr/gpr.gpr -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} || die + fi + for kind in static static-pic; do + if use ${kind}; then + gprbuild -p -m -j$(makeopts_jobs) -XBUILD=production -v \ + -XLIBRARY_TYPE=${kind} -XXMLADA_BUILD=${kind} gpr/gpr.gpr \ + -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} || die + fi + done + fi +} + +src_install() { + if use bootstrap; then + 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 + else + default + for kind in shared static static-pic; do + if use ${kind}; then + emake DESTDIR="${D}" libgpr.install.${kind} + fi + done + rm "${D}"usr/doinstall || die + fi + einstalldocs +} diff --git a/dev-ada/gprbuild/gprbuild-9999.ebuild b/dev-ada/gprbuild/gprbuild-9999.ebuild index 39a26f1a7e42..86fb99df1e2a 100644 --- a/dev-ada/gprbuild/gprbuild-9999.ebuild +++ b/dev-ada/gprbuild/gprbuild-9999.ebuild @@ -20,9 +20,9 @@ SLOT="0" KEYWORDS="" IUSE="bootstrap +shared static static-pic" -DEPEND="dev-lang/gnat-gpl +DEPEND="dev-lang/gnat-gpl:= >=dev-python/sphinx-1.5.2 - !bootstrap? ( dev-ada/xmlada )" + !bootstrap? ( dev-ada/xmlada[static] )" RDEPEND="${DEPEND}" REQUIRED_USE="bootstrap? ( !shared !static !static-pic )" -- cgit v1.2.3-65-gdbad