summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild')
-rw-r--r--games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild196
1 files changed, 196 insertions, 0 deletions
diff --git a/games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild b/games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild
new file mode 100644
index 000000000000..bd485260f4c3
--- /dev/null
+++ b/games-fps/quake2-icculus/quake2-icculus-0.16.1-r1.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs games
+
+MY_P="quake2-r${PV}"
+DESCRIPTION="The icculus.org Linux port of iD's Quake 2 engine"
+HOMEPAGE="http://icculus.org/quake2/"
+SRC_URI="http://icculus.org/quake2/files/${MY_P}.tar.gz
+ qmax? ( http://icculus.org/quake2/files/maxpak.pak )
+ rogue? ( mirror://idsoftware/quake2/source/roguesrc320.shar.Z )
+ xatrix? ( mirror://idsoftware/quake2/source/xatrixsrc320.shar.Z )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ppc sparc x86 ~x86-fbsd"
+IUSE="aalib alsa cdinstall dedicated demo ipv6 joystick opengl qmax rogue sdl X xatrix"
+
+UIDEPEND="aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ opengl? ( virtual/opengl )
+ sdl? ( media-libs/libsdl[sound,joystick?,video] )
+ X? (
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm
+ )"
+RDEPEND="${UIDEPEND}
+ cdinstall? ( games-fps/quake2-data )
+ demo? ( games-fps/quake2-demodata )"
+DEPEND="${UIDEPEND}
+ X? ( x11-proto/xf86dgaproto )
+ rogue? ( || ( sys-freebsd/freebsd-ubin app-arch/sharutils ) )
+ xatrix? ( || ( sys-freebsd/freebsd-ubin app-arch/sharutils ) )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ games_pkg_setup
+
+ if ! use qmax && $( use opengl || use sdl ) ; then
+ elog "The 'qmax' graphical improvements are recommended."
+ echo
+ fi
+}
+
+src_prepare() {
+ # Now we deal with the silly rogue / xatrix addons ... this is ugly :/
+ ln -s $(type -P echo) "${T}"/more
+ for g in rogue xatrix ; do
+ use ${g} || continue
+ mkdir -p src/${g}
+ pushd src/${g}
+ local shar=../../../${g}src320.shar
+ sed -i -e 's:^read ans:ans=yes :' ${shar} || die
+ echo ">>> Unpacking ${shar} to ${PWD}"
+ env PATH="${T}:${PATH}" unshar ${shar} || die
+ popd
+ done
+ sed -i -e 's:jpeg_mem_src:_&:' src/ref_candygl/gl_image.c || die
+
+ sed -i -e 's:BUILD_SOFTX:BUILD_X11:' Makefile || die
+ # -amd64.patch # make sure this is still needed in future versions
+ epatch \
+ "${FILESDIR}"/${P}-amd64.patch \
+ "${FILESDIR}"/${P}-gentoo-paths.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-no-asm-io.patch \
+ "${FILESDIR}"/${P}-gnusource.patch \
+ "${FILESDIR}"/${P}-x11_soft.patch \
+ "${FILESDIR}"/${P}-x11_mouse.patch \
+ "${FILESDIR}"/${P}-alsa.patch \
+ "${FILESDIR}"/${P}-ia64.patch
+
+ if use xatrix ; then
+ epatch "${FILESDIR}/${P}"-gcc41.patch
+ fi
+ if use rogue ; then
+ cd src
+ epatch \
+ "${FILESDIR}"/0.16-rogue-nan.patch \
+ "${FILESDIR}"/0.16-rogue-armor.patch
+ fi
+}
+
+yesno() {
+ for f in "$@" ; do
+ if ! use $f ; then
+ echo NO
+ return 1
+ fi
+ done
+ echo YES
+ return 0
+}
+
+src_compile() {
+ # xatrix fails to build
+ # rogue fails to build
+ local libsuffix
+ for BUILD_QMAX in YES NO ; do
+ ! use qmax && [[ ${BUILD_QMAX} == "YES" ]] && continue
+ [[ ${BUILD_QMAX} == "YES" ]] \
+ && libsuffix=-qmax \
+ || libsuffix=
+ emake -j1 clean
+ emake -j1 build_release \
+ BUILD_SDLQUAKE2=$(yesno sdl) \
+ BUILD_SVGA=NO \
+ BUILD_X11=$(yesno X) \
+ BUILD_GLX=$(yesno opengl) \
+ BUILD_SDL=$(yesno sdl) \
+ BUILD_SDLGL=$(yesno sdl opengl) \
+ BUILD_CTFDLL=YES \
+ BUILD_XATRIX=$(yesno xatrix) \
+ BUILD_ROGUE=$(yesno rogue) \
+ BUILD_JOYSTICK=$(yesno joystick) \
+ BUILD_DEDICATED=$(yesno dedicated) \
+ BUILD_AA=$(yesno aalib) \
+ BUILD_QMAX=${BUILD_QMAX} \
+ HAVE_IPV6=$(yesno ipv6) \
+ BUILD_ARTS=NO \
+ BUILD_ALSA=$(yesno alsa) \
+ SDLDIR=/usr/lib \
+ DEFAULT_BASEDIR="${GAMES_DATADIR}/quake2" \
+ DEFAULT_LIBDIR="$(games_get_libdir)/${PN}${libsuffix}" \
+ OPT_CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)"
+ # now we save the build dir ... except for the object files ...
+ rm release*/*/*.o
+ mv release* my-rel-${BUILD_QMAX}
+ cd my-rel-${BUILD_QMAX}
+ rm -rf ref_{gl,soft} ded game client ctf/*.o
+ mkdir baseq2
+ mv game*.so baseq2/
+ cd ..
+ done
+}
+
+src_install() {
+ local q2dir=$(games_get_libdir)/${PN}
+ local q2maxdir=$(games_get_libdir)/${PN}-qmax
+
+ dodoc readme.txt README TODO "${FILESDIR}"/README-postinstall
+
+ # regular q2 files
+ dodir "${q2dir}"
+ cp -rf my-rel-NO/* "${D}/${q2dir}"/
+ dogamesbin "${D}/${q2dir}"/quake2
+ rm "${D}/${q2dir}"/quake2
+ use dedicated \
+ && dogamesbin "${D}/${q2dir}"/q2ded \
+ && rm "${D}/${q2dir}"/q2ded
+ use sdl \
+ && dogamesbin "${D}/${q2dir}"/sdlquake2 \
+ && rm "${D}/${q2dir}"/sdlquake2
+
+ doicon "${FILESDIR}"/quake2.xpm
+ make_desktop_entry quake2 "Quake 2" quake2
+
+ # q2max files
+ if use qmax ; then
+ dodir "${q2maxdir}"
+ cp -rf my-rel-YES/* "${D}/${q2maxdir}"/ || die
+ newgamesbin "${D}/${q2maxdir}"/quake2 quake2-qmax
+ rm "${D}/${q2maxdir}"/quake2
+ use dedicated \
+ && newgamesbin "${D}/${q2maxdir}"/q2ded q2ded-qmax \
+ && rm "${D}/${q2maxdir}"/q2ded
+ use sdl \
+ && newgamesbin "${D}/${q2maxdir}"/sdlquake2 sdlquake2-qmax \
+ && rm "${D}/${q2maxdir}"/sdlquake2
+
+ insinto "${q2maxdir}"/baseq2
+ doins "${DISTDIR}"/maxpak.pak
+
+ make_desktop_entry quake2-qmax Quake2-qmax quake2
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "Go read README-postinstall in /usr/share/doc/${PF}"
+ elog "right now! It's important - This install is just the engine, you still need"
+ elog "the data paks. Go read."
+
+ if use demo && ! has_version "games-fps/quake2-demodata[symlink]" ; then
+ ewarn "To play the Quake 2 demo,"
+ ewarn "emerge games-fps/quake2-demodata with the 'symlink' USE flag."
+ echo
+ fi
+}