archrelease: copy trunk to extra-x86_64
[arch-packages.git] / graphviz / trunk / PKGBUILD
blob9090651d4917e56b4ad7a73c6efc4212f073ecc0
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=3
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' 'perl' 'python' 'r' 'tk' 'qt6-base' 'gtk2')
14 optdepends=('mono: sharp bindings'
15             'guile: guile bindings'
16             'lua: lua bindings'
17             'perl: perl bindings'
18             'python: python bindings'
19             'r: r bindings'
20             'tcl: tcl bindings'
21             'qt6-base: gvedit'
22             'gtk2: gtk output plugin'
23             'xterm: vimdot')
24 source=("https://gitlab.com/graphviz/graphviz/-/archive/$pkgver/$pkgname-$pkgver.tar.gz"
25         'ghostscript918.patch')
26 sha256sums=('dd06f45f5bbcb1c7cbc67adab5359da2cd4b40533dc7c7424b3fc0e998bbd6c9'
27             '0083d126e27f2223ec4226fc1d71c9c84106968a0fdf65de838aee1e4882bfdb')
28 install=install
30 prepare() {
31         cd "${srcdir}/${pkgname}-${pkgver}"
32         patch -p1 -i ../ghostscript918.patch
33         ./autogen.sh NOCONFIG
36 build() {
37         cd "${srcdir}/${pkgname}-${pkgver}"
38         export LIBPOSTFIX=/
39         export CXXFLAGS+=' -fPIC -fpermissive'
41         ./configure --prefix=/usr \
42            --enable-python3=yes --disable-python --enable-lefty
43         sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool # Fix overlinking
44         make
47 package() {
48         cd "${srcdir}/${pkgname}-${pkgver}"
49         make DESTDIR="${pkgdir}" install
51         # fix symlink to symlink that doesn't get picked up by makepkg's zipman
52         ln -s gv2gxl.1.gz "${pkgdir}"/usr/share/man/man1/dot2gxl.1.gz
53         rm "${pkgdir}"/usr/share/man/man1/dot2gxl.1
55         # Deduplicates TCL libraries
56         cd "${pkgdir}/usr/lib/tcl8.6"
57         rm -fr graphviz
58         ln -s ../graphviz/tcl graphviz