SUMMARY="The free space simulation to explore our universe in 3 dimensions"
DESCRIPTION="Unlike most planetarium software, Celestia doesn't confine you to \
the surface of the Earth. You can travel throughout the solar system, to any of \
over 100,000 stars, or even beyond the galaxy.

All movement in Celestia is seamless; the exponential zoom feature lets you \
explore space across a huge range of scales, from galaxy clusters down to \
spacecraft only a few meters across. A 'point-and-goto' interface makes it \
simple to navigate through the universe to the object you want to visit.

Celestia is expandable. Celestia comes with a large catalog of stars, galaxies, \
planets, moons, asteroids, comets, and spacecraft. If that's not enough, you \
can download dozens of easy to install add-ons with more objects."
HOMEPAGE="http://celestia.sourceforge.net"
SOURCE_URI="http://fossies.org/linux/misc/celestia-1.6.1.tar.gz"
CHECKSUM_SHA256="d35570ccb9440fc0bd3e73eb9b4c3e8a4c25f3ae444a13d1175053fa16dc34c4"
SOURCE_DIR="celestia-$portVersion"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2001-2011 Celestia Development Team"

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"
else
    ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	celestia$secondaryArchSuffix = $portVersion
	app:celestia$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lua$secondaryArchSuffix
	lib:libintl$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	lib:libiconv$secondaryArchSuffix
	lib:libgl$secondaryArchSuffix
	lib:libglu$secondaryArchSuffix
	lib:libglut$secondaryArchSuffix
	"
BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	lua${secondaryArchSuffix}_devel
	devel:libintl$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	devel:libiconv$secondaryArchSuffix
	devel:libgl$secondaryArchSuffix
	devel:libglu$secondaryArchSuffix
	devel:libglut$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:make
	cmd:gcc$secondaryArchSuffix
	cmd:libtoolize
	cmd:gettext
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	libtoolize -fci
	runConfigure ./configure --with-glut
	make $jobArgs
}

INSTALL()
{
	make install
}
