# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rawtherapee
pkgver=5.0.r1
pkgrel=0
_gtkver=2
pkgdesc="RawTherapee is image processing software simular to Lightroom or Aperture"
url="http://rawtherapee.com"
arch="x86 x86_64 ppc64le"
license="GPL-3.0"
makedepends="bzip2-dev exiv2-dev expat-dev fftw-dev glib-dev gtk+2.0-dev \
             gtk-engines-dev gtkmm-dev lcms2-dev libcanberra-dev \
             libpng-dev libsigc++-dev tiff-dev zlib-dev cmake mercurial \
             libiptcdata-dev libjpeg-turbo-dev"
options="!check"
subpackages="$pkgname-doc"
source="http://rawtherapee.com/shared/source/${pkgname}-${pkgver/.r/-r}-gtk$_gtkver.tar.xz"
builddir=${srcdir}/${pkgname}-${pkgver/.r/-r}-gtk$_gtkver

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build
	export CXXFLAGS="$CXXFLAGS -std=c++11"
        cmake -DCMAKE_INSTALL_PREFIX=/usr \
		..  || return 1
        make || return 1
}

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

sha512sums="91ce5664371933554738282ae0f099431b29c3bd9010a85ed7bcf7895aadaae12aef61ce41dafa7b75fa382e82ae53edc231c20ade7971b6d34d5e4324138886  rawtherapee-5.0-r1-gtk2.tar.xz"
