summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2006-07-19 22:57:45 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2006-07-19 22:57:45 +0000
commitf50510a7a277fad22be29abba31ac03cd14f04a8 (patch)
tree13ab906cdec0e1fe9c05e437cbca71efa1e4704f /games-strategy/warzone2100
parentVersion bump. (diff)
downloadgentoo-2-f50510a7a277fad22be29abba31ac03cd14f04a8.tar.gz
gentoo-2-f50510a7a277fad22be29abba31ac03cd14f04a8.tar.bz2
gentoo-2-f50510a7a277fad22be29abba31ac03cd14f04a8.zip
version bump - upstream patch and ebuild submitted by Tristan Heaven via bug #140419
(Portage version: 2.1.1_pre3)
Diffstat (limited to 'games-strategy/warzone2100')
-rw-r--r--games-strategy/warzone2100/ChangeLog9
-rw-r--r--games-strategy/warzone2100/files/digest-warzone2100-2.0.33
-rw-r--r--games-strategy/warzone2100/files/warzone2100-2.0.3-16bpp.patch77
-rw-r--r--games-strategy/warzone2100/warzone2100-2.0.3.ebuild67
4 files changed, 155 insertions, 1 deletions
diff --git a/games-strategy/warzone2100/ChangeLog b/games-strategy/warzone2100/ChangeLog
index 0013a663289d..056044a75776 100644
--- a/games-strategy/warzone2100/ChangeLog
+++ b/games-strategy/warzone2100/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-strategy/warzone2100
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/warzone2100/ChangeLog,v 1.5 2006/05/25 14:58:41 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/warzone2100/ChangeLog,v 1.6 2006/07/19 22:57:45 mr_bones_ Exp $
+
+*warzone2100-2.0.3 (19 Jul 2006)
+
+ 19 Jul 2006; Michael Sterrett <mr_bones_@gentoo.org>
+ +files/warzone2100-2.0.3-16bpp.patch, +warzone2100-2.0.3.ebuild:
+ version bump - upstream patch and ebuild submitted by Tristan Heaven via bug
+ #140419
25 May 2006; Chris Gianelloni <wolf31o2@gentoo.org>
warzone2100-0.2.2.ebuild:
diff --git a/games-strategy/warzone2100/files/digest-warzone2100-2.0.3 b/games-strategy/warzone2100/files/digest-warzone2100-2.0.3
new file mode 100644
index 000000000000..cabf660b4cc0
--- /dev/null
+++ b/games-strategy/warzone2100/files/digest-warzone2100-2.0.3
@@ -0,0 +1,3 @@
+MD5 2396e0def69e5e48902448d04944927a warzone-2.0.3.tar.bz2 19902273
+RMD160 10fc56a2930346d41d517f4df6f3b0b9b001b183 warzone-2.0.3.tar.bz2 19902273
+SHA256 7668f6b794faad8d7ae66dbd0c7317df2521b33593f29174ab3fecb647326749 warzone-2.0.3.tar.bz2 19902273
diff --git a/games-strategy/warzone2100/files/warzone2100-2.0.3-16bpp.patch b/games-strategy/warzone2100/files/warzone2100-2.0.3-16bpp.patch
new file mode 100644
index 000000000000..70877b31e208
--- /dev/null
+++ b/games-strategy/warzone2100/files/warzone2100-2.0.3-16bpp.patch
@@ -0,0 +1,77 @@
+--- /trunk/lib/ivis_opengl/screen.c 2006/07/17 22:21:13 116
++++ trunk/lib/ivis_opengl/screen.c 2006/07/19 21:26:09 117
+@@ -131,7 +131,7 @@
+ /* Store the screen information */
+ screenWidth = width;
+ screenHeight = height;
+- screenDepth = 24;
++ screenDepth = 32;
+
+ /* store vidmem flag */
+ g_bVidMem = bVidMem;
+@@ -168,14 +168,42 @@
+ video_flags |= SDL_HWACCEL;
+ }
+
+- SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
+- SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
+- SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
+- SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8 );
+- SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
+- SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 8 );
++ bpp = SDL_VideoModeOK(width, height, screenDepth, video_flags);
++ if (!bpp) {
++ debug( LOG_ERROR, "Error: Video mode %dx%d@%dbpp is not supported!\n", width, height, screenDepth );
++ return FALSE;
++ }
++ switch ( bpp )
++ {
++ case 32:
++ case 24:
++ SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
++ SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
++ SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
++ SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8 );
++ SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
++ SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 8 );
++ break;
++ case 16:
++ debug( LOG_ERROR, "Warning: Using colour depth of %i instead of %i.", bpp, screenDepth );
++ debug( LOG_ERROR, " You will experience graphics glitches!" );
++ SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
++ SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 6 );
++ SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
++ SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
++ SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 8 );
++ break;
++ case 8:
++ debug( LOG_ERROR, "Error: You don't want to play Warzone with a bit depth of %i, do you?", bpp );
++ exit( 1 );
++ break;
++ default:
++ debug( LOG_ERROR, "Error: Weird bit depth: %i", bpp );
++ exit( 1 );
++ break;
++ }
+
+- // Set the double buffer OpenGL attribute.
++ // Set the double buffer OpenGL attribute.
+ SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+ }
+
+@@ -186,15 +214,6 @@
+ screenMode = SCREEN_WINDOWED;
+ }
+
+- bpp = SDL_VideoModeOK(width, height, screenDepth, video_flags);
+- if (!bpp) {
+- printf("Error: Video mode %dx%d@%dbpp is not supported!\n", width, height, screenDepth);
+- return FALSE;
+- }
+- if (bpp != screenDepth) {
+- debug(LOG_3D, "Warning: Using colour depth of %d instead of %d.",
+- bpp, screenDepth);
+- }
+ screen = SDL_SetVideoMode(width, height, bpp, video_flags);
+ if (!screen) {
+ printf("Error: SDL_SetVideoMode failed (%s).\n", SDL_GetError());
diff --git a/games-strategy/warzone2100/warzone2100-2.0.3.ebuild b/games-strategy/warzone2100/warzone2100-2.0.3.ebuild
new file mode 100644
index 000000000000..edf2fb3ceced
--- /dev/null
+++ b/games-strategy/warzone2100/warzone2100-2.0.3.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/warzone2100/warzone2100-2.0.3.ebuild,v 1.1 2006/07/19 22:57:45 mr_bones_ Exp $
+
+inherit eutils versionator games
+
+MY_PV="$(get_version_component_range -2 ${PV})"
+DESCRIPTION="3D real-time strategy game"
+HOMEPAGE="http://home.gna.org/warzone/"
+SRC_URI="http://download.gna.org/warzone/releases/${MY_PV}/warzone-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-games/physfs
+ media-libs/jpeg
+ media-libs/libogg
+ media-libs/libpng
+ media-libs/libsdl
+ media-libs/libvorbis
+ media-libs/openal
+ media-libs/sdl-net
+ virtual/glu
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ app-arch/zip"
+
+S=${WORKDIR}/warzone-${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -i \
+ -e 's/-m32 //' \
+ configure \
+ || die "sed failed"
+ epatch "${FILESDIR}/${P}-16bpp.patch"
+}
+
+src_compile() {
+ egamesconf \
+ --disable-dependency-tracking \
+ --with-ogg \
+ --without-mp3 \
+ || die "egamesconf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ doicon debian/${PN}.png
+ domenu debian/warzone.desktop
+
+ dodoc AUTHORS CHANGELOG README TODO
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ ewarn "Currently, attempting to use uppercase letters in save game names"
+ ewarn "will cause a crash."
+}