mozart-1.4.0-r3.ebuild 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit elisp-common eutils
  5. PATCHSET_VER="5"
  6. MY_P="mozart-${PV}.20080704"
  7. DESCRIPTION="Advanced development platform for intelligent, distributed applications"
  8. HOMEPAGE="http://www.mozart-oz.org/"
  9. SRC_URI="
  10. http://www.mozart-oz.org/download/mozart-ftp/store/1.4.0-2008-07-02-tar/mozart-1.4.0.20080704-src.tar.gz
  11. mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz
  12. doc? ( http://www.mozart-oz.org/download/mozart-ftp/store/1.4.0-2008-07-02-tar/mozart-1.4.0.20080704-doc.tar.gz )"
  13. SLOT="0"
  14. LICENSE="Mozart"
  15. KEYWORDS="-amd64 ppc -ppc64 x86"
  16. IUSE="doc emacs examples gdbm static tcl threads tk"
  17. RDEPEND="
  18. dev-lang/perl
  19. dev-libs/gmp:0=
  20. sys-libs/zlib
  21. emacs? ( virtual/emacs )
  22. gdbm? ( sys-libs/gdbm )
  23. tcl? (
  24. tk? (
  25. dev-lang/tk:0=
  26. dev-lang/tcl:0=
  27. )
  28. )"
  29. DEPEND="${RDEPEND}
  30. sys-devel/bison
  31. sys-devel/flex"
  32. SITEFILE=50${PN}-gentoo.el
  33. S="${WORKDIR}"/${MY_P}
  34. src_prepare() {
  35. EPATCH_FORCE=yes
  36. EPATCH_SUFFIX=patch
  37. epatch "${WORKDIR}"/${PV}
  38. }
  39. src_configure() {
  40. local myconf="\
  41. --without-global-oz \
  42. --enable-opt=none"
  43. if use tcl && use tk ; then
  44. myconf="${myconf} --enable-wish"
  45. else
  46. myconf="${myconf} --disable-wish"
  47. fi
  48. econf \
  49. ${myconf} \
  50. --disable-doc \
  51. --enable-contrib \
  52. --disable-contrib-micq \
  53. $(use_enable doc contrib-doc) \
  54. $(use_enable gdbm contrib-gdbm) \
  55. $(use_enable tk contrib-tk) \
  56. $(use_enable emacs compile-elisp) \
  57. $(use_enable static link-static) \
  58. $(use_enable threads threaded)
  59. }
  60. src_compile() {
  61. emake bootstrap
  62. }
  63. src_test() {
  64. # Mozart tests must be run single-threaded
  65. cd "${S}"/share/test || die
  66. emake -j1 boot-oztest
  67. emake -j1 boot-check
  68. }
  69. src_install() {
  70. emake \
  71. PREFIX="${D}"/usr/lib/mozart \
  72. ELISPDIR="${D}${SITELISP}/${PN}" \
  73. install
  74. dosym /usr/lib/mozart/bin/convertTextPickle /usr/bin/convertTextPickle
  75. dosym /usr/lib/mozart/bin/oldpickle2text /usr/bin/oldpickle2text
  76. dosym /usr/lib/mozart/bin/ozc /usr/bin/ozc
  77. dosym /usr/lib/mozart/bin/ozd /usr/bin/ozd
  78. dosym /usr/lib/mozart/bin/ozengine /usr/bin/ozengine
  79. dosym /usr/lib/mozart/bin/ozl /usr/bin/ozl
  80. dosym /usr/lib/mozart/bin/ozplatform /usr/bin/ozplatform
  81. dosym /usr/lib/mozart/bin/oztool /usr/bin/oztool
  82. dosym /usr/lib/mozart/bin/pickle2text /usr/bin/pickle2text
  83. dosym /usr/lib/mozart/bin/text2pickle /usr/bin/text2pickle
  84. if use emacs; then
  85. dosym /usr/lib/mozart/bin/oz /usr/bin/oz
  86. elisp-site-file-install "${FILESDIR}/${SITEFILE}"
  87. fi
  88. dodoc "${S}"/README
  89. use doc && dohtml -r "${WORKDIR}"/mozart/doc/*
  90. if use examples; then
  91. cd "${S}"/share || die
  92. insinto /usr/share/doc/${PF}
  93. doins -r examples demo
  94. rm -rf $(find "${ED}"/usr/share/doc/${PF}/examples \
  95. -name Makefile -o -name Makefile.in) || die
  96. fi
  97. }
  98. pkg_postinst() {
  99. use emacs && elisp-site-regen
  100. }
  101. pkg_postrm() {
  102. use emacs && elisp-site-regen
  103. }