summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2004-11-27 15:46:27 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2004-11-27 15:46:27 +0000
commit64a27cb3579ea859e1355f12b117fc59df397cc2 (patch)
tree3599ab0de9d54e4a8223ec7dfa250ecdf2915377 /games-fps
parentInitial 2.4-only profile for testing. (diff)
downloadgentoo-2-64a27cb3579ea859e1355f12b117fc59df397cc2.tar.gz
gentoo-2-64a27cb3579ea859e1355f12b117fc59df397cc2.tar.bz2
gentoo-2-64a27cb3579ea859e1355f12b117fc59df397cc2.zip
Fixed up the path patch, added initial amd64 support, and closing bugs #61801 and #40328.
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/quake2-icculus/ChangeLog11
-rw-r--r--games-fps/quake2-icculus/files/0.15-Makefile-amd64.patch111
-rw-r--r--games-fps/quake2-icculus/files/0.15-amd64.patch11
-rw-r--r--games-fps/quake2-icculus/files/0.15-gentoo-path.patch6
-rw-r--r--games-fps/quake2-icculus/files/digest-quake2-icculus-0.15-r2 (renamed from games-fps/quake2-icculus/files/digest-quake2-icculus-0.15-r1)0
-rw-r--r--games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild (renamed from games-fps/quake2-icculus/quake2-icculus-0.15-r1.ebuild)37
6 files changed, 170 insertions, 6 deletions
diff --git a/games-fps/quake2-icculus/ChangeLog b/games-fps/quake2-icculus/ChangeLog
index 88f6384a9f3e..99122d3e5de7 100644
--- a/games-fps/quake2-icculus/ChangeLog
+++ b/games-fps/quake2-icculus/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for games-fps/quake2-icculus
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-icculus/ChangeLog,v 1.9 2004/11/23 20:11:39 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-icculus/ChangeLog,v 1.10 2004/11/27 15:46:27 wolf31o2 Exp $
+
+*quake2-icculus-0.15-r2 (27 Nov 2004)
+
+ 27 Nov 2004; Chris Gianelloni <wolf31o2@gentoo.org>
+ +files/0.15-Makefile-amd64.patch, +files/0.15-amd64.patch,
+ files/0.15-gentoo-path.patch, -quake2-icculus-0.15-r1.ebuild,
+ +quake2-icculus-0.15-r2.ebuild:
+ Fixed up the path patch, added initial amd64 support, and closing bugs
+ #61801 and #40328.
23 Nov 2004; Chris Gianelloni <wolf31o2@gentoo.org>
quake2-icculus-0.15-r1.ebuild:
diff --git a/games-fps/quake2-icculus/files/0.15-Makefile-amd64.patch b/games-fps/quake2-icculus/files/0.15-Makefile-amd64.patch
new file mode 100644
index 000000000000..633f7856ff4d
--- /dev/null
+++ b/games-fps/quake2-icculus/files/0.15-Makefile-amd64.patch
@@ -0,0 +1,111 @@
+--- Makefile.orig 2004-02-03 22:17:10.302818528 -0500
++++ Makefile 2004-02-03 22:18:14.369078976 -0500
+@@ -58,11 +58,13 @@
+ ifneq ($(ARCH),axp)
+ ifneq ($(ARCH),ppc)
+ ifneq ($(ARCH),sparc)
++ifneq ($(ARCH),x86_64)
+ $(error arch $(ARCH) is currently not supported)
+ endif
+ endif
+ endif
+ endif
++endif
+
+ CC=gcc
+
+@@ -82,12 +84,16 @@
+ endif
+
+ ifeq ($(ARCH),i386)
+-RELEASE_CFLAGS=-ffast-math -funroll-loops $(BASE_CFLAGS)
+-# -falign-jumps=2 -falign-functions=2 -g
++RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops -malign-loops=2 \
++ -malign-jumps=2 -malign-functions=2 -g
+ # compiler bugs with gcc 2.96 and 3.0.1 can cause bad builds with heavy opts.
+ #RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -m486 -ffast-math -funroll-loops \
+-# -fomit-frame-pointer -fexpensive-optimizations -falign-loops=2 \
+-# -falign-jumps=2 -falign-functions=2
++# -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
++# -malign-jumps=2 -malign-functions=2
++endif
++
++ifeq ($(ARCH),x86_64)
++RELEASE_CFLAGS=$(BASE_CFLAGS) -fomit-frame-pointer -fexpensive-optimizations
+ endif
+
+ VERSION=3.21+rCVS
+@@ -338,11 +344,40 @@
+ endif
+ endif # ARCH i386
+
++ifeq ($(ARCH),x86_64)
++ ifeq ($(strip $(BUILD_SDLQUAKE2)),YES)
++ TARGETS += $(BUILDDIR)/sdlquake2
++ endif
++
++ ifeq ($(strip $(BUILD_SVGA)),YES)
++ TARGETS += $(BUILDDIR)/ref_soft.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_X11)),YES)
++ TARGETS += $(BUILDDIR)/ref_softx.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_GLX)),YES)
++ TARGETS += $(BUILDDIR)/ref_glx.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_FXGL)),YES)
++ TARGETS += $(BUILDDIR)/ref_gl.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_SDL)),YES)
++ TARGETS += $(BUILDDIR)/ref_softsdl.$(SHLIBEXT)
++ endif
++
++ ifeq ($(strip $(BUILD_SDLGL)),YES)
++ TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT)
++ endif
++endif # ARCH x86_64
++
+ ifeq ($(strip $(BUILD_AA)),YES)
+ TARGETS += $(BUILDDIR)/ref_softaa.$(SHLIBEXT)
+ endif
+
+-RELEASE_CFLAGS += $(OPTCFLAGS)
+ all: build_debug build_release
+
+ build_debug:
+@@ -441,7 +476,8 @@
+ QUAKE2_AS_OBJS = \
+ $(BUILDDIR)/client/snd_mixa.o
+ else
+-QUAKE2_AS_OBJS = #blank
++QUAKE2_AS_OBJS = \
++ $(BUILDDIR)/client/snd_mixa.o #forcing for all to include x86_64, probably dangerous
+ endif
+
+ $(BUILDDIR)/quake2 : $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS)
+@@ -1540,6 +1576,21 @@
+ $(BUILDDIR)/ref_soft/sys_dosa.o
+ endif
+
++ifeq ($(ARCH),x86_64) #do the same as i386
++REF_SOFT_OBJS += \
++ $(BUILDDIR)/ref_soft/r_aclipa.o \
++ $(BUILDDIR)/ref_soft/r_draw16.o \
++ $(BUILDDIR)/ref_soft/r_drawa.o \
++ $(BUILDDIR)/ref_soft/r_edgea.o \
++ $(BUILDDIR)/ref_soft/r_scana.o \
++ $(BUILDDIR)/ref_soft/r_spr8.o \
++ $(BUILDDIR)/ref_soft/r_surf8.o \
++ $(BUILDDIR)/ref_soft/math.o \
++ $(BUILDDIR)/ref_soft/d_polysa.o \
++ $(BUILDDIR)/ref_soft/r_varsa.o \
++ $(BUILDDIR)/ref_soft/sys_dosa.o
++endif
++
+ REF_SOFT_SVGA_OBJS = \
+ $(BUILDDIR)/ref_soft/rw_svgalib.o \
+ $(BUILDDIR)/ref_soft/d_copy.o \
diff --git a/games-fps/quake2-icculus/files/0.15-amd64.patch b/games-fps/quake2-icculus/files/0.15-amd64.patch
new file mode 100644
index 000000000000..5e078fece423
--- /dev/null
+++ b/games-fps/quake2-icculus/files/0.15-amd64.patch
@@ -0,0 +1,11 @@
+--- src/linux/sys_linux.c.orig 2004-02-03 22:25:43.310829456 -0500
++++ src/linux/sys_linux.c 2004-02-03 22:27:03.922574608 -0500
+@@ -223,6 +223,8 @@
+ const char *gamename = "gameppc.so";
+ #elif defined __sparc__
+ const char *gamename = "gamesparc.so";
++#elif defined __x86_64__
++ const char *gamename = "gamex86_64.so";
+ #else
+ #error Unknown arch
+ #endif
diff --git a/games-fps/quake2-icculus/files/0.15-gentoo-path.patch b/games-fps/quake2-icculus/files/0.15-gentoo-path.patch
index 7e1b8a97f9b2..593ce0e962dc 100644
--- a/games-fps/quake2-icculus/files/0.15-gentoo-path.patch
+++ b/games-fps/quake2-icculus/files/0.15-gentoo-path.patch
@@ -16,7 +16,7 @@
//
- fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET);
+ fs_basedir = Cvar_Get ("basedir", "GENTOO_DATADIR", CVAR_NOSET);
-+ fs_libdir = Cvar_Get ("libdir", GENTOO_LIBDIR, CVAR_NOSET);
++ fs_libdir = Cvar_Get ("libdir", "GENTOO_LIBDIR", CVAR_NOSET);
//
// cddir <path>
@@ -37,14 +37,14 @@
seteuid(saved_euid);
- path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
-+ path = Cvar_Get ("libdir", GENTOO_LIBDIR, CVAR_NOSET)->string;
++ path = Cvar_Get ("libdir", "GENTOO_LIBDIR", CVAR_NOSET)->string;
snprintf (fn, MAX_OSPATH, "%s/%s", path, name );
if (stat(fn, &st) == -1) {
- Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno));
- return false;
-+ path = Cvar_Get ("basedir", ".", CVAR_NOSET)->string;
++ path = Cvar_Get ("libdir", "GENTOO_LIBDIR", CVAR_NOSET)->string;
+ snprintf (fn, MAX_OSPATH, "%s/%s", path, name );
+ if (stat(fn, &st) == -1) {
+ Com_Printf( "LoadLibrary(\"%s\") failed: %s\n", name, strerror(errno));
diff --git a/games-fps/quake2-icculus/files/digest-quake2-icculus-0.15-r1 b/games-fps/quake2-icculus/files/digest-quake2-icculus-0.15-r2
index 3f8d9c69a534..3f8d9c69a534 100644
--- a/games-fps/quake2-icculus/files/digest-quake2-icculus-0.15-r1
+++ b/games-fps/quake2-icculus/files/digest-quake2-icculus-0.15-r2
diff --git a/games-fps/quake2-icculus/quake2-icculus-0.15-r1.ebuild b/games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild
index 124065b38958..eb7f0a389643 100644
--- a/games-fps/quake2-icculus/quake2-icculus-0.15-r1.ebuild
+++ b/games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-icculus/quake2-icculus-0.15-r1.ebuild,v 1.10 2004/11/23 20:11:39 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-icculus/quake2-icculus-0.15-r2.ebuild,v 1.1 2004/11/27 15:46:27 wolf31o2 Exp $
inherit eutils gcc games
@@ -14,7 +14,7 @@ SRC_URI="http://icculus.org/quake2/files/${MY_P}.tar.gz
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="x86 ppc sparc alpha"
+KEYWORDS="x86 ppc sparc alpha amd64"
IUSE="arts svga sdl aalib dedicated opengl noqmax rogue xatrix"
# default to X11 if svga/opengl/sdl/aalib/dedicated are not in USE
@@ -31,16 +31,45 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ if [ -e /etc/env.d/09opengl ]
+ then
+ # Set up X11 implementation
+ X11_IMPLEM_P="$(portageq best_version "${ROOT}" virtual/x11)"
+ X11_IMPLEM="${X11_IMPLEM_P%-[0-9]*}"
+ X11_IMPLEM="${X11_IMPLEM##*\/}"
+ einfo "X11 implementation is ${X11_IMPLEM}."
+
+ VOID=$(cat /etc/env.d/09opengl | grep ${X11_IMPLEM})
+
+ USING_X11=$?
+ if [ "${USING_X11}" -eq "1" ]
+ then
+ GL_IMPLEM=$(cat /etc/env.d/09opengl | cut -f5 -d/)
+ opengl-update ${X11_IMPLEM}
+ fi
+ else
+ die "Could not find /etc/env.d/09opengl. Please run opengl-update."
+ fi
+}
+
src_unpack() {
unpack ${MY_P}.tar.gz
cd ${S}
epatch "${FILESDIR}/${PV}-Makefile-noopts.patch"
epatch "${FILESDIR}/${PV}-Makefile-optflags.patch"
+ epatch "${FILESDIR}/${PV}-Makefile-amd64.patch"
epatch "${FILESDIR}/${PV}-gentoo-path.patch"
+ epatch "${FILESDIR}/${PV}-amd64.patch"
sed -i \
-e "s:GENTOO_DATADIR:${GAMES_DATADIR}/quake2-data:" \
+ -e "s:GENTOO_LIBDIR:${GAMES_LIBDIR}/quake2-icculus:" \
src/qcommon/files.c \
|| die "sed src/qcommon/files.c failed"
+ sed -i \
+ -e "s:GENTOO_LIBDIR:${GAMES_LIBDIR}/quake2-icculus:" \
+ src/linux/vid_so.c \
+ || die "sed src/linux/vid_so.c failed"
ln -s $(which echo) ${T}/more
for g in $(useq rogue && echo rogue) $(useq xatrix && echo xatrix); do
@@ -144,6 +173,10 @@ src_install() {
}
pkg_postinst() {
+ if [ "${USING_X11}" -eq "1" ]
+ then
+ opengl-update ${GL_IMPLEM}
+ fi
games_pkg_postinst
einfo "Go read /usr/share/doc/${PF}/README-postinstall.gz right now!"
einfo "It's important- This install is just the engine, you still need"