summaryrefslogtreecommitdiff
path: root/extra/gnuplot
diff options
context:
space:
mode:
Diffstat (limited to 'extra/gnuplot')
-rw-r--r--extra/gnuplot/PKGBUILD50
-rw-r--r--extra/gnuplot/gnuplot.install35
2 files changed, 85 insertions, 0 deletions
diff --git a/extra/gnuplot/PKGBUILD b/extra/gnuplot/PKGBUILD
new file mode 100644
index 000000000..3c7388288
--- /dev/null
+++ b/extra/gnuplot/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 94793 2010-10-11 09:23:28Z ronald $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: damir <damir@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=gnuplot
+pkgver=4.4.2
+pkgrel=2
+pkgdesc="Plotting package which outputs to X11, PostScript, PNG, GIF, and others"
+arch=('i686' 'x86_64')
+url="http://www.gnuplot.info"
+license=('custom')
+depends=('readline' 'gd' 'wxgtk' 'cairo' 'libjpeg')
+makedepends=('texinfo' 'emacs' 'texlive-core')
+install=gnuplot.install
+source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
+md5sums=('a4f0dd89f9b9334890464f687ddd9f50')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ # fix default source location; use the GDFONTPATH variable to modify at runtime
+ sed -i 's|/usr/X11R6/lib/X11/fonts/truetype|/usr/share/fonts/TTF|' src/variable.c
+ sed -i 's|/X11R6/lib/X11/fonts/Type1|/usr/share/fonts/Type1|' src/variable.c
+
+ ./configure --prefix=/usr --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --libexecdir=/usr/bin \
+ --with-gihdir=/usr/share/gnuplot \
+ --datadir=/usr/share \
+ --with-readline=gnu \
+ --with-texdir=$pkgdir/usr/share/texmf/tex/latex/gnuplot
+ make pkglibexecdir=/usr/bin
+}
+
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make prefix=$pkgdir/usr libexecdir=$pkgdir/usr/bin \
+ mandir=$pkgdir/usr/share/man \
+ infodir=$pkgdir/usr/share/info \
+ pkglibexecdir=$pkgdir/usr/bin \
+ GIHDIR=$pkgdir/usr/share/gnuplot \
+ datadir=$pkgdir/usr/share install
+
+ install -Dm644 lisp/dotemacs $pkgdir/usr/share/emacs/site-lisp/dotemacs
+ install -Dm644 Copyright $pkgdir/usr/share/licenses/$pkgname/Copyright
+
+ rm -f $pkgdir/usr/share/texmf-dist/ls-R
+}
diff --git a/extra/gnuplot/gnuplot.install b/extra/gnuplot/gnuplot.install
new file mode 100644
index 000000000..b7a5746ad
--- /dev/null
+++ b/extra/gnuplot/gnuplot.install
@@ -0,0 +1,35 @@
+info_dir=/usr/share/info
+info_files=(gnuplot.info)
+
+post_install() {
+cat << EOF
+==> To add the gnuplot mode in Emacs, add the content of /usr/share/emacs/site-lisp/dotemacs to your ~/.emacs file.
+EOF
+
+ if [ -f /usr/bin/mktexlsr ]; then
+ echo "Updating TeX tree..."
+ mktexlsr
+ fi
+
+for f in ${info_files[@]}; do
+ install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ for f in ${info_files[@]}; do
+ install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+post_remove() {
+ if [ -f /usr/bin/mktexlsr ]; then
+ echo "Updating TeX tree..."
+ mktexlsr
+ fi
+}
+