SUMMARY="X Keyboard File manipulation library"
DESCRIPTION="libxkbfile provides an interface to read and manipulate \
description files for XKB, the X11 keyboard configuration extension."
HOMEPAGE="http://xorg.freedesktop.org/releases/individual/lib/"
COPYRIGHT="1994-1996 Silicon Graphics Computer Systems, Inc."
LICENSE="MIT (no promotion)"
REVISION="2"
SOURCE_URI="http://xorg.freedesktop.org/releases/individual/lib/libxkbfile-$portVersion.tar.bz2"
CHECKSUM_SHA256="758dbdaa20add2db4902df0b1b7c936564b7376c02a0acd1f2a331bd334b38c7"

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86"

libVersion="1.0.2"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"

# server-interfacing: needs libX11_xcb.

PROVIDES="
	libxkbfile$secondaryArchSuffix = $portVersion
	lib:libxkbfile$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libX11_xcb$secondaryArchSuffix
	"

PROVIDES_devel="
	libxkbfile${secondaryArchSuffix}_devel = $portVersion
	devel:libxkbfile$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES_devel="
	libxkbfile$secondaryArchSuffix == $portVersion base
	devel:kbproto
	devel:libX11_xcb$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libX11_xcb$secondaryArchSuffix
	devel:util_macros
	"
BUILD_PREREQUIRES="
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

defineDebugInfoPackage libxkbfile$secondaryArchSuffix \
	"$libDir"/libxkbfile.so.$libVersion

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

INSTALL()
{
	make install

	rm -rf $libDir/libxkbfile.la

	fixPkgconfig
	prepareInstalledDevelLib libxkbfile

	# devel package
	packageEntries devel \
		$developDir
}
