/[gentoo-x86]/games-fps/urbanterror/urbanterror-4.2.017.ebuild
Gentoo

Contents of /games-fps/urbanterror/urbanterror-4.2.017.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Mar 12 19:10:50 2014 UTC (4 years, 9 months ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
remove old

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key BDEED020)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-fps/urbanterror/urbanterror-4.2.017.ebuild,v 1.1 2013/12/23 17:08:55 hasufell Exp $
4
5 EAPI=5
6
7 inherit check-reqs eutils gnome2-utils games
8
9 ENGINE_PV=4.2.015
10 FULL_P=UrbanTerror42_full017
11 DESCRIPTION="Hollywood tactical shooter based on the ioquake3 engine"
12 HOMEPAGE="http://www.urbanterror.info/home/"
13 SRC_URI="http://cdn.urbanterror.info/urt/42/zips/${FULL_P}.zip
14 https://github.com/Barbatos/ioq3-for-UrbanTerror-4/archive/release-${ENGINE_PV}.tar.gz -> ${PN}-${ENGINE_PV}.tar.gz
15 http://upload.wikimedia.org/wikipedia/en/5/56/Urbanterror.svg -> ${PN}.svg"
16
17 LICENSE="GPL-2 Q3AEULA-20000111 urbanterror-4.2-maps"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="+curl debug dedicated openal +sdl server smp vorbis"
21 RESTRICT="mirror"
22
23 RDEPEND="
24 !dedicated? (
25 virtual/opengl
26 curl? ( net-misc/curl )
27 openal? ( media-libs/openal )
28 sdl? ( media-libs/libsdl[X,audio,joystick,opengl,video] )
29 !sdl? ( x11-libs/libX11
30 x11-libs/libXext
31 x11-libs/libXxf86dga
32 x11-libs/libXxf86vm )
33 vorbis? ( media-libs/libogg
34 media-libs/libvorbis )
35 )"
36 DEPEND="${RDEPEND}
37 app-arch/unzip
38 dedicated? ( curl? ( net-misc/curl ) )"
39
40 S=${WORKDIR}/ioq3-for-UrbanTerror-4-release-${ENGINE_PV}
41 S_DATA=${WORKDIR}/UrbanTerror42
42
43 CHECKREQS_DISK_BUILD="3300M"
44 CHECKREQS_DISK_USR="1550M"
45
46 pkg_pretend() {
47 check-reqs_pkg_pretend
48
49 if ! use dedicated ; then
50 if ! use sdl && ! use openal ; then
51 ewarn
52 ewarn "Sound support disabled. Enable 'sdl' or 'openal' useflag."
53 ewarn
54 fi
55 fi
56 }
57
58 src_unpack() {
59 local i
60 default
61 # apply updates
62 if [[ ${FULL_P#*full} != ${PV##*.} ]] ; then
63 for i in {2..6} ; do
64 cp -dRpf \
65 "${WORKDIR}"/UrbanTerror-4.2.01${i}-to-4.2.01$((${i} + 1))/* \
66 "${S_DATA}"/ || die
67 done
68 fi
69 }
70
71 src_prepare() {
72 epatch "${FILESDIR}"/${PN}-${ENGINE_PV}-build.patch
73 }
74
75 src_compile() {
76 buildit() { use $1 && echo 1 || echo 0 ; }
77 nobuildit() { use $1 && echo 0 || echo 1 ; }
78
79 emake \
80 ARCH=$(usex amd64 "x86_64" "i386") \
81 DEFAULT_BASEDIR="${GAMES_DATADIR}/${PN}" \
82 BUILD_CLIENT=$(nobuildit dedicated) \
83 BUILD_CLIENT_SMP=$(usex smp "$(nobuildit dedicated)" "0") \
84 BUILD_SERVER=$(usex dedicated "1" "$(buildit server)") \
85 USE_SDL=$(buildit sdl) \
86 USE_OPENAL=$(buildit openal) \
87 USE_OPENAL_DLOPEN=0 \
88 USE_CURL=$(buildit curl) \
89 USE_CURL_DLOPEN=0 \
90 USE_CODEC_VORBIS=$(buildit vorbis) \
91 USE_LOCAL_HEADERS=0 \
92 Q="" \
93 $(usex debug "debug" "release")
94 }
95
96 src_install() {
97 local my_arch=$(usex amd64 "x86_64" "i386")
98
99 dodoc ChangeLog README md4-readme.txt
100 dodoc "${S_DATA}"/q3ut4/readme42.txt
101 insinto "${GAMES_DATADIR}"/${PN}/q3ut4
102 doins "${S_DATA}"/q3ut4/*.pk3
103
104 if use !dedicated ; then
105 newgamesbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT$(usex smp "-smp" "").${my_arch} ${PN}
106 doicon -s scalable "${DISTDIR}"/${PN}.svg
107 make_desktop_entry ${PN} "UrbanTerror"
108 fi
109
110 if use dedicated || use server ; then
111 newgamesbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT-Ded.${my_arch} ${PN}-dedicated
112 docinto examples
113 dodoc "${S_DATA}"/q3ut4/{server_example.cfg,mapcycle_example.txt}
114 fi
115
116 prepgamesdirs
117 }
118
119 pkg_preinst() {
120 games_pkg_preinst
121 use dedicated || gnome2_icon_savelist
122 }
123
124 pkg_postinst() {
125 games_pkg_postinst
126 use dedicated || gnome2_icon_cache_update
127
128 if use openal && ! use dedicated ; then
129 einfo
130 elog "You might need to set:"
131 elog " seta s_useopenal \"1\""
132 elog "in your ~/.q3a/q3ut4/q3config.cfg for openal to work."
133 einfo
134 fi
135 }
136
137 pkg_postrm() {
138 use dedicated || gnome2_icon_cache_update
139 }

  ViewVC Help
Powered by ViewVC 1.1.20