summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-07 12:10:15 +0000
committerSam James <sam@gentoo.org>2021-04-07 12:10:35 +0000
commitcf06a05c0315f27d559a5b5b74fb109d982e7b33 (patch)
treecced70de9a377447ea89062c31de1e8e368956c9 /games-fps/quake2-icculus
parentapp-admin/bitwarden-desktop-bin: version bupm 1.25.1 (diff)
downloadgentoo-cf06a05c0315f27d559a5b5b74fb109d982e7b33.tar.gz
gentoo-cf06a05c0315f27d559a5b5b74fb109d982e7b33.tar.bz2
gentoo-cf06a05c0315f27d559a5b5b74fb109d982e7b33.zip
games-fps/quake2-icculus: port to EAPI 7, games.eclass--
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-fps/quake2-icculus')
-rw-r--r--games-fps/quake2-icculus/files/0.16-rogue-armor.patch4
-rw-r--r--games-fps/quake2-icculus/files/0.16-rogue-nan.patch4
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-alsa.patch4
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-amd64.patch4
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gcc41.patch4
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch20
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gnusource.patch4
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ia64.patch8
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ldflags.patch4
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-no-asm-io.patch8
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_mouse.patch4
-rw-r--r--games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_soft.patch12
-rw-r--r--games-fps/quake2-icculus/quake2-icculus-0.16.1-r2.ebuild (renamed from games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild)129
13 files changed, 110 insertions, 99 deletions
diff --git a/games-fps/quake2-icculus/files/0.16-rogue-armor.patch b/games-fps/quake2-icculus/files/0.16-rogue-armor.patch
index 194f965a0501..bed337e4ce31 100644
--- a/games-fps/quake2-icculus/files/0.16-rogue-armor.patch
+++ b/games-fps/quake2-icculus/files/0.16-rogue-armor.patch
@@ -1,5 +1,5 @@
---- src/rogue/g_local.h.orig
-+++ src/rogue/g_local.h
+--- a/rogue/g_local.h
++++ b/rogue/g_local.h
@@ -545,9 +545,6 @@
extern int sm_meat_index;
extern int snd_fry;
diff --git a/games-fps/quake2-icculus/files/0.16-rogue-nan.patch b/games-fps/quake2-icculus/files/0.16-rogue-nan.patch
index 0961fa68a985..09da62bee201 100644
--- a/games-fps/quake2-icculus/files/0.16-rogue-nan.patch
+++ b/games-fps/quake2-icculus/files/0.16-rogue-nan.patch
@@ -1,5 +1,5 @@
---- src/rogue/g_local.h.orig
-+++ src/rogue/g_local.h
+--- a/rogue/g_local.h
++++ b/rogue/g_local.h
@@ -24,3 +24,3 @@
#ifndef _WIN32
-#include <nan.h>
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-alsa.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-alsa.patch
index 185359373c4b..a27fc035cd4c 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-alsa.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-alsa.patch
@@ -1,5 +1,5 @@
---- src/linux/snd_alsa.c.old
-+++ src/linux/snd_alsa.c
+--- a/src/linux/snd_alsa.c
++++ b/src/linux/snd_alsa.c
@@ -22,13 +22,22 @@
$Id: quake2-icculus-0.16.1-alsa.patch,v 1.2 2015/03/27 06:40:34 mr_bones_ Exp $
*/
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-amd64.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-amd64.patch
index b3291827996c..30966c813d7c 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-amd64.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-amd64.patch
@@ -4,8 +4,8 @@ glx renderer by default.
http://bugs.gentoo.org/show_bug.cgi?id=86552
---- src/linux/vid_so.c
-+++ src/linux/vid_so.c
+--- a/src/linux/vid_so.c
++++ b/src/linux/vid_so.c
@@ -435,6 +440,9 @@ VID_Init
*/
void VID_Init (void)
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gcc41.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gcc41.patch
index 626cf5a1b64d..1ea4d41df80a 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gcc41.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gcc41.patch
@@ -1,5 +1,5 @@
---- src/xatrix/g_local.h.old
-+++ src/xatrix/g_local.h
+--- a/src/xatrix/g_local.h
++++ b/src/xatrix/g_local.h
@@ -446,11 +446,6 @@
extern int sm_meat_index;
extern int snd_fry;
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch
index 61f0bb2286e5..4631d3ca92f4 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gentoo-paths.patch
@@ -1,5 +1,5 @@
---- Makefile
-+++ Makefile
+--- a/Makefile
++++ b/Makefile
@@ -74,35 +74,46 @@ endif
CC=gcc
@@ -85,8 +85,8 @@
targets: $(TARGETS)
---- src/linux/qgl_linux.c
-+++ src/linux/qgl_linux.c
+--- a/src/linux/qgl_linux.c
++++ b/src/linux/qgl_linux.c
@@ -3006,13 +3006,17 @@ qboolean QGL_Init( const char *dllname )
// dllname, dlerror());
@@ -108,8 +108,8 @@
}
Com_Printf ("Using %s for OpenGL...", fn);
} else {
---- src/linux/vid_so.c
-+++ src/linux/vid_so.c
+--- a/src/linux/vid_so.c
++++ b/src/linux/vid_so.c
@@ -237,13 +237,17 @@ qboolean VID_LoadRefresh( char *name )
//regain root
seteuid(saved_euid);
@@ -154,8 +154,8 @@
}
/*****************************************************************************/
---- src/qcommon/files.c
-+++ src/qcommon/files.c
+--- a/src/qcommon/files.c
++++ b/src/qcommon/files.c
@@ -60,6 +60,7 @@ typedef struct pack_s
char fs_gamedir[MAX_OSPATH];
@@ -195,8 +195,8 @@
//
// then add a '.quake2/baseq2' directory in home directory by default
---- src/qcommon/qcommon.h
-+++ src/qcommon/qcommon.h
+--- a/src/qcommon/qcommon.h
++++ b/src/qcommon/qcommon.h
@@ -74,6 +74,13 @@ Foundation, Inc., 59 Temple Place - Suit
#endif
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gnusource.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gnusource.patch
index ad1f37309c30..42041978509f 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gnusource.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-gnusource.patch
@@ -1,5 +1,5 @@
---- quake2-r0.16.1/src/linux/q_shlinux.c
-+++ quake2-r0.16.1-modified/src/linux/q_shlinux.c
+--- a/src/linux/q_shlinux.c
++++ b/src/linux/q_shlinux.c
@@ -17,6 +17,9 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ia64.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ia64.patch
index ae1aa2e4068c..fe61bf501658 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ia64.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ia64.patch
@@ -1,5 +1,5 @@
---- quake2-r0.16.1.orig/Makefile
-+++ quake2-r0.16.1/Makefile
+--- a/Makefile
++++ b/Makefile
@@ -54,24 +54,26 @@ endif
@@ -74,8 +74,8 @@
ifeq ($(strip $(BUILD_SVGA)),YES)
$(warning Warning: SVGAlib support not supported for $(ARCH))
endif
---- quake2-r0.16.1.orig/src/linux/sys_linux.c
-+++ quake2-r0.16.1/src/linux/sys_linux.c
+--- a/src/linux/sys_linux.c
++++ b/src/linux/sys_linux.c
@@ -216,16 +216,18 @@ void *Sys_GetGameAPI (void *parms)
char *path;
char *str_p;
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ldflags.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ldflags.patch
index 978c9c9820ea..765c146dd4ec 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ldflags.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-ldflags.patch
@@ -1,5 +1,5 @@
---- Makefile.old
-+++ Makefile
+--- a/Makefile
++++ b/Makefile
@@ -169,18 +169,18 @@
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-no-asm-io.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-no-asm-io.patch
index d94925b83e4b..0a1eecef2afa 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-no-asm-io.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-no-asm-io.patch
@@ -3,8 +3,8 @@ http://bugs.gentoo.org/193107
asm/io.h does not exist with sanitized kernel headers, nor do these source
files actually need the header, so punt it
---- src/linux/rw_in_aa.c
-+++ src/linux/rw_in_aa.c
+--- a/src/linux/rw_in_aa.c
++++ b/src/linux/rw_in_aa.c
@@ -46,7 +46,6 @@
#include <sys/mman.h>
@@ -13,8 +13,8 @@ files actually need the header, so punt it
#include <sys/vt.h>
#endif
---- src/linux/rw_aa.c
-+++ src/linux/rw_aa.c
+--- a/src/linux/rw_aa.c
++++ b/src/linux/rw_aa.c
@@ -63,7 +63,6 @@
#include <dlfcn.h>
#if defined (__linux__)
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_mouse.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_mouse.patch
index 6dc6f0f1ddfb..5d2a85a68e9b 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_mouse.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_mouse.patch
@@ -1,5 +1,5 @@
---- src/linux/rw_x11.c.old
-+++ src/linux/rw_x11.c
+--- a/src/linux/rw_x11.c
++++ b/src/linux/rw_x11.c
@@ -989,8 +989,8 @@
}
else
diff --git a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_soft.patch b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_soft.patch
index e23caf9db09f..cd0f2c807ae0 100644
--- a/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_soft.patch
+++ b/games-fps/quake2-icculus/files/quake2-icculus-0.16.1-x11_soft.patch
@@ -1,8 +1,8 @@
the x11 software renderer just needs some tweaks to get working
---- Makefile.old
-+++ Makefile
+--- a/Makefile
++++ b/Makefile
@@ -358,7 +358,7 @@
endif
@@ -12,8 +12,8 @@ the x11 software renderer just needs some tweaks to get working
endif
ifeq ($(strip $(BUILD_GLX)),YES)
---- src/linux/rw_x11.c.old
-+++ src/linux/rw_x11.c
+--- a/src/linux/rw_x11.c
++++ b/src/linux/rw_x11.c
@@ -53,7 +53,7 @@
#include <X11/Xatom.h>
#include <X11/keysym.h>
@@ -32,8 +32,8 @@ the x11 software renderer just needs some tweaks to get working
#ifdef REDBLUE
static PIXEL16 st2d_8to16table_s[2][256];
static PIXEL24 st2d_8to24table_s[2][256];
---- src/ref_soft/r_poly.c.old
-+++ src/ref_soft/r_poly.c
+--- a/src/ref_soft/r_poly.c
++++ b/src/ref_soft/r_poly.c
@@ -994,7 +994,7 @@
scale = yscale * pout->zi;
pout->v = (ycenter - scale * transformed[1]);
diff --git a/games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild b/games-fps/quake2-icculus/quake2-icculus-0.16.1-r2.ebuild
index 5a5e6b994311..ef6f7b8b34a4 100644
--- a/games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild
+++ b/games-fps/quake2-icculus/quake2-icculus-0.16.1-r2.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils toolchain-funcs games
+EAPI=7
+
+inherit desktop toolchain-funcs
MY_P="quake2-r${PV}"
DESCRIPTION="The icculus.org Linux port of iD's Quake 2 engine"
@@ -11,6 +12,7 @@ SRC_URI="http://icculus.org/quake2/files/${MY_P}.tar.gz
qmax? ( http://icculus.org/quake2/files/maxpak.pak )
rogue? ( mirror://idsoftware/quake2/source/roguesrc320.shar.Z )
xatrix? ( mirror://idsoftware/quake2/source/xatrixsrc320.shar.Z )"
+S="${WORKDIR}"/${MY_P}
LICENSE="GPL-2"
SLOT="0"
@@ -33,11 +35,21 @@ DEPEND="${UIDEPEND}
rogue? ( app-arch/sharutils )
xatrix? ( app-arch/sharutils )"
-S=${WORKDIR}/${MY_P}
+PATCHES=(
+ # -amd64.patch # make sure this is still needed in future versions
+ "${FILESDIR}"/${P}-amd64.patch
+ "${FILESDIR}"/${P}-gentoo-paths.patch
+ "${FILESDIR}"/${P}-ldflags.patch
+ "${FILESDIR}"/${P}-no-asm-io.patch
+ "${FILESDIR}"/${P}-gnusource.patch
+ "${FILESDIR}"/${P}-x11_soft.patch
+ "${FILESDIR}"/${P}-x11_mouse.patch
+ "${FILESDIR}"/${P}-alsa.patch
+ "${FILESDIR}"/${P}-ia64.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
pkg_setup() {
- games_pkg_setup
-
if ! use qmax && $( use opengl || use sdl ) ; then
elog "The 'qmax' graphical improvements are recommended."
echo
@@ -46,39 +58,33 @@ pkg_setup() {
src_prepare() {
# Now we deal with the silly rogue / xatrix addons ... this is ugly :/
- ln -s $(type -P echo) "${T}"/more
+ ln -s $(type -P echo) "${T}"/more || die
+
for g in rogue xatrix ; do
use ${g} || continue
- mkdir -p src/${g}
- pushd src/${g}
+ mkdir -p src/${g} || die
+
+ pushd src/${g} || die
+
local shar=../../../${g}src320.shar
sed -i -e 's:^read ans:ans=yes :' ${shar} || die
- echo ">>> Unpacking ${shar} to ${PWD}"
+ elog "Unpacking ${shar} to ${PWD}"
env PATH="${T}:${PATH}" unshar ${shar} || die
- popd
+
+ popd || die
done
- sed -i -e 's:jpeg_mem_src:_&:' src/ref_candygl/gl_image.c || die
+ sed -i -e 's:jpeg_mem_src:_&:' src/ref_candygl/gl_image.c || die
sed -i -e 's:BUILD_SOFTX:BUILD_X11:' Makefile || die
- # -amd64.patch # make sure this is still needed in future versions
- epatch \
- "${FILESDIR}"/${P}-amd64.patch \
- "${FILESDIR}"/${P}-gentoo-paths.patch \
- "${FILESDIR}"/${P}-ldflags.patch \
- "${FILESDIR}"/${P}-no-asm-io.patch \
- "${FILESDIR}"/${P}-gnusource.patch \
- "${FILESDIR}"/${P}-x11_soft.patch \
- "${FILESDIR}"/${P}-x11_mouse.patch \
- "${FILESDIR}"/${P}-alsa.patch \
- "${FILESDIR}"/${P}-ia64.patch \
- "${FILESDIR}"/${P}-fno-common.patch
+
+ default
if use xatrix ; then
- epatch "${FILESDIR}/${P}"-gcc41.patch
+ eapply "${FILESDIR}/${P}"-gcc41.patch
fi
if use rogue ; then
- cd src
- epatch \
+ cd src || die
+ eapply \
"${FILESDIR}"/0.16-rogue-nan.patch \
"${FILESDIR}"/0.16-rogue-armor.patch
fi
@@ -123,38 +129,41 @@ src_compile() {
BUILD_ARTS=NO \
BUILD_ALSA=$(yesno alsa) \
SDLDIR=/usr/lib \
- DEFAULT_BASEDIR="${GAMES_DATADIR}/quake2" \
- DEFAULT_LIBDIR="$(games_get_libdir)/${PN}${libsuffix}" \
+ DEFAULT_BASEDIR="/usr/share/quake2" \
+ DEFAULT_LIBDIR="/usr/$(get_libdir)/${PN}${libsuffix}" \
OPT_CFLAGS="${CFLAGS}" \
CC="$(tc-getCC)"
+
# now we save the build dir ... except for the object files ...
- rm release*/*/*.o
- mv release* my-rel-${BUILD_QMAX}
- cd my-rel-${BUILD_QMAX}
- rm -rf ref_{gl,soft} ded game client ctf/*.o
- mkdir baseq2
- mv game*.so baseq2/
- cd ..
+ rm release*/*/*.o || die
+ mv release* my-rel-${BUILD_QMAX} || die
+ cd my-rel-${BUILD_QMAX} || die
+ rm -rf ref_{gl,soft} ded game client ctf/*.o || die
+ mkdir baseq2 || die
+ mv game*.so baseq2/ || die
+ cd .. || die
done
}
src_install() {
- local q2dir=$(games_get_libdir)/${PN}
- local q2maxdir=$(games_get_libdir)/${PN}-qmax
+ local q2dir=/usr/$(get_libdir)/${PN}
+ local q2maxdir=/usr/$(get_libdir)/${PN}-qmax
dodoc readme.txt README TODO "${FILESDIR}"/README-postinstall
# regular q2 files
dodir "${q2dir}"
- cp -rf my-rel-NO/* "${D}/${q2dir}"/
- dogamesbin "${D}/${q2dir}"/quake2
- rm "${D}/${q2dir}"/quake2
+ cp -rf my-rel-NO/* "${ED}/${q2dir}"/ || die
+
+ dobin "${ED}/${q2dir}"/quake2
+ rm "${ED}/${q2dir}"/quake2 || die
+
use dedicated \
- && dogamesbin "${D}/${q2dir}"/q2ded \
- && rm "${D}/${q2dir}"/q2ded
+ && dobin "${ED}/${q2dir}"/q2ded \
+ && rm "${ED}/${q2dir}"/q2ded
use sdl \
- && dogamesbin "${D}/${q2dir}"/sdlquake2 \
- && rm "${D}/${q2dir}"/sdlquake2
+ && dobin "${ED}/${q2dir}"/sdlquake2 \
+ && rm "${ED}/${q2dir}"/sdlquake2
doicon "${FILESDIR}"/quake2.xpm
make_desktop_entry quake2 "Quake 2" quake2
@@ -162,30 +171,32 @@ src_install() {
# q2max files
if use qmax ; then
dodir "${q2maxdir}"
- cp -rf my-rel-YES/* "${D}/${q2maxdir}"/ || die
- newgamesbin "${D}/${q2maxdir}"/quake2 quake2-qmax
- rm "${D}/${q2maxdir}"/quake2
- use dedicated \
- && newgamesbin "${D}/${q2maxdir}"/q2ded q2ded-qmax \
- && rm "${D}/${q2maxdir}"/q2ded
- use sdl \
- && newgamesbin "${D}/${q2maxdir}"/sdlquake2 sdlquake2-qmax \
- && rm "${D}/${q2maxdir}"/sdlquake2
+
+ cp -rf my-rel-YES/* "${ED}/${q2maxdir}"/ || die
+
+ newbin "${ED}/${q2maxdir}"/quake2 quake2-qmax
+ rm "${ED}/${q2maxdir}"/quake2 || die
+
+ if use dedicated ; then
+ newbin "${ED}/${q2maxdir}"/q2ded q2ded-qmax
+ rm "${ED}/${q2maxdir}"/q2ded || die
+ fi
+
+ if use sdl ; then
+ newbin "${ED}/${q2maxdir}"/sdlquake2 sdlquake2-qmax
+ rm "${ED}/${q2maxdir}"/sdlquake2 || die
+ fi
insinto "${q2maxdir}"/baseq2
doins "${DISTDIR}"/maxpak.pak
make_desktop_entry quake2-qmax Quake2-qmax quake2
fi
-
- prepgamesdirs
}
pkg_postinst() {
- games_pkg_postinst
-
elog "Go read README-postinstall in /usr/share/doc/${PF}"
- elog "right now! It's important - This install is just the engine, you still need"
+ elog "right now! It's important - this install is just the engine, you still need"
elog "the data paks. Go read."
if use demo && ! has_version "games-fps/quake2-demodata[symlink]" ; then