SUMMARY="A command-line decoder for raw digital photos"
DESCRIPTION="
dcraw decodes raw photos, displays metadata, and extracts thumbnails."
HOMEPAGE="http://www.cybercom.net/~dcoffin/dcraw/"
COPYRIGHT="1997-2015 Dave Coffin"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="http://www.cybercom.net/~dcoffin/dcraw/archive/dcraw-$portVersion.tar.gz"
CHECKSUM_SHA256="2890c3da2642cd44c5f3bfed2c9b2c1db83da5cec09cc17e0fa72e17541fb4b9"
SOURCE_DIR="dcraw"

ARCHITECTURES="all"

PROVIDES="
	dcraw = $portVersion compat >= 9
	cmd:dcraw = $portVersion compat >= 9
	"
REQUIRES="
	haiku
	lib:libjasper
	lib:libjpeg
	lib:liblcms2
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libjasper
	devel:libjpeg
	devel:liblcms2
	"
BUILD_PREREQUIRES="
	coreutils
	cmd:gcc
	"

BUILD()
{
	gcc -O3 -o dcraw dcraw.c -llcms2 -ljasper -ljpeg
}

INSTALL()
{
	mkdir -p $binDir $manDir/man1
	cp dcraw $binDir
	cp dcraw.1 $manDir/man1
}
