/[gentoo-x86]/games-rpg/eternal-lands/eternal-lands-1.9.3-r1.ebuild
Gentoo

Contents of /games-rpg/eternal-lands/eternal-lands-1.9.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sun Jun 24 13:11:45 2012 UTC (2 years ago) by rich0
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +11 -2 lines
Fixes for gnome icon cache - thanks hasufell.

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 rich0 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 rich0 1.2 # $Header: /var/cvsroot/gentoo-x86/games-rpg/eternal-lands/eternal-lands-1.9.3-r1.ebuild,v 1.1 2012/03/02 18:28:24 rich0 Exp $
4 rich0 1.1
5     EAPI=2
6 rich0 1.3 inherit eutils flag-o-matic gnome2-utils games
7 rich0 1.1
8     DESCRIPTION="An online MMORPG written in C and SDL"
9     HOMEPAGE="http://www.eternal-lands.com"
10     SRC_URI="mirror://gentoo/elc_1.9.3-20120213.tar.bz2
11     http://dev.gentoo.org/~rich0/distfiles/eternal-lands.png"
12    
13     LICENSE="eternal_lands"
14     SLOT="0"
15     KEYWORDS="~amd64 ~x86 ~x86-fbsd"
16     IUSE="debug doc kernel_linux"
17    
18     RDEPEND="x11-libs/libX11
19     x11-libs/libXau
20     x11-libs/libXdmcp
21     x11-libs/libXext
22     virtual/opengl
23     virtual/glu
24     media-libs/libsdl[X]
25     media-libs/sdl-net
26     media-libs/sdl-image
27     media-libs/openal
28     media-libs/freealut
29     media-libs/libvorbis
30     dev-libs/libxml2
31     media-libs/cal3d[-16bit-indices]
32     media-libs/libpng
33     >=games-rpg/eternal-lands-data-1.9.3"
34    
35     DEPEND="${RDEPEND}
36     >=app-admin/eselect-opengl-1.0.6-r1
37     app-arch/unzip
38     doc? ( app-doc/doxygen
39     media-gfx/graphviz )"
40    
41     #ECVS_SERVER="cvs.elc.berlios.de:/cvsroot/elc"
42     #ECVS_MODULE="elc"
43     #ECVS_USER="anonymous"
44     #ECVS_LOCALNAME="elc"
45     #ECVS_PASS=""
46     #ECVS_CVS_OPTIONS="-dP -z3"
47     #ECVS_BRANCH="elc_1_8_0"
48    
49     #S="${WORKDIR}/${ECVS_MODULE}"
50     S="${WORKDIR}/elc"
51    
52     src_unpack() {
53     # cvs_src_unpack
54     OPTIONS="-DDATA_DIR="\\\\\"${GAMES_DATADIR}/${PN}/\\\\\"""
55     S_CLIENT="${WORKDIR}/elc"
56     BROWSER="firefox"
57     unpack ${A}
58     cd "${S}"
59     }
60    
61     src_prepare() {
62     # Add debugging options
63     if use debug ; then
64     OPTIONS="${OPTIONS} -DMEMORY_DEBUG"
65     append-flags -ggdb
66     fi
67    
68     # Clean compile flags (make Gentoo friendly)
69     sed -i \
70     -e "s@CFLAGS=\$(PLATFORM) \$(CWARN) -O0 -ggdb -pipe@CFLAGS = ${CFLAGS} ${OPTIONS} @g" \
71     -e "s@CXXFLAGS=\$(PLATFORM) \$(CXXWARN) -O0 -ggdb -pipe@CXXFLAGS = ${CXXFLAGS} ${OPTIONS} @g" \
72     -e 's/lopenal/lopenal -l alut/' \
73     Makefile.linux || die "sed failed"
74    
75     sed -i \
76     -e 's/#browser/browser/g' \
77     -e "s/browser = mozilla/#browser = ${BROWSER}/g" \
78     -e "s@#data_dir = /usr/local/games/el/@#data_dir = ${GAMES_DATADIR}/${PN}/@g" \
79     el.ini || die "sed failed"
80    
81     # Support BSD in the Linux makefile - it's easier
82     use kernel_linux || sed -i \
83     -e 's/^CFLAGS=.*/& -DBSD/' \
84     Makefile.linux || die "sed failed"
85    
86     # Clean up library flag order for --as-needed
87     # sed -i -e 's/@$(LINK) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(OBJS)/@$(LINK) $(CFLAGS) -o $(EXE) $(OBJS) $(LDFLAGS)/' Makefile.linux
88    
89     # Finally, update the server
90     sed -i -e '/#server_address =/ s/.*/#server_address = game.eternal-lands.com/' \
91     el.ini || die "sed failed"
92    
93     sed -i -e 's:FEATURES:EL_FEATURES:' make.defaults
94     sed -i -e 's:FEATURES:EL_FEATURES:' Makefile.linux
95    
96     if use debug; then
97     sed -i -e 's/#\(EL_FEATURES += MEMORY_DEBUG\)/\1/' make.defaults
98     sed -i -e 's/#\(EL_FEATURES += MEMORY_DEBUG\)/\1/' Makefile.linux
99     fi
100    
101     cp Makefile.linux Makefile
102    
103     epatch "${FILESDIR}/${PN}-1.9.2-glext.patch"
104     # epatch "${FILESDIR}/${PN}-1.9.1-libpng.patch"
105    
106     # Fix for Gentoo zlib OF redefine
107    
108     sed -i '1i#define OF(x) x' `find -name "*.c"` || die "sed failed"
109     }
110    
111     src_compile() {
112     emake || die "make failed"
113    
114     if use doc; then
115     emake docs || die "Failed to create documentation, try with USE=-doc"
116     mv ./docs/html/ ../client || die "Failed to move documentation directory"
117     fi
118     }
119    
120     src_install() {
121 rich0 1.3 newicon -s 64 "${DISTDIR}/eternal-lands.png" ${PN}.png
122 rich0 1.1
123     newgamesbin el.x86.linux.bin el \
124     || die "newgamesbin failed"
125     make_desktop_entry el "Eternal Lands" \
126     || die "make_desktop_entry failed"
127     insopts -m 0660
128     insinto "${GAMES_DATADIR}/${PN}"
129    
130     doins -r *.ini *.txt commands.lst \
131     || die "doins failed"
132    
133     if use doc ; then
134     dohtml -r client/*
135     fi
136    
137     prepgamesdirs
138     }
139    
140 rich0 1.3 pkg_preinst() {
141     games_pkg_preinst
142     gnome2_icon_savelist
143     }
144    
145 rich0 1.1 pkg_postinst() {
146     games_pkg_postinst
147 rich0 1.3 gnome2_icon_cache_update
148 rich0 1.1 elog "Auto Update is now enabled in Eternal Lands"
149     elog "If an update occurs then the client will suddenly exit"
150     elog "Updates only happen when the game first loads"
151     elog "Please don't report this behaviour as a bug"
152    
153     # Ensure that the files are writable by the game group for auto
154     # updating.
155     chmod -R g+rw "${ROOT}/${GAMES_DATADIR}/${PN}"
156    
157     # Make sure new files stay in games group
158     find "${ROOT}/${GAMES_DATADIR}/${PN}" -type d -exec chmod g+sx {} \;
159 rich0 1.3 }
160 rich0 1.1
161 rich0 1.3 pkg_postrm() {
162     gnome2_icon_cache_update
163 rich0 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20