SUMMARY="Enhanced config file parser"
DESCRIPTION="libeconf is a highly flexible and configureable library
to parse and manage key=value configuration files.
It reads configuration file snippets from different directories
and builds the final configuration file for the application from it."
HOMEPAGE="https://github.com/openSUSE/libeconf"
COPYRIGHT="2019 SUSE LLC"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/openSUSE/libeconf/releases/download/$portVersion/libeconf-$portVersion.tar.xz"
CHECKSUM_SHA256="62552e84616aa259cd3c6ac2d285b15fc89037fdbb7ed568714a491a57440807"
SOURCE_DIR="libeconf-$portVersion"

ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	libeconf$secondaryArchSuffix = $portVersion
	lib:libeconf$secondaryArchSuffix = 0.3.1
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

PROVIDES_devel="
	libeconf${secondaryArchSuffix}_devel = $portVersion
	devel:libeconf$secondaryArchSuffix = 0.3.1
	"
REQUIRES_devel="
	libeconf$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:awk
	cmd:cmp
	cmd:diff
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:gcc$secondaryArchSuffix
	"

BUILD()
{
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	fixPkgconfig
	prepareInstalledDevelLibs \
		libeconf
	packageEntries devel \
		$developDir
}

TEST()
{
	make check
}
