summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Heaven <nyhm@gentoo.org>2007-02-02 00:26:14 +0000
committerTristan Heaven <nyhm@gentoo.org>2007-02-02 00:26:14 +0000
commit302ccab4076ceed128c23cd0e63a030251fc9d7b (patch)
treee73a5254b03349aa5795fb9bf29e56659ac7f642 /games-fps
parentVersion bump (diff)
downloadgentoo-2-302ccab4076ceed128c23cd0e63a030251fc9d7b.tar.gz
gentoo-2-302ccab4076ceed128c23cd0e63a030251fc9d7b.tar.bz2
gentoo-2-302ccab4076ceed128c23cd0e63a030251fc9d7b.zip
Patch from FreeBSD for bug #162592
(Portage version: 2.1.2-r5)
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/warsow/ChangeLog10
-rw-r--r--games-fps/warsow/files/digest-warsow-0.21-r16
-rw-r--r--games-fps/warsow/files/warsow-0.21-inverted-mouse.patch15
-rw-r--r--games-fps/warsow/warsow-0.21-r1.ebuild151
4 files changed, 180 insertions, 2 deletions
diff --git a/games-fps/warsow/ChangeLog b/games-fps/warsow/ChangeLog
index d41c1c0fba2e..afdbb2007276 100644
--- a/games-fps/warsow/ChangeLog
+++ b/games-fps/warsow/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-fps/warsow
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/warsow/ChangeLog,v 1.2 2006/11/18 19:17:26 peper Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/warsow/ChangeLog,v 1.3 2007/02/02 00:26:13 nyhm Exp $
+
+*warsow-0.21-r1 (02 Feb 2007)
+
+ 02 Feb 2007; Tristan Heaven <nyhm@gentoo.org>
+ +files/warsow-0.21-inverted-mouse.patch, +warsow-0.21-r1.ebuild:
+ Patch from FreeBSD for bug #162592
18 Nov 2006; Piotr Jaroszyński <peper@gentoo.org> warsow-0.21.ebuild:
Add ~amd64 wrt bug #154362.
diff --git a/games-fps/warsow/files/digest-warsow-0.21-r1 b/games-fps/warsow/files/digest-warsow-0.21-r1
new file mode 100644
index 000000000000..99a42184c662
--- /dev/null
+++ b/games-fps/warsow/files/digest-warsow-0.21-r1
@@ -0,0 +1,6 @@
+MD5 0ee0835a1fe9092c9562113253d0f79a warsow_0.21_linux.tar.gz 80219586
+RMD160 1d4e5672a79bb38c594e9bcfcad09b6a1a59c47d warsow_0.21_linux.tar.gz 80219586
+SHA256 fa927e2559620bea8926eed141106815c28099c8fff227f21463ebb1be9748d4 warsow_0.21_linux.tar.gz 80219586
+MD5 ce66288c5d345c8cf3985cbb1e51e199 warsow_0.21_sdk.zip 7469755
+RMD160 416e646463fd4a4bc51bf84eebceed725dab1744 warsow_0.21_sdk.zip 7469755
+SHA256 81b9fd550d826cb0b466b05106bff1729270ceb7682debb4c0a333b8b8dfa3f7 warsow_0.21_sdk.zip 7469755
diff --git a/games-fps/warsow/files/warsow-0.21-inverted-mouse.patch b/games-fps/warsow/files/warsow-0.21-inverted-mouse.patch
new file mode 100644
index 000000000000..5d39e2ef01b7
--- /dev/null
+++ b/games-fps/warsow/files/warsow-0.21-inverted-mouse.patch
@@ -0,0 +1,15 @@
+--- source/linux/in_x11.c
++++ source/linux/in_x11.c
+@@ -589,10 +589,8 @@
+ }
+ else
+ {
+- mx = -((int)event.xmotion.x - mwx);
+- my = -((int)event.xmotion.y - mwy);
+- mwx = event.xmotion.x;
+- mwy = event.xmotion.y;
++ mx += ((int)event.xmotion.x - mwx);
++ my += ((int)event.xmotion.y - mwy);
+
+ if (mx || my)
+ dowarp = qtrue;
diff --git a/games-fps/warsow/warsow-0.21-r1.ebuild b/games-fps/warsow/warsow-0.21-r1.ebuild
new file mode 100644
index 000000000000..93fab6a47d96
--- /dev/null
+++ b/games-fps/warsow/warsow-0.21-r1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/warsow/warsow-0.21-r1.ebuild,v 1.1 2007/02/02 00:26:13 nyhm Exp $
+
+inherit eutils toolchain-funcs games
+
+MY_PV=${PV/_/}
+F=${PN}_${MY_PV}_linux.tar.gz
+SDK=${PN}_${MY_PV}_sdk.zip
+DESCRIPTION="Multiplayer FPS based on the QFusion engine (evolved from Quake 2)"
+HOMEPAGE="http://www.warsow.net/"
+SRC_URI="ftp://ftp.club-internet.fr/pub/games/nofrag/${PN}/${F}
+ ftp://ftp.club-internet.fr/pub/games/nofrag/${PN}/${SDK}
+ http://www.bef-warsow.de/files/${F}
+ http://www.bef-warsow.de/files/${SDK}
+ http://wsw.surreal-xenotronic.com/${F}
+ http://wsw.surreal-xenotronic.com/${SDK}
+ http://ik.spinther.com/${PN}/${F}
+ http://warsow.routed-gaming.co.uk/downloads/${F}
+ http://warsownews.game-server.cc/${F}
+ http://warsownews.game-server.cc/${SDK}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug dedicated irc openal sdl"
+
+UIRDEPEND="media-libs/jpeg
+ media-libs/libogg
+ media-libs/libvorbis
+ net-misc/curl
+ virtual/opengl
+ >=media-libs/libsdl-1.2.8-r1
+ >=media-libs/sdl-sound-1.0.1-r1
+ openal? ( media-libs/openal )
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext"
+UIDEPEND="x11-proto/xf86dgaproto
+ x11-proto/xf86vidmodeproto"
+RDEPEND="sdl? ( ${UIRDEPEND} )
+ !sdl? ( !dedicated? ( ${UIRDEPEND} ) )"
+DEPEND="${RDEPEND}
+ sdl? ( ${UIDEPEND} )
+ !sdl? ( !dedicated? ( ${UIDEPEND} ) )
+ app-arch/unzip"
+
+S=${WORKDIR}/source
+SDATA=${WORKDIR}/${PN}
+dir=${GAMES_DATADIR}/${PN}
+libdir=${GAMES_LIBDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Make fs_usehomedir default to 1, so the game will write to ~/.warsow/
+ # Make fs_basepath default to correct path.
+ # Add libdir as game directory.
+ sed -i qcommon/files.c \
+ -e 's:"fs_usehomedir", "0":"fs_usehomedir", "1":' \
+ -e "s:\"fs_basepath\", \"\.\":\"fs_basepath\", \"${dir}\":" \
+ || die "sed files.c failed"
+
+ # Remove pre-compiled binaries, because they are compiled in src_compile()
+ # Also remove the startup scripts.
+ rm "${SDATA}"/{${PN}*,wsw_server*}
+ rm -r "${SDATA}"/libs/*.so
+
+ # Remove copy of licence.
+ rm "${SDATA}"/docs/gnu.txt
+
+ # Move docs to a convenient directory, away from the files to be installed.
+ mv "${SDATA}"/docs "${S}"
+
+ sed -i Makefile \
+ -e '/^CFLAGS_RELEASE/s/=.* \(-fno.* \).* .* /=\1/' \
+ -e '/^CFLAGS_DEBUG/s/-O0 -ggdb/-fno-strict-aliasing/' \
+ || die "sed Makefile failed"
+
+ epatch "${FILESDIR}"/${P}-inverted-mouse.patch
+}
+
+src_compile() {
+ yesno() { useq $1 && echo YES || echo NO ; }
+
+ local client="NO"
+
+ if use sdl || ! use dedicated ; then
+ client="YES"
+ fi
+
+ emake \
+ BUILD_CLIENT=${client} \
+ BUILD_SERVER=$(yesno dedicated) \
+ BUILD_IRC=$(yesno irc) \
+ BUILD_SND_QF=${client} \
+ BUILD_SND_OPENAL=$(yesno openal) \
+ DEBUG_BUILD=$(yesno debug) \
+ BINDIR=release \
+ SERVER_EXE=${PN}-ded \
+ CLIENT_EXE=${PN} \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getCC)" \
+ || die "emake failed"
+
+ mv -f release/basewsw/*.so "${WORKDIR}" || die "mv *.so failed"
+ cp -rf release/basewsw "${SDATA}" || die "cp basewsw failed"
+}
+
+src_install() {
+ cd "${SDATA}"
+
+ if use sdl || use openal || ! use dedicated ; then
+ # Install client-only components.
+ dogamesbin "${S}/release/${PN}" \
+ || die "dogamesbin ${PN} failed"
+ make_desktop_entry ${PN} "Warsow"
+ fi
+
+ if use dedicated ; then
+ # Install server-only components.
+ dogamesbin "${S}/release/${PN}-ded" \
+ || die "dogamesbin ${PN}-ded failed"
+ fi
+
+ # Install common components.
+ insinto "${dir}"
+ doins -r * || die "doins -r failed"
+
+ # Game libraries.
+ exeinto "${libdir}"/basewsw
+ local lib
+ for lib in $(cd "${WORKDIR}" && ls -A *.so) ; do
+ doexe "${WORKDIR}/${lib}" || die "doexe ${lib} failed"
+ dosym "${libdir}/basewsw/${lib}" "${dir}"/basewsw/
+ done
+
+ # "Shared" Libraries.
+ exeinto "${libdir}"
+ local lib2
+ for lib2 in $(cd "${S}"/release/libs/ && ls -A *.so) ; do
+ doexe "${S}"/release/libs/"${lib2}" || die "doexe ${lib2} failed"
+ dosym "${libdir}/${lib2}" "${dir}"/libs/
+ done
+
+ dodoc "${S}"/docs/*
+
+ prepgamesdirs
+}