# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=graphviz pkgver=2.38.0 pkgrel=2 pkgdesc="Graph Visualization Tools" url="http://www.graphviz.org/" arch="all" license="EPL" depends="" depends_dev="zlib-dev libpng-dev libjpeg-turbo-dev expat-dev freetype-dev bison m4 flex fontconfig-dev libtool libsm-dev libxext-dev cairo-dev pango-dev librsvg-dev gmp-dev lua5.2-dev gtk+2.0-dev swig python-dev" makedepends="$depends_dev" install="" subpackages="$pkgname-dev $pkgname-doc py-$pkgname:py lua-$pkgname:_lua $pkgname-gtk $pkgname-graphs" source="http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-$pkgver.tar.gz 0001-clone-nameclash.patch musl-posix-grep.patch CVE-2014-9157.patch " _builddir="$srcdir"/graphviz-$pkgver prepare() { local i cd "$_builddir" update_config_sub || return 1 for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done # use /usr/lib instead of /usr/lib64 sed -i -e 's/LIBPOSTFIX="64"/LIBPOSTFIX=/' configure || return 1 } build() { cd "$_builddir" LUA=lua5.2 \ LUA_CFLAGS="$(pkg-config --cflags lua5.2)" \ LUA_LIBS="$(pkg-config --libs lua5.2)" \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --with-x \ --disable-static \ --disable-dependency-tracking \ --enable-lua=yes \ --without-mylibgd \ --with-ipsepcola \ --with-pangocairo \ --with-gdk-pixbuf \ --with-png \ --with-jpeg \ --with-rsvg \ || return 1 if [ "$CARCH" = "x86_64" ]; then # the configure script thinks we have sincos. we dont. sed -i -e '/HAVE_SINCOS/d' config.h || return 1 fi make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" \ pkgconfigdir=/usr/lib/pkgconfig \ install || return 1 mkdir -p "$pkgdir"/usr/share/doc mv "$pkgdir"/usr/share/graphviz/doc "$pkgdir"/usr/share/doc/graphviz || return 1 rm -f "$pkgdir"/usr/lib/*.la \ "$pkgdir"/usr/lib/graphviz/*.la \ "$pkgdir"/usr/lib/graphviz/*/*.la \ || return 1 } py() { pkgdesc="Python extension for graphviz" mkdir -p "$subpkgdir"/usr/lib/graphviz \ "$subpkgdir"/usr/lib || return 1 mv "$pkgdir"/usr/lib/graphviz/python* \ "$subpkgdir"/usr/lib/graphviz || return 1 mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } _lua() { pkgdesc="Lua extension for graphviz" mkdir -p "$subpkgdir"/usr/lib/graphviz \ "$subpkgdir"/usr/lib/lua || return 1 mv "$pkgdir"/usr/lib/graphviz/lua \ "$subpkgdir"/usr/lib/graphviz || return 1 mv "$pkgdir"/usr/lib/lua "$subpkgdir"/usr/lib/ } gtk() { pkgdesc="Gtk extension for graphviz" mkdir -p "$subpkgdir"/usr/lib/graphviz || return 1 mv "$pkgdir"/usr/lib/graphviz/libgvplugin_g?k* \ "$pkgdir"/usr/lib/graphviz/libgvplugin_rsvg* \ "$subpkgdir"/usr/lib/graphviz || return 1 } graphs() { pkgdesc="Demo graphs for graphviz" mkdir -p "$subpkgdir"/usr/share/graphviz || return 1 mv "$pkgdir"/usr/share/graphviz/graphs \ "$subpkgdir"/usr/share/graphviz/ } md5sums="5b6a829b2ac94efcd5fa3c223ed6d3ae graphviz-2.38.0.tar.gz bce8a9ae4c3a8c52c1bcf0e03d5ce364 0001-clone-nameclash.patch f2e8e751d8b26dd659b51940f7210b8a musl-posix-grep.patch 8da7607dfaaf0ea01e2618d647f79c45 CVE-2014-9157.patch" sha256sums="81aa238d9d4a010afa73a9d2a704fc3221c731e1e06577c2ab3496bdef67859e graphviz-2.38.0.tar.gz 2b6c8186bf2799658494428d68597f63b91799f37809cbe59d8adcab60c27363 0001-clone-nameclash.patch c9629e3e5502450ff000af173d568147aee5d8e884d7d8d8754cb7dd94e90ba6 musl-posix-grep.patch 4289ed4dbcfc2e6d19131e029364eaf7bc728948bbed2b211e808868b7450752 CVE-2014-9157.patch" sha512sums="0e51a97dae595f4e80bc9e4a12ba3c48485fab19941a28d522f5a0624b6a767e0ba720e9e55bff8efe8308dd1cd3793e2c99cb5fdfceb2d5cafb0cbee907e531 graphviz-2.38.0.tar.gz aa4cbc341906a949a6bf78cadd96c437d6bcc90369941fe03519aa4447731ecbf6063a0dd0366d3e7aaadf22b69e4bcab3f8632a7da7a01f8e08a3be05c2bc5d 0001-clone-nameclash.patch 365ecb684b26c382f62b2c8bc075169eafd46478d21a49ecc433fcbf7b720027567438a01659fada7714433c1eced7f5662913179e6d59437fc5daba0d66b0cc musl-posix-grep.patch 0bd86ddab647ddc2c4b6b2ae8435b725c7e5a66028d51bae6f1111030be3f338b6b767327ad04e8f830cc2483812eee9e54943197ae5de06395d70c240e36552 CVE-2014-9157.patch"