1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils flag-o-matic autotools
7 DESCRIPTION="New 3d engine based off of id Softwares's Quake and QuakeWorld game engine"
8 HOMEPAGE="http://www.quakeforge.net/"
9 SRC_URI="mirror://sourceforge/quake/${P}.tar.bz2"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="alsa cdinstall debug dga fbcon flac ipv6 ncurses oss png sdl vorbis wildmidi X xdg xv zlib"
18 media-libs/libsamplerate
21 alsa? ( media-libs/alsa-lib )
22 dga? ( x11-libs/libXxf86dga )
23 flac? ( media-libs/flac )
24 ncurses? ( sys-libs/ncurses:0 )
25 png? ( media-libs/libpng:0 )
26 sdl? ( media-libs/libsdl[video] )
31 wildmidi? ( media-sound/wildmidi )
42 zlib? ( sys-libs/zlib )"
44 cdinstall? ( games-fps/quake1-data )
50 "${FILESDIR}"/${P}-gentoo.patch
56 append-cflags -std=gnu89 # build with gcc5 (bug #570392)
62 && debugopts="--enable-debug --disable-optimize --enable-profile" \
63 || debugopts="--disable-debug --disable-profile"
65 local clients=${QF_CLIENTS}
66 use fbcon && clients="${clients},fbdev"
67 use sdl && clients="${clients},sdl"
68 use X && clients="${clients},x11"
69 [ "${clients:0:1}" == "," ] && clients=${clients:1}
71 local servers=${QF_SERVERS:-master,nq,qw,qtv}
73 local tools=${QF_TOOLS:-all}
76 --enable-dependency-tracking \
77 $(use_enable ncurses curses) \
78 $(use_enable vorbis) \
82 $(use_with fbcon fbdev) \
84 $(use_enable xv vidmode) \
92 $(use_enable wildmidi) \
98 --with-global-cfg=/etc/quakeforge.conf \
99 --with-sharepath=/usr/share/quake1 \
100 --with-clients=${clients} \
101 --with-servers=${servers} \
102 --with-tools=${tools}
106 emake -j1 DESTDIR="${D}" install
107 dodoc ChangeLog NEWS TODO
111 # same warning used in quake1 / quakeforge / nprquake-sdl
113 elog "Before you can play, you must make sure"
114 elog "${PN} can find your Quake .pak files"
116 elog "You have 2 choices to do this"
117 elog "1 Copy pak*.pak files to /usr/share/quake1/id1"
118 elog "2 Symlink pak*.pak files in /usr/share/quake1/id1"
121 elog "my pak*.pak files are in /mnt/secondary/Games/Quake/Id1/"
122 elog "ln -s /mnt/secondary/Games/Quake/Id1/pak0.pak /usr/share/quake1/id1/pak0.pak"
124 elog "You only need pak0.pak to play the demo version,"
125 elog "the others are needed for registered version"