summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2007-02-03 17:05:40 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2007-02-03 17:05:40 +0000
commit0f04d6501438e936486471965ff346ef06fae91f (patch)
tree1b30d8789535a9bbd8861c16466415975dfe912b /sci-astronomy
parentRemove trailing white space and shorten DESCRIPTION. (diff)
downloadgentoo-2-0f04d6501438e936486471965ff346ef06fae91f.tar.gz
gentoo-2-0f04d6501438e936486471965ff346ef06fae91f.tar.bz2
gentoo-2-0f04d6501438e936486471965ff346ef06fae91f.zip
celestia-1.4.1-r1: fixed bugs #128218, #130091, #142786, and #162777
(Portage version: 2.1.1-r2)
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/celestia/ChangeLog17
-rw-r--r--sci-astronomy/celestia/celestia-1.4.1-r1.ebuild146
-rw-r--r--sci-astronomy/celestia/files/celestia-1.4.1-cfg.patch11
-rw-r--r--sci-astronomy/celestia/files/celestia-1.4.1-kde-datadir.patch32
-rw-r--r--sci-astronomy/celestia/files/celestia-1.4.1-lua.patch62
-rw-r--r--sci-astronomy/celestia/files/celestia-1.4.1-lua51.patch75
-rw-r--r--sci-astronomy/celestia/files/celestia-1.4.1-strictalias.patch13
-rw-r--r--sci-astronomy/celestia/files/digest-celestia-1.4.1-r13
-rw-r--r--sci-astronomy/celestia/metadata.xml10
9 files changed, 367 insertions, 2 deletions
diff --git a/sci-astronomy/celestia/ChangeLog b/sci-astronomy/celestia/ChangeLog
index 8723083af2c1..d3ab7c831717 100644
--- a/sci-astronomy/celestia/ChangeLog
+++ b/sci-astronomy/celestia/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for sci-astronomy/celestia
-# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/celestia/ChangeLog,v 1.24 2006/10/20 20:12:28 gustavoz Exp $
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/celestia/ChangeLog,v 1.25 2007/02/03 17:05:39 bicatali Exp $
+
+*celestia-1.4.1-r1 (03 Feb 2007)
+
+ 03 Feb 2007; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/celestia-1.4.1-cfg.patch, +files/celestia-1.4.1-kde-datadir.patch,
+ +files/celestia-1.4.1-lua.patch, +files/celestia-1.4.1-lua51.patch,
+ +files/celestia-1.4.1-strictalias.patch, metadata.xml,
+ +celestia-1.4.1-r1.ebuild:
+ Some cleaning in the ebuild. Added more patches for lua, a default
+ config file, longdescription in metadata.xml.
+ Fixed bugs #128218, #142786 and #162777 (with the kde-datadir patch)
+ Fixed bug #130091 with a filter on as-needed
+ Tested with kde and gtk only on amd64 and x86 (not yet with gnome).
20 Oct 2006; Gustavo Zacarias <gustavoz@gentoo.org> celestia-1.4.1.ebuild:
Stable on sparc
diff --git a/sci-astronomy/celestia/celestia-1.4.1-r1.ebuild b/sci-astronomy/celestia/celestia-1.4.1-r1.ebuild
new file mode 100644
index 000000000000..42fb544d52bc
--- /dev/null
+++ b/sci-astronomy/celestia/celestia-1.4.1-r1.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/celestia/celestia-1.4.1-r1.ebuild,v 1.1 2007/02/03 17:05:39 bicatali Exp $
+
+#WANT_AUTOCONF="2.5"
+WANT_AUTOMAKE="1.9"
+
+inherit eutils flag-o-matic gnome2 kde-functions autotools
+
+DESCRIPTION="Space 3D simulator"
+HOMEPAGE="http://www.shatters.net/celestia/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="cairo gnome gtk kde arts threads nls lua"
+
+DEPEND="virtual/glu
+ media-libs/jpeg
+ media-libs/libpng
+ gtk? ( !gnome? ( !kde? (
+ >=x11-libs/gtk+-2.6
+ >=x11-libs/gtkglext-1.0
+ ) ) )
+ gnome? ( !kde? (
+ >=x11-libs/gtk+-2.6
+ >=x11-libs/gtkglext-1.0
+ >=gnome-base/libgnomeui-2.0
+ ) )
+ kde? ( !gnome? ( >=kde-base/kdelibs-3.0.5 ) )
+ !gtk? ( !gnome? ( !kde? ( virtual/glut ) ) )
+ arts? ( kde-base/arts )
+ lua? ( >=dev-lang/lua-5.0 )
+ cairo? ( x11-libs/cairo )"
+
+pkg_setup() {
+ # Check for one for the following use flags to be set.
+ if ! use gnome && use kde; then
+ einfo "USE=\"kde\" detected."
+ mygui="kde"
+ elif ! use kde && use gnome; then
+ einfo "USE=\"gnome\" detected."
+ USE_DESTDIR="1"
+ mygui="gnome"
+ elif ! use kde && ! use gnome && use gtk; then
+ einfo "USE=\"gtk\" detected."
+ mygui="gtk"
+ elif use kde && use gnome; then
+ einfo "Both gnome and kde support requested. Defaulting to kde"
+ mygui="kde"
+ else
+ ewarn "If you want to use the full gui, set USE=\"{kde/gnome/gtk}\""
+ ewarn "Defaulting to glut support (no GUI)."
+ mygui="glut"
+ fi
+
+ einfo "If you experience problems building celestia with nvidia drivers,"
+ einfo "you can try:"
+ einfo "eselect opengl set xorg-x11"
+ einfo "emerge celestia"
+ einfo "eselect opengl set nvidia"
+}
+
+src_unpack() {
+
+ unpack ${A}
+ cd "${S}"
+
+ # standard set of gcc-4.1 patches
+ epatch "${FILESDIR}/${P}-gcc-4.1.patch"
+ # fix kde datadir in makefile.am and .desktop location
+ epatch "${FILESDIR}/${P}-kde-datadir.patch"
+ #epatch "${FILESDIR}/${P}-makefile.am.patch"
+ # add a ~/.celestia for extra directories
+ epatch "${FILESDIR}/${P}-cfg.patch"
+ # some lua patches on celx.cpp
+ epatch "${FILESDIR}/${P}-lua.patch"
+ # strict aliasing from mandriva
+ epatch "${FILESDIR}/${P}-strictalias.patch"
+
+ # remove agressive flags to let the user decide
+ sed -i \
+ -e 's/-ffast-math -fexpensive-optimizations//g' \
+ configure.in || die "sed failed"
+
+ # remove an unused gconf macro killing autoconf
+ if ! use gnome; then
+ sed -i \
+ -e '/AM_GCONF_SOURCE_2/d' \
+ configure.in || die "sed failed"
+ fi
+
+ # nasty hack for gettext generated file
+ sed -i \
+ -e 's:@MKINSTALLDIRS@:$(top_builddir)/admin/mkinstalldirs:' \
+ po/Makefile.in.in || die "sed failed"
+
+ eautoreconf
+}
+
+src_compile() {
+
+ if [[ "${mygui}" == "kde" ]]; then
+ set-kdedir 3
+ set-qtdir 3
+ export kde_widgetdir="$KDEDIR/lib/kde3/plugins/designer"
+ fi
+ addwrite ${QTDIR}/etc/settings
+
+ filter-flags "-funroll-loops -frerun-loop-opt"
+ filter-ldflags -Wl,--as-needed --as-needed
+
+ econf \
+ --with-${mygui} \
+ --enable-pch \
+ $(use_with arts) \
+ $(use_with lua) \
+ $(use_enable cairo) \
+ $(use_enable threads threading) \
+ $(use_enable nls) \
+ || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ #dodir /usr/share/celestia
+ if [[ "${mygui}" == "gnome" ]]; then
+ gnome2_src_install
+ else
+ #einstall || die "einstall failed"
+ emake DESTDIR="${D}" install || die "emake install failed"
+ for size in 16 22 32 48 ; do
+ insinto /usr/share/icons/hicolor/${size}x${size}/apps/
+ newins ${S}/src/celestia/kde/data/hi${size}-app-${PN}.png ${PN}.png
+ done
+ fi
+ dodoc AUTHORS README TODO NEWS TRANSLATORS ChangeLog \
+ CelestiaKeyAssignments.txt KbdMouseJoyControls.txt devguide.txt
+ dohtml coding-standards.html manual/*.html manual/*.css
+ insinto /usr/share/celestia/models/
+ for m in models/*.3ds; do
+ doins ${m}
+ done
+}
diff --git a/sci-astronomy/celestia/files/celestia-1.4.1-cfg.patch b/sci-astronomy/celestia/files/celestia-1.4.1-cfg.patch
new file mode 100644
index 000000000000..61e9419c2d89
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.4.1-cfg.patch
@@ -0,0 +1,11 @@
+--- celestia.cfg.orig 2006-09-19 11:05:24.000000000 +0100
++++ celestia.cfg 2006-09-19 11:05:50.000000000 +0100
+@@ -150,7 +150,7 @@
+ # or
+ # ExtrasDirectories [ "D:\\celestia-extras" ]
+ #------------------------------------------------------------------------
+- ExtrasDirectories [ "extras" ]
++ ExtrasDirectories [ "extras" "~/.celestia" ]
+
+
+ #------------------------------------------------------------------------
diff --git a/sci-astronomy/celestia/files/celestia-1.4.1-kde-datadir.patch b/sci-astronomy/celestia/files/celestia-1.4.1-kde-datadir.patch
new file mode 100644
index 000000000000..48912f2e2c15
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.4.1-kde-datadir.patch
@@ -0,0 +1,32 @@
+diff -Nur ../celestia-1.4.1.orig/Makefile.am ./Makefile.am
+--- ../celestia-1.4.1.orig/Makefile.am 2006-02-03 18:04:33.000000000 +0000
++++ ./Makefile.am 2007-02-03 12:46:33.000000000 +0000
+@@ -66,11 +66,11 @@
+ )
+
+ install-data-hook:
+- if [ "$(kde_datadir)" -a -d $(kde_datadir)/@PACKAGE@ -a ! -h $(kde_datadir)/@PACKAGE@ ] ; then \
+- mv -f -b $(kde_datadir)/@PACKAGE@/* $(datadir)/@PACKAGE@/ ; \
+- rmdir $(kde_datadir)/@PACKAGE@ ; \
++ if [ "$(DESTDIR)$(kde_datadir)" -a -d $(DESTDIR)$(kde_datadir)/@PACKAGE@ -a ! -h $(DESTDIR)$(kde_datadir)/@PACKAGE@ ] ; then \
++ mv -f -b $(DESTDIR)$(kde_datadir)/@PACKAGE@/* $(DESTDIR)$(datadir)/@PACKAGE@/ ; \
++ rmdir $(DESTDIR)$(kde_datadir)/@PACKAGE@ ; \
+ fi
+- if [ "$(kde_datadir)" -a ! -h $(kde_datadir)/@PACKAGE@ ] ; then \
+- ln -s $(datadir)/@PACKAGE@ $(kde_datadir)/@PACKAGE@ ; \
++ if [ "$(DESTDIR)$(kde_datadir)" -a ! -h $(DESTDIR)$(kde_datadir)/@PACKAGE@ ] ; then \
++ ln -s $(datadir)/@PACKAGE@ $(DESTDIR)$(kde_datadir)/@PACKAGE@ ; \
+ fi
+
+diff -Nur ../celestia-1.4.1.orig/src/celestia/kde/data/Makefile.am ./src/celestia/kde/data/Makefile.am
+--- ../celestia-1.4.1.orig/src/celestia/kde/data/Makefile.am 2006-01-07 11:15:48.000000000 +0000
++++ ./src/celestia/kde/data/Makefile.am 2007-02-03 12:49:04.000000000 +0000
+@@ -14,7 +14,7 @@
+ mimedir = $(kde_mimedir)/application
+ mime_DATA = x-celestia-script.desktop
+
+-appsdir = $(kde_appsdir)/Edutainment/Science
++appsdir = $(datadir)/applications/kde
+ apps_DATA = celestia.desktop
+
+ KDE_ICON = celestia
diff --git a/sci-astronomy/celestia/files/celestia-1.4.1-lua.patch b/sci-astronomy/celestia/files/celestia-1.4.1-lua.patch
new file mode 100644
index 000000000000..ed31b8ee0d0c
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.4.1-lua.patch
@@ -0,0 +1,62 @@
+--- src/celestia/celx.cpp.orig 2006-09-19 11:08:10.000000000 +0100
++++ src/celestia/celx.cpp 2006-09-19 11:07:03.000000000 +0100
+@@ -32,9 +32,7 @@
+
+ #include "celx.h"
+ #include "celestiacore.h"
+-extern "C" {
+-#include "lualib.h"
+-}
++#include "lua.hpp"
+
+ using namespace std;
+
+@@ -532,6 +530,8 @@
+
+ status = lua_resume(co, narg);
+ if (status == 0)
++ return 0;
++ else if (status == LUA_YIELD)
+ {
+ int nres = lua_gettop(co);
+ #if 0
+@@ -543,7 +543,7 @@
+ }
+ else
+ {
+- lua_xmove(co, L, 1); // move error message
++ lua_xmove(co, L, -1); // move error message
+ return -1; // error flag
+ }
+ }
+@@ -598,7 +598,7 @@
+ int stackTop = lua_gettop(costate);
+ if (strcmp(c_p, "y") == 0)
+ {
+- lua_iolibopen(costate);
++ luaL_openlibs(costate);
+ ioMode = IOAllowed;
+ }
+ else
+@@ -713,7 +713,8 @@
+ // no other errors, and execution terminates normally. There
+ // should be a better way to figure out whether the script ended
+ // normally . . .
+- if (strcmp(errorMessage, "cannot resume dead coroutine") != 0)
++ if (errorMessage
++ && strcmp(errorMessage, "cannot resume dead coroutine") != 0)
+ {
+ cout << "Error: " << errorMessage << '\n';
+ CelestiaCore* appCore = getAppCore(co);
+@@ -4577,10 +4578,7 @@
+ initMaps();
+
+ // Import the base and math libraries
+- lua_baselibopen(state);
+- lua_mathlibopen(state);
+- lua_tablibopen(state);
+- lua_strlibopen(state);
++ luaL_openlibs(state);
+
+ // Add an easy to use wait function, so that script writers can
+ // live in ignorance of coroutines. There will probably be a significant
diff --git a/sci-astronomy/celestia/files/celestia-1.4.1-lua51.patch b/sci-astronomy/celestia/files/celestia-1.4.1-lua51.patch
new file mode 100644
index 000000000000..7c02999116fe
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.4.1-lua51.patch
@@ -0,0 +1,75 @@
+diff -Nur celestia-1.4.1.orig/configure.in celestia-1.4.1/configure.in
+--- celestia-1.4.1.orig/configure.in 2006-02-03 18:09:54.000000000 +0000
++++ celestia-1.4.1/configure.in 2006-09-19 10:04:57.000000000 +0100
+@@ -383,7 +383,7 @@
+ AC_MSG_CHECKING([whether to enable Celestia Extension Language])
+ if (test "$enable_lua" != "no"); then
+ CXXFLAGS="$CXXFLAGS -DCELX"
+- LDFLAGS="$LDFLAGS -llualib -llua"
++ LDFLAGS="$LDFLAGS -llua"
+
+ if (test "$lua_includes" != "no"); then
+ CXXFLAGS="$CXXFLAGS -I$lua_includes"
+diff -Nur celestia-1.4.1.orig/src/celestia/celx.cpp celestia-1.4.1/src/celestia/celx.cpp
+--- celestia-1.4.1.orig/src/celestia/celx.cpp 2006-01-07 00:01:51.000000000 +0000
++++ celestia-1.4.1/src/celestia/celx.cpp 2006-09-19 10:05:06.000000000 +0100
+@@ -32,9 +32,7 @@
+
+ #include "celx.h"
+ #include "celestiacore.h"
+-extern "C" {
+-#include "lualib.h"
+-}
++#include "lua.hpp"
+
+ using namespace std;
+
+@@ -532,6 +530,8 @@
+
+ status = lua_resume(co, narg);
+ if (status == 0)
++ return 0;
++ else if (status == LUA_YIELD)
+ {
+ int nres = lua_gettop(co);
+ #if 0
+@@ -543,7 +543,7 @@
+ }
+ else
+ {
+- lua_xmove(co, L, 1); // move error message
++ lua_xmove(co, L, -1); // move error message
+ return -1; // error flag
+ }
+ }
+@@ -598,7 +598,7 @@
+ int stackTop = lua_gettop(costate);
+ if (strcmp(c_p, "y") == 0)
+ {
+- lua_iolibopen(costate);
++ luaL_openlibs(costate);
+ ioMode = IOAllowed;
+ }
+ else
+@@ -713,7 +713,8 @@
+ // no other errors, and execution terminates normally. There
+ // should be a better way to figure out whether the script ended
+ // normally . . .
+- if (strcmp(errorMessage, "cannot resume dead coroutine") != 0)
++ if (errorMessage
++ && strcmp(errorMessage, "cannot resume dead coroutine") != 0)
+ {
+ cout << "Error: " << errorMessage << '\n';
+ CelestiaCore* appCore = getAppCore(co);
+@@ -4577,10 +4578,7 @@
+ initMaps();
+
+ // Import the base and math libraries
+- lua_baselibopen(state);
+- lua_mathlibopen(state);
+- lua_tablibopen(state);
+- lua_strlibopen(state);
++ luaL_openlibs(state);
+
+ // Add an easy to use wait function, so that script writers can
+ // live in ignorance of coroutines. There will probably be a significant
diff --git a/sci-astronomy/celestia/files/celestia-1.4.1-strictalias.patch b/sci-astronomy/celestia/files/celestia-1.4.1-strictalias.patch
new file mode 100644
index 000000000000..3ff59b31686a
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.4.1-strictalias.patch
@@ -0,0 +1,13 @@
+--- celestia-1.4.1/src/celengine/modelfile.cpp.strictalias 2006-11-22 14:04:15.000000000 +0100
++++ celestia-1.4.1/src/celengine/modelfile.cpp 2006-11-22 14:01:27.000000000 +0100
+@@ -1080,7 +1080,9 @@
+ static float readFloat(istream& in)
+ {
+ int i = readUint(in);
+- return *((float*) &i);
++ float f;
++ memcpy(&f, &i, sizeof(float));
++ return f;
+ }
+
+
diff --git a/sci-astronomy/celestia/files/digest-celestia-1.4.1-r1 b/sci-astronomy/celestia/files/digest-celestia-1.4.1-r1
new file mode 100644
index 000000000000..b75d1f3ff9d0
--- /dev/null
+++ b/sci-astronomy/celestia/files/digest-celestia-1.4.1-r1
@@ -0,0 +1,3 @@
+MD5 be1d36fc97a13b9a276249dbc0efac41 celestia-1.4.1.tar.gz 23966886
+RMD160 c66c2540e329613dace12e5b12b2dae2a4c679e0 celestia-1.4.1.tar.gz 23966886
+SHA256 f9dc34dbc0d53e98534000545802b5ab4a471c3cb3fa08a9c958cbbbeb28d8b5 celestia-1.4.1.tar.gz 23966886
diff --git a/sci-astronomy/celestia/metadata.xml b/sci-astronomy/celestia/metadata.xml
index b229aec85b8f..86553ce85b44 100644
--- a/sci-astronomy/celestia/metadata.xml
+++ b/sci-astronomy/celestia/metadata.xml
@@ -2,4 +2,14 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>sci</herd>
+<longdescription lang="en">
+Celestia is a free real-time space simulation that lets you experience
+our universe in three dimensions. You can travel throughout the solar
+system, to any of over 100,000 stars, or even beyond the galaxy. All
+travel 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.
+</longdescription>
</pkgmetadata>