# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
pkgname=agg
pkgver=2.5
pkgrel=0
pkgdesc="Anti-Grain Geometry (AGG) is a general purpose graphical toolkit written completely in standard and platform independent C++."
url="http://www.antigrain.com"
arch="all"
license="GPL-2.0-or-later"
options="!check"
makedepends="autoconf automake libgfortran libtool sdl-dev"
install=""
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::http://www.antigrain.com/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
        cd "$builddir"

        sed -i 's:  -L@x_libraries@::' src/platform/X11/Makefile.am
        sed -i '/^AM_C_PROTOTYPES/d'   configure.in

        sh autogen.sh \
                --prefix=/usr \
                --disable-static
        make -j1
}

package() {
        cd "$builddir"
        make DESTDIR="$pkgdir" install
}

sha512sums="e2c79f0bf6da80e16e5b50e69638647224fbe778a42a83d72e9de444b3ea711735177de92bf16134da313b9f75e63eb76bd7b0aaf390059f4d0785454e8a6fcf  agg-2.5.tar.gz"
