SUMMARY="The Oil Runtime Compiler"
DESCRIPTION="
Orc is a library and set of tools for compiling and executing \
very simple programs that operate on arrays of data.  The \"language\" \
is a generic assembly language that represents many of the features \
available in SIMD architectures, including saturated addition and \
subtraction, and many arithmetic operations.
"
HOMEPAGE="http://code.entropywave.com/orc/"
COPYRIGHT="
	2002-2009 David A. Schleef
	"
LICENSE="BSD (2-clause)"
SOURCE_URI="http://gstreamer.freedesktop.org/src/orc/orc-$portVersion.tar.gz"
CHECKSUM_SHA256="e21f50321a21c33178bbe41ea8bd27c49ae60aeb8c22902a215f7141297fb59e"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 !x86"

PATCHES="orc-$portVersion.patchset"

PROVIDES="
	orc$secondaryArchSuffix = $portVersion compat >= 0
	lib:liborc_0.4$secondaryArchSuffix = 0.19.0 compat >= 0
	lib:liborc_test_0.4$secondaryArchSuffix = 0.19.0 compat >= 0
	"
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
	"

BUILD()
{
	autoreconf -f -i -I m4
	runConfigure ./configure --disable-gtk-doc
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs liborc-0.4 \
		liborc-test-0.4
	fixPkgconfig
	# fix include path in pkgconfig
	sed -i -e 's#^includedir=\(.*\)#includedir=\1/orc-0.4#g' \
		$developLibDir/pkgconfig/orc-0.4.pc

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

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

PROVIDES_devel="
	orc${secondaryArchSuffix}_devel = $portVersion compat >= 0.4
	cmd:orc_bugreport
	cmd:orcc
	devel:liborc_0.4$secondaryArchSuffix = 0.19.0 compat >= 0
	devel:liborc_test_0.4$secondaryArchSuffix = 0.19.0 compat >= 0
	"
REQUIRES_devel="
	orc$secondaryArchSuffix == $portVersion base
	"
