summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2011-06-12 10:42:45 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2011-06-12 10:42:45 +0000
commitec28ca1a17bf4d0228c1004a2c22bb888b718f63 (patch)
tree518da8e74e3736a1b4829bc45cb671372aa37411 /sci-astronomy/celestia
parentCorrect dependencies wrt #371215 by Piotr Szymaniak <lazy_bum@o2.pl>. Fix typ... (diff)
downloadgentoo-2-ec28ca1a17bf4d0228c1004a2c22bb888b718f63.tar.gz
gentoo-2-ec28ca1a17bf4d0228c1004a2c22bb888b718f63.tar.bz2
gentoo-2-ec28ca1a17bf4d0228c1004a2c22bb888b718f63.zip
Version bump wrt #370499 by Nils Larsson <ni1s@nerdshack.com>. Fixes building with gcc-4.6 (bug #366073)
(Portage version: 2.2.0_alpha36/cvs/Linux x86_64)
Diffstat (limited to 'sci-astronomy/celestia')
-rw-r--r--sci-astronomy/celestia/ChangeLog9
-rw-r--r--sci-astronomy/celestia/celestia-1.6.1.ebuild108
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.1-as-needed.patch19
-rw-r--r--sci-astronomy/celestia/files/celestia-1.6.1-gcc46.patch13
4 files changed, 148 insertions, 1 deletions
diff --git a/sci-astronomy/celestia/ChangeLog b/sci-astronomy/celestia/ChangeLog
index 31245bf14ffa..c72402087357 100644
--- a/sci-astronomy/celestia/ChangeLog
+++ b/sci-astronomy/celestia/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-astronomy/celestia
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/celestia/ChangeLog,v 1.69 2011/03/02 21:34:44 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/celestia/ChangeLog,v 1.70 2011/06/12 10:42:44 xarthisius Exp $
+
+*celestia-1.6.1 (12 Jun 2011)
+
+ 12 Jun 2011; Kacper Kowalik <xarthisius@gentoo.org> +celestia-1.6.1.ebuild,
+ +files/celestia-1.6.1-as-needed.patch, +files/celestia-1.6.1-gcc46.patch:
+ Version bump wrt #370499 by Nils Larsson <ni1s@nerdshack.com>. Fixes building
+ with gcc-4.6 (bug #366073)
02 Mar 2011; Justin Lecher <jlec@gentoo.org> celestia-1.6.0.ebuild:
Correct Slots for gtk 3 introduction to tree
diff --git a/sci-astronomy/celestia/celestia-1.6.1.ebuild b/sci-astronomy/celestia/celestia-1.6.1.ebuild
new file mode 100644
index 000000000000..685e116d4e35
--- /dev/null
+++ b/sci-astronomy/celestia/celestia-1.6.1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/celestia/celestia-1.6.1.ebuild,v 1.1 2011/06/12 10:42:44 xarthisius Exp $
+
+EAPI=2
+inherit eutils flag-o-matic gnome2 autotools
+
+DESCRIPTION="OpenGL 3D space 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 nls pch theora threads"
+
+RDEPEND="virtual/opengl
+ virtual/jpeg
+ media-libs/libpng
+ >=dev-lang/lua-5.0
+ gtk? ( !gnome? ( x11-libs/gtk+:2 >=x11-libs/gtkglext-1.0 ) )
+ gnome? (
+ x11-libs/gtk+:2
+ >=x11-libs/gtkglext-1.0
+ >=gnome-base/libgnomeui-2.0
+ )
+ !gtk? ( !gnome? ( media-libs/freeglut ) )
+ cairo? ( x11-libs/cairo )
+ theora? ( media-libs/libtheora )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+pkg_setup() {
+ # Check for one for the following use flags to be set.
+ if use gnome; then
+ einfo "USE=\"gnome\" detected."
+ USE_DESTDIR="1"
+ CELESTIA_GUI="gnome"
+ elif use gtk; then
+ einfo "USE=\"gtk\" detected."
+ CELESTIA_GUI="gtk"
+ else
+ ewarn "If you want to use the full gui, set USE=\"{gnome|gtk}\""
+ ewarn "Defaulting to glut support (no GUI)."
+ CELESTIA_GUI="glut"
+ fi
+}
+
+src_prepare() {
+ # make better desktop files
+ epatch "${FILESDIR}"/${PN}-1.5.0-desktop.patch
+ # add a ~/.celestia for extra directories
+ epatch "${FILESDIR}"/${PN}-1.6.0-cfg.patch
+ # --as-needed fix
+ epatch "${FILESDIR}"/${P}-as-needed.patch
+ # fix missing includes for gcc-4.6
+ epatch "${FILESDIR}"/${P}-gcc46.patch
+ # remove flags to let the user decide
+ 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
+ # remove an unused gconf macro killing autoconf when no gnome
+ # (not needed without eautoreconf)
+ if ! use gnome; then
+ sed -i \
+ -e '/AM_GCONF_SOURCE_2/d' \
+ configure.in || die "sed failed"
+ fi
+ eautoreconf
+ filter-flags "-funroll-loops -frerun-loop-opt"
+
+ ### This version of Celestia has a bug in the font rendering and
+ ### requires -fsigned-char. We should be able to force this flag
+ ### on all architectures. See bug #316573.
+ append-flags "-fsigned-char"
+}
+
+src_configure() {
+ # force lua in 1.6.1. seems to be inevitable
+ econf \
+ --disable-rpath \
+ --with-${CELESTIA_GUI} \
+ --with-lua \
+ $(use_enable cairo) \
+ $(use_enable threads threading) \
+ $(use_enable nls) \
+ $(use_enable pch) \
+ $(use_enable theora)
+}
+
+src_install() {
+ if [[ ${CELESTIA_GUI} == gnome ]]; then
+ gnome2_src_install
+ else
+ 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
+ [[ ${CELESTIA_GUI} == glut ]] && domenu celestia.desktop
+ dodoc AUTHORS README TRANSLATORS *.txt || die
+}
diff --git a/sci-astronomy/celestia/files/celestia-1.6.1-as-needed.patch b/sci-astronomy/celestia/files/celestia-1.6.1-as-needed.patch
new file mode 100644
index 000000000000..5b9d2ddfc03c
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.1-as-needed.patch
@@ -0,0 +1,19 @@
+Fixes building with as-needed
+
+Patch written by Nils Larsson <ni1s@nerdshack.com>
+--- src/celestia/Makefile.am
++++ src/celestia/Makefile.am
+@@ -10,11 +10,13@@
+ celestiaKDELIBS = $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KFILE) \
+ $(LIBSOCKET) kde/libkdegui.a
+ celestia_LDFLAGS = $(all_libraries) $(KDE_RPATH)
++LIBS += $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KFILE)
+ endif
+
+ if ENABLE_GTK
+ SUBDIRS += gtk
+ celestiaGTKLIBS = $(GTK_LIBS) gtk/libgtkgui.a
++LIBS += $(GTK_LIBS)
+ endif
+
+ COMMONSOURCES = \
diff --git a/sci-astronomy/celestia/files/celestia-1.6.1-gcc46.patch b/sci-astronomy/celestia/files/celestia-1.6.1-gcc46.patch
new file mode 100644
index 000000000000..ddf4036f2d66
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.6.1-gcc46.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/show_bug.cgi?id=366073
+
+Patch written by Nils Larsson <ni1s@nerdshack.com>
+--- src/celengine/frametree.h
++++ src/celengine/frametree.h
+@@ -14,6 +14,7 @@
+ #define _CELENGINE_FRAMETREE_H_
+
+ #include <vector>
++#include <cstddef>
+
+ class Star;
+ class Body;