Files
haikuports/sci-astronomy/celestia/celestia-1.6.1.recipe
Gerasim Troeglazov fa86be9d49 Celestia: fix build
2020-04-15 23:18:44 +10:00

115 lines
3.3 KiB
Bash

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"
COPYRIGHT="2001-2018 Celestia Development Team"
LICENSE="GNU GPL v2"
REVISION="5"
SOURCE_URI="http://fossies.org/linux/misc/celestia-$portVersion.tar.gz"
CHECKSUM_SHA256="d35570ccb9440fc0bd3e73eb9b4c3e8a4c25f3ae444a13d1175053fa16dc34c4"
SOURCE_DIR="celestia-$portVersion"
PATCHES="celestia-$portVersion.patchset"
ADDITIONAL_FILES="celestia.rdef.in"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
celestia$secondaryArchSuffix = $portVersion
app:celestia$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgl$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:liblua$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:liblua5.1$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:autoreconf
cmd:gcc$secondaryArchSuffix
cmd:gettext
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
local
for cf in -O2 -ffast-math \
-fexpensive-optimizations \
-fomit-frame-pointer; do
sed -i \
-e "s/${cf}//g" \
configure.in admin/* || die "sed failed"
done
autoreconf -fi
export LIBS="-lbe -lGL -lGLU -lglut -lintl -lnetwork"
runConfigure ./configure \
--datarootdir=$dataDir \
--datadir=$dataDir \
--disable-rpath \
--with-glut \
--disable-nls \
--with-lua
make $jobArgs
}
INSTALL()
{
mkdir -p $appsDir
make install
mv $binDir/celestia $appsDir/Celestia
rm -rf $binDir
local APP_SIGNATURE="application/x-vnd.celestia"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/celestia.rdef.in > celestia.rdef
addResourcesToBinaries celestia.rdef $appsDir/Celestia
mimeset -f $appsDir/Celestia
addAppDeskbarSymlink $appsDir/Celestia
}