# Contributor: Sören Tempel # Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=graphviz pkgver=8.1.0 pkgrel=0 pkgdesc="Graph Visualization Tools" url="https://www.graphviz.org/" arch="all" license="EPL-1.0" options="!check" # fixme: enable testsuite _luaver=5.4 depends_dev=" cairo-dev expat-dev fontconfig-dev freetype-dev gd-dev gmp-dev libjpeg-turbo-dev libpng-dev libsm-dev libxext-dev pango-dev python3-dev zlib-dev " makedepends=" $depends_dev bison flex libltdl libxaw-dev lua$_luaver-dev m4 swig tcl " install="$pkgname.pre-deinstall" triggers="$pkgname.trigger=/usr/lib/graphviz" subpackages=" $pkgname-dev $pkgname-libs $pkgname-doc py3-gv:_py3 lua$_luaver-$pkgname:_lua $pkgname-graphs::noarch " source="$pkgname-$pkgver.tar.xz::https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/$pkgver/graphviz-$pkgver.tar.xz" # secfixes: # 2.46.0-r0: # - CVE-2020-18032 build() { LIBPOSTFIX=/ \ LUA=lua$_luaver \ lua_suffix=$_luaver \ CFLAGS="$CFLAGS -O2 -flto=auto" \ CXXFLAGS="$CXXFLAGS -O2 -flto=auto" \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --disable-python \ --disable-silent-rules \ --disable-static \ --disable-dependency-tracking \ --disable-ltdl-install \ --enable-ltdl \ --enable-sharp=no \ --enable-go=no \ --enable-guile=no \ --enable-java=no \ --enable-lua=yes \ --enable-ocaml=no \ --enable-perl=no \ --enable-php=no \ --enable-python3 \ --enable-r=no \ --enable-ruby=no \ --enable-tcl=no \ --without-included-ltdl \ --with-gdk-pixbuf=yes \ --with-ipsepcola=yes \ --with-jpeg \ --with-libgd=yes \ --with-pangocairo=yes \ --with-rsvg=yes \ --with-x make } package() { # Install has race conditions... make DESTDIR="$pkgdir" \ pkgconfigdir=/usr/lib/pkgconfig \ install } _py3() { pkgdesc="Python3 extension for graphviz" depends="python3" amove usr/lib/graphviz/python3* \ usr/lib/python3* } _lua() { pkgdesc="Lua$_luaver extension for graphviz" provides="lua-$pkgname=$pkgver-r$pkgrel" # for backward compatibility replaces="lua-$pkgname" # for backward compatibility mkdir -p "$subpkgdir"/usr/lib/lua mv "$pkgdir"/usr/lib/lua "$subpkgdir"/usr/lib/lua/$_luaver amove usr/lib/graphviz/lua } graphs() { pkgdesc="Demo graphs for graphviz" amove usr/share/graphviz/graphs } sha512sums=" 56ce357999b7e7c623ec410eb772a98a23be2d7e871c5e6f500ea000d217714b8f6114d35844dac576e2dcb059f74037833e7728b85fc2c8fa67589e716a39e1 graphviz-8.1.0.tar.xz "