summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2012-05-18 04:56:14 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2012-05-18 04:56:14 +0000
commitbcf67c5b547c03ce3dfdfcee8e8e98d2c39461d6 (patch)
tree5696ed1111b3921ea48bb510b11e795fd5dd07ac /games-fps
parentBump for #416383 (diff)
downloadgentoo-2-bcf67c5b547c03ce3dfdfcee8e8e98d2c39461d6.tar.gz
gentoo-2-bcf67c5b547c03ce3dfdfcee8e8e98d2c39461d6.tar.bz2
gentoo-2-bcf67c5b547c03ce3dfdfcee8e8e98d2c39461d6.zip
version bump (bug #306617) with patches from hasufell
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/openarena/ChangeLog11
-rw-r--r--games-fps/openarena/files/openarena-0.8.8-makefile.patch36
-rw-r--r--games-fps/openarena/files/openarena-0.8.8-unbundling.patch172
-rw-r--r--games-fps/openarena/openarena-0.8.8.ebuild79
4 files changed, 296 insertions, 2 deletions
diff --git a/games-fps/openarena/ChangeLog b/games-fps/openarena/ChangeLog
index 59eda0ed2dae..f2fa3db03151 100644
--- a/games-fps/openarena/ChangeLog
+++ b/games-fps/openarena/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-fps/openarena
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/openarena/ChangeLog,v 1.22 2011/09/25 21:32:21 mr_bones_ Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/openarena/ChangeLog,v 1.23 2012/05/18 04:56:13 mr_bones_ Exp $
+
+*openarena-0.8.8 (18 May 2012)
+
+ 18 May 2012; Michael Sterrett <mr_bones_@gentoo.org> +openarena-0.8.8.ebuild,
+ +files/openarena-0.8.8-makefile.patch,
+ +files/openarena-0.8.8-unbundling.patch:
+ version bump (bug #306617) with patches from hasufell
25 Sep 2011; Michael Sterrett <mr_bones_@gentoo.org> openarena-0.8.5.ebuild:
sed patch to build against newer zlib (bug #384395)
diff --git a/games-fps/openarena/files/openarena-0.8.8-makefile.patch b/games-fps/openarena/files/openarena-0.8.8-makefile.patch
new file mode 100644
index 000000000000..d72bbe79b29d
--- /dev/null
+++ b/games-fps/openarena/files/openarena-0.8.8-makefile.patch
@@ -0,0 +1,36 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu May 17 23:34:20 UTC 2012
+Subject: flags, arch
+
+--- openarena-engine-source-0.8.8/Makefile
++++ openarena-engine-source-0.8.8/Makefile
+@@ -73,6 +73,10 @@
+
+ ifndef ARCH
+ ARCH=$(COMPILE_ARCH)
++else
++ ifeq ($(ARCH),amd64)
++ ARCH=x86_64
++ endif
+ endif
+ export ARCH
+
+@@ -263,8 +267,7 @@
+ endif
+ endif
+
+- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+- -pipe -DUSE_ICON
++ BASE_CFLAGS = -fno-strict-aliasing -DUSE_ICON -I.
+ CLIENT_CFLAGS = $(SDL_CFLAGS)
+ SERVER_CFLAGS =
+
+@@ -335,7 +338,7 @@
+ THREAD_LIBS=-lpthread
+ LIBS=-ldl -lm
+
+- CLIENT_LIBS=$(SDL_LIBS) -lGL
++ CLIENT_LIBS=$(SDL_LIBS) -lGL -ljpeg
+
+ ifeq ($(USE_OPENAL),1)
+ ifneq ($(USE_OPENAL_DLOPEN),1) \ No newline at end of file
diff --git a/games-fps/openarena/files/openarena-0.8.8-unbundling.patch b/games-fps/openarena/files/openarena-0.8.8-unbundling.patch
new file mode 100644
index 000000000000..2f108a6c8cb0
--- /dev/null
+++ b/games-fps/openarena/files/openarena-0.8.8-unbundling.patch
@@ -0,0 +1,172 @@
+--- openarena-engine-source-0.8.8/Makefile
++++ openarena-engine-source-0.8.8/Makefile
+@@ -1406,41 +1406,7 @@
+ $(B)/client/l_script.o \
+ $(B)/client/l_struct.o \
+ \
+- $(B)/client/jcapimin.o \
+- $(B)/client/jcapistd.o \
+- $(B)/client/jccoefct.o \
+- $(B)/client/jccolor.o \
+- $(B)/client/jcdctmgr.o \
+- $(B)/client/jchuff.o \
+- $(B)/client/jcinit.o \
+- $(B)/client/jcmainct.o \
+- $(B)/client/jcmarker.o \
+- $(B)/client/jcmaster.o \
+- $(B)/client/jcomapi.o \
+- $(B)/client/jcparam.o \
+- $(B)/client/jcphuff.o \
+- $(B)/client/jcprepct.o \
+- $(B)/client/jcsample.o \
+- $(B)/client/jdapimin.o \
+- $(B)/client/jdapistd.o \
+ $(B)/client/jdatasrc.o \
+- $(B)/client/jdcoefct.o \
+- $(B)/client/jdcolor.o \
+- $(B)/client/jddctmgr.o \
+- $(B)/client/jdhuff.o \
+- $(B)/client/jdinput.o \
+- $(B)/client/jdmainct.o \
+- $(B)/client/jdmarker.o \
+- $(B)/client/jdmaster.o \
+- $(B)/client/jdpostct.o \
+- $(B)/client/jdsample.o \
+- $(B)/client/jdtrans.o \
+- $(B)/client/jerror.o \
+- $(B)/client/jfdctflt.o \
+- $(B)/client/jidctflt.o \
+- $(B)/client/jmemmgr.o \
+- $(B)/client/jmemnobs.o \
+- $(B)/client/jutils.o \
+ \
+ $(B)/client/tr_animation.o \
+ $(B)/client/tr_backend.o \
+--- openarena-engine-source-0.8.8/code/jpeg-6b/jdatasrc.c
++++ openarena-engine-source-0.8.8/code/jpeg-6b/jdatasrc.c
+@@ -15,9 +15,15 @@
+ */
+
+ /* this is not a core library module, so it doesn't define JPEG_INTERNALS */
+-#include "jinclude.h"
+-#include "jpeglib.h"
+-#include "jerror.h"
++#include <stdio.h>
++#include <string.h>
++#include <jpeglib.h>
++#include <jerror.h>
++#undef METHODDEF
++#define METHODDEF static
++#undef GLOBAL
++#define GLOBAL
++#define SIZEOF(object) ((size_t) sizeof(object))
+
+ #ifndef MIN
+ #define MIN(a, b) ((a)<(b)?(a):(b))
+@@ -44,7 +50,7 @@
+ * before any data is actually read.
+ */
+
+-METHODDEF(void)
++METHODDEF void
+ init_source (j_decompress_ptr cinfo)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -90,7 +96,7 @@
+ * the front of the buffer rather than discarding it.
+ */
+
+-METHODDEF(boolean)
++METHODDEF boolean
+ fill_input_buffer (j_decompress_ptr cinfo)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -129,7 +135,7 @@
+ * buffer is the application writer's problem.
+ */
+
+-METHODDEF(void)
++METHODDEF void
+ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -170,7 +176,7 @@
+ * for error exit.
+ */
+
+-METHODDEF(void)
++METHODDEF void
+ term_source (j_decompress_ptr cinfo)
+ {
+ /* no work necessary here */
+@@ -183,8 +189,8 @@
+ * for closing it after finishing decompression.
+ */
+
+-GLOBAL(void)
+-jpeg_mem_src (j_decompress_ptr cinfo, unsigned char *inbuf, size_t size)
++GLOBAL void
++jpeg_mem_src (j_decompress_ptr cinfo, unsigned char *inbuf, unsigned long size)
+ {
+ my_src_ptr src;
+
+--- openarena-engine-source-0.8.8/code/renderer/tr_image_jpg.c
++++ openarena-engine-source-0.8.8/code/renderer/tr_image_jpg.c
+@@ -31,7 +31,7 @@
+ */
+
+ #define JPEG_INTERNALS
+-#include "../jpeg-6b/jpeglib.h"
++#include <jpeglib.h>
+
+ void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ) {
+ /* This struct contains the JPEG decompression parameters and pointers to
+@@ -131,7 +131,10 @@
+ }
+
+ memcount = pixelcount * 4;
+- row_stride = cinfo.output_width * cinfo.output_components;
++ if (3 == cinfo.output_components)
++ row_stride = cinfo.output_width * 4;
++ else
++ row_stride = cinfo.output_width * cinfo.output_components;
+
+ out = ri.Malloc(memcount);
+
+@@ -144,14 +147,26 @@
+ /* Here we use the library's state variable cinfo.output_scanline as the
+ * loop counter, so that we don't have to keep track ourselves.
+ */
++ buf = out;
+ while (cinfo.output_scanline < cinfo.output_height) {
+ /* jpeg_read_scanlines expects an array of pointers to scanlines.
+ * Here the array is only one element long, but you could ask for
+ * more than one scanline at a time if that's more convenient.
+ */
+- buf = ((out+(row_stride*cinfo.output_scanline)));
+ buffer = &buf;
+ (void) jpeg_read_scanlines(&cinfo, buffer, 1);
++ if (3 == cinfo.output_components) {
++ /* turn RGB into RGBA */
++ int ioffset = cinfo.output_width * 3 - 1;
++ int ooffset = cinfo.output_width * 4 - 1;
++ do {
++ buf[ooffset--] = 255;
++ buf[ooffset--] = buf[ioffset--];
++ buf[ooffset--] = buf[ioffset--];
++ buf[ooffset--] = buf[ioffset--];
++ } while (ioffset > 0);
++ }
++ buf += row_stride;
+ }
+
+ buf = out;
+@@ -176,7 +191,7 @@
+ buf[--dindex] = greyshade;
+ } while(sindex);
+ }
+- else
++ else if (4 == cinfo.output_components)
+ {
+ // clear all the alphas to 255
+ int i; \ No newline at end of file
diff --git a/games-fps/openarena/openarena-0.8.8.ebuild b/games-fps/openarena/openarena-0.8.8.ebuild
new file mode 100644
index 000000000000..044339795746
--- /dev/null
+++ b/games-fps/openarena/openarena-0.8.8.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/openarena/openarena-0.8.8.ebuild,v 1.1 2012/05/18 04:56:13 mr_bones_ Exp $
+
+EAPI=2
+inherit eutils flag-o-matic versionator games
+
+DESCRIPTION="Open-source replacement for Quake 3 Arena"
+HOMEPAGE="http://openarena.ws/"
+SRC_URI="mirror://sourceforge/oarena/${P}.zip
+ mirror://sourceforge/oarena/src/${PN}-engine-source-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+curl +openal +vorbis"
+
+RDEPEND="virtual/opengl
+ media-libs/libsdl[joystick,opengl,video]
+ media-libs/speex
+ virtual/jpeg
+ x11-libs/libXext
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ curl? ( net-misc/curl )
+ openal? ( media-libs/openal )
+ vorbis? ( media-libs/libvorbis )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+MY_S=${WORKDIR}/${PN}-engine-source-${PV}
+BUILD_DIR=${PN}-build
+DIR=${GAMES_DATADIR}/${PN}
+
+src_prepare() {
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-unbundling.patch
+ cd "${MY_S}"
+ touch jpegint.h
+}
+
+src_compile() {
+ local myopts
+
+ # enable voip, disable mumble
+ # also build always server and use smp by default
+ myopts="USE_INTERNAL_SPEEX=0 USE_VOIP=1 USE_MUMBLE=0
+ BUILD_SERVER=1 BUILD_CLIENT_SMP=1 USE_LOCAL_HEADERS=0"
+ use curl || myopts="${myopts} USE_CURL=0"
+ use openal || myopts="${myopts} USE_OPENAL=0"
+ use vorbis || myopts="${myopts} USE_CODEC_VORBIS=0"
+
+ cd "${MY_S}"
+ emake \
+ V=1 \
+ DEFAULT_BASEDIR="${DIR}" \
+ BR="${BUILD_DIR}" \
+ ${myopts} \
+ OPTIMIZE= \
+ || die "emake failed"
+}
+
+src_install() {
+ cd "${MY_S}"/"${BUILD_DIR}"
+ newgamesbin openarena-smp.* "${PN}" || die "binary install failed"
+ newgamesbin oa_ded.* "${PN}-ded" || die "dedicated binary not found"
+ cd "${S}"
+
+ insinto "${DIR}"
+ doins -r baseoa missionpack || die "doins -r failed"
+
+ dodoc CHANGES CREDITS LINUXNOTES README
+ newicon "${MY_S}"/misc/quake3.png ${PN}.png
+ make_desktop_entry ${PN} "OpenArena"
+
+ prepgamesdirs
+}