summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMamoru Komachi <usata@gentoo.org>2004-10-19 15:34:47 +0000
committerMamoru Komachi <usata@gentoo.org>2004-10-19 15:34:47 +0000
commita04db0d56a0c40295cf43bf9e1501fc43e172b9d (patch)
treee843bd782c88358cfb4ec9ba1556d3b8721aa533 /media-gfx/gnuplot
parentStable on x86. (Manifest recommit) (diff)
downloadgentoo-2-a04db0d56a0c40295cf43bf9e1501fc43e172b9d.tar.gz
gentoo-2-a04db0d56a0c40295cf43bf9e1501fc43e172b9d.tar.bz2
gentoo-2-a04db0d56a0c40295cf43bf9e1501fc43e172b9d.zip
Support for emacs. Thanks to P.L.Hayes <paul@wolfbone.ath.cx>; bug #66765.
Diffstat (limited to 'media-gfx/gnuplot')
-rw-r--r--media-gfx/gnuplot/ChangeLog7
-rw-r--r--media-gfx/gnuplot/gnuplot-4.0-r1.ebuild56
2 files changed, 48 insertions, 15 deletions
diff --git a/media-gfx/gnuplot/ChangeLog b/media-gfx/gnuplot/ChangeLog
index eadb64336db5..b36ab9c7d53f 100644
--- a/media-gfx/gnuplot/ChangeLog
+++ b/media-gfx/gnuplot/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for media-gfx/gnuplot
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/gnuplot/ChangeLog,v 1.30 2004/10/17 05:46:48 usata Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/gnuplot/ChangeLog,v 1.31 2004/10/19 15:34:47 usata Exp $
+
+ 20 Oct 2004; Mamoru KOMACHI <usata@gentoo.org> gnuplot-4.0-r1.ebuild:
+ Support for emacs. Thanks to P.L.Hayes <paul@wolfbone.ath.cx>; bug #66765.
17 Oct 2004; Mamoru KOMACHI <usata@gentoo.org> gnuplot-4.0-r1.ebuild:
Detects XEmacs correctly; bug #66765.
@@ -35,7 +38,7 @@
files/header-order.patch:
Added a patch for bug #49263 and corrected the header.
- 05 May 2004; Bryan Østergaard <kloeri@gentoo.org> gnuplot-3.8j.ebuild:
+ 05 May 2004; Bryan ƒŠstergaard <kloeri@gentoo.org> gnuplot-3.8j.ebuild:
Stable on alpha.
*gnuplot-4.0 (27 Apr 2004)
diff --git a/media-gfx/gnuplot/gnuplot-4.0-r1.ebuild b/media-gfx/gnuplot/gnuplot-4.0-r1.ebuild
index 5c2f29ffa51b..cd7afb31b966 100644
--- a/media-gfx/gnuplot/gnuplot-4.0-r1.ebuild
+++ b/media-gfx/gnuplot/gnuplot-4.0-r1.ebuild
@@ -1,9 +1,8 @@
# Copyright 1999-2004 Gentoo Foundation
# 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.3 2004/10/17 05:46:48 usata Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/gnuplot/gnuplot-4.0-r1.ebuild,v 1.4 2004/10/19 15:34:47 usata Exp $
-inherit eutils
-# inherit elisp-common
+inherit eutils elisp-common
MY_P="${P}.0"
@@ -14,11 +13,11 @@ LICENSE="gnuplot"
SLOT="0"
KEYWORDS="~x86 ~amd64 ~sparc"
-IUSE="doc gd ggi pdflib plotutils png readline svga X xemacs"
-#IUSE="${IUSE} emacs"
+IUSE="doc emacs gd ggi pdflib plotutils png readline svga X xemacs"
DEPEND="
xemacs? ( virtual/xemacs )
+ emacs? ( virtual/emacs !app-emacs/gnuplot-mode )
pdflib? ( media-libs/pdflib )
ggi? ( media-libs/libggi )
png? ( media-libs/libpng )
@@ -28,10 +27,11 @@ DEPEND="
svga? ( media-libs/svgalib )
readline? ( >=sys-libs/readline-4.2 )
plotutils? ( media-libs/plotutils )"
-# emacs? ( app-emacs/gnuplot-mode )
S=${WORKDIR}/${MY_P}
+E_SITEFILE="50gnuplot-gentoo.el"
+
src_unpack() {
unpack ${A}
cd ${S}
@@ -56,13 +56,7 @@ src_compile() {
&& myconf="${myconf} --with-readline=gnu --enable-history-file" \
|| myconf="${myconf} --with-readline"
- if use xemacs ; then
- export EMACS=xemacs
- myconf="${myconf} --with-lispdir=/usr/lib/xemacs/site-packages/${PN}"
- else
- export EMACS=no
- myconf="${myconf} --without-lisp-files"
- fi
+ myconf="${myconf} --without-lisp-files"
# 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
@@ -83,6 +77,37 @@ src_compile() {
src_install () {
make DESTDIR=${D} install || die
+ if use emacs; then
+ cd lisp
+ einfo "Configuring gnuplot-mode for emacs..."
+ EMACS="emacs" lispdir="/usr/share/emacs/site-lisp/${PN}" econf || die
+ make DESTDIR=${D} install || die
+ make clean
+ cd ..
+
+ # Gentoo emacs site-lisp configuration
+ string="(add-to-list 'load-path \"/usr/share/emacs/site-lisp/${PN}\")"
+ echo -e ";;; Gnuplot site-lisp configuration\n\n${string}\n" > ${E_SITEFILE}
+ sed '/^;; move/,+4 d' lisp/dotemacs >> ${E_SITEFILE}
+ elisp-site-file-install ${E_SITEFILE}
+ fi
+
+ if use xemacs; then
+ cd lisp
+ einfo "Configuring gnuplot-mode for xemacs..."
+ EMACS="xemacs" lispdir="/usr/lib/xemacs/site-packages/${PN}" econf || die
+ make DESTDIR=${D} install || {
+ ewarn "Compiling/installing gnuplot-mode for xemacs has failed."
+ ewarn "I need xemacs-base to be installed before I can compile"
+ ewarn "the gnuplot-mode lisp files for xemacs successfully."
+ ewarn "Please try re-emerging me after app-xemacs/xemacs-base"
+ ewarn "has been successfuly emerged."
+ die
+ }
+ cd ..
+ fi
+
+
dodoc BUGS ChangeLog FAQ NEWS PATCHLEVEL PGPKEYS PORTING README* TODO VERSION
if use doc; then
@@ -102,6 +127,7 @@ src_install () {
}
pkg_postinst() {
+ use emacs && elisp-site-regen
if use svga ; then
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"
@@ -109,3 +135,7 @@ pkg_postinst() {
einfo "As root, manually \"chmod u+s /usr/bin/gnuplot\"."
fi
}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}