SUMMARY="Portable Network Graphics library"
DESCRIPTION="
libburn is the official PNG reference library. It supports almost all PNG \
features, is extensible, and has been extensively tested for over 17 years
"
HOMEPAGE="http://www.libburnia-project.org"
COPYRIGHT="
	1998-2011 Glenn Randers-Pehrson
	1996-1997 Andreas Dilger
	1995-1996 Guy Eric Schalnat, Group 42, Inc.
	"
LICENSE="GNU GPL v2"
SOURCE_URI="http://files.libburnia-project.org/releases/libburn-$portVersion.tar.gz"
CHECKSUM_SHA256="46266bdd4b37ca9700a44bbd8dbfbf3526423ede25751fd2f0211b2b5ce29283"
REVISION="1"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
	# x86_gcc2 is fine as primary target architecture as long as we're building
	# for a different secondary architecture.
	ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi

PATCHES="libburn-$portVersion.patchset"

PROVIDES="
	libburn$secondaryArchSuffix = $portVersion compat >= 1
	cmd:cdrskin$secondaryArchSuffix
	lib:libburn$secondaryArchSuffix = 4.91.0 compat >= 4
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:libtoolize
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

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

INSTALL()
{
	make install
	
	prepareInstalledDevelLibs libburn
	fixPkgconfig

	# devel package
	packageEntries devel \
		$developDir
}

# ----- devel package -------------------------------------------------------

PROVIDES_devel="
	libburn${secondaryArchSuffix}_devel = $portVersion compat >= 1
	devel:libburn$secondaryArchSuffix = 4.91.0 compat >= 4
	"
REQUIRES_devel="
	libburn$secondaryArchSuffix == $portVersion base
	"
