SUMMARY="A Perl library and a command-line tool for editing image metdata"
DESCRIPTION="ExifTool is both a Perl library and a command-line script that \
enables editing of the metadata of a large variety of files. This includes all \
major image formats which support metadata as well as the vendor-specific \
metadata of numerous digital cameras."
HOMEPAGE="https://www.sno.phy.queensu.ca/~phil/exiftool/"
COPYRIGHT="2003-2020 Phil Harvey"
LICENSE="GNU GPL v1
	Artistic"
REVISION="1"
SOURCE_URI="https://github.com/exiftool/exiftool/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="b41a141d095eca0f7137818db65b6378f501b786147d2e7c085a5c8a8bd8d3ac"

ARCHITECTURES="any"

PROVIDES="
	exiftool = $portVersion
	cmd:exiftool = $portVersion
	"
REQUIRES="
	haiku
	cmd:perl >= 5.0.0
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:make
	cmd:perl
	"

BUILD()
{
	perl Makefile.PL PREFIX=$prefix
	make
}

INSTALL()
{
	make install

	cd "$libDir"/perl5
	# delete 5.x.y/`uname -m`-haiku/perllocal.pod
	perllocal=*/*-haiku/perllocal.pod
	rm $perllocal
	rmdir -p `dirname $perllocal`

	cd vendor_perl/5.*
	# delete `uname -m`-haiku/auto/auto/Image/ExifTool/.packlist
	packlist=*-haiku/auto/Image/ExifTool/.packlist
	rm $packlist
	rmdir -p `dirname $packlist`
}

TEST()
{
	make test
}
