2018-01-26 10:36:34 +03:00
|
|
|
# Copyright 1999-2018 Gentoo Foundation
|
2017-12-03 14:26:36 +03:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=6
|
|
|
|
|
|
|
|
inherit toolchain-funcs multiprocessing
|
|
|
|
|
|
|
|
MYP=gprbuild-gpl-${PV}
|
|
|
|
|
2017-12-06 08:52:11 +03:00
|
|
|
DESCRIPTION="Ada library to handle GPRbuild project files"
|
2017-12-03 14:26:36 +03:00
|
|
|
HOMEPAGE="http://libre.adacore.com/"
|
2018-02-12 13:55:02 +03:00
|
|
|
SRC_URI="http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deecff7
|
2017-12-03 14:26:36 +03:00
|
|
|
-> ${MYP}-src.tar.gz"
|
|
|
|
LICENSE="GPL-3"
|
|
|
|
SLOT="0"
|
2018-04-22 00:12:55 +03:00
|
|
|
KEYWORDS="amd64 x86"
|
2018-02-12 13:55:02 +03:00
|
|
|
IUSE="gnat_2016 +gnat_2017 +shared static-libs static-pic"
|
2017-12-03 14:26:36 +03:00
|
|
|
|
2018-02-12 13:55:02 +03:00
|
|
|
RDEPEND="dev-ada/xmlada[static-libs,gnat_2016=,gnat_2017=]"
|
2017-12-03 14:26:36 +03:00
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
dev-ada/gprbuild"
|
|
|
|
|
|
|
|
S="${WORKDIR}"/${MYP}-src
|
|
|
|
|
2018-02-12 13:55:02 +03:00
|
|
|
REQUIRED_USE="|| ( shared static-libs static-pic )"
|
2017-12-03 14:26:36 +03:00
|
|
|
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
emake prefix="${D}"usr setup
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2018-02-12 13:55:02 +03:00
|
|
|
build () {
|
|
|
|
gprbuild -p -m -j$(makeopts_jobs) -XBUILD=production -v \
|
|
|
|
-XLIBRARY_TYPE=$1 -XXMLADA_BUILD=$1 \
|
|
|
|
gpr/gpr.gpr -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} || die
|
|
|
|
}
|
2017-12-03 14:26:36 +03:00
|
|
|
if use gnat_2016; then
|
|
|
|
GCC_PV=4.9.4
|
|
|
|
else
|
|
|
|
GCC_PV=6.3.0
|
|
|
|
fi
|
|
|
|
GCC=${CHOST}-gcc-${GCC_PV}
|
|
|
|
if use shared; then
|
2018-02-12 13:55:02 +03:00
|
|
|
build relocatable
|
|
|
|
fi
|
|
|
|
if use static-libs; then
|
|
|
|
build static
|
|
|
|
fi
|
|
|
|
if use static-pic; then
|
|
|
|
build static-pic
|
2017-12-03 14:26:36 +03:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2018-02-12 13:55:02 +03:00
|
|
|
if use static-libs; then
|
|
|
|
emake DESTDIR="${D}" libgpr.install.static
|
|
|
|
fi
|
|
|
|
for kind in shared static-pic; do
|
2017-12-03 14:26:36 +03:00
|
|
|
if use ${kind}; then
|
|
|
|
emake DESTDIR="${D}" libgpr.install.${kind}
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|