Celestia: fix build

This commit is contained in:
Gerasim Troeglazov
2018-09-16 14:20:32 +10:00
parent 683099f64a
commit 123a7005c0
4 changed files with 449 additions and 137 deletions

View File

@@ -12,14 +12,16 @@ 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-2011 Celestia Development Team"
COPYRIGHT="2001-2018 Celestia Development Team"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://fossies.org/linux/misc/celestia-1.6.1.tar.gz"
REVISION="2"
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"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
@@ -27,42 +29,85 @@ PROVIDES="
app:celestia$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lua$secondaryArchSuffix
haiku$secondaryArchSuffix
lib:libgl$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libglut$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:liblua$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
lua${secondaryArchSuffix}_devel
haiku${secondaryArchSuffix}_devel
devel:libgl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libglut$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:liblua5.1$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:autoreconf
cmd:gcc$secondaryArchSuffix
cmd:gettext
cmd:libtoolize
cmd:gettext
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
libtoolize -fci
runConfigure ./configure --with-glut
{
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 -lnetwork -lglut -lGL -lintl"
./configure \
--prefix=$appsDir \
--datarootdir=$dataDir \
--datadir=$dataDir \
--disable-rpath \
--with-glut \
--disable-nls \
--with-lua
make $jobArgs
}
INSTALL()
{
make install
mv $appsDir/bin/celestia $appsDir/Celestia
rm -rf $appsDir/bin
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
}