SUMMARY="A decoder implementation of the JBIG2 image format"
DESCRIPTION="
jbig2dec is a decoder implementation of the JBIG2 image compression format. \
JBIG2 is designed for lossy or lossless encoding of 'bilevel' (1-bit \
monochrome) images at moderately high resolution, and in particular scanned \
paper documents. In this domain it is very efficient, offering compression \
ratios on the order of 100:1.
"
HOMEPAGE="http://jbig2dec.sourceforge.net/" 
SOURCE_URI="http://sourceforge.net/projects/jbig2dec/files/jbig2dec/0.11/jbig2dec-0.11.tar.gz"
CHECKSUM_SHA256="7e2d8330b36f2765da22043d174827bee0f30db8d78c330904f363275c7dd0b9"
LICENSE="GNU GPL v3"
COPYRIGHT="2001-2009 Artifex Software, Inc."
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	jbig2dec$secondaryArchSuffix = $portVersion compat >= 0
	cmd:jbig2dec$secondaryArchSuffix = $portVersion compat >= 0
	lib:libjbig2dec$secondaryArchSuffix = $portVersion compat >= 0
	"

REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:libtoolize
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:make
	cmd:gcc$secondaryArchSuffix
	cmd:m4
	cmd:ar$secondaryArchSuffix
	"

PROVIDES_devel="
	jbig2dec${secondaryArchSuffix}_devel = $portVersion compat >= 0
	devel:libjbig2dec$secondaryArchSuffix = $portVersion compat >= 0
	"

REQUIRES_devel="
	jbig2dec$secondaryArchSuffix == $portVersion
	"

PATCHES="jbig2dec-0.11.patchset"

SOURCE_DIR="jbig2dec-0.11"

BUILD()
{
	libtoolize --force --copy --install
	aclocal
	automake --add-missing
	autoconf
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs libjbig2dec

	packageEntries devel $developDir
}
