games-fps/turtlearena: remove deprecated games eclass
authorAustin English <wizardedit@gentoo.org>
Wed, 6 Sep 2017 23:28:13 +0000 (18:28 -0500)
committerAustin English <wizardedit@gentoo.org>
Wed, 6 Sep 2017 23:28:35 +0000 (18:28 -0500)
Also update to EAPI 6

Gentoo-Bug: https://bugs.gentoo.org/574082
Package-Manager: Portage-2.3.6, Repoman-2.3.2

games-fps/turtlearena/files/turtlearena-0.6.1-build.patch
games-fps/turtlearena/files/turtlearena-0.6.1-freetype.patch
games-fps/turtlearena/turtlearena-0.6.1-r1.ebuild [new file with mode: 0644]

index 76843b08ebf686b58a42e32aea4ac84ffa84f53f..0b6ad877b3f2ad5624e09b4f95105bdb9e9f2cbd 100644 (file)
@@ -7,8 +7,8 @@ Date: Sat Apr 27 20:53:37 UTC 2013
 * unbundle the unzip.c properly and fix headers
 * make -m* flags depend on CROSS_COMPILING var
 
---- engine/Makefile
-+++ engine/Makefile
+--- a/engine/Makefile
++++ b/engine/Makefile
 @@ -346,27 +346,31 @@
  
  bin_path=$(shell which $(1) 2> /dev/null)
@@ -177,8 +177,8 @@ Date: Sat Apr 27 20:53:37 UTC 2013
    $(B)/ded/vm.o \
    $(B)/ded/vm_interpreted.o \
    \
---- engine/code/qcommon/files.c
-+++ engine/code/qcommon/files.c
+--- a/engine/code/qcommon/files.c
++++ b/engine/code/qcommon/files.c
 @@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth
  
  #include "q_shared.h"
@@ -188,8 +188,8 @@ Date: Sat Apr 27 20:53:37 UTC 2013
  
  /*
  =============================================================================
---- engine/code/renderer/tr_public.h
-+++ engine/code/renderer/tr_public.h
+--- a/engine/code/renderer/tr_public.h
++++ b/engine/code/renderer/tr_public.h
 @@ -25,7 +25,7 @@
  #include "tr_types.h"
  
index 563a9d0d70429a11ef0c83f4e5fefbeefdf7c20f..9ecd6df2bf57452f8dd1e73b7ec636c8412ac358 100644 (file)
@@ -1,8 +1,8 @@
 http://bugs.gentoo.org/show_bug.cgi?id=479822#c3
 http://github.com/ioquake/ioq3/commit/ab4c602374caa0f520b3a0801d384a73e29e0bc7
 
---- engine/code/renderer/tr_font.c
-+++ engine/code/renderer/tr_font.c
+--- a/engine/code/renderer/tr_font.c
++++ b/engine/code/renderer/tr_font.c
 @@ -47,10 +47,10 @@
  #include "../qcommon/qcommon.h"
  
diff --git a/games-fps/turtlearena/turtlearena-0.6.1-r1.ebuild b/games-fps/turtlearena/turtlearena-0.6.1-r1.ebuild
new file mode 100644 (file)
index 0000000..ee35255
--- /dev/null
@@ -0,0 +1,122 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils gnome2-utils
+
+MY_P=${PN/-/}-${PV}
+
+DESCRIPTION="A turtle featuring free and open source third-person action game (ioq3 engine)"
+HOMEPAGE="http://ztm.x10host.com/ta/index.htm"
+SRC_URI="https://turtlearena.googlecode.com/files/${MY_P}-0-src.tar.bz2
+       https://turtlearena.googlecode.com/files/${MY_P}-0.zip"
+
+LICENSE="GPL-2+ CC-BY-SA-3.0 mplus-fonts lcc"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+curl debug dedicated mumble openal server theora voice vorbis"
+
+RDEPEND="
+       sys-libs/zlib[minizip]
+       !dedicated? (
+               media-libs/freetype:2
+               media-libs/libsdl[X,sound,joystick,opengl,video]
+               virtual/jpeg:0
+               virtual/opengl
+               curl? ( net-misc/curl )
+               openal? ( media-libs/openal )
+               theora? ( media-libs/libtheora )
+               voice? (
+                       media-libs/speex
+                       mumble? ( media-sound/mumble )
+               )
+               vorbis? ( media-libs/libvorbis )
+       )"
+DEPEND="${RDEPEND}
+       app-arch/unzip
+       virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}-0-src
+
+src_prepare() {
+       default
+
+       eapply "${FILESDIR}"/${P}-build.patch
+       eapply "${FILESDIR}"/${P}-freetype.patch
+
+       sed -i \
+               -e 's:JPEG_LIB_VERSION < 80:JPEG_LIB_VERSION < 62:' \
+               engine/code/renderer/tr_image_jpg.c || die #479822
+
+       rm -r engine/code/{AL,libcurl,libogg,libspeex,libtheora,libvorbis,SDL12,zlib} \
+               engine/code/freetype* engine/code/jpeg-* \
+               engine/code/qcommon/unzip.{c,h} || die
+}
+
+src_compile() {
+       buildit() { use $1 && echo 1 || echo 0 ; }
+       nobuildit() { use $1 && echo 0 || echo 1 ; }
+
+       myarch=$(usex amd64 "x86_64" "x86")
+       emake -C engine \
+               Q="" \
+               ARCH=${myarch} \
+               CROSS_COMPILING=0 \
+               BUILD_GAME_QVM=0 \
+               BUILD_GAME_SO=0 \
+               BUILD_CLIENT=$(nobuildit dedicated) \
+               BUILD_SERVER=$(usex dedicated "1" "$(buildit server)") \
+               DEFAULT_BASEDIR="/usr/share/${PN}" \
+               GENERATE_DEPENDENCIES=0 \
+               OPTIMIZEVM="" \
+               OPTIMIZE="" \
+               DEBUG_CFLAGS="" \
+               USE_MUMBLE=$(buildit mumble) \
+               USE_VOIP=$(buildit voice) \
+               USE_INTERNAL_SPEEX=0 \
+               USE_INTERNAL_OGG=0 \
+               USE_INTERNAL_ZLIB=0 \
+               USE_INTERNAL_JPEG=0 \
+               USE_INTERNAL_FREETYPE=0 \
+               USE_CODEC_VORBIS=$(buildit vorbis) \
+               USE_INTERNAL_VORBIS=0 \
+               USE_CODEC_THEORA=$(buildit theora) \
+               USE_OPENAL=$(buildit openal) \
+               USE_OPENAL_DLOPEN=0 \
+               USE_CURL=$(buildit curl) \
+               USE_CURL_DLOPEN=0 \
+               USE_LOCAL_HEADERS=0 \
+               $(usex debug "debug" "release")
+}
+
+src_install() {
+       dodoc engine/{ChangeLog,BUGS,TODO}
+       use voice && dodoc engine/voip-readme.txt
+
+       if ! use dedicated ; then
+               newbin engine/build/$(usex debug "debug" "release")-linux-${myarch}/turtlearena.${myarch} turtlearena
+               newicon -s scalable engine/misc/quake3-tango.svg ${PN}.svg
+               newicon -s 256 engine/misc/quake3-tango.png ${PN}.png
+               make_desktop_entry ${PN}
+       fi
+
+       if use dedicated || use server ; then
+               newbin engine/build/$(usex debug "debug" "release")-linux-${myarch}/turtlearena-server.${myarch} turtlearena-server
+       fi
+
+       insinto "/usr/share/${PN}"
+       doins -r "${WORKDIR}"/${MY_P}-0/base
+}
+
+pkg_preinst() {
+       use dedicated || gnome2_icon_savelist
+}
+
+pkg_postinst() {
+       use dedicated || gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+       use dedicated || gnome2_icon_cache_update
+}