# Maintainer: Jesus E. pkgname=graphviz pkgver=2.42.2 _debver=$pkgver _debrel=5 pkgrel=3 pkgdesc="Graph visualization software" url='https://www.graphviz.org/' license=('EPL-1.0') arch=('i686' 'x86_64') depends=('libtool' 'gd' 'librsvg-legacy' 'libxaw' 'ghostscript' 'pango' 'gts' 'gsfonts' 'libnsl') makedepends=('swig' 'guile' 'lua' 'ocaml' 'perl' 'python' 'tauthon' 'tk' 'quilt') optdepends=('guile: guile bindings' 'lua: lua bindings' 'ocaml: ocaml bindings' 'perl: perl bindings' 'python: python bindings' 'tauthon: tauthon bindings' 'tcl: tcl bindings' 'xterm: vimdot') install=$pkgname.install source=("https://gitlab.com/graphviz/graphviz/-/archive/$pkgver/graphviz-$pkgver.tar.gz" "https://deb.debian.org/debian/pool/main/g/graphviz/graphviz_${_debver}-${_debrel}+deb11u1.debian.tar.xz" "ghostscript918.patch") sha512sums=('06233afbf8fc8ec3d53557e2910743f8ab339c73e9546e967106be9f49653d432eb9dd0b9db5b578421f7cfbb7ff03a0855022e57b30a26f94eab8894e101346' 'ee00f15ed8c9e7a3704bf4f48f0ef4cec65aab4d5b049dbad571058d01c8190a06307e32be873dc9887e5104faf9fcc35ebc37062625deceb4780aa9e72d5ca6' '314b444da2fed31535d164e47abcaf866f57b8fea3514a6642a8f4539611a93d7f74462049d769004bfd734abee33e5b86ffe3ac49e0b7f50ea177624d68d510') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian/patches/* debian/patches # Doesn't apply rm -v debian/patches/0_bindings_documentation || true rm -v debian/patches/50_remove_changelog_in || true rm -v debian/patches/build_with_libann.patch || true rm -v debian/patches/fix-kfreebsd-chroots || true rm -v debian/patches/kfreebsd-hang.patch || true rm -v debian/patches/ruby-config.diff || true rm -v debian/patches/versioned-plugin-config-file.diff || true quilt push -av fi patch -p1 -i $srcdir/ghostscript918.patch ./autogen.sh } build() { cd "${srcdir}/${pkgname}-${pkgver}" export PYTHON=tauthon export LIBPOSTFIX=/ export CXXFLAGS+=' -fPIC -fpermissive' ./configure \ --prefix=/usr make } package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" # fix symlink to symlink that doesn't get picked up by makepkg's zipman ln -s gv2gxl.1.gz "${pkgdir}"/usr/share/man/man1/dot2gxl.1.gz rm "${pkgdir}"/usr/share/man/man1/dot2gxl.1 # Deduplicates TCL libraries cd "${pkgdir}/usr/lib/tcl8.6" rm -fr graphviz ln -s ../graphviz/tcl graphviz }