SUMMARY="Library for IPTC metadata manipulation"
DESCRIPTION="libiptcdata is a library, written in C, for manipulating the \
International Press Telecommunications Council (IPTC) metadata stored within \
multimedia files such as images. This metadata can include captions and \
keywords, often used by popular photo management applications.
The library provides routines for parsing, viewing, modifying, and saving \
this metadata."
HOMEPAGE="http://libiptcdata.sourceforge.net/"
COPYRIGHT="2005 David Moore"
LICENSE="GNU LGPL v2.1"
REVISION="3"
SOURCE_URI="http://prdownloads.sourceforge.net/libiptcdata/libiptcdata-$portVersion.tar.gz?download"
CHECKSUM_SHA256="79f63b8ce71ee45cefd34efbb66e39a22101443f4060809b8fc29c5eebdcee0e"
SOURCE_FILENAME="libiptcdata-$portVersion.tar.gz"
PATCHES="libiptcdata-$portVersion.patch"

ARCHITECTURES="all ?x86"

libVersion="0.3.3"
libVersionCompat="$libVersion compat >= 0"

PROVIDES="
	libiptcdata = $portVersion
	cmd:iptc = $portVersion
	lib:libiptcdata = $libVersionCompat
	"
REQUIRES="
	haiku
	lib:libiconv
	lib:libintl
	"

PROVIDES_devel="
	libiptcdata_devel = $portVersion
	devel:libiptcdata = $libVersion
	"
REQUIRES_devel="
	libiptcdata == $portVersion base
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libiconv
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:autopoint
	cmd:gcc
	cmd:ld
	cmd:libtoolize
	cmd:make
	"

defineDebugInfoPackage libiptcdata \
	$libDir/libiptcdata.so.$libVersion

BUILD()
{
	autoreconf -vfi
	runConfigure ./configure --enable-static --enable-shared
	make $jobArgs
}

INSTALL()
{
	make install

	# remove libtool file
	rm -r $libDir/*.la

	prepareInstalledDevelLib libiptcdata
	fixPkgconfig

	# devel package
	packageEntries devel \
		$developDir
}
