guile-1.8.8-r3.ebuild 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils autotools flag-o-matic elisp-common
  5. DESCRIPTION="Scheme interpreter"
  6. HOMEPAGE="https://www.gnu.org/software/guile/"
  7. SRC_URI="mirror://gnu/guile/${P}.tar.gz"
  8. LICENSE="LGPL-2.1"
  9. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
  10. IUSE="debug debug-freelist debug-malloc +deprecated discouraged emacs networking nls readline +regex +threads"
  11. RESTRICT="!regex? ( test )"
  12. RDEPEND="
  13. >=dev-libs/gmp-4.1:0=
  14. dev-libs/libltdl:0=
  15. sys-devel/gettext
  16. sys-libs/ncurses:0=
  17. emacs? ( virtual/emacs )
  18. readline? ( sys-libs/readline:0= )"
  19. DEPEND="${RDEPEND}
  20. sys-apps/texinfo
  21. sys-devel/libtool"
  22. # Guile seems to contain some slotting support, /usr/share/guile/ is slotted,
  23. # but there are lots of collisions. Most in /usr/share/libguile. Therefore
  24. # I'm slotting this in the same slot as guile-1.6* for now.
  25. SLOT="12/8"
  26. MAJOR="1.8"
  27. src_prepare() {
  28. epatch "${FILESDIR}/${P}-fix_guile-config.patch" \
  29. "${FILESDIR}/${P}-gcc46.patch" \
  30. "${FILESDIR}/${P}-gcc5.patch" \
  31. "${FILESDIR}/${P}-makeinfo-5.patch" \
  32. "${FILESDIR}/${P}-gtexinfo-5.patch" \
  33. "${FILESDIR}/${P}-readline.patch" \
  34. "${FILESDIR}/${P}-tinfo.patch" \
  35. "${FILESDIR}/${P}-sandbox.patch" \
  36. "${FILESDIR}/${P}-mkdir-mask.patch"
  37. sed \
  38. -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g" \
  39. -e "/AM_PROG_CC_STDC/d" \
  40. -i guile-readline/configure.in || die
  41. epatch_user
  42. mv "${S}"/configure.{in,ac} || die
  43. mv "${S}"/guile-readline/configure.{in,ac} || die
  44. eautoreconf
  45. }
  46. src_configure() {
  47. # see bug #178499
  48. filter-flags -ftree-vectorize
  49. #will fail for me if posix is disabled or without modules -- hkBst
  50. econf \
  51. --disable-error-on-warning \
  52. --disable-static \
  53. --enable-posix \
  54. $(use_enable networking) \
  55. $(use_enable readline) \
  56. $(use_enable regex) \
  57. $(use deprecated || use_enable discouraged) \
  58. $(use_enable deprecated) \
  59. $(use_enable emacs elisp) \
  60. $(use_enable nls) \
  61. --disable-rpath \
  62. $(use_enable debug-freelist) \
  63. $(use_enable debug-malloc) \
  64. $(use_enable debug guile-debug) \
  65. $(use_with threads) \
  66. --with-modules \
  67. EMACS=no
  68. }
  69. src_compile() {
  70. emake
  71. # Above we have disabled the build system's Emacs support;
  72. # for USE=emacs we compile (and install) the files manually
  73. if use emacs; then
  74. cd emacs || die
  75. elisp-compile *.el || die
  76. fi
  77. }
  78. src_install() {
  79. emake DESTDIR="${D}" install
  80. dodoc AUTHORS ChangeLog GUILE-VERSION HACKING NEWS README THANKS
  81. # texmacs needs this, closing bug #23493
  82. dodir /etc/env.d
  83. echo "GUILE_LOAD_PATH=\"${EPREFIX}/usr/share/guile/${MAJOR}\"" > "${ED}"/etc/env.d/50guile || die
  84. # necessary for registering slib, see bug 206896
  85. keepdir /usr/share/guile/site
  86. if use emacs; then
  87. elisp-install ${PN} emacs/*.{el,elc} || die
  88. elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el" || die
  89. fi
  90. }
  91. pkg_postinst() {
  92. use emacs && elisp-site-regen
  93. }
  94. pkg_postrm() {
  95. use emacs && elisp-site-regen
  96. }