SUMMARY="Apple Keynote import library"
DESCRIPTION="
libetonyek is a library that parses the file format of Apple Keynote \
documents. It supports Keynote versions 2-5.
"
HOMEPAGE="http://wiki.documentfoundation.org/DLP/Libraries/libetonyek"
SOURCE_URI="http://dev-www.libreoffice.org/src/libetonyek/libetonyek-$portVersion.tar.bz2"
LICENSE="
MPL v2.0
"
COPYRIGHT="
Fridrich Strba <fridrich.strba@bluewin.ch>
David Tardon <dtardon@redhat.com>
"
REVISION="1"
CHECKSUM_SHA256="f3f9342a34514a02c8a8c6d2a7957ee29cdb94ee69c67fe37b214fba50f49abf"

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
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	libetonyek$secondaryArchSuffix = $portVersion
	cmd:numbers2csv$secondaryArchSuffix
	cmd:pages2html$secondaryArchSuffix
	cmd:key2raw$secondaryArchSuffix
	cmd:numbers2raw$secondaryArchSuffix
	cmd:pages2raw$secondaryArchSuffix
	cmd:key2xhtml$secondaryArchSuffix
	cmd:key2text$secondaryArchSuffix
	cmd:numbers2text$secondaryArchSuffix
	cmd:pages2text$secondaryArchSuffix
	lib:libetonyek_0.1$secondaryArchSuffix = 1.0.2 compat >= 1
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libboost_system$secondaryArchSuffix
	lib:librevenge_0.0$secondaryArchSuffix
	lib:librevenge_generators_0.0$secondaryArchSuffix
	lib:librevenge_stream_0.0$secondaryArchSuffix
	lib:libxml2$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	lib:libstdc++$secondaryArchSuffix
	lib:libgcc_s$secondaryArchSuffix
	"
BUILD_REQUIRES="
	devel:libboost_system$secondaryArchSuffix
	devel:libcppunit$secondaryArchSuffix
	devel:librevenge_0.0$secondaryArchSuffix
	devel:librevenge_generators_0.0$secondaryArchSuffix
	devel:librevenge_stream_0.0$secondaryArchSuffix
	devel:libxml2$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	glm_devel$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	haiku${secondaryArchSuffix}_devel
	cmd:aclocal
	cmd:libtoolize
	cmd:autoconf
	cmd:automake
	cmd:autoheader
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	cmd:gperf
	"

BUILD()
{
	libtoolize --force --copy --install
	aclocal
	autoheader
	automake -a -c --foreign
	autoconf
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	
	# remove libtool file
	rm $libDir/libetonyek-0.1.la

	prepareInstalledDevelLibs libetonyek-0.1
	fixPkgconfig

	packageEntries devel $developDir
}

PROVIDES_devel="
	libetonyek${secondaryArchSuffix}_devel = $portVersion
	devel:libetonyek_0.1$secondaryArchSuffix = 1.0.2 compat >= 1
	"
REQUIRES_devel="
	libetonyek$secondaryArchSuffix == $portVersion base
	"
