summaryrefslogtreecommitdiff
path: root/extra/graphviz/PKGBUILD
blob: d50151cb6050d8da1aafb1c8172279657cdad846 (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
# $Id: PKGBUILD 178958 2013-03-01 10:20:33Z andrea $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>

pkgname=graphviz
pkgver=2.30.0
pkgrel=6
pkgdesc='Graph visualization software'
url='http://www.graphviz.org/'
license=('custom:EPL')
arch=('i686' 'x86_64' 'mips64el')
depends=('libltdl' 'gd' 'librsvg' 'libxaw' 'ghostscript' 'pango' 'gts')
makedepends=('swig' 'guile' 'lua51' 'ocaml' 'perl' 'php' 'python2' 'ruby' 'tk' 'qt4')
optdepends=('guile: guile bindings'
            'lua51: lua bindings'
            'ocaml: ocaml bindings'
            'perl: perl bindings'
            'php: php bindings'
            'python2: python bindings'
            'ruby: ruby bindings'
            'tcl: tcl bindings'
            'qt4: gvedit')
if [ "$CARCH" != "mips64el" ]; then
  makedepends+=('mono' 'r')
  optdepends+=('mono: sharp bindings'
               'r: r bindings')
fi
source=("${url}/pub/${pkgname}/stable/SOURCES/${pkgname}-${pkgver}.tar.gz"
        'LICENSE')
sha1sums=('596c1ddf60c5428c5c4700d10f3ea86534195311'
          'e78277e502c29abb74b9587a5dc951ec392554ea')

options=('!libtool')
install=install

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

    . /etc/profile.d/qt4.sh

	sed \
		-e '/"archdir"/s:$:+" '"$(echo -I/usr/include/ruby-1.9.1/{$CARCH-linux,ruby/backward,})"'":' \
		-e '/CONFIG/s:site:vendor:' \
		-i config/config_ruby.rb

	sed '/LIBPOSTFIX="64"/d' -i configure
	export PYTHON=python2
	export LUA=lua5.1

	# install the graph and cgraph api alongside
	sed 's/@WITH_CGRAPH_FALSE@//g' -i lib/graph/Makefile.in

	./configure --prefix=/usr
	make || sed '/caml_array_length/d' -i tclpkg/gv/gv_ocaml.cpp # swig goes wonky
	make
}

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

	# http://www.graphviz.org/License.php
	install -Dm644 ../LICENSE "${pkgdir}"/usr/share/licenses/graphviz/LICENSE

	# everything has been built against cgraph, but use graph as default api
	sed '/#define WITH_CGRAPH 1/d' -i "${pkgdir}"/usr/include/graphviz/types.h
}