summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTupone Alfredo <tupone@gentoo.org>2017-06-26 22:03:11 +0200
committerTupone Alfredo <tupone@gentoo.org>2017-06-26 22:03:11 +0200
commite8347eefda91406fa8553e4328584b66df8010ad (patch)
treee2dd3072e2fab40e0ebf85450c741b1284954dcf /dev-ada/gprbuild/gprbuild-2017.ebuild
parentdev-perl/Olson-Abbreviations: Add build fix for Perl 5.26, bug 617140 (diff)
downloadgentoo-e8347eefda91406fa8553e4328584b66df8010ad.tar.gz
gentoo-e8347eefda91406fa8553e4328584b66df8010ad.tar.bz2
gentoo-e8347eefda91406fa8553e4328584b66df8010ad.zip
dev-ada/gprbuild: add gnat_2016 and gnat_2017 use flags to select the compiler
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'dev-ada/gprbuild/gprbuild-2017.ebuild')
-rw-r--r--dev-ada/gprbuild/gprbuild-2017.ebuild39
1 files changed, 14 insertions, 25 deletions
diff --git a/dev-ada/gprbuild/gprbuild-2017.ebuild b/dev-ada/gprbuild/gprbuild-2017.ebuild
index 277fb5c5f3f8..60fa7d00f000 100644
--- a/dev-ada/gprbuild/gprbuild-2017.ebuild
+++ b/dev-ada/gprbuild/gprbuild-2017.ebuild
@@ -18,39 +18,26 @@ SRC_URI="
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
-IUSE="bootstrap +shared static static-pic"
+IUSE="bootstrap gnat_2016 gnat_2017 +shared static static-pic"
-DEPEND="dev-lang/gnat-gpl:=
- !bootstrap? ( dev-ada/xmlada[static] )"
+DEPEND="
+ !bootstrap? ( dev-ada/xmlada[static,gnat_2016=,gnat_2017=] )
+ gnat_2016? ( =dev-lang/gnat-gpl-2016 )
+ gnat_2017? ( =dev-lang/gnat-gpl-2017 )"
RDEPEND="${DEPEND}"
S="${WORKDIR}"/${MYP}-src
-REQUIRED_USE="bootstrap? ( !shared !static !static-pic )"
+REQUIRED_USE="bootstrap? ( !shared !static !static-pic )
+ ^^ ( gnat_2016 gnat_2017 )"
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
-pkg_setup() {
- GCC=${ADA:-$(tc-getCC)}
- gnatbase=$(basename ${GCC})
- if use bootstrap; then
- 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_prepare() {
- GCC_PV=${gnatbase#*gcc-}
+ if use gnat_2016; then
+ GCC_PV=4.9.4
+ else
+ GCC_PV=6.3.0
+ fi
sed -e "s:@VER@:${GCC_PV}:g" "${FILESDIR}"/${P}.xml > gnat-${GCC_PV}.xml
default
}
@@ -63,7 +50,9 @@ bin_progs="gprbuild gprconfig gprclean gprinstall gprname gprls"
lib_progs="gprlib gprbind"
src_compile() {
+ GCC=${CHOST}-gcc-${GCC_PV}
if use bootstrap; then
+ 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 \