summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-07-06 16:54:04 +0000
committerRoy Marples <uberlord@gentoo.org>2006-07-06 16:54:04 +0000
commitb43ca32deca1b99d4fe3d4833c3c049386288fc5 (patch)
tree1ba15a6cdb65ce49ff7f86596526f58526c807f5 /games-rpg/eternal-lands
parentVersion bump. New release after 2.5 years. Thank all who worked on bug 138963. (diff)
downloadgentoo-2-b43ca32deca1b99d4fe3d4833c3c049386288fc5.tar.gz
gentoo-2-b43ca32deca1b99d4fe3d4833c3c049386288fc5.tar.bz2
gentoo-2-b43ca32deca1b99d4fe3d4833c3c049386288fc5.zip
Added a patch to make the new counters actually work.
(Portage version: 2.1.1_pre2-r2)
Diffstat (limited to 'games-rpg/eternal-lands')
-rw-r--r--games-rpg/eternal-lands/ChangeLog8
-rw-r--r--games-rpg/eternal-lands/eternal-lands-1.3.0-r1.ebuild118
-rw-r--r--games-rpg/eternal-lands/files/digest-eternal-lands-1.3.0-r16
-rw-r--r--games-rpg/eternal-lands/files/eternal-lands-1.3.0-counters.patch66
4 files changed, 197 insertions, 1 deletions
diff --git a/games-rpg/eternal-lands/ChangeLog b/games-rpg/eternal-lands/ChangeLog
index 4397bb7e2964..cb7137865b6f 100644
--- a/games-rpg/eternal-lands/ChangeLog
+++ b/games-rpg/eternal-lands/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-rpg/eternal-lands
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-rpg/eternal-lands/ChangeLog,v 1.21 2006/07/06 13:28:24 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/eternal-lands/ChangeLog,v 1.22 2006/07/06 16:54:04 uberlord Exp $
+
+*eternal-lands-1.3.0-r1 (06 Jul 2006)
+
+ 06 Jul 2006; Roy Marples <uberlord@gentoo.org>
+ +files/eternal-lands-1.3.0-counters.patch, +eternal-lands-1.3.0-r1.ebuild:
+ Added a patch to make the new counters actually work.
06 Jul 2006; Roy Marples <uberlord@gentoo.org> eternal-lands-1.3.0.ebuild:
Stop compiling with -DFONTS_FIX as it appears to be a bit wonky.
diff --git a/games-rpg/eternal-lands/eternal-lands-1.3.0-r1.ebuild b/games-rpg/eternal-lands/eternal-lands-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..40f6bb21c1ba
--- /dev/null
+++ b/games-rpg/eternal-lands/eternal-lands-1.3.0-r1.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/eternal-lands/eternal-lands-1.3.0-r1.ebuild,v 1.1 2006/07/06 16:54:04 uberlord Exp $
+
+inherit eutils games
+
+MY_PV="${PV//_/}"
+MY_PV="${MY_PV//./}"
+S="${WORKDIR}/elc"
+DESCRIPTION="An online MMORPG written in C and SDL"
+HOMEPAGE="http://www.eternal-lands.com"
+SRC_URI="mirror://gentoo/elc_${MY_PV}.tar.bz2
+ mirror://gentoo/eternal-lands.png"
+
+# NOTE: Sometimes you'll have to roll your own elc tarball from their CVS
+# tree as they don't always release one.
+# If they do then use this in SRC_URI instead
+# ftp://ftp.berlios.de/pub/elc/elc_${MY_PV}.tgz
+
+LICENSE="eternal_lands"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+ || ( (
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext )
+ virtual/x11 )
+ virtual/opengl
+ >=media-libs/libsdl-1.2.5
+ >=media-libs/sdl-net-1.2.5
+ ~media-libs/openal-0.0.8
+ media-libs/freealut
+ media-libs/libvorbis
+ >=dev-libs/libxml2-2.6.7
+ =media-libs/cal3d-0.10.0
+ >=media-libs/libpng-1.2.8
+ ~games-rpg/${PN}-data-${PV}"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ sys-apps/findutils
+ doc? ( >=app-doc/doxygen-1.3.8
+ >=media-gfx/graphviz-1.10 )"
+
+src_unpack() {
+ OPTIONS="OPTIONS=-DDATA_DIR="\\\\\"${GAMES_DATADIR}/${PN}/\\\\\"""
+ S_CLIENT="${WORKDIR}/elc"
+ BROWSER="konqueror"
+
+ unpack ${A}
+ cd "${S}"
+
+ # Remove CVS entries
+ find . -type d -name CVS -exec rm -rf {} \; 2>/dev/null
+
+ # Create updated files with correct perms and allow dir creation
+ epatch "${FILESDIR}/${PN}-1.3.0-update-createdir.patch"
+
+ # Get counters working
+ epatch "${FILESDIR}/${PN}-1.3.0-counters.patch"
+
+ use amd64 && OPTIONS="${OPTIONS} -DX86_64"
+ sed \
+ -e "s@CFLAGS=\$(PLATFORM) \$(CWARN) -O -ggdb -pipe@CFLAGS=${CFLAGS} @g"\
+ -e "s@CXXFLAGS=\$(PLATFORM) \$(CXXWARN) -O -ggdb -pipe@CXXFLAGS=${CXXFLAGS} @g"\
+ -e "s@OPTIONS=@${OPTIONS} @g" \
+ -e 's/lopenal/lopenal -l alut/' \
+ -e 's/-DFONTS_FIX//' \
+ Makefile.linux > Makefile \
+ || die "sed failed"
+ sed -i \
+ -e 's/#browser/browser/g' \
+ -e "s/browser = mozilla/#browser = ${BROWSER}/g" \
+ -e "s@#data_dir = /usr/local/games/el/@#data_dir = ${GAMES_DATADIR}/${PN}/@g" \
+ el.ini || die "sed failed"
+}
+
+src_compile() {
+ emake || die "emake failed"
+ if use doc; then
+ emake docs || die "Failed to create documentation, try with USE=-doc"
+ mv ./docs/html/ ../client || die "Failed to move documentation directory"
+ fi
+}
+
+src_install() {
+ newgamesbin el.x86.linux.bin el || die "newgamesbin failed"
+ doicon "${DISTDIR}/eternal-lands.png"
+ make_desktop_entry el "Eternal Lands"
+
+ insopts -m 0660
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins *.ini *.txt commands.lst || die "doins failed"
+
+ if use doc ; then
+ dohtml -r client/*
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ einfo "Auto Update is now enabled in Eternal Lands"
+ ewarn "If an update occurs then the client will suddenly exit"
+ einfo "Updates only happen when the game first loads"
+ einfo "Please don't report this behaviour as a bug"
+
+ # Ensure that the files are writable by the game group for auto
+ # updating.
+ chmod -R g+rw "${ROOT}/${GAMES_DATADIR}/${MY_PN}"
+
+ # Make sure new files stay in games group
+ find "${ROOT}/${GAMES_DATADIR}/${MY_PN}" -type d -exec chmod g+sx {} \;
+}
diff --git a/games-rpg/eternal-lands/files/digest-eternal-lands-1.3.0-r1 b/games-rpg/eternal-lands/files/digest-eternal-lands-1.3.0-r1
new file mode 100644
index 000000000000..2be8e9ed82f7
--- /dev/null
+++ b/games-rpg/eternal-lands/files/digest-eternal-lands-1.3.0-r1
@@ -0,0 +1,6 @@
+MD5 f83902ed603926a9611ace5914a3fdc0 elc_130.tar.bz2 849004
+RMD160 e5dc66b2db5203a13707170046874392e1908a06 elc_130.tar.bz2 849004
+SHA256 ffcd5779a0516e5ec3f6c1add718653284689023a92fcb9dfa3917076d8be140 elc_130.tar.bz2 849004
+MD5 059df8128b11b19a76b54e9907072f00 eternal-lands.png 9955
+RMD160 2f9c8acd96214577cf8b8027f0d20fb1fe7574ff eternal-lands.png 9955
+SHA256 dd7d45cd9948fe7875ebd0bfcd1925d9b34e7606a223faf61d37a6dd2cd433fb eternal-lands.png 9955
diff --git a/games-rpg/eternal-lands/files/eternal-lands-1.3.0-counters.patch b/games-rpg/eternal-lands/files/eternal-lands-1.3.0-counters.patch
new file mode 100644
index 000000000000..243cfb658cff
--- /dev/null
+++ b/games-rpg/eternal-lands/files/eternal-lands-1.3.0-counters.patch
@@ -0,0 +1,66 @@
+--- elc.orig/counters.c 2006-07-04 20:03:48.000000000 +0100
++++ elc/counters.c 2006-07-06 14:46:40.000000000 +0100
+@@ -121,54 +121,6 @@
+ return my_fopen(filename, mode);
+ }
+
+-/*******************************************************************************
+- * XXX: Delete this function.
+- ******************************************************************************/
+-void import_old_counters()
+-{
+- char filename[256], username[16];
+- int i, j;
+- Uint8 io_name_len;
+- Uint8 io_is_player;
+- Uint32 io_n_total;
+- char io_name[32];
+- FILE *f;
+-
+- strncpy(username, username_str, sizeof(username));
+- for (i = 0; username[i]; i++) {
+- username[i] = tolower(username[i]);
+- }
+-
+-#ifndef WINDOWS
+- snprintf(filename, sizeof(filename), "%s/kills_%s.dat", configdir, username);
+-#else
+- snprintf(filename, sizeof(filename), "kills_%s.dat", username);
+-#endif
+-
+- if (!(f = my_fopen(filename, "rb"))) {
+- return;
+- }
+-
+- i = KILLS - 1;
+-
+- while (fread(&io_name_len, sizeof(io_name_len), 1, f) > 0) {
+- fread(io_name, io_name_len, 1, f);
+- io_name[io_name_len] = '\0';
+-
+- fread(&io_is_player, sizeof(io_is_player), 1, f);
+- fread(&io_n_total, sizeof(io_n_total), 1, f);
+-
+- j = entries[i]++;
+- counters[i] = realloc(counters[i], entries[i] * sizeof(struct Counter));
+- counters[i][j].name = strdup(io_name);
+- counters[i][j].n_session = 0;
+- counters[i][j].n_total = io_n_total;
+- counters[i][j].extra = io_is_player;
+- }
+-
+- fclose(f);
+-}
+-
+ void load_counters()
+ {
+ FILE *f;
+@@ -198,7 +150,7 @@
+ }
+
+ if (!(f = open_counters_file("rb"))) {
+- import_old_counters();
++ counters_initialized = 1;
+ return;
+ }
+