summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-astronomy/celestia/ChangeLog10
-rw-r--r--sci-astronomy/celestia/celestia-1.5.1.ebuild141
-rw-r--r--sci-astronomy/celestia/files/celestia-1.5.1-arts.patch34
3 files changed, 184 insertions, 1 deletions
diff --git a/sci-astronomy/celestia/ChangeLog b/sci-astronomy/celestia/ChangeLog
index 3bd33a33e843..596be9016596 100644
--- a/sci-astronomy/celestia/ChangeLog
+++ b/sci-astronomy/celestia/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-astronomy/celestia
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/celestia/ChangeLog,v 1.40 2008/04/15 15:52:53 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/celestia/ChangeLog,v 1.41 2008/06/24 17:20:03 markusle Exp $
+
+*celestia-1.5.1 (24 Jun 2008)
+
+ 24 Jun 2008; Markus Dittrich <markusle@gentoo.org>
+ +files/celestia-1.5.1-arts.patch, +celestia-1.5.1.ebuild:
+ Version bump, including fix for libtool-2.2 problems (bug #228865
+ and #218982). Thanks much to Aleksandr Yakimov <aleks@spamtest.ru>
+ for his patches.
15 Apr 2008; Sébastien Fabbro <bicatali@gentoo.org>
+files/celestia-1.5.0-gcc43.patch, celestia-1.5.0.ebuild:
diff --git a/sci-astronomy/celestia/celestia-1.5.1.ebuild b/sci-astronomy/celestia/celestia-1.5.1.ebuild
new file mode 100644
index 000000000000..65f7dd08e7ce
--- /dev/null
+++ b/sci-astronomy/celestia/celestia-1.5.1.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/celestia/celestia-1.5.1.ebuild,v 1.1 2008/06/24 17:20:03 markusle Exp $
+
+inherit eutils flag-o-matic gnome2 kde-functions autotools
+
+DESCRIPTION="OpenGL 3D space simulator"
+HOMEPAGE="http://www.shatters.net/celestia/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://gentoo/${P}-acinclude.patch.bz2
+ mirror://gentoo/${P}-gcc43.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="arts cairo gnome gtk kde lua nls pch theora threads"
+
+RDEPEND="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 )
+ 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 && use kde; then
+ einfo "USE=\"kde\" detected."
+ CELESTIA_GUI="kde"
+ elif ! use kde && use gnome; then
+ einfo "USE=\"gnome\" detected."
+ USE_DESTDIR="1"
+ CELESTIA_GUI="gnome"
+ elif ! use kde && ! use gnome && use gtk; then
+ einfo "USE=\"gtk\" detected."
+ CELESTIA_GUI="gtk"
+ elif use kde && use gnome; then
+ einfo "Both gnome and kde support requested. Defaulting to kde"
+ CELESTIA_GUI="kde"
+ else
+ ewarn "If you want to use the full gui, set USE=\"{kde/gnome/gtk}\""
+ ewarn "Defaulting to glut support (no GUI)."
+ CELESTIA_GUI="glut"
+ fi
+}
+
+src_unpack() {
+
+ unpack ${A}
+ cd "${S}"
+ # make better desktop files
+ epatch "${FILESDIR}"/${PN}-1.5.0-desktop.patch
+
+ # add a ~/.celestia for extra directories
+ epatch "${FILESDIR}"/${PN}-1.4.1-cfg.patch
+
+ # fix for as-needed (bug #130091)
+ epatch "${FILESDIR}"/${PN}-1.4.1-as-needed.patch
+
+ # fix for as-needed (bug #217758)
+ epatch "${DISTDIR}"/${P}-gcc43.patch.bz2
+
+ # fix for libtool-2.2 (bug #228865 and #218982)
+ epatch "${DISTDIR}"/${P}-acinclude.patch.bz2
+
+ # needed for kde GUI
+ epatch "${FILESDIR}"/${P}-arts.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 || 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
+}
+
+src_compile() {
+
+ if [[ ${CELESTIA_GUI} == kde ]]; then
+ set-kdedir 3
+ set-qtdir 3
+ export kde_widgetdir="${KDEDIR}/lib/kde3/plugins/designer"
+ fi
+
+ filter-flags "-funroll-loops -frerun-loop-opt"
+
+ econf \
+ --with-${CELESTIA_GUI} \
+ $(use_with arts) \
+ $(use_with lua) \
+ $(use_enable cairo) \
+ $(use_enable threads threading) \
+ $(use_enable nls) \
+ $(use_enable pch) \
+ $(use_enable theora) \
+ || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+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 TODO TRANSLATORS *.txt || die
+}
diff --git a/sci-astronomy/celestia/files/celestia-1.5.1-arts.patch b/sci-astronomy/celestia/files/celestia-1.5.1-arts.patch
new file mode 100644
index 000000000000..2f257a919901
--- /dev/null
+++ b/sci-astronomy/celestia/files/celestia-1.5.1-arts.patch
@@ -0,0 +1,34 @@
+diff -Naur celestia-1.5.1/acinclude.m4 celestia-1.5.1.new/acinclude.m4
+--- celestia-1.5.1/acinclude.m4 2008-04-23 17:18:48.000000000 -0400
++++ celestia-1.5.1.new/acinclude.m4 2008-06-24 10:00:53.000000000 -0400
+@@ -522,6 +522,15 @@
+
+ AC_DEFUN(KDE_SUBST_PROGRAMS,
+ [
++ AC_ARG_WITH(arts,
++ AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
++ [build_arts=$withval],
++ [build_arts=yes]
++ )
++ AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
++ if test "$build_arts" = "no"; then
++ AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
++ fi
+
+ kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+ test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
+@@ -536,8 +545,12 @@
+ kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
+ KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
+ KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
+- KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
+- KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
++
++ if test "$build_arts" '!=' "no"; then
++ KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
++ KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
++ fi
++
+ KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
+ KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
+