summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Goller <morfic@gentoo.org>2004-08-19 04:09:59 +0000
committerDaniel Goller <morfic@gentoo.org>2004-08-19 04:09:59 +0000
commit79c592d9e0f53ad6206dafe1cbef2c24a6599333 (patch)
tree731081c60943c955044bcb98b192f1c78005e95c /app-sci
parentstable on ppc64 (Manifest recommit) (diff)
downloadgentoo-2-79c592d9e0f53ad6206dafe1cbef2c24a6599333.tar.gz
gentoo-2-79c592d9e0f53ad6206dafe1cbef2c24a6599333.tar.bz2
gentoo-2-79c592d9e0f53ad6206dafe1cbef2c24a6599333.zip
Fixed USE logic
Diffstat (limited to 'app-sci')
-rw-r--r--app-sci/celestia/ChangeLog7
-rw-r--r--app-sci/celestia/celestia-1.3.2_pre20040731-r1.ebuild93
2 files changed, 56 insertions, 44 deletions
diff --git a/app-sci/celestia/ChangeLog b/app-sci/celestia/ChangeLog
index 4f616c546e9c..a88fb40cc80a 100644
--- a/app-sci/celestia/ChangeLog
+++ b/app-sci/celestia/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-sci/celestia
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-sci/celestia/ChangeLog,v 1.14 2004/08/09 01:30:31 morfic Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-sci/celestia/ChangeLog,v 1.15 2004/08/19 04:09:59 morfic Exp $
+
+ 18 Aug 2004; Daniel Goller <morfic@gentoo.org>
+ celestia-1.3.2_pre20040731-r1.ebuild:
+ Fixed USE logic and other cleanups.
+ Thanks Jay.
*celestia-1.3.2_pre20040731-r1 (08 Aug 2004)
diff --git a/app-sci/celestia/celestia-1.3.2_pre20040731-r1.ebuild b/app-sci/celestia/celestia-1.3.2_pre20040731-r1.ebuild
index 5bc487be4b9d..7c6771b980a9 100644
--- a/app-sci/celestia/celestia-1.3.2_pre20040731-r1.ebuild
+++ b/app-sci/celestia/celestia-1.3.2_pre20040731-r1.ebuild
@@ -1,104 +1,111 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-sci/celestia/celestia-1.3.2_pre20040731-r1.ebuild,v 1.2 2004/08/09 01:58:42 morfic Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-sci/celestia/celestia-1.3.2_pre20040731-r1.ebuild,v 1.3 2004/08/19 04:09:59 morfic Exp $
-inherit eutils flag-o-matic gnome2
-
-IUSE="kde gnome gtk"
+inherit eutils flag-o-matic gnome2 kde-functions
SNAPSHOT="${PV/*_pre}"
S="${WORKDIR}/${P/_*}"
DESCRIPTION="Celestia is a free real-time space simulation that lets you experience our universe in three dimensions"
-#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://www.shatters.net/celestia/"
SRC_URI="http://celestia.teyssier.org/download/daily/${PN}-cvs.${SNAPSHOT}.tgz"
-HOMEPAGE="http://www.shatters.net/celestia"
-SLOT="0"
LICENSE="GPL-2"
+SLOT="0"
KEYWORDS="-* ~x86"
+IUSE="gnome gtk kde glut"
-# gnome and kde interfaces are exlcusive
DEPEND=">=media-libs/glut-3.7-r2
virtual/glu
media-libs/jpeg
media-libs/libpng
- !kde? ( gtk? ( =x11-libs/gtk+-1.2*
- =x11-libs/gtkglext-1.0*
- <x11-libs/gtkglarea-1.99.0 )
- gnome? ( =gnome-base/gnome-libs-1.4* )
- )
+ gtk? ( =x11-libs/gtk+-1.2*
+ =x11-libs/gtkglext-1.0*
+ <x11-libs/gtkglarea-1.99.0 )
+ gnome? ( =gnome-base/gnome-libs-1.4* )
kde? ( >=kde-base/kdelibs-3.0.5 )"
-
pkg_setup() {
- # Set up X11 implementation
+ # Check for one for the following use flags to be set.
+ if use kde; then
+ einfo "USE=\"kde\" detected. This will override any gnome/gtk USE preferences."
+ export MYMAKE="kde"
+ elif use glut; then
+ einfo "USE=\"glut\" detected."
+ export MYMAKE="gnome"
+ elif use gtk; then
+ einfo "USE=\"gtk\" detected."
+ export MYMAKE="gtk"
+ else
+ eerror "You must set at least one of USE=\"{kde/gnome/gtk}\""
+ ewarn "Please set one of the USE flags end re-emerge"
+ ewarn "ie. 'env USE=\"kde\" emerge celestia"
+ die "No valid USE flags set"
+ fi
+
+ # Get X11 implementation
X11_IMPLEM_P="$(portageq best_version "${ROOT}" virtual/x11)"
X11_IMPLEM="${X11_IMPLEM_P%-[0-9]*}"
X11_IMPLEM="${X11_IMPLEM##*\/}"
- einfo "Please note:"
- einfo "if you experience problems building celestia with nvidia drivers,"
- einfo "you can try:"
- einfo "opengl-update ${X11_IMPLEM}"
- einfo "emerge celestia"
- einfo "opengl-update nvidia"
+ einfo "Please note:"
+ einfo "if you experience problems building celestia with nvidia drivers,"
+ einfo "you can try:"
+ einfo "opengl-update ${X11_IMPLEM}"
+ einfo "emerge celestia"
+ einfo "opengl-update nvidia"
}
src_unpack() {
unpack ${A}
cd ${S}
+
# the patch didn't apply correcty. Had no time to check if the patch
# is no longer necessary
-# epatch ${FILESDIR}/${PN}-1.3.1-gtkmain.patch
+ #epatch ${FILESDIR}/${PN}-1.3.1-gtkmain.patch
+
# adding gcc-3.4 support as posted in
# (http://bugs.gentoo.org/show_bug.cgi?id=53479#c2)
- epatch ${FILESDIR}/resmanager.h.patch || die
+ epatch ${FILESDIR}/resmanager.h.patch \
+ || die "patching gcc 3.4 support failed"
- if use !gnome; then
+ if [ "${MYMAKE}" != "gnome" ]; then
# alright this snapshot seems to have some trouble with installing a
# file properly. It wants to install celestia.schemas in / which leads
# to an ACCESS VIOLATION. Unfortunately this file even gets installed
# when no gtk/gnome is enabled
# The following lines prevents this but thinkabout as a dirty hack
cd ${S}/src/celestia/gtk || die
- sed -i -e 's:GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@:GCONF_SCHEMA_FILE_DIR = $(pkgdatadir)/schemas:g' Makefile.in || die
- sed -i -e 's:GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@:GCONF_SCHEMA_FILE_DIR = $(pkgdatadir)/schemas:g' data/Makefile.in || die
- cd ${S} || die
+ sed -i -e 's:@GCONF_SCHEMA_FILE_DIR@:$(pkgdatadir)/schemas:g' \
+ Makefile.in || die
+ sed -i -e 's:@GCONF_SCHEMA_FILE_DIR@:$(pkgdatadir)/schemas:g' \
+ data/Makefile.in || die
fi
-
}
src_compile() {
- local myconf
-
filter-flags "-funroll-loops -frerun-loop-opt"
addwrite ${QTDIR}/etc/settings
- # currently celestia's "gtk support" requires gnome
- if use kde; then
- myconf="$myconf --with-kde"
+
+ if [ "${MYMAKE}" = "kde" ]; then
set-kdedir 3
set-qtdir 3
export kde_widgetdir="$KDEDIR/lib/kde3/plugins/designer"
- elif use gnome; then
- myconf="$myconf --with-gnome"
- elif use gtk; then
- myconf="$myconf --with-gtk"
- else
- die "!!! You need to choose either USE=kde or USE=i\"-kde gnomei\""
fi
-
- ./configure --prefix=/usr ${myconf} || die
+
+ ./configure --prefix=/usr \
+ --with-${MYMAKE} || die
emake all || die
}
src_install() {
- if use gnome; then
+ if [ "${MYMAKE}" = "gnome" ]; then
gnome2_src_install
else
make install prefix=${D}/usr
fi
- # removed NEWS as it is not included in this snapshot
+
dodoc AUTHORS COPYING README TODO controls.txt
dohtml manual/*.html manual/*.css
}