summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2010-01-12 16:32:57 +0000
committerSebastian Pipping <sping@gentoo.org>2010-01-12 16:32:57 +0000
commit7ced5e80906de025c8aa7d738310e5f5f6ac2c05 (patch)
tree35043ad8fdc75f03b27408edaf086f9a1ff4079c /games-action/openlierox
parentAnd install generators as well. (diff)
downloadhistorical-7ced5e80906de025c8aa7d738310e5f5f6ac2c05.tar.gz
historical-7ced5e80906de025c8aa7d738310e5f5f6ac2c05.tar.bz2
historical-7ced5e80906de025c8aa7d738310e5f5f6ac2c05.zip
Integrate patches (fixes #300640)
Package-Manager: portage-2.2_rc61/cvs/Linux i686
Diffstat (limited to 'games-action/openlierox')
-rw-r--r--games-action/openlierox/ChangeLog8
-rw-r--r--games-action/openlierox/Manifest6
-rw-r--r--games-action/openlierox/files/openlierox-0.58-beta9-joystick-cmake.patch35
-rw-r--r--games-action/openlierox/files/openlierox-0.58-beta9-joystick-cpp.patch192
-rw-r--r--games-action/openlierox/openlierox-0.58_beta9-r1.ebuild14
5 files changed, 249 insertions, 6 deletions
diff --git a/games-action/openlierox/ChangeLog b/games-action/openlierox/ChangeLog
index fd6d829297cf..d14550afad67 100644
--- a/games-action/openlierox/ChangeLog
+++ b/games-action/openlierox/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-action/openlierox
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/openlierox/ChangeLog,v 1.1 2010/01/10 00:52:11 sping Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/openlierox/ChangeLog,v 1.2 2010/01/12 16:32:57 sping Exp $
+
+ 12 Jan 2010; Sebastian Pipping <sping@gentoo.org>
+ openlierox-0.58_beta9-r1.ebuild,
+ +files/openlierox-0.58-beta9-joystick-cmake.patch,
+ +files/openlierox-0.58-beta9-joystick-cpp.patch:
+ Integrate joystick patches from upstream (fixes #300640)
*openlierox-0.58_beta9-r1 (10 Jan 2010)
diff --git a/games-action/openlierox/Manifest b/games-action/openlierox/Manifest
index 8da30bb6961a..141330413775 100644
--- a/games-action/openlierox/Manifest
+++ b/games-action/openlierox/Manifest
@@ -1,4 +1,6 @@
+AUX openlierox-0.58-beta9-joystick-cmake.patch 1115 RMD160 7e207e8e1585026e895c405bb5f982a53489f104 SHA1 e27790e6bdbcee21b91f4f1b9078bcdbf0a32e81 SHA256 0eab9a526d997584ecb917897c72f66b6458029ba6160b274564d167f8adea65
+AUX openlierox-0.58-beta9-joystick-cpp.patch 5234 RMD160 96c1726c6e8cdf95ae435255ea5b0df1e0aa4d31 SHA1 6ad6f69ff81bf91c78f39b1a3fb70e97c8e1cdce SHA256 08de10ecd9dac7d0d22369294ac563668c9a0aad45ce3b36be42826f1d007cd9
DIST OpenLieroX_0.58_beta9.src.tar.bz2 82815579 RMD160 1fa481b01e116a190128f68c979c40c2c280df09 SHA1 63363009c56536e205892c02bc641550e81564a1 SHA256 9f272f530e2a2648c53272e0c835092615d9bc9f14f5e733b2d0935a0edfc014
-EBUILD openlierox-0.58_beta9-r1.ebuild 1646 RMD160 21db85640671f62415b46bb36fde3d1098de62e0 SHA1 fd5dd7012f7efc93a64362dbadf0530151a50242 SHA256 41d201a5b06f37281a2b8330a58ecab6de6207178249221707046e1d1e6d971d
-MISC ChangeLog 397 RMD160 522f53e77a7199a613c92c693c10f28f3917920e SHA1 2961309416d88b503ca3a6ae7555eb0cc342c8f2 SHA256 6053ee1cb8084a0f41107cf8c1cb7efea9795094a905fcb378d4b5587e1bd69f
+EBUILD openlierox-0.58_beta9-r1.ebuild 1938 RMD160 139bf216572fa3481cb90a4f151516135299acab SHA1 633a0f95d91acece971a80f832d9c2668be2b85e SHA256 ac6fa3636141e4908e77f0ae5e5903729a51acb9e673d46ee0fd5ae9d04e9b8f
+MISC ChangeLog 648 RMD160 950cc119bcc2db31ebf9aaa79340e7a3d0aa0050 SHA1 ef5e47ef2dbd830edcd1d12da7ce174afa79c0d9 SHA256 3683322f0440f86ee3fcc4435538f60e3a973db16c6ee0a34ec6ab0694f31442
MISC metadata.xml 349 RMD160 e4393982b6abefaf5af33495cc2570bc47fb2a73 SHA1 bf9b60e616b4ab77e58a84df951911ba129fe68d SHA256 5fcdeeae5dac2e8a9d800a92fc178569f05799eba177785382328183796f85f8
diff --git a/games-action/openlierox/files/openlierox-0.58-beta9-joystick-cmake.patch b/games-action/openlierox/files/openlierox-0.58-beta9-joystick-cmake.patch
new file mode 100644
index 000000000000..75ca1d366fbe
--- /dev/null
+++ b/games-action/openlierox/files/openlierox-0.58-beta9-joystick-cmake.patch
@@ -0,0 +1,35 @@
+From 6b4e0a3ebcc2f43e1918ff84ddb25f87accbcd78 Mon Sep 17 00:00:00 2001
+From: Albert Zeyer <albert.zeyer@rwth-aachen.de>
+Date: Tue, 12 Jan 2010 16:49:35 +0100
+Subject: [PATCH] option in CMake to disable joystick support
+
+---
+ CMakeOlxCommon.cmake | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/CMakeOlxCommon.cmake b/CMakeOlxCommon.cmake
+index e4279ca..815d310 100644
+--- a/CMakeOlxCommon.cmake
++++ b/CMakeOlxCommon.cmake
+@@ -33,6 +33,7 @@ OPTION(PYTHON_DED_EMBEDDED "Python embedded in dedicated server" No)
+ OPTION(OPTIM_PROJECTILES "Enable optimisations for projectiles" Yes)
+ OPTION(MEMSTATS "Enable memory statistics and debugging" No)
+ OPTION(BREAKPAD "Google Breakpad support" Yes)
++OPTION(DISABLE_JOYSTICK "Disable joystick support" No)
+
+ IF (DEBUG)
+ SET(CMAKE_BUILD_TYPE Debug)
+@@ -161,6 +162,10 @@ ELSE (BREAKPAD)
+ ADD_DEFINITIONS(-DNBREAKPAD)
+ ENDIF (BREAKPAD)
+
++IF (DISABLE_JOYSTICK)
++ ADD_DEFINITIONS(-DDISABLE_JOYSTICK)
++ENDIF (DISABLE_JOYSTICK)
++
+ IF (GCOREDUMPER)
+ INCLUDE_DIRECTORIES(${OLXROOTDIR}/libs/coredumper/src)
+ ADD_DEFINITIONS(-DGCOREDUMPER)
+--
+1.6.3
+
diff --git a/games-action/openlierox/files/openlierox-0.58-beta9-joystick-cpp.patch b/games-action/openlierox/files/openlierox-0.58-beta9-joystick-cpp.patch
new file mode 100644
index 000000000000..cc72dbf339a0
--- /dev/null
+++ b/games-action/openlierox/files/openlierox-0.58-beta9-joystick-cpp.patch
@@ -0,0 +1,192 @@
+From cb6fec84b098472fb3a132f892de1be0080ad576 Mon Sep 17 00:00:00 2001
+From: Albert Zeyer <albert.zeyer@rwth-aachen.de>
+Date: Tue, 12 Jan 2010 02:59:49 +0100
+Subject: [PATCH 1/1] option to disable joystick support completly (DISABLE_JOYSTICK)
+
+---
+ src/client/AuxLib.cpp | 2 ++
+ src/client/CInput.cpp | 26 ++++++++++++++------------
+ src/client/InputEvents.cpp | 4 ++++
+ src/main.cpp | 4 ++++
+ 4 files changed, 24 insertions(+), 12 deletions(-)
+
+diff --git a/src/client/AuxLib.cpp b/src/client/AuxLib.cpp
+index 251ead3..438ff4f 100644
+--- a/src/client/AuxLib.cpp
++++ b/src/client/AuxLib.cpp
+@@ -149,12 +149,14 @@ int InitializeAuxLib(const std::string& config, int bpp, int vidflags)
+ return false;
+ }
+
++#ifndef DISABLE_JOYSTICK
+ if(bJoystickSupport) {
+ if(SDL_InitSubSystem(SDL_INIT_JOYSTICK) != 0) {
+ warnings << "WARNING: couldn't init joystick subystem: " << SDL_GetError() << endl;
+ bJoystickSupport = false;
+ }
+ }
++#endif
+
+ if(!bDedicated && !SetVideoMode())
+ return false;
+diff --git a/src/client/CInput.cpp b/src/client/CInput.cpp
+index 76b330f..d1e11c6 100644
+--- a/src/client/CInput.cpp
++++ b/src/client/CInput.cpp
+@@ -153,14 +153,16 @@ int keys_t::keySymFromName(const std::string & name)
+
+
+
+-#ifdef DEDICATED_ONLY
++#if defined(DEDICATED_ONLY) || defined(DISABLE_JOYSTICK)
+
+ void updateAxisStates() {}
+ void CInput::InitJoysticksTemp() {}
+ void CInput::UnInitJoysticksTemp() {}
+
+ #else
+-
++
++#define HAVE_JOYSTICK
++
+ // Joystick axes
+ // TODO: these are set up according to my joystick, are they general enough?
+ enum {
+@@ -458,7 +460,7 @@ int CInput::Wait(std::string& strText)
+ }
+ }
+
+-#ifndef DEDICATED_ONLY
++#ifdef HAVE_JOYSTICK
+ // joystick
+ // TODO: more joysticks
+ for(uint n = 0; n < sizeof(Joysticks) / sizeof(joystick_t); n++) {
+@@ -494,7 +496,7 @@ int CInput::Setup(const std::string& string)
+ return true;
+ }
+
+-#ifndef DEDICATED_ONLY
++#ifdef HAVE_JOYSTICK
+ // Check if it's a joystick #1
+ // TODO: allow more joysticks
+ if(string.substr(0,5) == "joy1_") {
+@@ -541,7 +543,7 @@ int CInput::Setup(const std::string& string)
+ }
+ }
+ }
+-#endif // !DEDICATED_ONLY
++#endif // HAVE_JOYSTICK
+
+
+ // Must be a keyboard character
+@@ -571,7 +573,7 @@ int CInput::Setup(const std::string& string)
+ // Returns the "force" value for a joystick axis
+ int CInput::getJoystickValue()
+ {
+-#ifndef DEDICATED_ONLY
++#ifdef HAVE_JOYSTICK
+ switch (Type) {
+ case INP_JOYSTICK1:
+ return getJoystickControlValue(Data, Extra, joys[0]);
+@@ -588,7 +590,7 @@ int CInput::getJoystickValue()
+ // Returns true if this input is a joystick axis
+ bool CInput::isJoystickAxis()
+ {
+-#ifndef DEDICATED_ONLY
++#ifdef HAVE_JOYSTICK
+ if (Type == INP_JOYSTICK1 || Type == INP_JOYSTICK2)
+ return Data != JOY_BUTTON;
+ #endif
+@@ -599,7 +601,7 @@ bool CInput::isJoystickAxis()
+ // Returns true if this joystick is a throttle
+ bool CInput::isJoystickThrottle()
+ {
+-#ifndef DEDICATED_ONLY
++#ifdef HAVE_JOYSTICK
+ if (Type == INP_JOYSTICK1 || Type == INP_JOYSTICK2)
+ return (Data == JOY_THROTTLE_LEFT) || (Data == JOY_THROTTLE_RIGHT);
+ #endif
+@@ -627,7 +629,7 @@ bool CInput::isUp()
+ return true;
+ break;
+
+-#ifndef DEDICATED_ONLY
++#ifdef HAVE_JOYSTICK
+ // Joystick
+ case INP_JOYSTICK1:
+ case INP_JOYSTICK2:
+@@ -656,7 +658,7 @@ bool CInput::isDown() const
+ return true;
+ break;
+
+-#ifndef DEDICATED_ONLY
++#ifdef HAVE_JOYSTICK
+ // Joystick
+ case INP_JOYSTICK1:
+ return checkJoystickState(Data, Extra, 0);
+@@ -694,7 +696,7 @@ int CInput::wasDown() const {
+ counter = nDownOnce; // no other way at the moment
+ break;
+
+-#ifndef DEDICATED_ONLY
++#ifdef HAVE_JOYSTICK
+ case INP_JOYSTICK1:
+ case INP_JOYSTICK2:
+ counter = nDownOnce; // no other way at the moment
+@@ -719,7 +721,7 @@ int CInput::wasUp() {
+ counter = 0; // no other way at the moment
+ break;
+
+-#ifndef DEDICATED_ONLY
++#ifdef HAVE_JOYSTICK
+ case INP_JOYSTICK1:
+ case INP_JOYSTICK2:
+ counter = 0; // no other way at the moment
+diff --git a/src/client/InputEvents.cpp b/src/client/InputEvents.cpp
+index b011297..c6fc4a0 100644
+--- a/src/client/InputEvents.cpp
++++ b/src/client/InputEvents.cpp
+@@ -522,8 +522,10 @@ bool WaitForNextEvent() {
+ HandleMouseState();
+ HandleKeyboardState();
+ #ifndef DEDICATED_ONLY
++#ifndef DISABLE_JOYSTICK
+ if(bJoystickSupport) SDL_JoystickUpdate();
+ #endif
++#endif
+ HandleCInputs_UpdateUpForNonKeyboard();
+ HandleCInputs_UpdateDownOnceForNonKeyboard();
+
+@@ -583,11 +585,13 @@ bool ProcessEvents()
+ HandleMouseState();
+ HandleKeyboardState();
+ #ifndef DEDICATED_ONLY
++#ifndef DISABLE_JOYSTICK
+ if(bJoystickSupport) {
+ SDL_JoystickUpdate();
+ updateAxisStates();
+ }
+ #endif
++#endif
+ HandleCInputs_UpdateUpForNonKeyboard();
+ HandleCInputs_UpdateDownOnceForNonKeyboard();
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 76e1fa6..95e4e85 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -75,7 +75,11 @@ bool bDedicated = true;
+ bool bJoystickSupport = false;
+ #else //DEDICATED_ONLY
+ bool bDedicated = false;
++#ifdef DISABLE_JOYSTICK
++bool bJoystickSupport = false;
++#else
+ bool bJoystickSupport = true;
++#endif
+ #endif //DEDICATED_ONLY
+ bool bRestartGameAfterQuit = false;
+ TStartFunction startFunction = NULL;
+--
+1.6.3
+
diff --git a/games-action/openlierox/openlierox-0.58_beta9-r1.ebuild b/games-action/openlierox/openlierox-0.58_beta9-r1.ebuild
index d3793e825349..cd8b8c0605a7 100644
--- a/games-action/openlierox/openlierox-0.58_beta9-r1.ebuild
+++ b/games-action/openlierox/openlierox-0.58_beta9-r1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/openlierox/openlierox-0.58_beta9-r1.ebuild,v 1.1 2010/01/10 00:52:11 sping Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/openlierox/openlierox-0.58_beta9-r1.ebuild,v 1.2 2010/01/12 16:32:57 sping Exp $
EAPI="2"
-inherit cmake-utils games
+inherit eutils cmake-utils games
MY_PN="OpenLieroX"
MY_P="${MY_PN}_${PV}"
@@ -15,7 +15,7 @@ SRC_URI="mirror://sourceforge/openlierox/${MY_P}.src.tar.bz2"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="X breakpad debug"
+IUSE="X breakpad debug joystick"
RDEPEND="media-libs/sdl-mixer
media-libs/sdl-image
@@ -23,6 +23,8 @@ RDEPEND="media-libs/sdl-mixer
dev-libs/libxml2
dev-libs/libzip
net-misc/curl
+ joystick? ( media-libs/libsdl[joystick] )
+ !joystick? ( media-libs/libsdl )
X? ( x11-libs/libX11
media-libs/libsdl[X] )
!X? ( media-libs/libsdl )"
@@ -30,11 +32,17 @@ DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_PN}"
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.58-beta9-joystick-cpp.patch \
+ "${FILESDIR}"/${PN}-0.58-beta9-joystick-cmake.patch
+}
+
src_configure() {
local mycmakeargs="
$(cmake-utils_use debug DEBUG)
$(cmake-utils_use X X11)
-D BREAKPAD=$(use breakpad && echo "Yes" || echo "No")
+ -D DISABLE_JOYSTICK=$(use joystick && echo "No" || echo "Yes")
-D SYSTEM_DATA_DIR=${GAMES_DATADIR}
-D VERSION=${PV}"