summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3763cbd2dad1f583b29897d1f5ea3fa01e3cf130 (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
# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
# Contributor: Ronald van Haren <ronald.archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

_pkgname=gnuplot
pkgname=$_pkgname-nogui
pkgver=5.2.7
pkgrel=1
pkgdesc="Plotting package which outputs to X11, files and others. Without wxgtk/qt."
arch=("x86_64")
url="http://www.gnuplot.info"
license=("custom")
depends=("cairo" "libjpeg" "lua" "gd" "gnutls" "readline")
makedepends=("emacs" "texlive-core" "texlive-latexextra")
provides=("gnuplot")
conflicts=("gnuplot" "gnuplot-nox")
replaces=("gnuplot-notk")
source=("http://downloads.sourceforge.net/sourceforge/$_pkgname/$_pkgname-$pkgver.tar.gz"
	"lua53_compat.patch")
sha256sums=('97fe503ff3b2e356fe2ae32203fc7fd2cf9cef1f46b60fe46dc501a228b9f4ed'
            'bfd8a61abbf4491c74225cb9fd252619d4fc29751838bcb4c0639ffe05a00695')

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

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

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

	./configure  --prefix=/usr \
        --libexecdir=/usr/bin \
        --with-gihdir=/usr/share/gnuplot \
        --disable-wxwidgets \
        --with-qt=no \
        --with-x \
        --with-readline=gnu

	make pkglibexecdir=/usr/bin
}

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