# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Daniel Isenmann <daniel@archlinux.org>
# Contributor: Dominik Ryba <domryba@post.pl>

pkgname=enblend-enfuse
pkgver=4.2
pkgrel=6
pkgdesc="Intelligent blend tool for overlapping picture"
arch=('x86_64')
url="http://enblend.sourceforge.net"
license=('GPL')
depends=('lcms2' 'vigra' 'gsl')
makedepends=('libjpeg' 'libpng' 'libtiff' 'openexr' 'libgl' 'glu' 'boost' 'help2man' 'texlive-bin')
            # Not building doc fails if pdflatex is not available, hence texlive-bin above.
            # Building doc is failing because of something FS#56460 related, but not sure why.
            # 'texlive-latexextra' 'perl-readonly' 'perl-timedate' 'imagemagick' 'hevea' 'gnuplot' 'graphviz' 'librsvg')
replaces=('enblend')
conflicts=('enblend')
provides=('enblend')
source=(https://downloads.sourceforge.net/enblend/${pkgname}-${pkgver}.tar.gz)
sha256sums=('8703e324939ebd70d76afd350e56800f5ea2c053a040a5f5218b2a1a4300bd48')

build() {
    cd ${pkgname}-${pkgver}
    ./configure --prefix=/usr \
                --enable-openmp=yes \
                --enable-opencl=yes
    make
}

package() {
    cd ${pkgname}-${pkgver}
    make DESTDIR="${pkgdir}" install
}
