diff options
author | Sam James <sam@gentoo.org> | 2021-04-06 20:36:59 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-04-06 20:42:51 +0000 |
commit | bc70afdf256aa8e9415e79eaa24d3207354eef3a (patch) | |
tree | c0e0c5a61563e07cb01a85b1b59afd3e1c5bc54f /games-fps | |
parent | dev-python/sentry-sdk: Remove old (diff) | |
download | gentoo-bc70afdf256aa8e9415e79eaa24d3207354eef3a.tar.gz gentoo-bc70afdf256aa8e9415e79eaa24d3207354eef3a.tar.bz2 gentoo-bc70afdf256aa8e9415e79eaa24d3207354eef3a.zip |
games-fps/qudos: port to EAPI 7, games.eclass--
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/qudos/files/qudos-0.40.1-gnusource.patch | 4 | ||||
-rw-r--r-- | games-fps/qudos/files/qudos-0.40.1-libpng15.patch | 4 | ||||
-rw-r--r-- | games-fps/qudos/qudos-0.40.1.ebuild | 52 |
3 files changed, 34 insertions, 26 deletions
diff --git a/games-fps/qudos/files/qudos-0.40.1-gnusource.patch b/games-fps/qudos/files/qudos-0.40.1-gnusource.patch index dd2113b0c3bb..b82a276b012c 100644 --- a/games-fps/qudos/files/qudos-0.40.1-gnusource.patch +++ b/games-fps/qudos/files/qudos-0.40.1-gnusource.patch @@ -1,5 +1,5 @@ ---- src/unix/qsh_unix.c.orig 2011-10-22 17:46:37.665993357 -0500 -+++ src/unix/qsh_unix.c 2011-10-22 17:46:40.965972209 -0500 +--- a/src/unix/qsh_unix.c ++++ b/src/unix/qsh_unix.c @@ -17,6 +17,9 @@ * Temple Place - Suite 330, Boston, MA 02111-1307, USA. * diff --git a/games-fps/qudos/files/qudos-0.40.1-libpng15.patch b/games-fps/qudos/files/qudos-0.40.1-libpng15.patch index ecf9de9370e9..633215be34be 100644 --- a/games-fps/qudos/files/qudos-0.40.1-libpng15.patch +++ b/games-fps/qudos/files/qudos-0.40.1-libpng15.patch @@ -1,5 +1,5 @@ ---- src/ref_gl/gl_local.h -+++ src/ref_gl/gl_local.h +--- a/src/ref_gl/gl_local.h ++++ b/src/ref_gl/gl_local.h @@ -29,6 +29,7 @@ #include <GL/glu.h> #include <GL/glext.h> diff --git a/games-fps/qudos/qudos-0.40.1.ebuild b/games-fps/qudos/qudos-0.40.1.ebuild index 1c167f70ec4d..24a6a4e01612 100644 --- a/games-fps/qudos/qudos-0.40.1.ebuild +++ b/games-fps/qudos/qudos-0.40.1.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -inherit eutils flag-o-matic toolchain-funcs games +inherit desktop flag-o-matic toolchain-funcs FILE_STEM="QuDos-${PV}-src" PK3_FILE="QuDos-${PV}.pk3" @@ -13,6 +13,7 @@ DESCRIPTION="Enhanced Quake 2 engine" HOMEPAGE="https://github.com/ZwS/qudos" SRC_URI="mirror://gentoo/${FILE_STEM}.tar.bz2 https://github.com/ZwS/qudos/raw/master/quake2/baseq2/qudos.pk3 -> ${PK3_FILE}" +S="${WORKDIR}"/${FILE_STEM} LICENSE="GPL-2+" SLOT="0" @@ -34,13 +35,19 @@ DEPEND="opengl? ( x11-libs/libXext x11-libs/libXxf86dga x11-libs/libXxf86vm" -RDEPEND="${DEPEND} +RDEPEND=" + ${DEPEND} cdinstall? ( games-fps/quake2-data ) demo? ( games-fps/quake2-demodata[symlink] ) - textures? ( games-fps/quake2-textures )" + textures? ( games-fps/quake2-textures ) +" -S=${WORKDIR}/${FILE_STEM} -dir=${GAMES_DATADIR}/${MY_PN} +dir=usr/share/${MY_PN} + +PATCHES=( + "${FILESDIR}"/${P}-libpng15.patch + "${FILESDIR}"/${P}-gnusource.patch +) default_client() { if use opengl || use sdl || ! use dedicated ; then @@ -51,8 +58,6 @@ default_client() { } pkg_setup() { - games_pkg_setup - if ! use qmax && $( use opengl || use sdl ) ; then elog "The 'qmax' graphical improvements are recommended." echo @@ -85,12 +90,12 @@ src_unpack() { } src_prepare() { - rm docs/gnu.txt + rm docs/gnu.txt || die # Change default sound driver and its location sed -i \ -e "s:\"oss\":\"${snd_drv}\":" \ - -e "s:\"\./snd:\"$(games_get_libdir)/${PN}/snd:" \ + -e "s:\"\./snd:\"/usr/$(get_libdir)/${PN}/snd:" \ src/client/snd_dma.c || die sed -i \ @@ -102,11 +107,12 @@ src_prepare() { -e '1i#define OF(x) x' \ src/qcommon/unzip/ioapi.h || die fi + sed -i -e '106,119 s/CFL/LED/' Makefile || die - epatch \ - "${FILESDIR}"/${P}-libpng15.patch \ - "${FILESDIR}"/${P}-gnusource.patch + sed -i -e 's:-L/usr/lib -L$(LOCALBASE)/lib :: ' Makefile || die + + default } src_configure() { @@ -115,7 +121,9 @@ src_configure() { } src_compile() { - yesno() { usex $1 YES NO; } + yesno() { + usex ${1} YES NO; + } local client="YES" default_client || client="NO" @@ -137,7 +145,7 @@ src_compile() { TYPE="${type}" \ DATADIR="${dir}" \ LOCALBASE=/usr \ - LIBDIR="$(games_get_libdir)"/${PN} \ + LIBDIR="/usr/$(get_libdir)"/${PN} \ WITH_QMAX=$(yesno qmax) \ BUILD_3ZB2=$(yesno mods) \ BUILD_CTF=$(yesno mods) \ @@ -157,24 +165,24 @@ src_compile() { src_install() { if default_client ; then - newgamesbin ${MY_PN}/QuDos ${PN} + newbin ${MY_PN}/QuDos ${PN} + # Change from gif to png in next version? newicon docs/q2_orig/quake2.gif ${PN}.gif + make_desktop_entry ${PN} "QuDos" ${PN}.gif fi if use dedicated ; then - newgamesbin ${MY_PN}/QuDos-ded ${PN}-ded + newbin ${MY_PN}/QuDos-ded ${PN}-ded fi - insinto "$(games_get_libdir)"/${PN} + insinto "/usr/$(get_libdir)"/${PN} doins -r ${MY_PN}/* - rm "${D}/$(games_get_libdir)"/${PN}/QuDos + rm "${ED}/usr/$(get_libdir)"/${PN}/QuDos || die - insinto "$(games_get_libdir)"/${PN}/baseq2 + insinto "/usr/$(get_libdir)"/${PN}/baseq2 newins "${DISTDIR}/${PK3_FILE}" qudos.pk3 dodoc $(find docs -name \*.txt) docs/q2_orig/README* - - prepgamesdirs } |