app-text/cpdf: update HOMEPAGE to use https://
[gentoo.git] / games-fps / quake4-demo / quake4-demo-1.0-r2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit eutils unpacker games
6
7 MY_P="quake4-linux-${PV}-demo"
8 DESCRIPTION="Sequel to Quake 2, an Id 3D first-person shooter"
9 HOMEPAGE="http://www.quake4game.com/"
10 SRC_URI="mirror://idsoftware/quake4/demo/${MY_P}.x86.run
11         http://www.3ddownloads.com/Action/Quake%204/Demos/${MY_P}.x86.run
12         http://filebase.gmpf.de/quake4/${MY_P}.x86.run
13         http://www.holarse.de/mirror/${MY_P}.x86.run
14         http://sonic-lux.net/data/mirror/quake4/${MY_P}.x86.run"
15
16 LICENSE="QUAKE4"
17 SLOT="0"
18 KEYWORDS="-* ~amd64 ~x86"
19 IUSE="dedicated"
20 RESTRICT="bindist mirror strip"
21
22 RDEPEND="sys-libs/glibc
23         sys-libs/libstdc++-v3:5
24         amd64? ( sys-libs/glibc[multilib] sys-libs/libstdc++-v3:5[multilib] )
25         dedicated? ( app-misc/screen )
26         !dedicated? (
27                 || (
28                         virtual/opengl[abi_x86_32(-)]
29                         x11-drivers/nvidia-drivers
30                 )
31                 >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
32                 >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
33                 >=media-libs/libsdl-1.2.15-r4[X,opengl,sound,abi_x86_32(-)]
34         )"
35
36 S=${WORKDIR}
37 dir=${GAMES_PREFIX_OPT}/${PN}
38 Ddir=${D}/${dir}
39
40 QA_PREBUILT="${dir:1}/quake4.x86
41         ${dir:1}/q4ded.x86"
42
43 src_install() {
44         insinto "${dir}"
45         doins License.txt q4icon.bmp version.info
46         dodoc README
47
48         exeinto "${dir}"
49         doexe openurl.sh bin/Linux/x86/q4ded.x86
50         games_make_wrapper ${PN}-ded ./q4ded.x86 "${dir}" "${dir}"
51
52         insinto "${dir}"/q4base
53         doins q4base/*
54
55         if ! use dedicated ; then
56                 doexe bin/Linux/x86/quake4.x86
57                 games_make_wrapper ${PN} ./quake4.x86 "${dir}" "${dir}"
58                 newicon q4icon.bmp ${PN}.bmp || die
59                 make_desktop_entry ${PN} "Quake IV (Demo)" /usr/share/applications/${PN}.bmp
60         fi
61
62         prepgamesdirs
63 }
64
65 pkg_postinst() {
66         games_pkg_postinst
67
68         if ! use dedicated; then
69                 elog "To play the game run:"
70                 elog " quake4-demo"
71                 echo
72         fi
73         elog "To start the gameserver, run:"
74         elog " quake4-demo-ded"
75 }