# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit gnatbuild flag-o-matic DESCRIPTION="GNAT Ada Compiler - gcc version" HOMEPAGE="http://gcc.gnu.org/" LICENSE="GMGPL" SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${GCCVER}/gcc-core-${GCCVER}.tar.bz2 ${P}-src.tgz x86? ( http://dev.gentoo.org/~george/src/gnatboot-3.4-i686.tar.bz2 ) amd64? ( http://dev.gentoo.org/~george/src/gnatboot-3.4-amd64.tar.bz2 )" # ${GNATBRANCH} and ${GCCVER} are defined in gnatbuild.eclass and depend # only on $PV, so should be safe to use in DEPEND/SRC_URI KEYWORDS="~amd64 ~x86" RESTRICT="fetch" GNATSOURCE="${WORKDIR}/${P}-src" CFLAGS="-O2" CXXFLAGS=${CFLAGS} pkg_nofetch() { einfo "Please fetch the ${P}-src.tgz file from https://libre2.adacore.com/dynamic/download" einfo "AdaCore wants a registration to get new Ada for now.." } src_unpack() { gnatbuild_src_unpack base_unpack # prep gcc sources for Ada mv "${GNATSOURCE}/src/ada" "${S}/gcc" # looks like some files are missing.. cp "${FILESDIR}"/prj-attr-pm.* "${S}/gcc/ada" cd "${S}" patch -p0 < "${GNATSOURCE}/src/gcc-34.dif" # epatch "${FILESDIR}/${P}-gentoo.patch.bz2" # epatch "${FILESDIR}/${P}-noaddr2line.patch.bz2" # sed -i -e "s:-laddr2line::g" ada/Makefile.in # epatch "${FILESDIR}/${P}-nptl.patch" gnatbuild_src_unpack common_prep # one of the converted gcc->gnatgcc in common_prep needs to stay gcc in # factin this version sed -i -e 's:(Last3 = "gnatgcc"):(Last3 = "gcc"):' "${S}/gcc/ada/makegpr.adb" # add -fPIC flag to shared libs cd ${S}/gcc/ada if [ "${ARCH}" = "amd64" -o "${ARCH}" = "x86" ]; then patch Make-lang.in < ${FILESDIR}/gnat-Make-lang.in.patch fi } #src_compile() { # gnatbuild_src_compile configure bootstrap \ # gnatlib_and_tools gnatlib-shared #}