1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils elisp-common
8 DESCRIPTION="Language for scientific graphics programming"
9 HOMEPAGE="http://gri.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
14 KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
15 IUSE="doc emacs examples hdf5"
18 app-text/ghostscript-gpl
21 virtual/imagemagick-tools[png]
22 emacs? ( >=app-editors/emacs-23.1:* )"
25 SITEFILE="50gri-gentoo.el"
29 "${FILESDIR}"/${PN}-2.12.18-postscript.patch \
30 "${FILESDIR}"/${P}-perl-5.16.patch \
31 "${FILESDIR}"/${P}-texinfo5.patch
32 # Makefile.am contains a call to the missing script that triggers gentoo qa
33 sed -i -e 's|${SHELL} ../missing --run tex|tex|g' \
34 doc/Makefile.in || die
37 -i doc/tst_suite/tst_rpn.gri || die
42 use hdf5 && has_version sci-libs/hdf5[mpi] && \
43 export CXX=mpicxx CC=mpicc
44 VARTEXFONTS="${T}/fonts" emake
45 use emacs && elisp-compile src/*.el
50 # license text not necessary
51 rm "${ED}"/usr/share/gri/doc/license.txt || die
53 # install target installs it always and in the wrong location
54 # remove it here and call elisp-install in case of USE=emacs below
55 rm -rf "${ED}"/usr/share/emacs || die
58 sed -i -e "s/Manual at.*//" "${ED}"/usr/share/gri/startup.msg || die
59 rm "${ED}"/usr/share/gri/doc/{cmd,}refcard.ps || die
60 rm -rf "${ED}"/usr/share/gri/doc/html || die
62 if ! use examples; then
63 sed -i -e "s/Examples at.*//" "${ED}"/usr/share/gri/startup.msg || die
64 rm -rf "${ED}"/usr/share/gri/doc/examples || die
66 #move docs to the proper place
67 use doc || use examples && \
68 mv -f "${ED}"/usr/share/gri/doc/* "${ED}"/usr/share/doc/${PF}
69 rm -rf "${ED}"/usr/share/gri/doc || die
73 elisp-install ${PN} *.{el,elc}
74 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
79 use emacs && elisp-site-regen
83 use emacs && elisp-site-regen