/[gentoo-x86]/app-sci/celestia/celestia-1.3.2.ebuild
Gentoo

Contents of /app-sci/celestia/celestia-1.3.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Fri Dec 24 03:43:56 2004 UTC (14 years, 9 months ago) by ribosome
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Moving to sci-astronomy/celestia

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-sci/celestia/celestia-1.3.2.ebuild,v 1.6 2004/11/28 10:39:06 blubb Exp $
4
5 inherit eutils flag-o-matic gnome2 kde-functions
6
7 DESCRIPTION="Celestia is a free real-time space simulation that lets you experience our universe in three dimensions"
8 HOMEPAGE="http://www.shatters.net/celestia/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="x86 ppc amd64"
14 IUSE="gnome gtk kde arts"
15
16 DEPEND=">=media-libs/glut-3.7.1
17 virtual/glu
18 media-libs/jpeg
19 media-libs/libpng
20 dev-lang/lua
21 gtk? ( >=x11-libs/gtk+-2.0
22 >=x11-libs/gtkglext-1.0 )
23 gnome? ( >=gnome-base/libgnomeui-2.0 )
24 kde? ( >=kde-base/kdelibs-3.0.5 )"
25
26 pkg_setup() {
27 # Check for one for the following use flags to be set.
28 if use kde; then
29 einfo "USE=\"kde\" detected. This will override any gnome/gtk USE preferences."
30 export MYMAKE="kde"
31 elif use gnome; then
32 einfo "USE=\"gnome\" detected."
33 export MYMAKE="gnome"
34 elif use gtk; then
35 einfo "USE=\"gtk\" detected."
36 export MYMAKE="gtk"
37 else
38 eerror "You must set at least one of USE=\"{kde/gnome/gtk}\""
39 ewarn "Please set one of the USE flags end re-emerge"
40 ewarn "ie. 'env USE=\"kde\" emerge celestia"
41 die "No valid USE flags set"
42 fi
43
44 # Get X11 implementation
45 X11_IMPLEM_P="$(portageq best_version "${ROOT}" virtual/x11)"
46 X11_IMPLEM="${X11_IMPLEM_P%-[0-9]*}"
47 X11_IMPLEM="${X11_IMPLEM##*\/}"
48
49 einfo "Please note:"
50 einfo "if you experience problems building celestia with nvidia drivers,"
51 einfo "you can try:"
52 einfo "opengl-update ${X11_IMPLEM}"
53 einfo "emerge celestia"
54 einfo "opengl-update nvidia"
55 }
56
57 src_unpack() {
58 unpack ${A}
59 cd ${S}
60
61 # adding gcc-3.4 support as posted in
62 # (http://bugs.gentoo.org/show_bug.cgi?id=53479#c2)
63 epatch ${FILESDIR}/resmanager.h.patch \
64 || die "patching gcc 3.4 support failed"
65
66 if use !arts;
67 then
68 epatch ${FILESDIR}/celestia-1.3.2-noarts.patch
69 fi
70
71 if [ "${MYMAKE}" != "gnome" ]; then
72 # alright this snapshot seems to have some trouble with installing a
73 # file properly. It wants to install celestia.schemas in / which leads
74 # to an ACCESS VIOLATION. Unfortunately this file even gets installed
75 # when no gtk/gnome is enabled
76 # The following lines prevents this but thinkabout as a dirty hack
77 cd ${S}/src/celestia/gtk || die
78 sed -i -e 's:@GCONF_SCHEMA_FILE_DIR@:$(pkgdatadir)/schemas:g' \
79 Makefile.in || die
80 sed -i -e 's:@GCONF_SCHEMA_FILE_DIR@:$(pkgdatadir)/schemas:g' \
81 data/Makefile.in || die
82 fi
83 }
84
85 src_compile() {
86 filter-flags "-funroll-loops -frerun-loop-opt"
87 addwrite ${QTDIR}/etc/settings
88
89 if [ "${MYMAKE}" = "kde" ]; then
90 set-kdedir 3
91 set-qtdir 3
92 export kde_widgetdir="$KDEDIR/lib/kde3/plugins/designer"
93 fi
94
95 ./configure --prefix=/usr \
96 --with-lua \
97 --with-${MYMAKE} || die
98
99 emake all || die
100 }
101
102 src_install() {
103 if [ "${MYMAKE}" = "gnome" ]; then
104 gnome2_src_install
105 else
106 make install prefix=${D}/usr
107 fi
108
109 dodoc AUTHORS COPYING README TODO controls.txt
110 dohtml manual/*.html manual/*.css
111 }

  ViewVC Help
Powered by ViewVC 1.1.20