diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2010-03-06 22:04:30 +0000 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2010-03-06 22:04:30 +0000 |
commit | aa2bb69aa27267a464aa2d935cfb7932e4a7ef7d (patch) | |
tree | 6b97387c507325e3d8aac6d414a1b06b0914c1b6 /games-fps/openarena | |
parent | Binary files shouldn't be in the tree. Uncompressing small patch (diff) | |
download | gentoo-2-aa2bb69aa27267a464aa2d935cfb7932e4a7ef7d.tar.gz gentoo-2-aa2bb69aa27267a464aa2d935cfb7932e4a7ef7d.tar.bz2 gentoo-2-aa2bb69aa27267a464aa2d935cfb7932e4a7ef7d.zip |
Unbundling speex and zlib. Partially fix bug #255453
(Portage version: 2.1.7.17/cvs/Linux i686)
Diffstat (limited to 'games-fps/openarena')
-rw-r--r-- | games-fps/openarena/ChangeLog | 12 | ||||
-rw-r--r-- | games-fps/openarena/files/openarena-0.8.1-makefile.patch | 9 | ||||
-rw-r--r-- | games-fps/openarena/files/openarena-0.8.1-zlib.patch | 116 | ||||
-rw-r--r-- | games-fps/openarena/openarena-0.8.1-r1.ebuild | 85 |
4 files changed, 220 insertions, 2 deletions
diff --git a/games-fps/openarena/ChangeLog b/games-fps/openarena/ChangeLog index 4daa65d58d11..afdb4d41f71a 100644 --- a/games-fps/openarena/ChangeLog +++ b/games-fps/openarena/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for games-fps/openarena -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-fps/openarena/ChangeLog,v 1.10 2009/10/12 15:14:04 mr_bones_ Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-fps/openarena/ChangeLog,v 1.11 2010/03/06 22:04:30 tupone Exp $ + +*openarena-0.8.1-r1 (06 Mar 2010) + + 06 Mar 2010; Tupone Alfredo <tupone@gentoo.org> + +openarena-0.8.1-r1.ebuild, files/openarena-0.8.1-makefile.patch, + +files/openarena-0.8.1-zlib.patch: + Unbundling speex and zlib. Partially fix bug #255453 by + flameeyes@gentoo.org 12 Oct 2009; Michael Sterrett <mr_bones_@gentoo.org> openarena-0.8.1.ebuild: diff --git a/games-fps/openarena/files/openarena-0.8.1-makefile.patch b/games-fps/openarena/files/openarena-0.8.1-makefile.patch index bb556119802c..eb6a6f6a93d6 100644 --- a/games-fps/openarena/files/openarena-0.8.1-makefile.patch +++ b/games-fps/openarena/files/openarena-0.8.1-makefile.patch @@ -19,3 +19,12 @@ else # ifeq Linux +@@ -821,7 +821,7 @@ + ifeq ($(USE_INTERNAL_SPEEX),1) + BASE_CFLAGS += -DFLOATING_POINT -DUSE_ALLOCA -I$(SPEEXDIR)/include + else +- CLIENT_LDFLAGS += -lspeex ++ CLIENT_LDFLAGS += -lspeex -lspeexdsp + endif + endif + diff --git a/games-fps/openarena/files/openarena-0.8.1-zlib.patch b/games-fps/openarena/files/openarena-0.8.1-zlib.patch new file mode 100644 index 000000000000..ba163e8a3338 --- /dev/null +++ b/games-fps/openarena/files/openarena-0.8.1-zlib.patch @@ -0,0 +1,116 @@ +--- openarena-engine-0.8.1/Makefile.old 2010-03-06 21:51:19.000000000 +0100 ++++ openarena-engine-0.8.1/Makefile 2010-03-06 21:58:01.000000000 +0100 +@@ -283,7 +283,7 @@ + SHLIBLDFLAGS=-shared $(LDFLAGS) + + THREAD_LDFLAGS=-lpthread +- LDFLAGS=-ldl -lm ++ LDFLAGS=-ldl -lm -lz + + CLIENT_LDFLAGS=$(shell sdl-config --libs) -lGL + +@@ -560,7 +560,7 @@ + + THREAD_LDFLAGS=-lpthread + # don't need -ldl (FreeBSD) +- LDFLAGS=-lm ++ LDFLAGS=-lm -lz + + CLIENT_LDFLAGS = + +@@ -616,7 +616,7 @@ + SHLIBLDFLAGS=-shared $(LDFLAGS) + + THREAD_LDFLAGS=-lpthread +- LDFLAGS=-lm ++ LDFLAGS=-lm -lz + + CLIENT_LDFLAGS = + +@@ -644,7 +644,7 @@ + ARCH=i386 + endif + +- LDFLAGS=-lm ++ LDFLAGS=-lm -lz + SHLIBEXT=so + SHLIBCFLAGS=-fPIC + SHLIBLDFLAGS=-shared $(LDFLAGS) +@@ -683,7 +683,7 @@ + SHLIBCFLAGS= + SHLIBLDFLAGS=-shared + +- LDFLAGS=-ldl -lm -lgen ++ LDFLAGS=-ldl -lm -lgen -lz + # FIXME: The X libraries probably aren't necessary? + CLIENT_LDFLAGS=-L/usr/X11/$(LIB) $(shell sdl-config --libs) -lGL \ + -lX11 -lXext -lm +@@ -750,7 +750,7 @@ + SHLIBLDFLAGS=-shared $(LDFLAGS) + + THREAD_LDFLAGS=-lpthread +- LDFLAGS=-lsocket -lnsl -ldl -lm ++ LDFLAGS=-lsocket -lnsl -ldl -lm -lz + + BOTCFLAGS=-O0 + +--- openarena-engine-0.8.1/code/qcommon/unzip.h.old 2010-03-06 21:59:46.000000000 +0100 ++++ openarena-engine-0.8.1/code/qcommon/unzip.h 2010-03-06 22:00:58.000000000 +0100 +@@ -19,6 +19,8 @@ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + =========================================================================== + */ ++#include <zconf.h> ++#include <zlib.h> + + #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) + /* like the STRICT of WIN32, we define a pointer that cannot be converted +@@ -80,6 +82,7 @@ + typedef void* (*alloc_func) (void* opaque, unsigned int items, unsigned int size); + typedef void (*free_func) (void* opaque, void* address); + ++#if 0 + struct internal_state; + + typedef struct z_stream_s { +@@ -105,6 +108,7 @@ + + typedef z_stream *z_streamp; + ++#endif + + /* file_in_zip_read_info_s contain internal information about a file in zipfile, + when reading and decompress it */ +--- openarena-engine-0.8.1/code/qcommon/unzip.c.old 2010-03-06 22:01:40.000000000 +0100 ++++ openarena-engine-0.8.1/code/qcommon/unzip.c 2010-03-06 22:03:35.000000000 +0100 +@@ -49,7 +49,7 @@ + ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip + PkWare has also a specification at : + ftp://ftp.pkware.com/probdesc.zip */ +- ++#if 0 + /* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.1.3, July 9th, 1998 + +@@ -955,6 +955,7 @@ + // static const char * zError OF((int err)); + // static int inflateSyncPoint OF((z_streamp z)); + // static const uLong * get_crc_table OF((void)); ++#endif + + typedef unsigned char uch; + typedef unsigned short ush; +@@ -2248,6 +2249,8 @@ + return (int)uReadThis; + } + ++#if 0 ++ + /* infblock.h -- header to use infblock.c + * Copyright (C) 1995-1998 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h +@@ -4295,3 +4298,4 @@ + } + + ++#endif diff --git a/games-fps/openarena/openarena-0.8.1-r1.ebuild b/games-fps/openarena/openarena-0.8.1-r1.ebuild new file mode 100644 index 000000000000..bc5b7d7b18bc --- /dev/null +++ b/games-fps/openarena/openarena-0.8.1-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-fps/openarena/openarena-0.8.1-r1.ebuild,v 1.1 2010/03/06 22:04:30 tupone Exp $ + +EAPI=2 +inherit eutils flag-o-matic versionator games + +MY_PV=$(delete_all_version_separators) + +DESCRIPTION="Open-source replacement for Quake 3 Arena" +HOMEPAGE="http://openarena.ws/" +SRC_URI="http://download.tuxfamily.org/openarena/rel/${MY_PV}/oa${MY_PV}.zip + http://openarena.ws/svn/source/${MY_PV}/${PN}-engine-${PV}-1.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 + 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-${PV} +BUILD_DIR=${PN}-build +DIR=${GAMES_DATADIR}/${PN} + +src_prepare() { + cd "${WORKDIR}" + epatch "${FILESDIR}"/${P}-makefile.patch \ + "${FILESDIR}"/${P}-zlib.patch + append-cflags -fno-strict-aliasing # bug #268851 + sed -i \ + -e "s:%CFLAGS%:${CFLAGS}:g" \ + "${MY_S}"/Makefile \ + || die "sed failed" + sed -i \ + -e '/ALDRIVER_DEFAULT/s/libopenal.so.0/libopenal.so/' \ + "${MY_S}"/code/client/snd_openal.c \ + || die "sed failed" +} + +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 \ + DEFAULT_BASEDIR="${DIR}" \ + BR="${BUILD_DIR}" \ + ${myopts} \ + || 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 +} |