diff options
author | Matt Turner <mattst88@gentoo.org> | 2011-05-06 22:21:19 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2011-05-06 22:21:19 +0000 |
commit | ad58dd09bd4a0d187554f542a7f887ee614e8290 (patch) | |
tree | 686c9bbf6792ad8edafb3c7fe1fa954c44ee27c6 /games-fps | |
parent | Version bump. (diff) | |
download | historical-ad58dd09bd4a0d187554f542a7f887ee614e8290.tar.gz historical-ad58dd09bd4a0d187554f542a7f887ee614e8290.tar.bz2 historical-ad58dd09bd4a0d187554f542a7f887ee614e8290.zip |
rewritten ebuild, fixes bugs 222005 and 250080
Package-Manager: portage-2.1.9.41/cvs/Linux x86_64
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/quake3/ChangeLog | 9 | ||||
-rw-r--r-- | games-fps/quake3/Manifest | 8 | ||||
-rw-r--r-- | games-fps/quake3/metadata.xml | 2 | ||||
-rw-r--r-- | games-fps/quake3/quake3-1.36.ebuild | 157 | ||||
-rw-r--r-- | games-fps/quake3/quake3-9999.ebuild | 157 |
5 files changed, 214 insertions, 119 deletions
diff --git a/games-fps/quake3/ChangeLog b/games-fps/quake3/ChangeLog index 5af7054c38c4..57db162c9138 100644 --- a/games-fps/quake3/ChangeLog +++ b/games-fps/quake3/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for games-fps/quake3 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-fps/quake3/ChangeLog,v 1.56 2011/01/31 00:30:47 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-fps/quake3/ChangeLog,v 1.57 2011/05/06 22:21:19 mattst88 Exp $ + + 06 May 2011; Matt Turner <mattst88@gentoo.org> quake3-1.36.ebuild, + quake3-9999.ebuild, metadata.xml: + Rewritten ebuild from Andrey Vihrov. Adds curl, mumble, opengl, openal, + voice, and vorbis USE flags (Bug 222005). Removes bundled openal, curl, + speex, sdl, zlib, and jpeg in favor of using system libraries and headers + (Bug 250080). Huge thanks to Andrey Vihrov! 31 Jan 2011; Michael Sterrett <mr_bones_@gentoo.org> quake3-1.36.ebuild, +files/quake3-1.36-bots.patch: diff --git a/games-fps/quake3/Manifest b/games-fps/quake3/Manifest index 55e81c070a3a..82d73b529753 100644 --- a/games-fps/quake3/Manifest +++ b/games-fps/quake3/Manifest @@ -3,7 +3,7 @@ AUX quake3-1.36-bots.patch 499 RMD160 71e280d72a5161fa5c72eeac6f38cb1c2b397579 S DIST ioquake3-1.36.tar.bz2 3503058 RMD160 af9f65bbde2fe5531fa371ec6d2023126a523293 SHA1 0f92891e2b174253d02f666fd22e147c886089b4 SHA256 79b10b92e9e586748a67089ac871646fe8144004d3ab4a55158348bc38d74821 DIST ioquake3_1.34-rc3.tar.bz2 3147694 RMD160 b270cd43a4f9f2700715cbd1487a8d0efab0296b SHA1 327d95a128aacc3bdd4e9497896651005cce8f92 SHA256 fb43f63178c6700f20b83634b816f77e390e375e7d9c717180c9820f0c541b01 EBUILD quake3-1.34_rc3.ebuild 3039 RMD160 faf6f996abea6c308da7276530d9291ed1ee3706 SHA1 461b5b4e803595335e977b7bb93bbd51e75097e8 SHA256 c44f2d7119b022bb24151597f28733a6204fded6e6d52afbca435a6392a2cfc7 -EBUILD quake3-1.36.ebuild 2573 RMD160 723a08e8cd5d59c409b62c7f637636a31f209d12 SHA1 9a9b4fbc991a72e4d67720074124ca8ae114f409 SHA256 1eac955b505c5262e5cfb5b6c502c355ca9451f1549631f87369445d8b30df95 -EBUILD quake3-9999.ebuild 2499 RMD160 88fd2db43539612e708b3a16d3e356d5a9c1807d SHA1 f75e52f6daa75a402f011cf073f87896ac9fcd77 SHA256 826fe466d0970e76d849f8bbc4b2cad9224674e09ba48f035b3efe1d420902aa -MISC ChangeLog 5357 RMD160 328b271f61b8960d5eebb42fcbab94240739412f SHA1 5e5cb6d4082f60b909756a1a42f92c3396dfe0db SHA256 afd9e56f26d50ba39d5f94513dbff16ca27281b743816ee138a7734efc22c52c -MISC metadata.xml 1052 RMD160 47127dc28337531fc3907c9d95f9d7d35d8e2d15 SHA1 08386bbbd1d751866a0201708cabfc8cbdfee975 SHA256 9552624bd6c0d0ac113dc2d283a41c556bd86948c5a14c98fb06e85948feb2aa +EBUILD quake3-1.36.ebuild 3902 RMD160 fccd289ddc717c2bc98c282485b450545790e2b7 SHA1 8f85a9519eebd956aa4e2c9046cf0fa4a4f3b502 SHA256 4cb1a3b9fb4df7d16f892af16ec4864bbfa1f42f4697c4bb16c75d41347af198 +EBUILD quake3-9999.ebuild 3716 RMD160 da06a6f933e106197bd9397e684dfaeaf93b079a SHA1 cc2025d259eda8f21ce4a87610716aaa43c207d3 SHA256 5f7fc344394f90cbcdfff7ab73251b177bd77964d0fa4ebf49f577d44b949e29 +MISC ChangeLog 5732 RMD160 02f3ef78355d5931d59824eba14ad36c05f9a581 SHA1 9b4693e7b80477e1edbfad8f2b27d2964666193f SHA256 e8f8f3a46b404aacc8c78725f72fc8b54fd8a04fed6195fc3a67b4c573f9ee24 +MISC metadata.xml 1187 RMD160 4624491873d1b4d5d5c0fcd50dd33ae0a9a9576d SHA1 9e67b7f738340ae9610810394ae5862ff2e20d8a SHA256 ded4783173bf567334634819e91ee0462c904872f723eb42674d7de9b5d514ca diff --git a/games-fps/quake3/metadata.xml b/games-fps/quake3/metadata.xml index 1532777984a0..360c025739d2 100644 --- a/games-fps/quake3/metadata.xml +++ b/games-fps/quake3/metadata.xml @@ -16,6 +16,8 @@ interested in checking out the technology behind Quake III, then "emerge quake3-demo" to get the playable demo. </longdescription> <use> + <flag name="mumble">Adds player-location (positional audio) support to VoIP</flag> <flag name="teamarena">Adds support for Team Arena expansion pack</flag> + <flag name="voice">Adds VoIP support</flag> </use> </pkgmetadata> diff --git a/games-fps/quake3/quake3-1.36.ebuild b/games-fps/quake3/quake3-1.36.ebuild index 5f6be5b7f168..6906af3be103 100644 --- a/games-fps/quake3/quake3-1.36.ebuild +++ b/games-fps/quake3/quake3-1.36.ebuild @@ -1,102 +1,145 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-fps/quake3/quake3-1.36.ebuild,v 1.3 2011/01/31 00:30:47 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-fps/quake3/quake3-1.36.ebuild,v 1.4 2011/05/06 22:21:19 mattst88 Exp $ # quake3-9999 -> latest svn # quake3-9999.REV -> use svn REV # quake3-VER_alphaREV -> svn snapshot REV for version VER # quake3-VER -> normal quake release -EAPI=2 -if [[ ${PV} == 9999* ]] ; then - [[ ${PV} == 9999.* ]] && ESVN_UPDATE_CMD="svn up -r ${PV/9999./}" - ESVN_REPO_URI="svn://svn.icculus.org/quake3/trunk" - inherit subversion flag-o-matic toolchain-funcs eutils games +EAPI="2" - SRC_URI="" - KEYWORDS="" - S=${WORKDIR}/trunk -else - inherit flag-o-matic toolchain-funcs eutils games - SRC_URI="http://ioquake3.org/files/${PV}/ioquake3-${PV}.tar.bz2" - KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" - S=${WORKDIR}/io${P} -fi +inherit eutils flag-o-matic games toolchain-funcs +[[ "${PV}" == 9999* ]] && inherit subversion + +MY_PN="ioquake3" +MY_PV="${PV}" +MY_P="${MY_PN}-${MY_PV}" DESCRIPTION="Quake III Arena - 3rd installment of the classic id 3D first-person shooter" HOMEPAGE="http://ioquake3.org/" +[[ "${PV}" != 9999* ]] && SRC_URI="http://ioquake3.org/files/${MY_PV}/${MY_P}.tar.bz2" +ESVN_REPO_URI="svn://svn.icculus.org/quake3/trunk" LICENSE="GPL-2" SLOT="0" -IUSE="dedicated teamarena" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" +# "smp" is omitted, because currently it does not work. +IUSE="dedicated opengl teamarena +openal curl vorbis voice mumble" -DEPEND="!dedicated? ( - virtual/opengl - media-libs/openal - media-libs/libsdl[joystick,opengl] - )" +UIDEPEND="virtual/opengl + media-libs/libsdl[audio,video,joystick,X,opengl] + openal? ( media-libs/openal ) + vorbis? ( + media-libs/libogg + media-libs/libvorbis + ) + voice? ( media-libs/speex ) + curl? ( net-misc/curl )" +DEPEND="opengl? ( ${UIDEPEND} ) + !dedicated? ( ${UIDEPEND} )" +UIRDEPEND="voice? ( mumble? ( media-sound/mumble ) )" RDEPEND="${DEPEND} + opengl? ( ${UIRDEPEND} ) + !dedicated? ( ${UIRDEPEND} ) games-fps/quake3-data teamarena? ( games-fps/quake3-teamarena )" -src_unpack() { - if [[ ${PV} == 9999* ]] ; then - subversion_src_unpack - else - unpack ${A} - fi +if [[ "${PV}" == 9999* ]] ; then + S="${WORKDIR}/trunk" +else + S="${WORKDIR}/${MY_P}" +fi + +my_arch() { + case "${ARCH}" in + x86) echo "i386" ;; + amd64) echo "x86_64" ;; + *) tc-arch-kernel ;; + esac +} + +my_platform() { + case "${ARCH}" in + alpha|amd64|ppc|x86) echo "linux" ;; + x86-fbsd) echo "freebsd" ;; + esac } src_prepare() { - sed -i -e '/INSTALL/s: -s : :' Makefile || die - if [[ ${PV} != 9999* ]] ; then + if [[ "${PV}" == 9999* ]] ; then + # Workaround for the version string + ln -s "${ESVN_WC_PATH}/.svn" .svn || die "ln ${ESVN_WC_PATH}/.svn" + else epatch "${FILESDIR}"/${P}-bots.patch fi + + einfo "Fixing libspeex linking..." + sed -i -e 's/\(-lspeex\)/\1 -lspeexdsp/' Makefile || die "sed failed" } src_compile() { - filter-flags -mfpmath=sse + buildit() { use $1 && echo 1 || echo 0 ; } + + # This is the easiest way to pass CPPFLAGS to the build system, which + # are otherwise ignored. + append-flags ${CPPFLAGS} + + # OPTIMIZE is disabled in favor of CFLAGS. + # + # TODO: BUILD_CLIENT_SMP=$(buildit smp) emake \ - V=1 \ - BUILD_SERVER=1 \ - BUILD_CLIENT=$(( $(buildit !dedicated) )) \ - TEMPDIR="${T}" \ - CC="$(tc-getCC)" \ - ARCH=$(tc-arch-kernel) \ - OPTIMIZE="${CFLAGS}" \ - DEFAULT_BASEDIR="${GAMES_DATADIR}/quake3" \ - DEFAULT_LIBDIR="$(games_get_libdir)/quake3" \ - Q3ASM_CFLAGS="${CFLAGS}" \ - || die + ARCH="$(my_arch)" \ + BUILD_CLIENT=$(( $(buildit opengl) | $(buildit !dedicated) )) \ + BUILD_GAME_QVM=0 \ + BUILD_GAME_SO=0 \ + BUILD_SERVER=$(buildit dedicated) \ + DEFAULT_BASEDIR="${GAMES_DATADIR}/${PN}" \ + GENERATE_DEPENDENCIES=0 \ + OPTIMIZE="" \ + PLATFORM="$(my_platform)" \ + USE_CODEC_VORBIS=$(buildit vorbis) \ + USE_CURL=$(buildit curl) \ + USE_CURL_DLOPEN=0 \ + USE_INTERNAL_SPEEX=0 \ + USE_INTERNAL_ZLIB=0 \ + USE_LOCAL_HEADERS=0 \ + USE_MUMBLE=$(buildit mumble) \ + USE_OPENAL=$(buildit openal) \ + USE_OPENAL_DLOPEN=0 \ + USE_VOIP=$(buildit voice) \ + || die "emake failed" } src_install() { - dodoc id-readme.txt TODO README BUGS ChangeLog + dodoc BUGS ChangeLog id-readme.txt md4-readme.txt NOTTODO README TODO || die + if use voice ; then + dodoc voip-readme.txt || die + fi - if ! use dedicated ; then - doicon misc/quake3.png + if use opengl || ! use dedicated ; then + doicon misc/quake3.svg || die make_desktop_entry quake3 "Quake III Arena" + #use smp && make_desktop_entry quake3-smp "Quake III Arena (SMP)" fi - cd build/release* - local old_x x - for old_x in ioq* ; do - x=${old_x%.*} - newgamesbin ${old_x} ${x} || die "newgamesbin ${x}" - dosym ${x} "${GAMES_BINDIR}"/${x/io} + cd build/release-$(my_platform)-$(my_arch) || die + local exe target + for exe in {ioquake3,ioquake3-smp,ioq3ded}.$(my_arch) ; do + if [[ -x ${exe} ]] ; then + target=${exe%.*} + newgamesbin ${exe} ${target} || die "newgamesbin ${target}" + dosym ${target} "${GAMES_BINDIR}/${target/io}" || die "dosym ${target}" + fi done - exeinto "$(games_get_libdir)"/${PN}/baseq3 - doexe baseq3/*.so || die "baseq3 .so" - exeinto "$(games_get_libdir)"/${PN}/missionpack - doexe missionpack/*.so || die "missionpack .so" prepgamesdirs } pkg_postinst() { games_pkg_postinst - ewarn "The source version of Quake 3 will not work with Punk Buster." - ewarn "If you need pb support, then use the quake3-bin package." - echo + + ewarn "The source version of Quake III Arena will not work with PunkBuster." + ewarn "If you need PB support, then use the games-fps/quake3-bin package." } diff --git a/games-fps/quake3/quake3-9999.ebuild b/games-fps/quake3/quake3-9999.ebuild index d3271ff7ffab..3911284ad4b0 100644 --- a/games-fps/quake3/quake3-9999.ebuild +++ b/games-fps/quake3/quake3-9999.ebuild @@ -1,99 +1,142 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-fps/quake3/quake3-9999.ebuild,v 1.19 2011/02/09 22:24:16 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-fps/quake3/quake3-9999.ebuild,v 1.20 2011/05/06 22:21:19 mattst88 Exp $ # quake3-9999 -> latest svn # quake3-9999.REV -> use svn REV # quake3-VER_alphaREV -> svn snapshot REV for version VER # quake3-VER -> normal quake release -EAPI=2 -if [[ ${PV} == 9999* ]] ; then - [[ ${PV} == 9999.* ]] && ESVN_UPDATE_CMD="svn up -r ${PV/9999./}" - ESVN_REPO_URI="svn://svn.icculus.org/quake3/trunk" - inherit subversion flag-o-matic toolchain-funcs eutils games +EAPI="2" - SRC_URI="" - KEYWORDS="" - S=${WORKDIR}/trunk -else - inherit flag-o-matic toolchain-funcs eutils games - SRC_URI="http://ioquake3.org/files/${PV}/ioquake3-${PV}.tar.bz2" - KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" - S=${WORKDIR}/io${P} -fi +inherit eutils flag-o-matic games toolchain-funcs +[[ "${PV}" == 9999* ]] && inherit subversion + +MY_PN="ioquake3" +MY_PV="${PV}" +MY_P="${MY_PN}-${MY_PV}" DESCRIPTION="Quake III Arena - 3rd installment of the classic id 3D first-person shooter" HOMEPAGE="http://ioquake3.org/" +[[ "${PV}" != 9999* ]] && SRC_URI="http://ioquake3.org/files/${MY_PV}/${MY_P}.tar.bz2" +ESVN_REPO_URI="svn://svn.icculus.org/quake3/trunk" LICENSE="GPL-2" SLOT="0" -IUSE="dedicated teamarena" +KEYWORDS="" +# "smp" is omitted, because currently it does not work. +IUSE="dedicated opengl teamarena +openal curl vorbis voice mumble" -DEPEND="!dedicated? ( - virtual/opengl - media-libs/openal - media-libs/libsdl[joystick,opengl] - )" +UIDEPEND="virtual/opengl + media-libs/libsdl[audio,video,joystick,X,opengl] + virtual/jpeg + openal? ( media-libs/openal ) + vorbis? ( + media-libs/libogg + media-libs/libvorbis + ) + voice? ( media-libs/speex ) + curl? ( net-misc/curl )" +DEPEND="opengl? ( ${UIDEPEND} ) + !dedicated? ( ${UIDEPEND} )" +UIRDEPEND="voice? ( mumble? ( media-sound/mumble ) )" RDEPEND="${DEPEND} + opengl? ( ${UIRDEPEND} ) + !dedicated? ( ${UIRDEPEND} ) games-fps/quake3-data teamarena? ( games-fps/quake3-teamarena )" -src_unpack() { - if [[ ${PV} == 9999* ]] ; then - subversion_src_unpack - else - unpack ${A} - fi +if [[ "${PV}" == 9999* ]] ; then + S="${WORKDIR}/trunk" +else + S="${WORKDIR}/${MY_P}" +fi + +my_arch() { + case "${ARCH}" in + x86) echo "i386" ;; + amd64) echo "x86_64" ;; + *) tc-arch-kernel ;; + esac +} + +my_platform() { + case "${ARCH}" in + alpha|amd64|ppc|x86) echo "linux" ;; + x86-fbsd) echo "freebsd" ;; + esac } src_prepare() { - sed -i -e '/INSTALL/s: -s : :' Makefile || die + if [[ "${PV}" == 9999* ]] ; then + # Workaround for the version string + ln -s "${ESVN_WC_PATH}/.svn" .svn || die "ln ${ESVN_WC_PATH}/.svn" + fi } src_compile() { - filter-flags -mfpmath=sse + buildit() { use $1 && echo 1 || echo 0 ; } + + # This is the easiest way to pass CPPFLAGS to the build system, which + # are otherwise ignored. + append-flags ${CPPFLAGS} + + # OPTIMIZE is disabled in favor of CFLAGS. + # + # TODO: BUILD_CLIENT_SMP=$(buildit smp) emake \ - V=1 \ - BUILD_SERVER=1 \ - BUILD_CLIENT=$(( $(buildit !dedicated) )) \ - TEMPDIR="${T}" \ - CC="$(tc-getCC)" \ - ARCH=$(tc-arch-kernel) \ - OPTIMIZE="${CFLAGS}" \ - DEFAULT_BASEDIR="${GAMES_DATADIR}/quake3" \ - DEFAULT_LIBDIR="$(games_get_libdir)/quake3" \ - Q3ASM_CFLAGS="${CFLAGS}" \ - || die + ARCH="$(my_arch)" \ + BUILD_CLIENT=$(( $(buildit opengl) | $(buildit !dedicated) )) \ + BUILD_GAME_QVM=0 \ + BUILD_GAME_SO=0 \ + BUILD_SERVER=$(buildit dedicated) \ + DEFAULT_BASEDIR="${GAMES_DATADIR}/${PN}" \ + FULLBINEXT="" \ + GENERATE_DEPENDENCIES=0 \ + OPTIMIZE="" \ + PLATFORM="$(my_platform)" \ + USE_CODEC_VORBIS=$(buildit vorbis) \ + USE_CURL=$(buildit curl) \ + USE_CURL_DLOPEN=0 \ + USE_INTERNAL_JPEG=0 \ + USE_INTERNAL_SPEEX=0 \ + USE_INTERNAL_ZLIB=0 \ + USE_LOCAL_HEADERS=0 \ + USE_MUMBLE=$(buildit mumble) \ + USE_OPENAL=$(buildit openal) \ + USE_OPENAL_DLOPEN=0 \ + USE_VOIP=$(buildit voice) \ + || die "emake failed" } src_install() { - dodoc id-readme.txt TODO README BUGS ChangeLog + dodoc BUGS ChangeLog id-readme.txt md4-readme.txt NOTTODO README TODO || die + if use voice ; then + dodoc voip-readme.txt || die + fi - if ! use dedicated ; then - doicon misc/quake3.png + if use opengl || ! use dedicated ; then + doicon misc/quake3.svg || die make_desktop_entry quake3 "Quake III Arena" + #use smp && make_desktop_entry quake3-smp "Quake III Arena (SMP)" fi - cd build/release* - local old_x x - for old_x in ioq* ; do - x=${old_x%.*} - newgamesbin ${old_x} ${x} || die "newgamesbin ${x}" - dosym ${x} "${GAMES_BINDIR}"/${x/io} + cd build/release-$(my_platform)-$(my_arch) || die + local exe + for exe in ioquake3 ioquake3-smp ioq3ded ; do + if [[ -x ${exe} ]] ; then + dogamesbin ${exe} || die "dogamesbin ${exe}" + dosym ${exe} "${GAMES_BINDIR}/${exe/io}" || die "dosym ${exe}" + fi done - exeinto "$(games_get_libdir)"/${PN}/baseq3 - doexe baseq3/*.so || die "baseq3 .so" - exeinto "$(games_get_libdir)"/${PN}/missionpack - doexe missionpack/*.so || die "missionpack .so" prepgamesdirs } pkg_postinst() { games_pkg_postinst - ewarn "The source version of Quake 3 will not work with Punk Buster." - ewarn "If you need pb support, then use the quake3-bin package." - echo + + ewarn "The source version of Quake III Arena will not work with PunkBuster." + ewarn "If you need PB support, then use the games-fps/quake3-bin package." } |