reduce-20110414-r1.ebuild 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 multilib
  5. DESCRIPTION="A general-purpose computer algebra system"
  6. HOMEPAGE="
  7. http://reduce-algebra.sourceforge.net/
  8. http://reduce-algebra.com/"
  9. SRC_URI="mirror://sourceforge/${PN}-algebra/${PN}-src-${PV}.tar.bz2"
  10. SLOT="0"
  11. LICENSE="BSD-2 X? ( LGPL-2.1 )"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="doc emacs gnuplot X"
  14. RDEPEND="
  15. X? (
  16. x11-libs/libXrandr
  17. x11-libs/libXcursor
  18. x11-libs/libXft
  19. )
  20. gnuplot? ( sci-visualization/gnuplot )
  21. emacs? ( virtual/emacs )"
  22. DEPEND="${RDEPEND}"
  23. src_configure() {
  24. # If you pass --prefix to this damn configure,
  25. # make (not make install!) will try to install stuff
  26. # into the live file system => sandbox violation
  27. # Therefore, I cannot use econf here
  28. # Also, make calls configure in maintainer mode in subdirs *by design*
  29. # The trunk sucks less => WONTFIX until the next release
  30. ./configure --with-csl $(use_with X gui) || die
  31. # psl build requires Internet connection at build time
  32. # we cannot support it
  33. }
  34. src_compile() {
  35. emake -j1 STRIP=true
  36. pushd cslbuild/*/csl/reduce.doc > /dev/null
  37. rm -f *.txt *.tex || die
  38. popd > /dev/null
  39. if use emacs; then
  40. einfo "Compiling emacs lisp files"
  41. elisp-compile generic/emacs/*.el || die "elisp-compile failed"
  42. fi
  43. }
  44. src_test() {
  45. emake -j1 testall
  46. }
  47. src_install() {
  48. local lib="$(get_libdir)"
  49. dodoc README BUILDING DEPENDENCY_TRACKING
  50. pushd bin > /dev/null
  51. cp "${FILESDIR}"/redcsl "${FILESDIR}"/csl . || die
  52. sed -e "s/lib/${lib}/" -i redcsl || die
  53. sed -e "s/lib/${lib}/" -i csl || die
  54. dobin redcsl csl
  55. popd > /dev/null
  56. pushd cslbuild/*/csl > /dev/null
  57. exeinto /usr/${lib}/${PN}
  58. doexe reduce csl
  59. insinto /usr/$(get_libdir)/${PN}
  60. doins reduce.img csl.img
  61. insinto /usr/share/${PN}
  62. doins -r ${PN}.doc
  63. mv "${D}"usr/share/${PN}/${PN}.doc "${D}"usr/share/${PN}/doc || die
  64. dosym /usr/share/${PN}/doc /usr/${lib}/${PN}/${PN}.doc
  65. if use X; then
  66. doins -r ${PN}.fonts
  67. mv "${D}"usr/share/${PN}/${PN}.fonts "${D}"usr/share/${PN}/fonts || die
  68. dosym /usr/share/${PN}/fonts /usr/${lib}/${PN}/${PN}.fonts
  69. fi
  70. popd > /dev/null
  71. if use doc; then
  72. dodoc doc/util/r38.pdf
  73. fi
  74. if use emacs; then
  75. pushd generic/emacs > /dev/null
  76. elisp-install ${PN} *.el *.elc || die "elisp-install failed"
  77. elisp-site-file-install "${FILESDIR}/64${PN}-gentoo.el"
  78. popd > /dev/null
  79. fi
  80. }