stalin-0.11.ebuild 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. DESCRIPTION="An aggressively optimizing Scheme compiler"
  6. HOMEPAGE="http://community.schemewiki.org/?Stalin"
  7. SRC_URI="ftp://ftp.ecn.purdue.edu/qobi/${P}.tgz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~x86"
  11. IUSE=""
  12. RDEPEND="x11-libs/libX11"
  13. DEPEND="${RDEPEND}"
  14. RESTRICT="strip"
  15. src_prepare() {
  16. sed -i -e "s/-O3 -fomit-frame-pointer/${CFLAGS}/" makefile || die
  17. }
  18. src_compile() {
  19. ./build || die "Stalin's compilation failed"
  20. }
  21. src_test() {
  22. einfo "This may take REALLY much time and requires"
  23. einfo "possibly more than 2Gb of RAM+swap."
  24. cd benchmarks || die
  25. ./compile-and-run-stalin-old-benchmarks || die "old benchmarks failed"
  26. #./compile-and-run-stalin-bcl-benchmarks || die "bcl bechmarks failed"
  27. #./compile-and-run-stalin-fdlcc-benchmarks || die "fdlcc benchmarks failed"
  28. }
  29. src_install() {
  30. pushd include
  31. doheader gc.h gc_config_macros.h
  32. insinto /usr/lib/${PN}
  33. doins \
  34. libgc.a libstalin.a stalin stalin-architecture-name \
  35. stalin.architectures QobiScheme.sc xlib.sc xlib-original.sc \
  36. Scheme-to-C-compatibility.sc
  37. fperms 755 /usr/lib/${PN}/stalin /usr/lib/${PN}/stalin-architecture-name
  38. popd
  39. cat > stalin <<- EOF
  40. #!/bin/bash
  41. exec /usr/lib/stalin/stalin -I /usr/include/stalin \
  42. -I /usr/lib/stalin -copt -fno-strict-aliasing $@
  43. EOF
  44. dobin stalin
  45. doman stalin.1
  46. dodoc ANNOUNCEMENT MORE README
  47. pushd benchmarks
  48. sed -i -e 's/..\/stalin/stalin/' make-hello || die
  49. dodoc hello.sc make-hello
  50. popd
  51. }
  52. pkg_postinst() {
  53. elog "In ${ROOT}/usr/share/doc/${PF} you will find the make-hello and"
  54. elog "hello.sc files(compressed). If you put them in the same directory"
  55. elog "and run make.hello, it will produce a \"hello\" executable."
  56. elog "The \"make-hello\" file can be used as an example of how to use"
  57. elog "stalin to compile code and create efficient executables. "
  58. elog "man stalin , for documentation"
  59. }