commit: 90fbfae1d66e2c2ae9807c0b15142dd846ddd00c Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Apr 6 22:35:49 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Apr 6 22:47:23 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90fbfae1
games-fps/red-blue-quake2: port to EAPI 7, games.eclass-- Signed-off-by: Sam James <sam <AT> gentoo.org> games-fps/red-blue-quake2/files/0.1-gentoo.patch | 16 ++--- .../files/red-blue-quake2-0.1-gcc41.patch | 8 +-- .../files/red-blue-quake2-0.1-ldflags.patch | 4 +- .../red-blue-quake2/red-blue-quake2-0.1-r1.ebuild | 73 ++++++++++++++++++++++ .../red-blue-quake2/red-blue-quake2-0.1.ebuild | 57 ----------------- 5 files changed, 87 insertions(+), 71 deletions(-) diff --git a/games-fps/red-blue-quake2/files/0.1-gentoo.patch b/games-fps/red-blue-quake2/files/0.1-gentoo.patch index fd13df9bcb4..e283e6e3bc0 100644 --- a/games-fps/red-blue-quake2/files/0.1-gentoo.patch +++ b/games-fps/red-blue-quake2/files/0.1-gentoo.patch @@ -1,6 +1,6 @@ diff -ur Makefile.old Makefile ---- Makefile 2001-12-29 20:37:22.000000000 -0500 -+++ Makefile 2003-07-17 22:14:50.000000000 -0400 +--- a/linux/Makefile ++++ b/linux/Makefile @@ -54,7 +54,7 @@ RELEASE_CFLAGS=$(BASE_CFLAGS) -O6 -ffast-math -funroll-loops \ -fomit-frame-pointer -fexpensive-optimizations @@ -11,8 +11,8 @@ diff -ur Makefile.old Makefile endif diff -ur sys_linux.c.old sys_linux.c ---- sys_linux.c.old 2001-12-22 18:45:58.000000000 -0500 -+++ sys_linux.c 2003-07-17 22:34:11.000000000 -0400 +--- a/linux/sys_linux.c ++++ b/linux/sys_linux.c @@ -220,7 +220,7 @@ char curpath[MAX_OSPATH]; char *path; @@ -38,8 +38,8 @@ diff -ur sys_linux.c.old sys_linux.c } diff -ur ../qcommon/files.c ../qcommon/files.c ---- ../qcommon/files.c 2001-12-22 16:32:26.000000000 -0500 -+++ ../qcommon/files.c 2003-07-17 22:34:29.000000000 -0400 +--- a/qcommon/files.c ++++ b/qcommon/files.c @@ -865,7 +865,7 @@ // // start up with baseq2 by default @@ -50,8 +50,8 @@ diff -ur ../qcommon/files.c ../qcommon/files.c // any set gamedirs will be freed up to here fs_base_searchpaths = fs_searchpaths; diff -ur ../qcommon/qcommon.h ../qcommon/qcommon.h ---- ../qcommon/qcommon.h 2001-12-22 16:32:26.000000000 -0500 -+++ ../qcommon/qcommon.h 2003-07-17 21:20:03.000000000 -0400 +--- a/qcommon/qcommon.h ++++ b/qcommon/qcommon.h @@ -25,7 +25,7 @@ #define VERSION 3.21 diff --git a/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-gcc41.patch b/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-gcc41.patch index 1f933d33537..22ca5c56a54 100644 --- a/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-gcc41.patch +++ b/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-gcc41.patch @@ -1,5 +1,5 @@ ---- ../game/g_local.h.old 2006-05-07 00:27:45.000000000 +0200 -+++ ../game/g_local.h 2006-05-07 00:28:06.000000000 +0200 +--- a/game/g_local.h ++++ b/game/g_local.h @@ -458,11 +458,6 @@ extern int sm_meat_index; extern int snd_fry; @@ -12,8 +12,8 @@ // means of death #define MOD_UNKNOWN 0 #define MOD_BLASTER 1 ---- ../ctf/g_local.h.old 2006-05-07 00:36:21.000000000 +0200 -+++ ../ctf/g_local.h 2006-05-07 00:36:38.000000000 +0200 +--- a/ctf/g_local.h ++++ b/ctf/g_local.h @@ -466,11 +466,6 @@ extern int sm_meat_index; extern int snd_fry; diff --git a/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-ldflags.patch b/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-ldflags.patch index 58beb0f3cec..547b9045a86 100644 --- a/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-ldflags.patch +++ b/games-fps/red-blue-quake2/files/red-blue-quake2-0.1-ldflags.patch @@ -1,5 +1,5 @@ ---- Makefile.old 2010-10-18 09:09:48.000000000 +0200 -+++ Makefile 2010-10-18 09:15:59.000000000 +0200 +--- a/linux/Makefile ++++ b/linux/Makefile @@ -59,7 +59,7 @@ endif diff --git a/games-fps/red-blue-quake2/red-blue-quake2-0.1-r1.ebuild b/games-fps/red-blue-quake2/red-blue-quake2-0.1-r1.ebuild new file mode 100644 index 00000000000..01e871966b2 --- /dev/null +++ b/games-fps/red-blue-quake2/red-blue-quake2-0.1-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="Red-blue Quake II! Play quake2 with 3D glasses!" +HOMEPAGE="https://www.jfedor.org/red-blue-quake2/" +SRC_URI="mirror://idsoftware/source/q2source-3.21.zip + https://www.jfedor.org/red-blue-quake2/${P}.tar.gz" +S="${WORKDIR}"/quake2-3.21 + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" + +RDEPEND="x11-libs/libX11" +DEPEND="${RDEPEND}" +BDEPEND="app-arch/unzip" + +PATCHES=( + "${FILESDIR}"/${PV}-gentoo.patch + "${FILESDIR}"/${P}-gcc41.patch + "${FILESDIR}"/${P}-ldflags.patch +) + +src_prepare() { + default + + cd linux || die + + sed -i \ + -e "s:GENTOO_DIR:$(get_libdir)/${PN}:" \ + sys_linux.c || die + + sed -i \ + -e "s:/etc/quake2.conf:/etc/${PN}.conf:" \ + sys_linux.c vid_so.c || die + + sed -i \ + -e 's:-O6::' \ + -e 's:-g::' \ + Makefile || die + + echo "$(get_libdir)"/${PN} > "${T}"/${PN}.conf || die +} + +src_compile() { + cd linux || die + + mkdir -p releasei386-glibc/ref_soft || die + + emake \ + CC="$(tc-getCC)" \ + GENTOO_CFLAGS="${CFLAGS}" \ + GENTOO_DATADIR=/usr/share/quake2/baseq2/ \ + build_release +} + +src_install() { + cd linux/release* || die + + exeinto "$(get_libdir)"/${PN} + doexe gamei386.so ref_softx.so + + exeinto "$(get_libdir)"/${PN}/ctf + doexe ctf/gamei386.so + newbin quake2 red-blue-quake2 + + insinto /etc + doins "${T}"/${PN}.conf +} diff --git a/games-fps/red-blue-quake2/red-blue-quake2-0.1.ebuild b/games-fps/red-blue-quake2/red-blue-quake2-0.1.ebuild deleted file mode 100644 index 96715daaab6..00000000000 --- a/games-fps/red-blue-quake2/red-blue-quake2-0.1.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit eutils games - -DESCRIPTION="red-blue Quake II ! play quake2 w/3d glasses !" -HOMEPAGE="https://www.jfedor.org/red-blue-quake2/" -SRC_URI="mirror://idsoftware/source/q2source-3.21.zip - https://www.jfedor.org/red-blue-quake2/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~x86" -IUSE="" - -RDEPEND="x11-libs/libX11" -DEPEND="${RDEPEND} - app-arch/unzip" - -S=${WORKDIR}/quake2-3.21/linux - -src_prepare() { - epatch "${FILESDIR}"/${PV}-gentoo.patch \ - "${FILESDIR}/${P}"-gcc41.patch \ - "${FILESDIR}/${P}"-ldflags.patch - sed -i \ - -e "s:GENTOO_DIR:$(games_get_libdir)/${PN}:" \ - sys_linux.c || die - sed -i \ - -e "s:/etc/quake2.conf:${GAMES_SYSCONFDIR}/${PN}.conf:" \ - sys_linux.c vid_so.c || die - echo "$(games_get_libdir)"/${PN} > "${T}"/${PN}.conf || die -} - -src_compile() { - mkdir -p releasei386-glibc/ref_soft - emake \ - GENTOO_CFLAGS="${CFLAGS}" \ - GENTOO_DATADIR="${GAMES_DATADIR}"/quake2/baseq2/ \ - build_release -} - -src_install() { - cd release* - - exeinto "$(games_get_libdir)"/${PN} - doexe gamei386.so ref_softx.so - exeinto "$(games_get_libdir)"/${PN}/ctf - doexe ctf/gamei386.so - newgamesbin quake2 red-blue-quake2 - - insinto "${GAMES_SYSCONFDIR}" - doins "${T}"/${PN}.conf - - prepgamesdirs -}