archrelease: copy trunk to extra-x86_64
[arch-packages.git] / gnuplot / trunk / PKGBUILD
blob6c0ed7791a4b8f5d3fa8611e8934e6bf5f138329
1 # Maintainer: Ronald van Haren <ronald.archlinux.org>
2 # Contributor: damir <damir@archlinux.org>
3 # Contributor: Tom Newsom <Jeepster@gmx.co.uk>
5 pkgbase=gnuplot
6 pkgname=(gnuplot gnuplot-demos)
7 pkgver=5.4.3
8 pkgrel=5
9 pkgdesc='Plotting package which outputs to X11, PostScript, PNG, GIF, and others' 
10 arch=(x86_64)
11 url='http://www.gnuplot.info'
12 license=(custom)
13 depends=(gd wxgtk3 lua qt5-svg libcerf libcaca) 
14 makedepends=(texlive-core emacs texlive-latexextra qt5-tools)
15 source=(https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
16         lua53_compat.patch)
17 sha256sums=('51f89bbab90f96d3543f95235368d188eb1e26eda296912256abcd3535bd4d84'
18             'bfd8a61abbf4491c74225cb9fd252619d4fc29751838bcb4c0639ffe05a00695')
20 prepare() {
21   cd $pkgname-$pkgver
23   # fix default source location; use the GDFONTPATH variable to modify at runtime
24   sed -i 's|/usr/X11R6/lib/X11/fonts/truetype|/usr/share/fonts/TTF|' src/variable.c
26   sed -i -e 's|/usr/X11R6/lib/X11/fonts/Type1|/usr/share/fonts/Type1|' \
27   -e 's|$(X11ROOT)/X11R6/lib/X11/fonts/Type1|$(X11ROOT)/usr/share/fonts/Type1|' \
28   src/variable.c
30   patch -p1 < "$srcdir"/lua53_compat.patch
33 build() {
34   cd $pkgbase-$pkgver
36   MAKEINFO=/usr/bin/makeinfo \
37   WX_CONFIG=/usr/bin/wx-config-gtk3 \
38   ./configure --prefix=/usr \
39               --libexecdir=/usr/bin \
40               --with-gihdir=/usr/share/gnuplot \
41               --with-readline=gnu \
42               --with-bitmap-terminals \
43               --with-wx-single-threaded \
44               --with-caca \
45               --with-texdir=/usr/share/texmf/tex/latex/gnuplot
46   make pkglibexecdir=/usr/bin
49 package_gnuplot() {
50   cd $pkgbase-$pkgver
51   make pkglibexecdir=/usr/bin DESTDIR="$pkgdir" install
52   make DESTDIR="$pkgdir" install -C demo
54   install -Dm644 Copyright -t "$pkgdir"/usr/share/licenses/$pkgname
56   rm -f "$pkgdir"/usr/share/texmf-dist/ls-R
59 package_gnuplot-demos() {
60   pkgdesc='Demos for gnuplot'
61   depends=(gnuplot)
63   install -Dm644 $pkgbase-$pkgver/demo/*.{dem,dat} -t "$pkgdir"/usr/share/gnuplot/demos