From 1ef25607f1dff6037595dd812f4547c660bc2260 Mon Sep 17 00:00:00 2001 From: Davide Cendron Date: Mon, 1 Oct 2007 22:16:21 +0000 Subject: games-fps/vavoom: Revision bump for security fixes (thanks to Robert Buchholz for reporting) svn path=/sunrise/; revision=4728 --- games-fps/vavoom/ChangeLog | 6 + games-fps/vavoom/Manifest | 5 +- games-fps/vavoom/files/1.24-vulnerabilities.patch | 172 +++++++++++++++ games-fps/vavoom/vavoom-1.24-r1.ebuild | 244 ++++++++++++++++++++++ games-fps/vavoom/vavoom-1.24.ebuild | 243 --------------------- 5 files changed, 425 insertions(+), 245 deletions(-) create mode 100644 games-fps/vavoom/files/1.24-vulnerabilities.patch create mode 100644 games-fps/vavoom/vavoom-1.24-r1.ebuild delete mode 100644 games-fps/vavoom/vavoom-1.24.ebuild (limited to 'games-fps') diff --git a/games-fps/vavoom/ChangeLog b/games-fps/vavoom/ChangeLog index d74cd5639..dbc149258 100644 --- a/games-fps/vavoom/ChangeLog +++ b/games-fps/vavoom/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 01 Oct 2007; Davide Cendron (scen) + +files/1.24-vulnerabilities.patch, -vavoom-1.24.ebuild, + +vavoom-1.24-r1.ebuild: + Revision bump for security fixes (thanks to Robert Buchholz for reporting) + 21 Aug 2007; Davide Cendron (scen) vavoom-9999.ebuild: Install also proper graphical launcher icon diff --git a/games-fps/vavoom/Manifest b/games-fps/vavoom/Manifest index 865aeb48b..3141b0e76 100644 --- a/games-fps/vavoom/Manifest +++ b/games-fps/vavoom/Manifest @@ -1,6 +1,7 @@ +AUX 1.24-vulnerabilities.patch 4492 RMD160 01a907d0e8d3dbbf75ce7cb653bc9702316ce378 SHA1 ef3b66c952e96bacc2c1206b61cefbb18d2fe6eb SHA256 ad3dcf387ba376b9d614cabf1034862dac6473d51b8f66d493105d507aad3d1e AUX vavoom-makefile_nowrapper.patch 3235 RMD160 b04e87de8068e2d290387998d34701e2a3a58b30 SHA1 5e5f3b0da0c9ca975cb9606e5684bb5e21e3d7de SHA256 23266e9e536cafb766155d6b6899f358d7dd0489ce61e2b9bec9ec567d0ac7d9 DIST vavoom-1.24.tar.bz2 1683706 RMD160 67ca05a0576516782c5063975ff07065216915ce SHA1 fd0fc36649faec8b8dc3123eddb52664391bacda SHA256 26d9f036f8429924d71dc16d805e9272b3c44cccc2067e82cb632170a21dd80b -EBUILD vavoom-1.24.ebuild 6556 RMD160 3c88cb10890b668c39b21906fc73fd3e6f5d1c80 SHA1 cfd64c3dd1d2792ffb872744d37a97558ae7056c SHA256 4a02748c29fd1b02c2a11239f6446a34e1d1d2c937c6946a0fc679249afd8fe0 +EBUILD vavoom-1.24-r1.ebuild 6606 RMD160 ec980f346f2d781597a993081352db3b4f42a01b SHA1 b59927ff52fc97be55781958c0f2fed256aa6c9b SHA256 7c5baae854fdfc77257699be11cdccfa865ebf4531dd7a34672e0e3bf0434157 EBUILD vavoom-9999.ebuild 7259 RMD160 6a28510de27c2aafea800d4f3dac265d224c6ef3 SHA1 f2db7cc962841235794fb70243b532801ecbcc18 SHA256 90ebb17b3962a34d1484a29f08616f7560874e610c20e19292d9eb0a9dd156fb -MISC ChangeLog 2080 RMD160 c6288e913c08f03a9da54d2fb2d1781198d589e9 SHA1 444d7fc9e0d30525db19ae905077c6fa82831a35 SHA256 26eca795c76f9986222a6af57b35822198158f1561b17c487e025a5eae2e92fb +MISC ChangeLog 2323 RMD160 a7eabe858cffda73e4d98ef9a2dc80c52c1b7332 SHA1 3a20a205b9a58ea354506011d58893298dbbe97a SHA256 a3bedb428b13ae1b0e62ed46d40bc002fda767169b6f5aadf1e7a640ada7f478 MISC metadata.xml 303 RMD160 626272995441b20fd23b1d0a94603e98b97b0f1e SHA1 f3cae1ec3568e7717d7265a58d0b2e6d8efe88b5 SHA256 334d9b64af3b010a9fcdcbd8736eba2f81ff9d87dee3eb76b5adacb7d48afa37 diff --git a/games-fps/vavoom/files/1.24-vulnerabilities.patch b/games-fps/vavoom/files/1.24-vulnerabilities.patch new file mode 100644 index 000000000..a652123fc --- /dev/null +++ b/games-fps/vavoom/files/1.24-vulnerabilities.patch @@ -0,0 +1,172 @@ +--- trunk/vavoom/source/p_acs.cpp 2007/08/29 22:11:13 2684 ++++ trunk/vavoom/source/p_acs.cpp 2007/08/31 16:30:40 2685 +@@ -2486,7 +2486,7 @@ + } + else + { +- BroadcastCentrePrintf(*PrintStr); ++ BroadcastCentrePrint(*PrintStr); + } + ACSVM_BREAK; + +@@ -2649,7 +2649,7 @@ + ACSVM_CASE(PCD_EndPrintBold) + //FIXME yellow message + PrintStr = PrintStr.EvalEscapeSequences(); +- BroadcastCentrePrintf(*PrintStr); ++ BroadcastCentrePrint(*PrintStr); + ACSVM_BREAK; + + // Extended P-Code commands. +@@ -2974,7 +2974,7 @@ + } + else + { +- BroadcastCentrePrintf(*PrintStr); ++ BroadcastCentrePrint(*PrintStr); + } + sp = optstart - 6; + ACSVM_BREAK; +--- trunk/vavoom/source/p_thinker.cpp 2007/08/29 22:11:13 2684 ++++ trunk/vavoom/source/p_thinker.cpp 2007/08/31 16:30:40 2685 +@@ -294,6 +294,21 @@ + + //========================================================================== + // ++// VThinker::BroadcastPrint ++// ++//========================================================================== ++ ++void VThinker::BroadcastPrint(const char *s) ++{ ++ guard(VThinker::BroadcastPrint); ++ for (int i = 0; i < svs.max_clients; i++) ++ if (Level->Game->Players[i]) ++ Level->Game->Players[i]->eventClientPrint(s); ++ unguard; ++} ++ ++//========================================================================== ++// + // VThinker::BroadcastPrintf + // + //========================================================================== +@@ -308,9 +323,22 @@ + vsprintf(buf, s, v); + va_end(v); + ++ BroadcastPrint(buf); ++ unguard; ++} ++ ++//========================================================================== ++// ++// VThinker::BroadcastCentrePrint ++// ++//========================================================================== ++ ++void VThinker::BroadcastCentrePrint(const char *s) ++{ ++ guard(VThinker::BroadcastCentrePrint); + for (int i = 0; i < svs.max_clients; i++) + if (Level->Game->Players[i]) +- Level->Game->Players[i]->eventClientPrint(buf); ++ Level->Game->Players[i]->eventClientCentrePrint(s); + unguard; + } + +@@ -330,9 +358,7 @@ + vsprintf(buf, s, v); + va_end(v); + +- for (int i = 0; i < svs.max_clients; i++) +- if (Level->Game->Players[i]) +- Level->Game->Players[i]->eventClientCentrePrint(buf); ++ BroadcastCentrePrint(buf); + unguard; + } + +@@ -444,7 +470,7 @@ + { + VStr Msg = PF_FormatString(); + P_GET_SELF; +- Self->BroadcastPrintf(*Msg); ++ Self->BroadcastPrint(*Msg); + } + + IMPLEMENT_FUNCTION(VThinker, AllocDlight) +--- trunk/vavoom/source/p_thinker.h 2007/08/29 22:11:13 2684 ++++ trunk/vavoom/source/p_thinker.h 2007/08/31 16:30:40 2685 +@@ -76,7 +76,9 @@ + void AddSoundSequenceChoice(vint32, VName); + void StopSoundSequence(vint32); + ++ void BroadcastPrint(const char*); + void BroadcastPrintf(const char*, ...); ++ void BroadcastCentrePrint(const char*); + void BroadcastCentrePrintf(const char*, ...); + + DECLARE_FUNCTION(Spawn) +--- trunk/vavoom/source/screen.cpp 2007/08/29 19:43:24 2683 ++++ trunk/vavoom/source/screen.cpp 2007/08/29 22:11:13 2684 +@@ -203,6 +203,12 @@ + void *data; + char filename[128]; + ++ if (strlen(screenshot_type) > 8) ++ { ++ GCon->Log("Screenshot extension too long"); ++ return; ++ } ++ + // Find a file name to save it to + VStr BaseDir = (fl_savedir ? fl_savedir : fl_basedir) + "/" + fl_gamedir; + for (i = 0; i <= 9999; i++) +--- trunk/vavoom/source/str.h 2007/08/31 16:30:40 2685 ++++ trunk/vavoom/source/str.h 2007/08/31 17:25:55 2686 +@@ -345,6 +345,8 @@ + { + vint32 Len; + Strm << STRM_INDEX(Len); ++ if (Len < 0) ++ Len = 0; + S.Resize(Len); + if (Len) + Strm.Serialise(S.Str, Len + 1); +--- trunk/vavoom/source/sv_main.cpp 2007/08/15 20:47:29 2647 ++++ trunk/vavoom/source/sv_main.cpp 2007/08/31 16:30:40 2685 +@@ -1431,14 +1431,14 @@ + COMMAND(Map) + { + guard(COMMAND Map); +- char mapname[12]; ++ VStr mapname; + + if (Args.Num() != 2) + { + GCon->Log("map : change level"); + return; + } +- VStr::Cpy(mapname, *Args[1]); ++ mapname = Args[1]; + + SV_ShutdownServer(false); + #ifdef CLIENT +@@ -1461,7 +1461,7 @@ + GGameInfo->netgame = svs.max_clients > 1; + GGameInfo->eventInitNewGame(gameskill); + +- SV_SpawnServer(mapname, true); ++ SV_SpawnServer(*mapname, true); + #ifdef CLIENT + if (cls.state != ca_dedicated) + GCmdBuf << "Connect local\n"; +@@ -1624,7 +1624,7 @@ + Text += " "; + Text += Args[i]; + } +- GLevelInfo->BroadcastPrintf(*Text); ++ GLevelInfo->BroadcastPrint(*Text); + GLevelInfo->StartSound(TVec(0, 0, 0), 0, + GSoundManager->GetSoundID("misc/chat"), 0, 1.0, 0); + unguard; diff --git a/games-fps/vavoom/vavoom-1.24-r1.ebuild b/games-fps/vavoom/vavoom-1.24-r1.ebuild new file mode 100644 index 000000000..e7ee75355 --- /dev/null +++ b/games-fps/vavoom/vavoom-1.24-r1.ebuild @@ -0,0 +1,244 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit autotools eutils flag-o-matic games + +DESCRIPTION="Advanced source port for Doom/Heretic/Hexen/Strife" +HOMEPAGE="http://www.vavoom-engine.com/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="allegro asm debug dedicated external-glbsp flac mad mikmod models music +openal opengl sdl textures tools vorbis" + +QA_EXECSTACK="${GAMES_BINDIR:1}/${PN}" + +# From econf: "Vavoom requires Allegro or SDL to compile" +# SDL,like Allegro are *software* renderers in this game. +# So, if not selected through proper USEs, the default is SDL, +# without opengl (vavoom can run in software-mode only). +# To enable it, enable proper USE. +# OpenGL is the normally-desired hardware renderer, selected on command-line +# (through "-opengl" switch). This switch is also added to the desktop entry, +# if "opengl" USE flag is enabled + +SDLDEPEND=">=media-libs/libsdl-1.2 + media-libs/sdl-mixer" +ALLEGDEPEND=">=media-libs/allegro-4.0" +OPENGLDEPEND="opengl? ( virtual/opengl ) + sdl? ( ${SDLDEPEND} ) + allegro? ( media-libs/allegrogl ) + !sdl? ( !allegro? ( ${SDLDEPEND} ) )" +DEPEND="media-libs/libpng + media-libs/jpeg + sdl? ( ${SDLDEPEND} ) + !sdl? ( allegro? ( ${ALLEGDEPEND} ) ) + !sdl? ( !allegro? ( !dedicated? ( ${OPENGLDEPEND} ) ) ) + opengl? ( ${OPENGLDEPEND} ) + vorbis? ( media-libs/libvorbis ) + flac? ( media-libs/flac ) + mad? ( media-libs/libmad ) + mikmod? ( media-libs/libmikmod ) + openal? ( media-libs/openal ) + external-glbsp? ( games-util/glbsp )" +RDEPEND="${DEPEND} + allegro? ( media-sound/timidity++ )" +PDEPEND="models? ( >=games-fps/vavoom-models-1.4.1 ) + music? ( games-fps/vavoom-music ) + textures? ( games-fps/vavoom-textures )" + +dir=${GAMES_DATADIR}/${PN} + +pkg_setup() { + local backend="media-libs/libsdl" + + if ! use sdl && use allegro ; then + backend="media-libs/allegro" + fi + + games_pkg_setup + + # Do some important check ... + + if use sdl && use allegro ; then + echo + ewarn "Both 'allegro' and 'sdl' USE flags enabled" + ewarn "Set default to SDL" + elif ! use sdl && ! use allegro ; then + ewarn "Both 'sdl' and 'allegro' USE flags disabled" + ewarn "Set default to SDL" + fi + + # Base graphic/sound/music support is enabled? + + echo + einfo "Doing some sanity check..." + + # Graphic check + if ! built_with_use ${backend} X ; then + echo + eerror "Software Graphic support is not configured properly!" + eerror "Please rebuild ${backend} with 'X' USE flag enabled" + die "graphic support error" + fi + + # Sound check + if ! built_with_use ${backend} alsa ; then + echo + eerror "Sound support is not configured properly!" + eerror "Please rebuild ${backend} with 'alsa' USE flag enabled" + die "sound support error" + fi + + # Music check + if ! use allegro && ! built_with_use media-libs/sdl-mixer timidity ; then + echo + eerror "MIDI Music support is not configured properly!" + eerror "Please rebuild sdl-mixer with USE 'timidity' enabled!" + die "music support error" + fi + + # OpenGL check + if use opengl ; then + if [ "${backend}" == "media-libs/libsdl" ] && ! built_with_use ${backend} opengl ; then + echo + eerror "OpenGL support is not configured properly!" + eerror "Please rebuild ${backend} with 'opengl' USE flag enabled" + die "opengl support error" + fi + else + echo + ewarn "'opengl' USE flag disabled. OpenGL is recommended, for best graphics." + fi + + # Does user want external music? Vorbis support is needed + if use music && ! use vorbis ; then + echo + eerror "Ogg/Vorbis support is required for external music playing" + eerror "Please enable 'vorbis' USE flag for this package" + die "external music support error" + fi + + echo + einfo "All is OK, let's build!" +} + +src_unpack() { + unpack "${A}" + cd "${S}" + + # Patch Makefiles to get rid of executable wrappers + epatch "${FILESDIR}/${PN}-makefile_nowrapper.patch" + epatch "${FILESDIR}/${PV}-vulnerabilities.patch" + + # Set shared directory + sed -i \ + -e "s:fl_basedir = \".\":fl_basedir = \"${dir}\":" \ + source/files.cpp || die "sed files.cpp failed" + + eautoreconf + + # Set executable filenames + for m in $(find . -type f -name Makefile.in) ; do + sed -i \ + -e "s:MAIN_EXE = @MAIN_EXE@:MAIN_EXE=${PN}:" \ + -e "s:SERVER_EXE = @SERVER_EXE@:SERVER_EXE=${PN}-ded:" \ + "${m}" || die "sed ${m} failed" + done +} + +src_compile() { + local \ + allegro="--without-allegro" \ + sdl="--without-sdl" + + # Sdl is the default, unless sdl=off & allegro=on + if ! use sdl && use allegro ; then + allegro="--with-allegro" + else + sdl="--with-sdl" + fi + + use debug && append-flags -g2 + + egamesconf \ + --enable-client \ + ${sdl} \ + ${allegro} \ + $(use_with opengl) \ + $(use_with openal) \ + $(use_with external-glbsp) \ + $(use_with vorbis) \ + $(use_with mad libmad) \ + $(use_with mikmod) \ + $(use_with flac) \ + $(use_enable asm) \ + $(use_enable dedicated server) \ + $(use_enable debug) \ + $(use_enable debug zone-debug) \ + --with-iwaddir="${dir}" \ + --disable-dependency-tracking \ + || die "egamesconf failed" + + # Parallel compiling seems to work (tested on 1.24) + # I hope it would be true :P (in case i'll re-enable it later) + emake || die "emake failed" +} + +src_install() { + local de_cmd="${PN}" + + emake DESTDIR="${D}" install || die "emake install failed" + + # Remove unneeded icon + rm -f "${D}/${dir}/${PN}.png" + + doicon source/${PN}.png || die "doicon failed" + + # Enable OpenGL in desktop entry, if relevant USE flag is enabled + use opengl && de_cmd="${PN} -opengl" + make_desktop_entry "${de_cmd}" "Vavoom" + + dodoc docs/${PN}.txt || die "dodoc vavoom.txt failed" + + if use tools; then + # The tools are always built + dobin utils/bin/{acc,fixmd2,vcc,vlumpy} || die "dobin utils failed" + dodoc utils/vcc/vcc.txt || die "dodoc vcc.txt failed" + fi + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + + elog "Copy or link wad files into ${dir}" + elog "(the files must be readable by the 'games' group)." + elog + elog "Example setup:" + elog "ln -sn ${GAMES_DATADIR}/doom-data/doom.wad ${dir}/" + elog + elog "Example command-line:" + elog " vavoom -doom -opengl" + elog + elog "See documentation for further details." + + if use tools; then + echo + elog "You have also installed some Vavoom-related utilities" + elog "(useful for mod developing):" + elog + elog " - acc (ACS Script Compiler)" + elog " - fixmd2 (MD2 models utility)" + elog " - vcc (Vavoom C Compiler)" + elog " - vlumpy (Vavoom Lump utility)" + elog + elog "See the Vavoom Wiki at http://vavoom-engine.com/wiki/ or" + elog "Vavoom Forum at http://www.vavoom-engine.com/forums/" + elog "for further help." + fi +} diff --git a/games-fps/vavoom/vavoom-1.24.ebuild b/games-fps/vavoom/vavoom-1.24.ebuild deleted file mode 100644 index 06260bc78..000000000 --- a/games-fps/vavoom/vavoom-1.24.ebuild +++ /dev/null @@ -1,243 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit autotools eutils flag-o-matic games - -DESCRIPTION="Advanced source port for Doom/Heretic/Hexen/Strife" -HOMEPAGE="http://www.vavoom-engine.com/" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="allegro asm debug dedicated external-glbsp flac mad mikmod models music -openal opengl sdl textures tools vorbis" - -QA_EXECSTACK="${GAMES_BINDIR:1}/${PN}" - -# From econf: "Vavoom requires Allegro or SDL to compile" -# SDL,like Allegro are *software* renderers in this game. -# So, if not selected through proper USEs, the default is SDL, -# without opengl (vavoom can run in software-mode only). -# To enable it, enable proper USE. -# OpenGL is the normally-desired hardware renderer, selected on command-line -# (through "-opengl" switch). This switch is also added to the desktop entry, -# if "opengl" USE flag is enabled - -SDLDEPEND=">=media-libs/libsdl-1.2 - media-libs/sdl-mixer" -ALLEGDEPEND=">=media-libs/allegro-4.0" -OPENGLDEPEND="opengl? ( virtual/opengl ) - sdl? ( ${SDLDEPEND} ) - allegro? ( media-libs/allegrogl ) - !sdl? ( !allegro? ( ${SDLDEPEND} ) )" -DEPEND="media-libs/libpng - media-libs/jpeg - sdl? ( ${SDLDEPEND} ) - !sdl? ( allegro? ( ${ALLEGDEPEND} ) ) - !sdl? ( !allegro? ( !dedicated? ( ${OPENGLDEPEND} ) ) ) - opengl? ( ${OPENGLDEPEND} ) - vorbis? ( media-libs/libvorbis ) - flac? ( media-libs/flac ) - mad? ( media-libs/libmad ) - mikmod? ( media-libs/libmikmod ) - openal? ( media-libs/openal ) - external-glbsp? ( games-util/glbsp )" -RDEPEND="${DEPEND} - allegro? ( media-sound/timidity++ )" -PDEPEND="models? ( >=games-fps/vavoom-models-1.4.1 ) - music? ( games-fps/vavoom-music ) - textures? ( games-fps/vavoom-textures )" - -dir=${GAMES_DATADIR}/${PN} - -pkg_setup() { - local backend="media-libs/libsdl" - - if ! use sdl && use allegro ; then - backend="media-libs/allegro" - fi - - games_pkg_setup - - # Do some important check ... - - if use sdl && use allegro ; then - echo - ewarn "Both 'allegro' and 'sdl' USE flags enabled" - ewarn "Set default to SDL" - elif ! use sdl && ! use allegro ; then - ewarn "Both 'sdl' and 'allegro' USE flags disabled" - ewarn "Set default to SDL" - fi - - # Base graphic/sound/music support is enabled? - - echo - einfo "Doing some sanity check..." - - # Graphic check - if ! built_with_use ${backend} X ; then - echo - eerror "Software Graphic support is not configured properly!" - eerror "Please rebuild ${backend} with 'X' USE flag enabled" - die "graphic support error" - fi - - # Sound check - if ! built_with_use ${backend} alsa ; then - echo - eerror "Sound support is not configured properly!" - eerror "Please rebuild ${backend} with 'alsa' USE flag enabled" - die "sound support error" - fi - - # Music check - if ! use allegro && ! built_with_use media-libs/sdl-mixer timidity ; then - echo - eerror "MIDI Music support is not configured properly!" - eerror "Please rebuild sdl-mixer with USE 'timidity' enabled!" - die "music support error" - fi - - # OpenGL check - if use opengl ; then - if [ "${backend}" == "media-libs/libsdl" ] && ! built_with_use ${backend} opengl ; then - echo - eerror "OpenGL support is not configured properly!" - eerror "Please rebuild ${backend} with 'opengl' USE flag enabled" - die "opengl support error" - fi - else - echo - ewarn "'opengl' USE flag disabled. OpenGL is recommended, for best graphics." - fi - - # Does user want external music? Vorbis support is needed - if use music && ! use vorbis ; then - echo - eerror "Ogg/Vorbis support is required for external music playing" - eerror "Please enable 'vorbis' USE flag for this package" - die "external music support error" - fi - - echo - einfo "All is OK, let's build!" -} - -src_unpack() { - unpack "${A}" - cd "${S}" - - # Patch Makefiles to get rid of executable wrappers - epatch "${FILESDIR}/${PN}-makefile_nowrapper.patch" - - # Set shared directory - sed -i \ - -e "s:fl_basedir = \".\":fl_basedir = \"${dir}\":" \ - source/files.cpp || die "sed files.cpp failed" - - eautoreconf - - # Set executable filenames - for m in $(find . -type f -name Makefile.in) ; do - sed -i \ - -e "s:MAIN_EXE = @MAIN_EXE@:MAIN_EXE=${PN}:" \ - -e "s:SERVER_EXE = @SERVER_EXE@:SERVER_EXE=${PN}-ded:" \ - "${m}" || die "sed ${m} failed" - done -} - -src_compile() { - local \ - allegro="--without-allegro" \ - sdl="--without-sdl" - - # Sdl is the default, unless sdl=off & allegro=on - if ! use sdl && use allegro ; then - allegro="--with-allegro" - else - sdl="--with-sdl" - fi - - use debug && append-flags -g2 - - egamesconf \ - --enable-client \ - ${sdl} \ - ${allegro} \ - $(use_with opengl) \ - $(use_with openal) \ - $(use_with external-glbsp) \ - $(use_with vorbis) \ - $(use_with mad libmad) \ - $(use_with mikmod) \ - $(use_with flac) \ - $(use_enable asm) \ - $(use_enable dedicated server) \ - $(use_enable debug) \ - $(use_enable debug zone-debug) \ - --with-iwaddir="${dir}" \ - --disable-dependency-tracking \ - || die "egamesconf failed" - - # Parallel compiling seems to work (tested on 1.24) - # I hope it would be true :P (in case i'll re-enable it later) - emake || die "emake failed" -} - -src_install() { - local de_cmd="${PN}" - - emake DESTDIR="${D}" install || die "emake install failed" - - # Remove unneeded icon - rm -f "${D}/${dir}/${PN}.png" - - doicon source/${PN}.png || die "doicon failed" - - # Enable OpenGL in desktop entry, if relevant USE flag is enabled - use opengl && de_cmd="${PN} -opengl" - make_desktop_entry "${de_cmd}" "Vavoom" - - dodoc docs/${PN}.txt || die "dodoc vavoom.txt failed" - - if use tools; then - # The tools are always built - dobin utils/bin/{acc,fixmd2,vcc,vlumpy} || die "dobin utils failed" - dodoc utils/vcc/vcc.txt || die "dodoc vcc.txt failed" - fi - - prepgamesdirs -} - -pkg_postinst() { - games_pkg_postinst - - elog "Copy or link wad files into ${dir}" - elog "(the files must be readable by the 'games' group)." - elog - elog "Example setup:" - elog "ln -sn ${GAMES_DATADIR}/doom-data/doom.wad ${dir}/" - elog - elog "Example command-line:" - elog " vavoom -doom -opengl" - elog - elog "See documentation for further details." - - if use tools; then - echo - elog "You have also installed some Vavoom-related utilities" - elog "(useful for mod developing):" - elog - elog " - acc (ACS Script Compiler)" - elog " - fixmd2 (MD2 models utility)" - elog " - vcc (Vavoom C Compiler)" - elog " - vlumpy (Vavoom Lump utility)" - elog - elog "See the Vavoom Wiki at http://vavoom-engine.com/wiki/ or" - elog "Vavoom Forum at http://www.vavoom-engine.com/forums/" - elog "for further help." - fi -} -- cgit v1.2.3-65-gdbad