# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rawtherapee
pkgver=5.4
pkgrel=0
pkgdesc="Powerful cross-platform raw image processing program"
url="http://rawtherapee.com"
arch="x86 x86_64 ppc64le"
license="GPL-3.0-or-later"
makedepends="bzip2-dev exiv2-dev expat-dev fftw-dev glib-dev gtk+3.0-dev gtk-engines-dev
	gtkmm3-dev lcms2-dev libcanberra-dev libpng-dev libsigc++-dev tiff-dev zlib-dev
	cmake mercurial libiptcdata-dev libjpeg-turbo-dev lensfun-dev"
options="!check !strip"
subpackages="$pkgname-doc $pkgname-dbg"
source="http://rawtherapee.com/shared/source/$pkgname-$pkgver.tar.xz"
builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	default_prepare
	mkdir -p "$builddir"/build
	export CXXFLAGS="$CXXFLAGS -std=c++11"
	cd "$builddir"/build
	cmake -DCMAKE_INSTALL_PREFIX=/usr ..
}

build() {
	cd "$builddir"/build
        make
}

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

sha512sums="6dc9a82202b80675f90eeb8f08c4484700561861f296546ae9425c6e9603f6e84bdc0859896c333d2367cc0b371c6bb6ab2fe36ff3d6f56419cbf18a58d8ef89  rawtherapee-5.4.tar.xz"
