gle-4.2.4c.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils elisp-common qt4-r2 flag-o-matic autotools
  5. DESCRIPTION="Graphics Layout Engine"
  6. HOMEPAGE="http://glx.sourceforge.net/"
  7. MY_P=${PN}-graphics-${PV}
  8. MAN_V=4.2.2
  9. SRC_URI="mirror://sourceforge/glx/${MY_P}f-src.tar.gz
  10. doc? ( mirror://sourceforge/glx/${PN}-manual-${MAN_V}.pdf
  11. mirror://sourceforge/glx/GLEusersguide.pdf )"
  12. SLOT="0"
  13. LICENSE="BSD-2 emacs? ( GPL-2 ) qt4? ( GPL-2 )"
  14. IUSE="X qt4 jpeg png tiff doc emacs vim-syntax"
  15. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  16. DEPEND="
  17. sys-libs/ncurses:0=
  18. X? ( x11-libs/libX11 )
  19. qt4? ( dev-qt/qtopengl:4 )
  20. jpeg? ( virtual/jpeg:0 )
  21. png? ( media-libs/libpng:0= )
  22. tiff? ( media-libs/tiff:0 )
  23. emacs? ( virtual/emacs )"
  24. RDEPEND="${DEPEND}
  25. app-text/ghostscript-gpl
  26. virtual/latex-base
  27. vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
  28. S="${WORKDIR}"/${MY_P}
  29. src_prepare() {
  30. epatch "${FILESDIR}"/${PN}-4.2.4b-parallel.patch
  31. eaclocal
  32. eautoconf
  33. }
  34. src_configure() {
  35. # CPPFLAGS are understood as C++ flags
  36. append-cppflags ${CXXFLAGS}
  37. econf \
  38. --without-rpath \
  39. --with-manip \
  40. $(use_with qt4 qt "${EPREFIX}"/usr) \
  41. $(use_with X x) \
  42. $(use_with jpeg) \
  43. $(use_with png) \
  44. $(use_with tiff)
  45. }
  46. src_compile() {
  47. emake
  48. if use emacs; then
  49. cd contrib/editors/highlighting
  50. mv ${PN}-emacs.el ${PN}-mode.el
  51. elisp-compile ${PN}-mode.el || die
  52. fi
  53. }
  54. src_install() {
  55. # -jN failed to install some data files
  56. emake -j1 DESTDIR="${D}" install
  57. rmdir "${ED}"/usr/share/doc/gle-graphics || die "rmdir gle-graphics failed"
  58. dodoc README.txt
  59. if use qt4; then
  60. newicon src/gui/images/gle_icon.png gle.png
  61. make_desktop_entry qgle GLE gle
  62. newdoc src/gui/readme.txt gui_readme.txt
  63. fi
  64. if use doc; then
  65. insinto /usr/share/doc/${PF}
  66. doins "${DISTDIR}"/${PN}-manual-${MAN_V}.pdf \
  67. "${DISTDIR}"/GLEusersguide.pdf
  68. fi
  69. if use emacs; then
  70. elisp-install ${PN} contrib/editors/highlighting/gle-mode.{el,elc} || die
  71. elisp-site-file-install "${FILESDIR}"/64gle-gentoo.el || die
  72. fi
  73. if use vim-syntax ; then
  74. dodir /usr/share/vim/vimfiles/{ftplugins,indent,syntax}
  75. cd contrib/editors/highlighting/vim || die
  76. chmod 644 ftplugin/* indent/* syntax/*
  77. insinto /usr/share/vim/vimfiles
  78. doins -r ftplugin indent syntax
  79. fi
  80. }
  81. pkg_postinst() {
  82. use emacs && elisp-site-regen
  83. }
  84. pkg_postrm() {
  85. use emacs && elisp-site-regen
  86. }