gnat-gcc-4.5.4-r1.ebuild 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit gnatbuild
  5. DESCRIPTION="GNAT Ada Compiler - gcc version"
  6. HOMEPAGE="https://gcc.gnu.org/"
  7. LICENSE="GMGPL"
  8. IUSE="doc"
  9. BOOT_SLOT="4.4"
  10. # SLOT is set in gnatbuild.eclass, depends only on PV (basically SLOT=GCCBRANCH)
  11. # so the URI's are static.
  12. SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
  13. ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
  14. amd64? ( https://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-amd64.tar.bz2 )
  15. sparc? ( https://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-sparc.tar.bz2 )
  16. x86? ( https://dev.gentoo.org/~george/src/gnatboot-${BOOT_SLOT}-i686.tar.bz2 )"
  17. # ppc? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
  18. KEYWORDS="~amd64 ~x86"
  19. # starting with 4.3.0 gnat needs these libs
  20. RDEPEND=">=dev-libs/mpfr-3.0.1
  21. >=dev-libs/gmp-5.0
  22. >=sys-libs/zlib-1.2
  23. >=sys-libs/ncurses-5.7:0"
  24. DEPEND="${RDEPEND}
  25. doc? ( sys-apps/texinfo )
  26. >=sys-devel/bison-1.875
  27. >=sys-libs/glibc-2.8
  28. >=sys-devel/binutils-2.20"
  29. #QA_EXECSTACK="${BINPATH:1}/gnatls ${BINPATH:1}/gnatbind ${BINPATH:1}/gnatmake
  30. # ${LIBEXECPATH:1}/gnat1 ${LIBPATH:1}/adalib/libgnat-${SLOT}.so"
  31. src_unpack() {
  32. gnatbuild_src_unpack
  33. #fixup some hardwired flags
  34. cd "${S}"/gcc/ada
  35. # universal gcc -> gnatgcc substitution occasionally produces lines too long
  36. # and then build halts on the style check.
  37. #
  38. sed -i -e 's:gnatgcc:gcc:' osint.ads switch.ads ||
  39. die "reversing [gnat]gcc substitution in comments failed"
  40. # gcc pretty much ignores --with-system-zlib. At least it still descends
  41. # into zlib and does configure and build there (gcc bug@7125?). For whatever
  42. # reason this conflicts with multilib in gcc-4.4..
  43. sed -i -e "s:libgui zlib:libgui:" "${S}"/configure
  44. }
  45. src_compile() {
  46. # work-around for downgrading texinfo. See bug #483192
  47. if use doc ; then
  48. if has_version ">=sys-apps/texinfo-5.1" ; then
  49. ewarn "Disabling info docs. Please downgrade texinfo to less than 5.x or"
  50. ewarn "use ${PN}-4.6 instead (as upstream has only patched 4.6 and higher)."
  51. epatch "${FILESDIR}"/${P}-tex-version-workaround.patch
  52. fi
  53. else
  54. elog "Disabling info docs."
  55. epatch "${FILESDIR}"/${P}-tex-version-workaround.patch
  56. fi
  57. # looks like gnatlib_and_tools and gnatlib_shared have become part of
  58. # bootstrap
  59. gnatbuild_src_compile configure make-tools bootstrap
  60. }