From dde67ed2b71e7a790eda78d8bfa643632fe151a9 Mon Sep 17 00:00:00 2001 From: Davide Cendron Date: Wed, 25 Jul 2007 20:35:20 +0000 Subject: games-fps/uhexen2-cvs: Version bump (and drop old) svn path=/sunrise/; revision=4335 --- games-fps/uhexen2-cvs/ChangeLog | 4 + games-fps/uhexen2-cvs/Manifest | 8 +- games-fps/uhexen2-cvs/uhexen2-cvs-20070722.ebuild | 456 --------------------- games-fps/uhexen2-cvs/uhexen2-cvs-20070725.ebuild | 464 ++++++++++++++++++++++ 4 files changed, 472 insertions(+), 460 deletions(-) delete mode 100644 games-fps/uhexen2-cvs/uhexen2-cvs-20070722.ebuild create mode 100644 games-fps/uhexen2-cvs/uhexen2-cvs-20070725.ebuild diff --git a/games-fps/uhexen2-cvs/ChangeLog b/games-fps/uhexen2-cvs/ChangeLog index 904d60a78..c13ce772a 100644 --- a/games-fps/uhexen2-cvs/ChangeLog +++ b/games-fps/uhexen2-cvs/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 25 Jul 2007; Davide Cendron (scen) + -uhexen2-cvs-20070722.ebuild, +uhexen2-cvs-20070725.ebuild: + Version bump (and drop old) + 23 Jul 2007; Davide Cendron (scen) -uhexen2-cvs-20070715.ebuild, +uhexen2-cvs-20070722.ebuild: Version bump (and drop old) diff --git a/games-fps/uhexen2-cvs/Manifest b/games-fps/uhexen2-cvs/Manifest index 748ce5dc3..457e8b7cf 100644 --- a/games-fps/uhexen2-cvs/Manifest +++ b/games-fps/uhexen2-cvs/Manifest @@ -1,6 +1,6 @@ -DIST gamedata-all-1.19-rc1.tgz 3703567 RMD160 11a9181428bd1e964d3513fb46cb1e35bc3ef292 SHA1 af9f96446c5607cf0974fa0b898e6925de9723d8 SHA256 3914c4af9acbabdfbec772bdc61a43bc265820ddb33aec4ab804e434105ff42b +DIST gamedata-all-1.19-rc2.tgz 3703813 RMD160 1be90cca1a76130ca5c602a7092c3aae3c110465 SHA1 6f2a626a95f368370acf2230932ee7373cecf1f1 SHA256 00f63a7c1aafae08f3786d5d78312f602a667d9ee8fcba43515a505223afe7cd DIST hexenworld-pakfiles-0.15.tgz 4956848 RMD160 cd6cafb8e597028e1405638b7a60e1f30ce6d846 SHA1 57af1db9a92f2e41f8fa0f1e5f779f4ec648e730 SHA256 215e92f58bc7ed6098f076b45a20b94092599bfce6c4cd00f2895b24a6ee72fe -DIST uhexen2-cvs-20070722.tgz 6314051 RMD160 1969b7d50fd77cbe1b3aa3b77fb2bb9ab51d3281 SHA1 c39ff8110d1d77ce9f7e8be2c38fb5217e6b28ff SHA256 de415ede510fc18c9ea498a08a2bafb3a1e5fc644d726e5e13493ca68ca0ba85 -EBUILD uhexen2-cvs-20070722.ebuild 12579 RMD160 a59057dec6b2e883a3c36d2ecd3ef2ff7bdcce5f SHA1 ee0ff29842cbe4a021920bc9425a65ddef4d6534 SHA256 e2c7758048e82561ac4b3cb73fa2efa75f102556e1f26585f21672e9b0fa40b4 -MISC ChangeLog 3317 RMD160 69ca6aa25e71fc9a22067b7336ff0d39f05f3592 SHA1 f86b44b48b260dc2d8217f4bd61d96941b0928b3 SHA256 47a1424a414b4e6b0e1977375b21a5399b0975bcc294f06e9de7bb662b890771 +DIST uhexen2-cvs-20070725.tgz 6313977 RMD160 ba92fde3575eea70529184e87dc1e5f5e6d97077 SHA1 d778bcf36606c74da9b605cda89b0c5898c78324 SHA256 bc42c167322a4da37ed248c69c90550cdddc0d9bacd1e3092f217761cd76ec94 +EBUILD uhexen2-cvs-20070725.ebuild 12792 RMD160 c55d10bbfa3cf15fa6c977c88f818339ad59205e SHA1 3ebd7e10d6ac9513f90aa7392a9b9270e0b35fc7 SHA256 8f9c97b28ba41a71fc6c941da4d3bb38877dc2d853cceae1f3a906d6dfeb732d +MISC ChangeLog 3465 RMD160 994288c9045948bbf9a51a30ff88cc2703fb290c SHA1 d4dd16d60b1574ad90e9127499b88bca1ea76723 SHA256 55f0286b5e29574a1520e1faa8aba856d512bd91a79c5bb7234b302e4c80f1e0 MISC metadata.xml 322 RMD160 f4bfe5b65994822f6e2c353556232c8eac25c50c SHA1 5e06f5726217482155d7eadde86107b1def891fe SHA256 8bbf84c0f56f602764f6041d84a1376dce6300548b116abde0dbd9d241218977 diff --git a/games-fps/uhexen2-cvs/uhexen2-cvs-20070722.ebuild b/games-fps/uhexen2-cvs/uhexen2-cvs-20070722.ebuild deleted file mode 100644 index d90820ecc..000000000 --- a/games-fps/uhexen2-cvs/uhexen2-cvs-20070722.ebuild +++ /dev/null @@ -1,456 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -inherit eutils flag-o-matic toolchain-funcs versionator games - -DATA_PV="1.19-rc1" -HW_PV="0.15" -MY_PN="hexen2" -DEMO_PV="1.4.1" - -DESCRIPTION="Hexen 2 port - Hammer of Thyrion (CVS snapshot)" -HOMEPAGE="http://uhexen2.sourceforge.net/" -SRC_URI="http://uhexen2.sourceforge.net/devel/cvs_latest/${P}.tgz - mirror://sourceforge/${PN}/gamedata-all-${DATA_PV}.tgz - hexenworld? ( mirror://sourceforge/${PN}/hexenworld-pakfiles-${HW_PV}.tgz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="3dfx alsa asm cdaudio debug dedicated demo dynamic hexenworld gtk lights -midi opengl optimize-cflags oss sdlaudio sdlcd tools" - -QA_EXECSTACK="${GAMES_BINDIR:1}/hexen2 - ${GAMES_BINDIR:1}/glhexen2 - ${GAMES_BINDIR:1}/hexen2-demo - ${GAMES_BINDIR:1}/glhexen2-demo - ${GAMES_BINDIR:1}/hwcl - ${GAMES_BINDIR:1}/glhwcl - ${GAMES_BINDIR:1}/hwcl-demo - ${GAMES_BINDIR:1}/glhwcl-demo" - -UIDEPEND=">=media-libs/libsdl-1.2.7 - >=media-libs/sdl-mixer-1.2.5 - 3dfx? ( media-libs/glide-v3 ) - alsa? ( >=media-libs/alsa-lib-1.0.7 ) - midi? ( media-sound/timidity++ ) - opengl? ( virtual/opengl )" - -# Launcher depends from GTK+ libs -LNCHDEPEND="gtk? ( =x11-libs/gtk+-2* )" - -# xdelta is needed to manually run the patch script -RDEPEND="!games-fps/uhexen2 - ${UIDEPEND} - ${LNCHDEPEND} - demo? ( >=games-fps/hexen2-demodata-${DEMO_PV} ) - lights? ( games-fps/hexen2-lights ) - >=dev-util/xdelta-1.1.3-r1" -DEPEND="${UIDEPEND} - ${LNCHDEPEND} - x86? ( >=dev-lang/nasm-0.98.38 )" - -S="${WORKDIR}/uhexen2-cvs-${PV}" -dir="${GAMES_DATADIR}/${MY_PN}" - -pkg_setup() { - games_pkg_setup - - if use midi ; then - if ! built_with_use "media-libs/sdl-mixer" timidity ; then - eerror "Recompile media-libs/sdl-mixer with 'timidity' USE flag." - die "sdl-mixer without timidity support detected" - fi - use sdlaudio && ewarn "MIDI music does not work with sdlaudio." - else - ewarn "MIDI support disabled! MIDI music won't be played at all." - ewarn "If you want to hear it, recompile this package" - ewarn "with \"midi\" USE flag enabled." - fi - - use alsa || ewarn "alsa is the recommended sound driver." -} - -src_unpack() { - unpack ${A} - cd "${S}" - - cd hexen2 - epatch "${S}/00_Patches/external-music-file-support.diff" - cd .. - - # Whether to use the demo directory - local demo - use demo && demo="/demo" - - # Use default basedir - has 2 variations - sed -i \ - -e "s:parms.basedir = cwd;:parms.basedir = \"${dir}${demo}\";:" \ - -e "s:parms.basedir = \".\";:parms.basedir = \"${dir}${demo}\";:" \ - {hexen2,hexen2/server,hexenworld/{Client,Server}}/sys_unix.c \ - || die "sed sys_unix.c failed" - - # Change default sndspeed from 11025 to 44100, - # to improve the quality/reliability. - sed -i \ - -e "s:desired_speed = 11025:desired_speed = 44100:" \ - {hexen2,hexenworld/Client}/snd_dma.c || die "sed snd_dma.c failed" - - # Change patch script to be suitable - sed -i \ - -e "s:chmod :#chmod :" \ - -e 's:"xdelta113":"/usr/bin/xdelta":' \ - -e "s:./xdelta113:xdelta": \ - "${WORKDIR}"/update_xdelta.sh || die "sed update_xdelta.sh failed" - - if use demo ; then - # Allow lightmaps in demo - sed -i \ - -e "s:!override_pack:0:" \ - hexen2/common.c || die "sed common.c demo failed" - fi - - if use gtk ; then - # Tweak the default games data dir for graphical launcher - sed -i \ - -e "/int basedir_nonstd/s:= 0:= 1:" \ - -e "/game_basedir\[0\]/d" \ - launcher/config_file.c || die "sed config_file.c failed" - # Tweak the default name for binary executables,if DEMO version is enabled - if use demo ; then - sed -i \ - -e "/BINARY_NAME/s:\"$:-demo\":" \ - launcher/games.h || die "sed games.h failed" - fi - fi - - rm -rf docs/{activision,COMPILE,COPYING,LICENSE,README.win32} -} - -src_compile() { - - local h2bin="h2" hwbin="hw" link_gl_libs="no" opts - local \ - h2bin="h2" hwbin="hw" \ - USE_ALSA="no" \ - USE_CDAUDIO="no" \ - LINK_GL_LIBS="no" \ - USE_MIDI="no" \ - OPT_EXTRA="no" \ - USE_OSS="no" \ - USE_SDLCD="no" \ - X86_ASM="no" \ - USE_3DFX="no" \ - opts - - if use opengl ; then - h2bin="${h2bin} gl${h2bin}" - hwbin="${hwbin} gl${hwbin}" - use dynamic && LINK_GL_LIBS="yes" - fi - - use debug && opts="${opts} DEBUG=1" - use demo && opts="${opts} DEMO=1" - - use alsa && USE_ALSA="yes" - use cdaudio && USE_CDAUDIO="yes" - use optimize-cflags && OPT_EXTRA="yes" - use oss && USE_OSS="yes" - use sdlcd && USE_SDLCD="yes" - use midi && USE_MIDI="yes" - use asm && X86_ASM="yes" - use 3dfx && USE_3DFX="yes" - - if use gtk ; then - # Build launcher - cd "${S}/launcher" - einfo "Compiling graphical launcher" - emake \ - AUTOTOOLS=1 \ - ${opts} \ - CPUFLAGS="${CFLAGS}" \ - CC="$(tc-getCC)" \ - || die "emake launcher failed" - fi - - if use tools ; then - # Build Hexen2 utils - cd "${S}/utils" - einfo "Compiling utils" - local utils_list="hcc maputils genmodel qfiles dcc jsh2color hcc_old texutils/bsp2wal texutils/lmp2pcx" - for x in ${utils_list} - do - emake -C ${x} \ - ${opts} \ - CPUFLAGS="${CFLAGS}" \ - CC="$(tc-getCC)" \ - || die "emake ${x} failed" - done - fi - - if use dedicated ; then - # Dedicated Server - cd "${S}/${MY_PN}" - einfo "Compiling Dedicated Server" - emake \ - ${opts} \ - OPT_EXTRA=${OPT_EXTRA} \ - CPUFLAGS="${CFLAGS}" \ - CC="$(tc-getCC)" \ - -f Makefile.sv \ - || die "emake Dedicated server failed" - fi - - if use hexenworld ; then - if use tools; then - # Hexenworld utils - local hw_utils="hwmquery hwrcon" - einfo "Compiling Hexenworld utils" - cd "${S}/hw_utils" - for x in ${hw_utils} ; do - emake \ - ${opts} \ - CPUFLAGS="${CFLAGS}" \ - CC="$(tc-getCC)" \ - -C ${x} \ - || die "emake ${x} failed" - done - fi - - # Hexenworld - einfo "Compiling Hexenworld servers" - cd "${S}"/hexenworld - # Hexenworld servers - emake \ - ${opts} \ - CPUFLAGS="${CFLAGS}" \ - CC="$(tc-getCC)" \ - -C Server \ - || die "emake HexenWorld Server failed" - emake \ - ${opts} \ - CPUFLAGS="${CFLAGS}" \ - CC="$(tc-getCC)" \ - -C Master \ - || die "emake HexenWorld Master failed" - - # Hexenworld client - einfo "Compiling Hexenworld client(s)" - for m in ${hwbin} ; do - emake -C Client clean - emake \ - ${opts} \ - USE_ALSA=${USE_ALSA} \ - USE_OSS=${USE_OSS} \ - USE_CDAUDIO=${USE_CDAUDIO} \ - USE_MIDI=${USE_MIDI} \ - USE_SDLAUDIO=${USE_SDLAUDIO} \ - USE_SDLCD=${USE_SDLCD} \ - USE_X86_ASM=${X86_ASM} \ - OPT_EXTRA=${OPT_EXTRA} \ - LINK_GL_LIBS=${LINK_GL_LIBS} \ - USE_3DFXGAMMA="${USE_3DFX}" \ - CPUFLAGS="${CFLAGS}" \ - CC="$(tc-getCC)" \ - ${m} \ - -C Client \ - || die "emake Hexenworld Client (${m}) failed" - done - fi - - # Hexen 2 game executable - cd "${S}/${MY_PN}" - - einfo "Compiling UHexen2 game executable(s)" - for m in ${h2bin} ; do - emake clean - emake \ - ${opts} \ - USE_ALSA=${USE_ALSA} \ - USE_OSS=${USE_OSS} \ - USE_CDAUDIO=${USE_CDAUDIO} \ - USE_MIDI=${USE_MIDI} \ - USE_SDLAUDIO=${USE_SDLAUDIO} \ - USE_SDLCD=${USE_SDLCD} \ - USE_X86_ASM=${X86_ASM} \ - OPT_EXTRA=${OPT_EXTRA} \ - LINK_GL_LIBS=${LINK_GL_LIBS} \ - USE_3DFXGAMMA=${USE_3DFX} \ - CPUFLAGS="${CFLAGS}" \ - CC="$(tc-getCC)" \ - ${m} \ - || die "emake Hexen2 (${m}) failed" - done - -} - -src_install() { - local demo demo_title demo_suffix - use demo && demo="-demo" && demo_title=" (Demo)" && demo_suffix="demo" - - newicon hexen2/icons/h2_32x32x4.png ${PN}.png || die - - make_desktop_entry "${MY_PN}${demo}" "Hexen 2${demo_title}" ${PN}.png - newgamesbin "${MY_PN}/${MY_PN}" "${MY_PN}${demo}" \ - || die "newgamesbin ${MY_PN} failed" - - if use opengl ; then - make_desktop_entry "gl${MY_PN}${demo}" "GLHexen 2${demo_title}" ${PN}.png - newgamesbin "${MY_PN}/gl${MY_PN}" "gl${MY_PN}${demo}" \ - || die "newgamesbin gl${MY_PN} failed" - fi - - if use dedicated ; then - newgamesbin "${MY_PN}"/h2ded "${MY_PN}${demo}-ded" \ - || die "newgamesbin h2ded failed" - fi - - if use hexenworld ; then - if use tools; then - # Hexenworld utils - dobin hw_utils/hwmquery/hwmquery || die "dobin hwmquery failed" - dobin hw_utils/hwrcon/{hwrcon,hwterm} || die "dobin hwrcon/hwterm failed" - - dodoc hw_utils/hwmquery/hwmquery.txt || die "dodoc hwmquery.txt failed" - dodoc hw_utils/hwrcon/{hwrcon,hwterm}.txt \ - || die "dodoc hwrcon/hwterm.txt failed" - fi - - # Hexenworld Servers - newgamesbin hexenworld/Server/hwsv hwsv${demo} \ - || die "newgamesbin hwsv failed" - - newgamesbin hexenworld/Master/hwmaster hwmaster${demo} \ - || die "newgamesbin hwmaster failed" - - # HexenWorld client(s) - newicon hexenworld/icons/hw2_32x32x8.png hwcl.png || die - - make_desktop_entry \ - "hwcl${demo}" "Hexen 2${demo_title} Hexenworld Client" hwcl.png - newgamesbin "hexenworld/Client/hwcl" "hwcl${demo}" \ - || die "newgamesbin hwcl failed" - - if use opengl ; then - make_desktop_entry \ - "glhwcl${demo}" "GLHexen 2${demo_title} Hexenworld Client" hwcl.png - newgamesbin "hexenworld/Client/glhwcl" "glhwcl${demo}" \ - || die "newgamesbin glhwcl failed" - fi - - insinto "${dir}"/${demo_suffix} - doins -r "${WORKDIR}"/hw || die "doins hexenworld pak failed" - fi - - if use gtk ; then - # GTK launcher - local lnch_name="h2launcher" - use demo && lnch_name="h2demo" - newgamesbin launcher/${lnch_name} h2launcher \ - || die "newgamesbin h2launcher failed" - make_desktop_entry \ - "h2launcher" "Hexen 2${demo_title} Launcher" ${PN}.png - fi - - # Forge a new useful document 8) - head -22 "00_Patches/external-music-file-support.diff" > \ - "docs/external_music.README" || die "make readme failed" - - dodoc docs/* - - if ! use demo ; then - # Install updated game data - insinto "${dir}" - doins -r "${WORKDIR}"/{data1,patchdata,portals,siege} || die - # Patching should really be done by a future "hexen2-data" ebuild. - # But this works for now. - doins "${WORKDIR}"/update_xdelta.sh || die - dodoc "${WORKDIR}"/*.txt - fi - - if use tools ; then - dobin \ - utils/bin/{bsp2wal,bspinfo,dhcc,genmodel,hcc} \ - || die "dobin utils part 1 failed" - dobin \ - utils/bin/{jsh2colour,light,lmp2pcx,qbsp,qfiles,vis} \ - || die "dobin utils part 2 failed" - newbin utils/hcc_old/hcc hcc_old || die "newbin hcc_old failed" - docinto utils - dodoc utils/README || die "dodoc README failed" - newdoc utils/dcc/README README.dcc || die "newdoc dcc failed" - dodoc utils/dcc/dcc.txt || die "dodoc dcc.txt failed" - newdoc utils/hcc/README README.hcc || die "newdoc hcc failed" - newdoc utils/hcc_old/README hcc_old.txt || die "newdoc hcc_old failed" - newdoc utils/jsh2color/README README.jsh2color \ - || die "newdoc README.jsh2color failed" - newdoc utils/jsh2color/ChangeLog ChangeLog.jsh2color \ - || die "newdoc Changelog.jsh2color failed" - fi - - prepgamesdirs -} - -pkg_postinst() { - games_pkg_postinst - - if use demo ; then - elog "uhexen2 has been compiled specifically to play the demo maps." - elog "Example command-line:" - elog " hexen2-demo -width 1024 -height 768 -conwidth 640" - echo - else - elog "To play the demo, emerge with the 'demo' USE flag." - elog - elog "For the Hexen 2 original game..." - elog "Put the following files into ${dir}/data1 before playing:" - elog " pak0.pak pak1.pak" - elog "Then to play: hexen2" - elog - elog "For the 'Portal of Praevus' mission pack..." - elog "Put the following file into ${dir}/portals before playing:" - elog " pak3.pak" - elog "Then to play: hexen2 -portals" - elog - elog "To ensure the data files from the CD are patched, run as root:" - elog " cd ${dir} && sh update_xdelta.sh" - elog - elog "Example command-line:" - elog " hexen2 -width 1024 -height 768 -conwidth 640" - echo - fi - if use gtk ; then - elog "You've also installed a nice graphical launcher. Simply run:" - elog - elog " h2launcher" - elog - elog "to enjoy it :)" - echo - fi - if use tools ; then - if use hexenworld; then - elog "You've also installed some Hexenworld utility:" - elog - elog " - hwmquery (console app to query HW master servers)" - elog " - hwrcon (remote interface to HW rcon command)" - elog " - hwterm (HW remote console terminal)" - echo - fi - elog "You've also installed some Hexen2 utility" - elog "(useful for mod developing)" - elog - elog " - dhcc (old progs.dat compiler/decompiler)" - elog " - genmodel (3-D model grabber)" - elog " - hcc (HexenC compiler)" - elog " - hcc_old (old version of HexenC compiler)" - elog " - jsh2color (light colouring utility)" - elog " - maputils (Map compiling tools: bspinfo, light, qbsp, vis)" - elog " - qfiles (build pak files and regenerate bsp models)" - elog " - bsp2wal (extract all textures from a bsp file)" - elog " - lmp2pcx (convert hexen2 texture data into pcx and tga)" - elog - elog "See relevant documentation for further informations" - echo - fi -} diff --git a/games-fps/uhexen2-cvs/uhexen2-cvs-20070725.ebuild b/games-fps/uhexen2-cvs/uhexen2-cvs-20070725.ebuild new file mode 100644 index 000000000..7ba88c5f9 --- /dev/null +++ b/games-fps/uhexen2-cvs/uhexen2-cvs-20070725.ebuild @@ -0,0 +1,464 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils flag-o-matic toolchain-funcs versionator games + +DATA_PV="1.19-rc2" +HW_PV="0.15" +MY_PN="hexen2" +DEMO_PV="1.4.1" + +DESCRIPTION="Hexen 2 port - Hammer of Thyrion (CVS snapshot)" +HOMEPAGE="http://uhexen2.sourceforge.net/" +SRC_URI="http://uhexen2.sourceforge.net/devel/cvs_latest/${P}.tgz + mirror://sourceforge/${PN}/gamedata-all-${DATA_PV}.tgz + hexenworld? ( mirror://sourceforge/${PN}/hexenworld-pakfiles-${HW_PV}.tgz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="3dfx alsa asm cdaudio debug dedicated demo dynamic hexenworld gtk lights +midi opengl optimize-cflags oss sdlaudio sdlcd tools" + +QA_EXECSTACK="${GAMES_BINDIR:1}/hexen2 + ${GAMES_BINDIR:1}/glhexen2 + ${GAMES_BINDIR:1}/hexen2-demo + ${GAMES_BINDIR:1}/glhexen2-demo + ${GAMES_BINDIR:1}/hwcl + ${GAMES_BINDIR:1}/glhwcl + ${GAMES_BINDIR:1}/hwcl-demo + ${GAMES_BINDIR:1}/glhwcl-demo" + +UIDEPEND=">=media-libs/libsdl-1.2.7 + >=media-libs/sdl-mixer-1.2.5 + 3dfx? ( media-libs/glide-v3 ) + alsa? ( >=media-libs/alsa-lib-1.0.7 ) + midi? ( media-sound/timidity++ ) + opengl? ( virtual/opengl )" + +# Launcher depends from GTK+ libs +LNCHDEPEND="gtk? ( =x11-libs/gtk+-2* )" + +# xdelta is needed to manually run the patch script +RDEPEND="!games-fps/uhexen2 + ${UIDEPEND} + ${LNCHDEPEND} + demo? ( >=games-fps/hexen2-demodata-${DEMO_PV} ) + lights? ( games-fps/hexen2-lights ) + >=dev-util/xdelta-1.1.3-r1" +DEPEND="${UIDEPEND} + ${LNCHDEPEND} + asm? ( >=dev-lang/nasm-0.98.38 )" + +S="${WORKDIR}/uhexen2-cvs-${PV}" +dir="${GAMES_DATADIR}/${MY_PN}" + +pkg_setup() { + games_pkg_setup + + if use midi ; then + if ! built_with_use "media-libs/sdl-mixer" timidity ; then + eerror "Recompile media-libs/sdl-mixer with 'timidity' USE flag." + die "sdl-mixer without timidity support detected" + fi + use sdlaudio && ewarn "MIDI music does not work with sdlaudio." + else + ewarn "MIDI support disabled! MIDI music won't be played at all." + ewarn "If you want to hear it, recompile this package" + ewarn "with \"midi\" USE flag enabled." + fi + + use alsa || ewarn "alsa is the recommended sound driver." +} + +src_unpack() { + unpack ${A} + cd "${S}" + + cd hexen2 + epatch "${S}/00_Patches/external-music-file-support.diff" + cd .. + + # Whether to use the demo directory + local demo + use demo && demo="/demo" + + # Use default basedir - has 2 variations + sed -i \ + -e "s:parms.basedir = cwd;:parms.basedir = \"${dir}${demo}\";:" \ + -e "s:parms.basedir = \".\";:parms.basedir = \"${dir}${demo}\";:" \ + {hexen2,hexen2/server,hexenworld/{Client,Server}}/sys_unix.c \ + || die "sed sys_unix.c failed" + + # Change default sndspeed from 11025 to 44100, + # to improve the quality/reliability. + sed -i \ + -e "s:desired_speed = 11025:desired_speed = 44100:" \ + {hexen2,hexenworld/Client}/snd_dma.c || die "sed snd_dma.c failed" + + # Change patch script to be suitable + sed -i \ + -e "s:chmod :#chmod :" \ + -e 's:"xdelta113":"/usr/bin/xdelta":' \ + -e "s:./xdelta113:xdelta": \ + "${WORKDIR}"/update_xdelta.sh || die "sed update_xdelta.sh failed" + + # Honour Portage CFLAGS also when debuggins is enabled + use debug && append-flags "-g2" + for u in `grep -lr '\-g \-Wall' *`; do + sed -i \ + -e "s/^CFLAGS \:\= \-g \-Wall/CFLAGS \:\= ${CFLAGS}/" \ + ${u} || die "sed ${u} failed" + done + + if use demo ; then + # Allow lightmaps in demo + sed -i \ + -e "s:!override_pack:0:" \ + hexen2/common.c || die "sed common.c demo failed" + fi + + if use gtk ; then + # Tweak the default games data dir for graphical launcher + sed -i \ + -e "/int basedir_nonstd/s:= 0:= 1:" \ + -e "/game_basedir\[0\]/d" \ + launcher/config_file.c || die "sed config_file.c failed" + # Tweak the default name for binary executables,if DEMO version is enabled + if use demo ; then + sed -i \ + -e "/BINARY_NAME/s:\"$:-demo\":" \ + launcher/games.h || die "sed games.h failed" + fi + fi + + rm -rf docs/{COMPILE,COPYING,README.win32} +} + +src_compile() { + + local h2bin="h2" hwbin="hw" link_gl_libs="no" opts + local \ + h2bin="h2" hwbin="hw" \ + USE_ALSA="no" \ + USE_CDAUDIO="no" \ + LINK_GL_LIBS="no" \ + USE_MIDI="no" \ + OPT_EXTRA="no" \ + USE_OSS="no" \ + USE_SDLCD="no" \ + X86_ASM="no" \ + USE_3DFX="no" \ + opts + + if use opengl ; then + h2bin="${h2bin} gl${h2bin}" + hwbin="${hwbin} gl${hwbin}" + use dynamic && LINK_GL_LIBS="yes" + fi + + use debug && opts="${opts} DEBUG=1" + use demo && opts="${opts} DEMO=1" + + use alsa && USE_ALSA="yes" + use cdaudio && USE_CDAUDIO="yes" + use optimize-cflags && OPT_EXTRA="yes" + use oss && USE_OSS="yes" + use sdlcd && USE_SDLCD="yes" + use midi && USE_MIDI="yes" + use asm && X86_ASM="yes" + use 3dfx && USE_3DFX="yes" + + if use gtk ; then + # Build launcher + cd "${S}/launcher" + einfo "Building graphical launcher" + emake \ + AUTOTOOLS=1 \ + ${opts} \ + CPUFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + || die "emake launcher failed" + fi + + if use tools ; then + # Build Hexen2 utils + cd "${S}/utils" + einfo "Building utils" + local utils_list="hcc maputils genmodel qfiles dcc jsh2color hcc_old texutils/bsp2wal texutils/lmp2pcx" + for x in ${utils_list} + do + emake -C ${x} \ + ${opts} \ + CPUFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + || die "emake ${x} failed" + done + fi + + if use dedicated ; then + # Dedicated Server + cd "${S}/${MY_PN}" + einfo "Building Dedicated Server" + emake \ + ${opts} \ + OPT_EXTRA=${OPT_EXTRA} \ + CPUFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + -f Makefile.sv \ + || die "emake Dedicated server failed" + fi + + if use hexenworld ; then + if use tools; then + # Hexenworld utils + local hw_utils="hwmquery hwrcon" + einfo "Building Hexenworld utils" + cd "${S}/hw_utils" + for x in ${hw_utils} ; do + emake \ + ${opts} \ + CPUFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + -C ${x} \ + || die "emake ${x} failed" + done + fi + + # Hexenworld + einfo "Building Hexenworld servers" + cd "${S}"/hexenworld + # Hexenworld servers + emake \ + ${opts} \ + CPUFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + -C Server \ + || die "emake HexenWorld Server failed" + emake \ + ${opts} \ + CPUFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + -C Master \ + || die "emake HexenWorld Master failed" + + # Hexenworld client + einfo "Building Hexenworld client(s)" + for m in ${hwbin} ; do + emake -C Client clean + emake \ + ${opts} \ + USE_ALSA=${USE_ALSA} \ + USE_OSS=${USE_OSS} \ + USE_CDAUDIO=${USE_CDAUDIO} \ + USE_MIDI=${USE_MIDI} \ + USE_SDLAUDIO=${USE_SDLAUDIO} \ + USE_SDLCD=${USE_SDLCD} \ + USE_X86_ASM=${X86_ASM} \ + OPT_EXTRA=${OPT_EXTRA} \ + LINK_GL_LIBS=${LINK_GL_LIBS} \ + USE_3DFXGAMMA="${USE_3DFX}" \ + CPUFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + ${m} \ + -C Client \ + || die "emake Hexenworld Client (${m}) failed" + done + fi + + # Hexen 2 game executable + cd "${S}/${MY_PN}" + + einfo "Building UHexen2 game executable(s)" + for m in ${h2bin} ; do + emake clean + emake \ + ${opts} \ + USE_ALSA=${USE_ALSA} \ + USE_OSS=${USE_OSS} \ + USE_CDAUDIO=${USE_CDAUDIO} \ + USE_MIDI=${USE_MIDI} \ + USE_SDLAUDIO=${USE_SDLAUDIO} \ + USE_SDLCD=${USE_SDLCD} \ + USE_X86_ASM=${X86_ASM} \ + OPT_EXTRA=${OPT_EXTRA} \ + LINK_GL_LIBS=${LINK_GL_LIBS} \ + USE_3DFXGAMMA=${USE_3DFX} \ + CPUFLAGS="${CFLAGS}" \ + CC="$(tc-getCC)" \ + ${m} \ + || die "emake Hexen2 (${m}) failed" + done + +} + +src_install() { + local demo demo_title demo_suffix + use demo && demo="-demo" && demo_title=" (Demo)" && demo_suffix="demo" + + newicon hexen2/icons/h2_32x32x4.png ${PN}.png || die + + make_desktop_entry "${MY_PN}${demo}" "Hexen 2${demo_title}" ${PN}.png + newgamesbin "${MY_PN}/${MY_PN}" "${MY_PN}${demo}" \ + || die "newgamesbin ${MY_PN} failed" + + if use opengl ; then + make_desktop_entry "gl${MY_PN}${demo}" "GLHexen 2${demo_title}" ${PN}.png + newgamesbin "${MY_PN}/gl${MY_PN}" "gl${MY_PN}${demo}" \ + || die "newgamesbin gl${MY_PN} failed" + fi + + if use dedicated ; then + newgamesbin "${MY_PN}"/h2ded "${MY_PN}${demo}-ded" \ + || die "newgamesbin h2ded failed" + fi + + if use hexenworld ; then + if use tools; then + # Hexenworld utils + dobin hw_utils/hwmquery/hwmquery || die "dobin hwmquery failed" + dobin hw_utils/hwrcon/{hwrcon,hwterm} || die "dobin hwrcon/hwterm failed" + + dodoc hw_utils/hwmquery/hwmquery.txt || die "dodoc hwmquery.txt failed" + dodoc hw_utils/hwrcon/{hwrcon,hwterm}.txt \ + || die "dodoc hwrcon/hwterm.txt failed" + fi + + # Hexenworld Servers + newgamesbin hexenworld/Server/hwsv hwsv${demo} \ + || die "newgamesbin hwsv failed" + + newgamesbin hexenworld/Master/hwmaster hwmaster${demo} \ + || die "newgamesbin hwmaster failed" + + # HexenWorld client(s) + newicon hexenworld/icons/hw2_32x32x8.png hwcl.png || die + + make_desktop_entry \ + "hwcl${demo}" "Hexen 2${demo_title} Hexenworld Client" hwcl.png + newgamesbin "hexenworld/Client/hwcl" "hwcl${demo}" \ + || die "newgamesbin hwcl failed" + + if use opengl ; then + make_desktop_entry \ + "glhwcl${demo}" "GLHexen 2${demo_title} Hexenworld Client" hwcl.png + newgamesbin "hexenworld/Client/glhwcl" "glhwcl${demo}" \ + || die "newgamesbin glhwcl failed" + fi + + insinto "${dir}"/${demo_suffix} + doins -r "${WORKDIR}"/hw || die "doins hexenworld pak failed" + fi + + if use gtk ; then + # GTK launcher + local lnch_name="h2launcher" + use demo && lnch_name="h2demo" + newgamesbin launcher/${lnch_name} h2launcher \ + || die "newgamesbin h2launcher failed" + make_desktop_entry \ + "h2launcher" "Hexen 2${demo_title} Launcher" ${PN}.png + fi + + # Forge a new useful document 8) + head -22 "00_Patches/external-music-file-support.diff" > \ + "docs/external_music.README" || die "make readme failed" + + dodoc docs/* + + if ! use demo ; then + # Install updated game data + insinto "${dir}" + doins -r "${WORKDIR}"/{data1,patchdata,portals,siege} || die + # Patching should really be done by a future "hexen2-data" ebuild. + # But this works for now. + doins "${WORKDIR}"/update_xdelta.sh || die + dodoc "${WORKDIR}"/*.txt + fi + + if use tools ; then + dobin \ + utils/bin/{bsp2wal,bspinfo,dhcc,genmodel,hcc} \ + || die "dobin utils part 1 failed" + dobin \ + utils/bin/{jsh2colour,light,lmp2pcx,qbsp,qfiles,vis} \ + || die "dobin utils part 2 failed" + newbin utils/hcc_old/hcc hcc_old || die "newbin hcc_old failed" + docinto utils + dodoc utils/README || die "dodoc README failed" + newdoc utils/dcc/README README.dcc || die "newdoc dcc failed" + dodoc utils/dcc/dcc.txt || die "dodoc dcc.txt failed" + newdoc utils/hcc/README README.hcc || die "newdoc hcc failed" + newdoc utils/hcc_old/README hcc_old.txt || die "newdoc hcc_old failed" + newdoc utils/jsh2color/README README.jsh2color \ + || die "newdoc README.jsh2color failed" + newdoc utils/jsh2color/ChangeLog ChangeLog.jsh2color \ + || die "newdoc Changelog.jsh2color failed" + fi + + prepgamesdirs +} + +pkg_postinst() { + games_pkg_postinst + + if use demo ; then + elog "uhexen2 has been compiled specifically to play the demo maps." + elog "Example command-line:" + elog " hexen2-demo -width 1024 -height 768 -conwidth 640" + echo + else + elog "To play the demo, emerge with the 'demo' USE flag." + elog + elog "For the Hexen 2 original game..." + elog "Put the following files into ${dir}/data1 before playing:" + elog " pak0.pak pak1.pak" + elog "Then to play: hexen2" + elog + elog "For the 'Portal of Praevus' mission pack..." + elog "Put the following file into ${dir}/portals before playing:" + elog " pak3.pak" + elog "Then to play: hexen2 -portals" + elog + elog "To ensure the data files from the CD are patched, run as root:" + elog " cd ${dir} && sh update_xdelta.sh" + elog + elog "Example command-line:" + elog " hexen2 -width 1024 -height 768 -conwidth 640" + echo + fi + if use gtk ; then + elog "You've also installed a nice graphical launcher. Simply run:" + elog + elog " h2launcher" + elog + elog "to enjoy it :)" + echo + fi + if use tools ; then + if use hexenworld; then + elog "You've also installed some Hexenworld utility:" + elog + elog " - hwmquery (console app to query HW master servers)" + elog " - hwrcon (remote interface to HW rcon command)" + elog " - hwterm (HW remote console terminal)" + echo + fi + elog "You've also installed some Hexen2 utility" + elog "(useful for mod developing)" + elog + elog " - dhcc (old progs.dat compiler/decompiler)" + elog " - genmodel (3-D model grabber)" + elog " - hcc (HexenC compiler)" + elog " - hcc_old (old version of HexenC compiler)" + elog " - jsh2color (light colouring utility)" + elog " - maputils (Map compiling tools: bspinfo, light, qbsp, vis)" + elog " - qfiles (build pak files and regenerate bsp models)" + elog " - bsp2wal (extract all textures from a bsp file)" + elog " - lmp2pcx (convert hexen2 texture data into pcx and tga)" + elog + elog "See relevant documentation for further informations" + echo + fi +} -- cgit v1.2.3-65-gdbad