summaryrefslogtreecommitdiff
path: root/extra/gnuplot/PKGBUILD
blob: eadbc528731475ab3fadba73f965c38b9f7e61c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# $Id: PKGBUILD 204059 2014-01-15 04:18:35Z eric $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=gnuplot
pkgver=4.6.4
pkgrel=5
pkgdesc="Plotting package which outputs to X11, PostScript, PNG, GIF, and others" 
arch=('i686' 'x86_64' 'mips64el') 
url="http://www.gnuplot.info" 
license=('custom') 
depends=('readline' 'gd' 'wxgtk2.8' 'cairo' 'libjpeg' 'lua' 'qt4' 'gnutls') 
makedepends=('texinfo' 'emacs' 'texlive-core' 'texlive-latexextra')
options=('!makeflags')
install=gnuplot.install 
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
sha1sums=('54ee5ce9a0a2698b046064bd275e772673350013')

prepare() {
  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 -e 's|/usr/X11R6/lib/X11/fonts/Type1|/usr/share/fonts/Type1|' \
  -e 's|$(X11ROOT)/X11R6/lib/X11/fonts/Type1|$(X11ROOT)/usr/share/fonts/Type1|' \
  src/variable.c
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

   WX_CONFIG=/usr/bin/wx-config-2.8 ./configure --prefix=/usr \
              --libexecdir=/usr/bin \
              --with-gihdir=/usr/share/gnuplot \
              --with-readline=gnu --enable-qt
  make pkglibexecdir=/usr/bin
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make pkglibexecdir=/usr/bin DESTDIR="$pkgdir" install install-info

  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"
}