diff options
Diffstat (limited to 'dev-ada/gnatcoll/gnatcoll-2016.ebuild')
-rw-r--r-- | dev-ada/gnatcoll/gnatcoll-2016.ebuild | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/dev-ada/gnatcoll/gnatcoll-2016.ebuild b/dev-ada/gnatcoll/gnatcoll-2016.ebuild index 0f4d7a0062ba..77e71b227951 100644 --- a/dev-ada/gnatcoll/gnatcoll-2016.ebuild +++ b/dev-ada/gnatcoll/gnatcoll-2016.ebuild @@ -15,10 +15,11 @@ SRC_URI="http://mirrors.cdn.adacore.com/art/5739942ac7a447658d00e1e7 LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64" -IUSE="gmp gtk iconv postgresql pygobject projects readline +shared sqlite - static syslog" +IUSE="gmp gnat_2016 gnat_2017 gtk iconv postgresql pygobject projects readline + +shared sqlite static syslog" -RDEPEND="dev-lang/gnat-gpl:* +RDEPEND="gnat_2016? ( dev-lang/gnat-gpl:4.9.4 ) + gnat_2017? ( dev-lang/gnat-gpl:6.3.0 ) ${PYTHON_DEPS} gmp? ( dev-libs/gmp:* ) gtk? ( @@ -37,28 +38,16 @@ RDEPEND="dev-lang/gnat-gpl:* =dev-ada/gprbuild-2016[static?,shared?] )" DEPEND="${RDEPEND} - dev-ada/gprbuild" + dev-ada/gprbuild[gnat_2016=,gnat_2017=]" REQUIRED_USE="${PYTHON_REQUIRED_USE} - pygobject? ( gtk )" + pygobject? ( gtk ) + ^^ ( gnat_2016 gnat_2017 )" S="${WORKDIR}"/${MYP}-src PATCHES=( "${FILESDIR}"/${P}-gentoo.patch ) -pkg_setup() { - GCC=${ADA:-$(tc-getCC)} - GNATMAKE="${GCC/gcc/gnatmake}" - GNATCHOP="${GCC/gcc/gnatchop}" - 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=gcc-4.9.4 in make.conf" - die "ada compiler not available" - fi - python-single-r1_pkg_setup -} - src_prepare() { default mv configure.{in,ac} || die @@ -66,6 +55,14 @@ src_prepare() { } src_configure() { + if use gnat_2016; then + GCC_PV=4.9.4 + else + GCC_PV=6.3.0 + fi + GCC=${CHOST}-gcc-${GCC_PV} + GNATMAKE=${CHOST}-gnatmake-${GCC_PV} + GNATCHOP=${CHOST}-gnatchop-${GCC_PV} if use sqlite; then myConf="--with-sqlite=$(get_libdir)" else @@ -91,15 +88,18 @@ src_configure() { --with-python-exec=${EPYTHON} \ --enable-shared-python \ --disable-pygtk \ + CC=${GCC} \ $myConf } src_compile() { if use shared; then - emake PROCESSORS=$(makeopts_jobs) build_library_type/relocatable + emake PROCESSORS=$(makeopts_jobs) GPRBUILD_OPTIONS=-v GCC=${GCC} \ + build_library_type/relocatable fi if use static; then - emake PROCESSORS=$(makeopts_jobs) build_library_type/static + emake PROCESSORS=$(makeopts_jobs) GPRBUILD_OPTIONS=-v GCC=${GCC} \ + build_library_type/static fi python_fix_shebang . } |