SUMMARY="A library for high-performance 2D graphics"
DESCRIPTION="
Libart is free software (all components are either GPL or LGPL). Libart is \
also available for commercial licensing.
Libart supports a very powerful imaging model, basically the same as SVG and \
the Java 2D API. It includes all PostScript imaging operations, and adds \
antialiasing and alpha-transparency.
Libart is also highly tuned for incremental rendering. It contains data \
structures and algorithms suited to rapid, precise computation of Region of \
Interest, as well as a two-phase rendering pipeline optimized for interactive \
display.
"
HOMEPAGE="https://www.levien.com/libart/"
COPYRIGHT="2001-2010 Mathieu Lacage and Raph Levien"
LICENSE="GNU LGPL v2.1"
REVISION="2"
SOURCE_URI="ftp://ftp.gnome.org/pub/gnome/sources/libart_lgpl/${portVersion%.*}/libart_lgpl-$portVersion.tar.gz"
CHECKSUM_SHA256="2a10b1c884bb37c7bd5c5eba59dbd0d28bf68e64a42d7f2083c836f60f8e98fa"

ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	libart_lgpl$secondaryArchSuffix = $portVersion
	lib:libart_lgpl_2$secondaryArchSuffix = 2.3.21 compat >= 2
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

PROVIDES_devel="
	libart_lgpl_2$secondaryArchSuffix = $portVersion
	cmd:libart2_config$secondaryArchSuffix = $portVersion compat >= 2
	devel:libart_lgpl_2$secondaryArchSuffix = 2.3.21 compat >= 2
	"
REQUIRES_devel="
	libart_lgpl_2$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoreconf
	cmd:gcc${secondaryArchSuffix}
	cmd:ld${secondaryArchSuffix}
	cmd:libtool
	cmd:make
	"

BUILD()
{
	libtoolize --force --copy --install
	autoreconf -i
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install

	# prepare devel/lib
	prepareInstalledDevelLibs libart_lgpl_2

	# devel package
	packageEntries devel \
		$developDir \
		$binDir
}
