archrelease: copy trunk to testing-x86_64
[arch-packages.git] / graphviz / trunk / PKGBUILD
blobe1cf392b7c422c2ad68759d32706e1209273d472
1 # Maintainer: Gaetan Bisson <bisson@archlinux.org>
2 # Contributor: kevin <kevin@archlinux.org>
3 # Contributor: John Proctor <jproctor@prium.net>
5 pkgname=graphviz
6 pkgver=8.0.5
7 pkgrel=2
8 pkgdesc='Graph visualization software'
9 url='https://www.graphviz.org/'
10 license=('EPL')
11 arch=('x86_64')
12 depends=('libltdl' 'gd' 'librsvg' 'ghostscript' 'pango' 'gts' 'gsfonts')
13 makedepends=('swig' 'mono' 'guile' 'lua' 'ocaml>=4.14.0' 'perl' 'python' 'r' 'tk' 'qt6-base' 'gtk2')
14 optdepends=('mono: sharp bindings'
15             'guile: guile bindings'
16             'lua: lua bindings'
17             'ocaml: ocaml bindings'
18             'perl: perl bindings'
19             'python: python bindings'
20             'r: r bindings'
21             'tcl: tcl bindings'
22             'qt6-base: gvedit'
23             'gtk2: gtk output plugin'
24             'xterm: vimdot')
25 source=("https://gitlab.com/graphviz/graphviz/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
26         'ghostscript918.patch')
27 sha256sums=('dd06f45f5bbcb1c7cbc67adab5359da2cd4b40533dc7c7424b3fc0e998bbd6c9'
28             '0083d126e27f2223ec4226fc1d71c9c84106968a0fdf65de838aee1e4882bfdb')
29 install=install
31 prepare() {
32         cd "${srcdir}/${pkgname}-${pkgver}"
33         patch -p1 -i ../ghostscript918.patch
34         ./autogen.sh NOCONFIG
37 build() {
38         cd "${srcdir}/${pkgname}-${pkgver}"
39         export LIBPOSTFIX=/
40         export CXXFLAGS+=' -fPIC -fpermissive'
42         ./configure --prefix=/usr \
43            --enable-python3=yes --disable-python --enable-lefty
44         sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool # Fix overlinking
45         make
48 package() {
49         cd "${srcdir}/${pkgname}-${pkgver}"
50         make DESTDIR="${pkgdir}" install
52         # fix symlink to symlink that doesn't get picked up by makepkg's zipman
53         ln -s gv2gxl.1.gz "${pkgdir}"/usr/share/man/man1/dot2gxl.1.gz
54         rm "${pkgdir}"/usr/share/man/man1/dot2gxl.1
56         # Deduplicates TCL libraries
57         cd "${pkgdir}/usr/lib/tcl8.6"
58         rm -fr graphviz
59         ln -s ../graphviz/tcl graphviz