scheme48-1.9.2-r1.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit elisp-common multilib eutils flag-o-matic
  5. DESCRIPTION="Scheme48 is an implementation of the Scheme Programming Language"
  6. HOMEPAGE="http://www.s48.org/"
  7. SRC_URI="http://www.s48.org/${PV}/${P}.tgz"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS="~x86 ~amd64 ~amd64-linux ~x86-linux ~x86-macos"
  11. IUSE="doc emacs"
  12. DEPEND="emacs? ( virtual/emacs )"
  13. RDEPEND="${DEPEND}"
  14. SITEFILE=50scheme48-gentoo.el
  15. src_prepare() {
  16. epatch "${FILESDIR}"/CVE-2014-4150.patch
  17. }
  18. src_configure() {
  19. append-cflags -fno-strict-aliasing
  20. econf --docdir=/usr/share/doc/${P}
  21. }
  22. src_compile() {
  23. emake
  24. if use emacs; then
  25. elisp-compile "${S}"/emacs/cmuscheme48.el
  26. fi
  27. }
  28. src_install() {
  29. # weird parallel failures!
  30. emake -j1 DESTDIR="${D}" install
  31. if use emacs; then
  32. elisp-install ${PN} emacs/cmuscheme48.el emacs/*.elc
  33. elisp-site-file-install "${FILESDIR}"/${SITEFILE}
  34. fi
  35. dodoc README
  36. if use doc; then
  37. dodoc doc/*.txt
  38. docinto src
  39. dodoc doc/src/*
  40. pushd "${ED}/usr/share/doc/${P}" > /dev/null
  41. install -dm755 html
  42. mv *.html *.css *.gif html/
  43. popd > /dev/null
  44. else
  45. pushd "${ED}/usr/share/doc/${P}" > /dev/null
  46. rm -f *.html *.css *.gif
  47. rm -f manu*
  48. popd > /dev/null
  49. fi
  50. #this symlink clashes with gambit
  51. rm "${ED}"/usr/bin/scheme-r5rs || die
  52. }
  53. pkg_postinst() {
  54. use emacs && elisp-site-regen
  55. }
  56. pkg_postrm() {
  57. use emacs && elisp-site-regen
  58. }