|
|
# Distributed under the terms of the GNU General Public License v2 | # Distributed under the terms of the GNU General Public License v2 |
# $Header: /var/cvsroot/gentoo-x86/media-gfx/gnuplot/gnuplot-4.0-r1.ebuild,v 1.2 2004/10/05 11:50:45 weeve Exp $ | # $Header: /var/cvsroot/gentoo-x86/media-gfx/gnuplot/gnuplot-4.0-r1.ebuild,v 1.2 2004/10/05 11:50:45 weeve Exp $ |
| |
inherit eutils |
inherit eutils elisp-common |
| |
MY_P="${P}.0" | MY_P="${P}.0" |
| |
|
|
| |
SLOT="0" | SLOT="0" |
KEYWORDS="~x86 ~amd64 ~sparc" | KEYWORDS="~x86 ~amd64 ~sparc" |
IUSE="doc gd ggi pdflib plotutils png readline svga X xemacs" |
IUSE="doc gd ggi pdflib plotutils png readline svga X xemacs emacs" |
|
|
|
E_SITEFILE="50gnuplot-gentoo.el" |
| |
DEPEND=" | DEPEND=" |
xemacs? ( virtual/xemacs ) | xemacs? ( virtual/xemacs ) |
|
emacs? ( virtual/emacs ) |
pdflib? ( media-libs/pdflib ) | pdflib? ( media-libs/pdflib ) |
ggi? ( media-libs/libggi ) | ggi? ( media-libs/libggi ) |
png? ( media-libs/libpng ) | png? ( media-libs/libpng ) |
|
|
} | } |
| |
src_compile() { | src_compile() { |
local myconf="--datadir=/usr/share/${PN} --with-gihdir=/usr/share/${PN}/gih" |
local myconf="--with-gihdir=/usr/share/${PN}/gih" |
| |
myconf="${myconf} $(use_with X x)" | myconf="${myconf} $(use_with X x)" |
myconf="${myconf} $(use_with svga linux-vga)" | myconf="${myconf} $(use_with svga linux-vga)" |
|
|
&& myconf="${myconf} --with-pdf=/usr/lib" \ | && myconf="${myconf} --with-pdf=/usr/lib" \ |
|| myconf="${myconf} --without-pdf" | || myconf="${myconf} --without-pdf" |
| |
! use xemacs && myconf="${myconf} --without-lisp-files" |
! ( use xemacs | use emacs ) && myconf="${myconf} --without-lisp-files" |
| |
# This is a hack to avoid sandbox violations when using the Linux console. | # This is a hack to avoid sandbox violations when using the Linux console. |
# Creating the DVI and PDF tutorials require /dev/svga to build the | # Creating the DVI and PDF tutorials require /dev/svga to build the |
|
|
insinto /usr/share/doc/${PF}/psdoc | insinto /usr/share/doc/${PF}/psdoc |
doins docs/psdoc/{*.doc,*.tex,*.ps,*.gpi,README} | doins docs/psdoc/{*.doc,*.tex,*.ps,*.gpi,README} |
fi | fi |
|
if use emacs; then |
|
cat lisp/dotemacs > ${T}/${E_SITEFILE} |
|
elisp-site-file-install ${T}/${E_SITEFILE} |
|
fi |
} | } |
| |
pkg_postinst() { | pkg_postinst() { |
|
if use emacs; then |
|
einfo "Running elisp-site-regen...." |
|
elisp-site-regen |
|
fi |
if use svga ; then | if use svga ; then |
einfo "In order to enable ordinary users to use SVGA console graphics" | einfo "In order to enable ordinary users to use SVGA console graphics" |
einfo "gnuplot needs to be set up as setuid root. Please note that" | einfo "gnuplot needs to be set up as setuid root. Please note that" |