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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Sep 27 23:54:41 2013 UTC (5 years ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
remove old (keep 4.1.1 since some servers still use it)

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)

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

  ViewVC Help
Powered by ViewVC 1.1.20