SUMMARY="D-Bus bindings for glib"
DESCRIPTION="A deprecated D-Bus binding for GLib."
HOMEPAGE="https://dbus.freedesktop.org/releases/dbus-glib/"
COPYRIGHT="2003, 2004, 2005 Red Hat, Inc.
	2005 Nokia"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.110.tar.gz"
CHECKSUM_SHA256="7ce4760cf66c69148f6bd6c92feaabb8812dee30846b24cd0f7395c436d7e825"
SOURCE_DIR="dbus-glib-$portVersion"

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

GLOBAL_WRITABLE_FILES="
	settings/bash_completion.d/dbus-bash-completion.sh keep-old
	"

libVersion="2.3.4"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
portVersionCompat="$portVersion compat >= ${portVersion%%.*}"

PROVIDES="
	dbus_glib$secondaryArchSuffix = $portVersionCompat
	lib:libdbus_glib_1$secondaryArchSuffix = $libVersionCompat
	cmd:dbus_binding_tool = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libdbus_1$secondaryArchSuffix
	lib:libexpat$secondaryArchSuffix
	lib:libgio_2.0$secondaryArchSuffix
	lib:libglib_2.0$secondaryArchSuffix
	lib:libgobject_2.0$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	"

PROVIDES_devel="
	dbus_glib${secondaryArchSuffix}_devel = $portVersionCompat
	devel:libdbus_glib_1$secondaryArchSuffix = $libVersionCompat
	"
REQUIRES_devel="
	dbus_glib$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libdbus_1$secondaryArchSuffix
	devel:libexpat$secondaryArchSuffix
	devel:libgio_2.0$secondaryArchSuffix
	devel:libglib_2.0$secondaryArchSuffix
	devel:libgobject_2.0$secondaryArchSuffix
	devel:libintl$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:dbus_run_session
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:python2
	"

defineDebugInfoPackage dbus_glib$secondaryArchSuffix \
	"$libDir"/libdbus-glib-1.so.$libVersion

BUILD()
{
	LDFLAGS="-lnetwork" runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs libdbus-glib-1
	fixPkgconfig
	packageEntries devel $developDir
}

TEST()
{
	make check
}
