summaryrefslogtreecommitdiffstats
path: root/abs/extra/graphviz/PKGBUILD
blob: 2eb0135f473f2fc57c8465f8a63067ebcf27a061 (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
# $Id$
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>

pkgname=graphviz
pkgver=2.40.1
pkgrel=1
pkgdesc='Graph visualization software'
url='http://www.graphviz.org/'
license=('CPL')
arch=('i686' 'x86_64')
depends=('libltdl' 'gd' 'librsvg' 'libxaw' 'ghostscript' 'pango' 'gts')
makedepends=('swig' 'mono' 'guile' 'lua51' 'ocaml' 'perl' 'python2' 'r' 'tk' 'qt4' 'gtk2')
optdepends=('mono: sharp bindings'
            'guile: guile bindings'
            'lua51: lua bindings'
            'ocaml: ocaml bindings'
            'perl: perl bindings'
            'python2: python bindings'
            'r: r bindings'
            'tcl: tcl bindings'
            'qt4: gvedit'
            'gtk2: gtk output plugin'
            'xterm: vimdot')
source=("${url}/pub/${pkgname}/stable/SOURCES/${pkgname}-${pkgver}.tar.gz"
        'ghostscript918.patch')
sha1sums=('8a44d19bcdb50df1bd8e649de472ebf868468888'
          'bcce75a535c277556e196638e59ea019b0a63fa1')

install=install

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	patch -p1 -i ../ghostscript918.patch
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	export CXXFLAGS+=' -Dint64=int64_t' # for ocaml
	export LIBPOSTFIX=/
	export PYTHON=python2
	export LUA=lua5.1

	./configure --prefix=/usr
	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install

	cd "${pkgdir}/usr/lib"
	install -d lua/5.1
	mv lua/gv.so lua/5.1

	# Workaround symlink upgrade bug (fixed in pacman trunk)
	# Also deduplicates the tcl libraries (upstream bug?)
	# Might have been this commit: https://github.com/ellson/graphviz/commit/f11aead
	rm -r tcl8.6/graphviz
	ln -s ../graphviz/tcl tcl8.6/graphviz
}