SUMMARY="HTTP client/server library for GNOME"
DESCRIPTION="libsoup is an HTTP client/server library for GNOME. \
It uses GObjects and the glib main loop, to integrate well with \
GNOME applications, and also has a synchronous API, for use in threaded applications."
HOMEPAGE="https://wiki.gnome.org/Projects/libsoup/"
COPYRIGHT="2005 - 2015 The GNOME Project"
LICENSE="GNU LGPL v2"
REVISION="2"
SOURCE_URI="http://ftp.gnome.org/pub/GNOME/sources/libsoup/2.60/libsoup-$portVersion.tar.xz"
CHECKSUM_SHA256="7263cfe18872e2e652c196f5667e514616d9c97c861dfca82a65a55f45f0da01"
PATCHES="libsoup-$portVersion.patchset"

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	libsoup$secondaryArchSuffix = $portVersion
	lib:libsoup_2.4$secondaryArchSuffix = 1.8.0 compat >= 1
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libcurl$secondaryArchSuffix
	lib:libglib_2.0$secondaryArchSuffix
	lib:libglib_networking_2.0${secondaryArchSuffix}
	lib:libiconv$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	lib:libsqlite3$secondaryArchSuffix
	lib:libxml2$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

PROVIDES_devel="
	libsoup${secondaryArchSuffix}_devel = $portVersion
	devel:libsoup_2.4$secondaryArchSuffix = 1.8.0 compat >= 1
	"
REQUIRES_devel="
	libsoup$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libcurl$secondaryArchSuffix
	devel:libglib_2.0$secondaryArchSuffix
	devel:libsqlite3$secondaryArchSuffix
	devel:libxml2$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	lib:libglib_networking_2.0${secondaryArchSuffix}
	"
BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:intltool_update
	cmd:libtool
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:python2
	"

BUILD()
{
	runConfigure ./configure --disable-nls --without-gnome --disable-tls-check \
		--enable-vala=no --enable-introspection=no --disable-gtk-doc-html
	make $jobArgs
}

INSTALL()
{
	make install

	rm $libDir/libsoup-2.4.la
	rm -rf $dataDir/gtk-doc

	prepareInstalledDevelLibs libsoup-2.4
	fixPkgconfig

	packageEntries devel \
		$developDir
}
