dev-lang/gnat-gpl: use the toolchain eclass ada facilities
authorAlfredo Tupone <tupone@gentoo.org>
Sat, 4 Apr 2020 19:17:03 +0000 (21:17 +0200)
committerAlfredo Tupone <tupone@gentoo.org>
Sat, 4 Apr 2020 19:17:03 +0000 (21:17 +0200)
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
dev-lang/gnat-gpl/gnat-gpl-2016-r4.ebuild
dev-lang/gnat-gpl/gnat-gpl-2017-r1.ebuild
dev-lang/gnat-gpl/gnat-gpl-2018-r3.ebuild
dev-lang/gnat-gpl/gnat-gpl-2019-r1.ebuild
dev-lang/gnat-gpl/metadata.xml

index 555b2df05631b15a119e6b1c7fe76975a9646a1c..b10bbb93de4e79161e425f05038b6e40a0fda8a3 100644 (file)
@@ -53,7 +53,7 @@ SRC_URI+="
 LICENSE+=" GPL-2 GPL-3"
 SLOT="${TOOLCHAIN_GCC_PV}"
 KEYWORDS="amd64 x86"
-IUSE="+bootstrap"
+IUSE="+ada +bootstrap"
 RESTRICT="!test? ( test )"
 
 RDEPEND="!sys-devel/gcc:${TOOLCHAIN_GCC_PV}"
@@ -145,22 +145,11 @@ src_prepare() {
 src_configure() {
        downgrade_arch_flags "$(gcc-version)"
        toolchain_src_configure \
-               --enable-languages=ada \
-               --disable-libada \
                CC=${GCC} \
                GNATBIND=${GNATBIND} \
                GNATMAKE=yes
 }
 
-src_compile() {
-       unset ADAFLAGS
-       toolchain_src_compile
-       gcc_do_make "-C gcc gnatlib-shared"
-       ln -s gcc ../build/prev-gcc || die
-       ln -s ${CHOST} ../build/prev-${CHOST} || die
-       gcc_do_make "-C gcc gnattools"
-}
-
 pkg_postinst() {
        toolchain_pkg_postinst
        einfo "This provide the GNAT compiler with gcc for ada/c/c++ and more"
index 8a6cf4555b8c6078446c11dfe04b4518942fdecf..a0efa9b463c10521c33ac1623cc38d8cf9f9ab78 100644 (file)
@@ -40,7 +40,7 @@ HOMEPAGE="http://libre.adacore.com/"
 LICENSE+=" GPL-2 GPL-3"
 SLOT="${TOOLCHAIN_GCC_PV}"
 KEYWORDS="amd64 x86"
-IUSE="+bootstrap"
+IUSE="+ada +bootstrap"
 RESTRICT="!test? ( test )"
 
 RDEPEND="!sys-devel/gcc:${TOOLCHAIN_GCC_PV}"
@@ -130,18 +130,7 @@ src_prepare() {
 src_configure() {
        export PATH=${PWD}/bin:${PATH}
        downgrade_arch_flags "$(gcc-version)"
-       toolchain_src_configure \
-               --enable-languages=ada \
-               --disable-libada
-}
-
-src_compile() {
-       unset ADAFLAGS
-       toolchain_src_compile
-       gcc_do_make "-C gcc gnatlib-shared"
-       ln -s gcc ../build/prev-gcc || die
-       ln -s ${CHOST} ../build/prev-${CHOST} || die
-       gcc_do_make "-C gcc gnattools"
+       toolchain_src_configure
 }
 
 pkg_postinst() {
index 6559a30cfa329d1f930284c70fe9ccfae001c7b3..239c00d759dae4fb716fe140ba6b95b1b01197b8 100644 (file)
@@ -39,7 +39,7 @@ HOMEPAGE="http://libre.adacore.com/"
 
 LICENSE+=" GPL-2 GPL-3"
 KEYWORDS="amd64 x86"
-IUSE="+bootstrap"
+IUSE="+ada +bootstrap"
 RESTRICT="!test? ( test )"
 
 RDEPEND="!sys-devel/gcc:${TOOLCHAIN_GCC_PV}"
@@ -128,18 +128,7 @@ src_prepare() {
 src_configure() {
        export PATH=${PWD}/bin:${PATH}
        downgrade_arch_flags "$(gcc-version)"
-       toolchain_src_configure \
-               --enable-languages=ada \
-               --disable-libada
-}
-
-src_compile() {
-       unset ADAFLAGS
-       toolchain_src_compile
-       gcc_do_make "-C gcc gnatlib-shared"
-       ln -s gcc ../build/prev-gcc || die
-       ln -s ${CHOST} ../build/prev-${CHOST} || die
-       gcc_do_make "-C gcc gnattools"
+       toolchain_src_configure
 }
 
 pkg_postinst() {
index 2d74d35e7a04750ee8c32b18891f6ac3c7cdd469..34a131541eaa11cf431e42d852b36f91493906de 100644 (file)
@@ -41,7 +41,7 @@ HOMEPAGE="http://libre.adacore.com/"
 
 LICENSE+=" GPL-2 GPL-3"
 KEYWORDS="amd64 x86"
-IUSE="+bootstrap"
+IUSE="+ada +bootstrap"
 RESTRICT="!test? ( test )"
 
 RDEPEND="!sys-devel/gcc:${TOOLCHAIN_GCC_PV}"
@@ -127,18 +127,7 @@ src_prepare() {
 src_configure() {
        export PATH=${PWD}/bin:${PATH}
        downgrade_arch_flags "$(gcc-version)"
-       toolchain_src_configure \
-               --enable-languages=ada \
-               --disable-libada
-}
-
-src_compile() {
-       unset ADAFLAGS
-       toolchain_src_compile
-       gcc_do_make "-C gcc gnatlib-shared"
-       ln -s gcc ../build/prev-gcc || die
-       ln -s ${CHOST} ../build/prev-${CHOST} || die
-       gcc_do_make "-C gcc gnattools"
+       toolchain_src_configure
 }
 
 pkg_postinst() {
index 923cfc961fa4cadba4699faab1818c124086a072..d3aadec0e515b67a4fdc5d960d5be44cc4d69ad8 100644 (file)
@@ -5,6 +5,7 @@
                <email>ada@gentoo.org</email>
        </maintainer>
        <use>
+               <flag name="ada">Build the ADA language (GNAT) frontend</flag>
                <flag name="awt">Useful only when building GCJ, this enables Abstract
                        Window Toolkit (AWT) peer support on top of GTK+</flag>
                <flag name="bootstrap">Used to bootstrap gnat-gpl</flag>