spim-8.0-r1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=3
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="MIPS Simulator"
  6. HOMEPAGE="http://spimsimulator.sourceforge.net/"
  7. SRC_URI="http://www.cs.wisc.edu/~larus/SPIM/${P}.tar.gz"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
  11. IUSE="doc X"
  12. RDEPEND="X? ( media-fonts/font-adobe-100dpi
  13. x11-libs/libXaw
  14. x11-libs/libXp )"
  15. DEPEND="${RDEPEND}
  16. X? ( x11-misc/imake
  17. x11-proto/xproto )
  18. >=sys-apps/sed-4
  19. sys-devel/bison"
  20. # test hangs forever, disabling it
  21. RESTRICT="test"
  22. src_prepare() {
  23. # fix bugs 240005 and 243588
  24. epatch "${FILESDIR}/${PF}-respect_env.patch"
  25. #fix bug 330389
  26. sed -i -e 's:-12-\*-75-:-14-\*-100-:g' xspim/xspim.c || die
  27. }
  28. src_configure() {
  29. tc-export CC
  30. emake -C spim configuration || die
  31. if use X; then
  32. emake -C xspim configuration || die
  33. fi
  34. }
  35. src_compile() {
  36. emake DESTDIR="${EPREFIX}" -C spim || die
  37. if use X; then
  38. emake DESTDIR="${EPREFIX}" EXCEPTION_DIR=/var/lib/spim \
  39. -C xspim -j1 xspim || die
  40. fi
  41. }
  42. src_install() {
  43. emake DESTDIR="${ED}" -C spim install || die
  44. newman Documentation/spim.man spim.1 || die
  45. if use X; then
  46. emake DESTDIR="${ED}" -C xspim install || die
  47. newman Documentation/xspim.man xspim.1 || die
  48. fi
  49. doicon "${FILESDIR}"/xspim.svg || die
  50. make_desktop_entry xspim xSPIM xspim "ComputerScience;Science;Education"
  51. dohtml Documentation/SPIM.html || die
  52. dodoc ChangeLog Documentation/BLURB README VERSION || die
  53. if use doc ; then
  54. dodoc Documentation/TeX/{cycle,spim}.ps || die
  55. fi
  56. }
  57. src_test() {
  58. emake -C spim test || die
  59. }