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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Thu Jan 24 23:20:08 2013 UTC (19 months, 1 week ago) by rich0
Branch: MAIN
Changes since 1.5: +3 -2 lines
Add glew dep - 448596

(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key 0x08C170DE55EC123A)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-rpg/eternal-lands/eternal-lands-1.9.3-r2.ebuild,v 1.5 2013/01/24 00:51:09 hasufell Exp $
4
5 EAPI=4
6 inherit eutils flag-o-matic gnome2-utils games
7
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/${PN}.png"
12
13 LICENSE="eternal_lands"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
16 IUSE="debug doc kernel_linux"
17
18 RDEPEND="dev-libs/libxml2
19 media-libs/cal3d[-16bit-indices]
20 media-libs/freealut
21 media-libs/libpng:0
22 media-libs/libsdl[X,opengl,video]
23 media-libs/libvorbis
24 media-libs/openal
25 media-libs/sdl-image
26 media-libs/sdl-net
27 >=games-rpg/eternal-lands-data-1.9.3
28 sys-libs/zlib[minizip]
29 virtual/glu
30 virtual/opengl
31 x11-libs/libX11
32 x11-libs/libXau
33 x11-libs/libXdmcp
34 x11-libs/libXext"
35 DEPEND="${RDEPEND}
36 >=app-admin/eselect-opengl-1.0.6-r1
37 app-arch/unzip
38 virtual/pkgconfig
39 doc? ( app-doc/doxygen
40 media-gfx/graphviz )
41 media-libs/glew"
42
43 S="${WORKDIR}/elc"
44
45 src_prepare() {
46 local BROWSER="firefox"
47
48 sed -i \
49 -e 's/#browser/browser/g' \
50 -e "s/browser = mozilla/#browser = ${BROWSER}/g" \
51 -e "s@#data_dir = /usr/local/games/el/@#data_dir = ${GAMES_DATADIR}/${PN}/@g" \
52 el.ini || die "sed failed"
53
54 # Finally, update the server
55 sed -i -e '/#server_address =/ s/.*/#server_address = game.eternal-lands.com/' \
56 el.ini || die "sed failed"
57
58 epatch "${FILESDIR}/${PN}-1.9.3-glbuild.patch"
59 epatch "${FILESDIR}/${PN}-1.9.3-build.patch"
60 epatch "${FILESDIR}/${PN}-1.9.3-minizip.patch"
61
62 # remove bundled minizip
63 rm io/{crypt,ioapi,unzip,zip}.h || die
64 rm io/{ioapi,unzip,zip}.c || die
65
66 cp Makefile.linux Makefile
67 }
68
69 src_compile() {
70 emake \
71 DEBUG="$(usex debug)" \
72 BSD_KERNEL="$(usex !kernel_linux)" \
73 DATADIR="${GAMES_DATADIR}/${PN}/"
74
75 if use doc; then
76 emake docs
77 mv ./docs/html/ ../client || die "Failed to move documentation directory"
78 fi
79 }
80
81 src_install() {
82 dogamesbin el
83 make_desktop_entry el "Eternal Lands"
84
85 insopts -m 0660
86 insinto "${GAMES_DATADIR}/${PN}"
87
88 doins -r *.ini *.txt commands.lst
89
90 if use doc ; then
91 dohtml -r "${WORKDIR}"/client/*
92 fi
93
94 doicon -s 64 "${DISTDIR}/${PN}.png"
95
96 prepgamesdirs
97 }
98
99 pkg_preinst() {
100 games_pkg_preinst
101 gnome2_icon_savelist
102 }
103
104 pkg_postinst() {
105 games_pkg_postinst
106 gnome2_icon_cache_update
107 elog "Auto Update is now enabled in Eternal Lands"
108 elog "If an update occurs then the client will suddenly exit"
109 elog "Updates only happen when the game first loads"
110 elog "Please don't report this behaviour as a bug"
111
112 # Ensure that the files are writable by the game group for auto
113 # updating.
114 chmod -R g+rw "${ROOT}/${GAMES_DATADIR}/${PN}"
115
116 # Make sure new files stay in games group
117 find "${ROOT}/${GAMES_DATADIR}/${PN}" -type d -exec chmod g+sx {} \;
118 }
119
120 pkg_postrm() {
121 gnome2_icon_cache_update
122 }

  ViewVC Help
Powered by ViewVC 1.1.20