1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils flag-o-matic gnome2-utils games
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 https://dev.gentoo.org/~rich0/distfiles/${PN}.png"
13 LICENSE="eternal_lands"
15 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
16 IUSE="debug doc kernel_linux"
18 RDEPEND="dev-libs/libxml2:=
19 media-libs/cal3d:=[-16bit-indices]
22 media-libs/libsdl:=[X,opengl,video]
23 media-libs/libvorbis:=
25 media-libs/sdl-image:=
27 >=games-rpg/eternal-lands-data-1.9.3
28 sys-libs/zlib:=[minizip]
36 >=app-eselect/eselect-opengl-1.0.6-r1
39 doc? ( app-doc/doxygen
46 local BROWSER="firefox"
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"
54 # Finally, update the server
55 sed -i -e '/#server_address =/ s/.*/#server_address = game.eternal-lands.com/' \
56 el.ini || die "sed failed"
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"
62 # remove bundled minizip
63 rm io/{crypt,ioapi,unzip,zip}.h || die
64 rm io/{ioapi,unzip,zip}.c || die
66 cp Makefile.linux Makefile
71 DEBUG="$(usex debug)" \
72 BSD_KERNEL="$(usex !kernel_linux)" \
73 DATADIR="${GAMES_DATADIR}/${PN}/"
77 mv ./docs/html/ ../client || die "Failed to move documentation directory"
83 make_desktop_entry el "Eternal Lands"
86 insinto "${GAMES_DATADIR}/${PN}"
88 doins -r *.ini *.txt commands.lst
91 dohtml -r "${WORKDIR}"/client/*
94 doicon -s 64 "${DISTDIR}/${PN}.png"
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"
112 # Ensure that the files are writable by the game group for auto
114 chmod -R g+rw "${ROOT}/${GAMES_DATADIR}/${PN}"
116 # Make sure new files stay in games group
117 find "${ROOT}/${GAMES_DATADIR}/${PN}" -type d -exec chmod g+sx {} \;
121 gnome2_icon_cache_update