#!/usr/bin/env bash
name='graphviz'
release='2'
version='12.1.1'
url='https://www.graphviz.org/'
description='Graph Visualization Tools'
email='akarsu@protonmail.com'
maintainer='akarsu'
license=('EPL-1.0')
source=("https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${version}/graphviz-${version}.tar.xz")
depends=()
makedepends=()
sha256sums=('8dd4fa2a30a80e9ee4a11ad4f43f4a900d683684e824681b084a1dc86777a2a3')
group=(dev.python)
uses=()
arch=('x86_64')

cd $name-$version

setup () {
    touch redhat/graphviz.spec.rhel.in
    autoreconf -fvi
    ./configure --prefix=/usr \
		--libdir=/usr/lib64/ \
		--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
}

build () {
    make $jobs
}

package () {
    make DESTDIR=${DESTDIR} install $jobs
}

