SUMMARY="Simple optical media image file converter"
DESCRIPTION="A simple tool to convert various CD/DVD images into .iso images."
HOMEPAGE="https://github.com/mgorny/mirage2iso"
COPYRIGHT="2009-2017 Michał Górny"
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="https://github.com/mgorny/mirage2iso/releases/download/v$portVersion/mirage2iso-$portVersion.tar.xz"
CHECKSUM_SHA256="f92af1737a7d5756a76d6ccf4a2b7ed922d271eb0ce01e4e32efc5516638d30d"

ARCHITECTURES="?all"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	mirage2iso$secondaryArchSuffix = $portVersion
	cmd:mirage2iso$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libgio_2.0$secondaryArchSuffix
	lib:libglib_2.0$secondaryArchSuffix
	lib:libgmodule_2.0$secondaryArchSuffix
	lib:libgobject_2.0$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	lib:libmirage$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libglib_2.0$secondaryArchSuffix
	devel:libmirage$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	autoconf
	CFLAGS="-D_BSD_SOURCE" runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
}

TEST()
{
	make check
}
