summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2a5a3aebb055c9fd9c0af14539b341e1a3b87ac9 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer: Nimrod Maclomhair <nimrod4garoa@gmail.com>
# Contributor: Ronald van Haren <ronald.archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=gnuplot-headless
pkgver=5.2.2
pkgrel=1
pkgdesc="Plotting package which outputs to PostScript, PNG, GIF, and others, without any X or latex depencies." 
arch=('i686' 'x86_64') 
url="http://www.gnuplot.info" 
license=('custom') 
depends=('readline' 'lua' 'ncurses')
makedepends=()
provides=('gnuplot')
conflicts=('gnuplot')
options=('!makeflags')
source=("http://downloads.sourceforge.net/sourceforge/gnuplot/gnuplot-$pkgver.tar.gz"
        "lua53_compat.patch")
sha1sums=('fc39158851f39e48136d2bdd3f753bf46a99965c'
          '9005fa9e4da91ceedb8ccd1d761866e7b064f8b1')

prepare() {
  cd "${srcdir}/gnuplot-${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

  patch -p1 < "$srcdir"/lua53_compat.patch
}

build() {
  cd "${srcdir}/gnuplot-${pkgver}"

  # If you want png and jpeg terminal support, set --with-gd and get
  # add "gd-headless" as an depency.
  ./configure --prefix=/usr \
              --libexecdir=/usr/bin \
              --with-gihdir=/usr/share/gnuplot \
              --with-readline=gnu \
              --disable-x11-mbfonts \
              --disable-x11-external \
              --disable-wxwidgets \
              --without-latex \
              --without-cairo \
              --with-qt=no \
              --without-libcerf \
              --disable-raise-console \
              --with-x=no \
              --with-aquaterm=no \
              --with-linux-vga=no \
              --with-ggi=no \
              --with-gd=no

#              --with-bitmap-terminals \

  make pkglibexecdir=/usr/bin
}

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

  install -Dm644 Copyright "${pkgdir}/usr/share/licenses/$pkgname/Copyright"

  rm -f "${pkgdir}/usr/share/texmf-dist/ls-R"
}