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

Contents of /games-fps/urbanterror/urbanterror-4.2.013-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Sep 27 23:54:41 2013 UTC (5 years, 2 months ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +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.013-r1.ebuild,v 1.2 2013/09/01 20:27:35 hasufell Exp $
4
5 EAPI=5
6
7 inherit check-reqs eutils gnome2-utils games
8
9 PREV_PV="4.2.012"
10 DESCRIPTION="Hollywood tactical shooter based on the ioquake3 engine"
11 HOMEPAGE="http://www.urbanterror.info/home/"
12 SRC_URI="http://cdn.urbanterror.info/urt/42/zips/UrbanTerror42_full${PREV_PV:4:3}.zip
13 http://cdn.urbanterror.info/urt/42/zips/UrbanTerror-${PREV_PV}-to-${PV}.zip
14 https://github.com/Barbatos/ioq3-for-UrbanTerror-4/archive/release-${PV}.tar.gz -> ${P}.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-${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 default
60 cp -dRp "${WORKDIR}"/UrbanTerror-${PREV_PV}-to-${PV}/* "${S_DATA}"/ || die
61 }
62
63 src_prepare() {
64 epatch "${FILESDIR}"/${P}-build.patch
65 }
66
67 src_compile() {
68 buildit() { use $1 && echo 1 || echo 0 ; }
69 nobuildit() { use $1 && echo 0 || echo 1 ; }
70
71 emake \
72 ARCH=$(usex amd64 "x86_64" "i386") \
73 DEFAULT_BASEDIR="${GAMES_DATADIR}/${PN}" \
74 BUILD_CLIENT=$(nobuildit dedicated) \
75 BUILD_CLIENT_SMP=$(usex smp "$(nobuildit dedicated)" "0") \
76 BUILD_SERVER=$(usex dedicated "1" "$(buildit server)") \
77 USE_SDL=$(buildit sdl) \
78 USE_OPENAL=$(buildit openal) \
79 USE_OPENAL_DLOPEN=0 \
80 USE_CURL=$(buildit curl) \
81 USE_CURL_DLOPEN=0 \
82 USE_CODEC_VORBIS=$(buildit vorbis) \
83 USE_LOCAL_HEADERS=0 \
84 Q="" \
85 $(usex debug "debug" "release")
86 }
87
88 src_install() {
89 local my_arch=$(usex amd64 "x86_64" "i386")
90
91 dodoc ChangeLog README md4-readme.txt
92 dodoc "${S_DATA}"/q3ut4/readme42.txt
93 insinto "${GAMES_DATADIR}"/${PN}/q3ut4
94 doins "${S_DATA}"/q3ut4/*.pk3
95
96 if use !dedicated ; then
97 newgamesbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT$(usex smp "-smp" "").${my_arch} ${PN}
98 doicon -s scalable "${DISTDIR}"/${PN}.svg
99 make_desktop_entry ${PN} "UrbanTerror"
100 fi
101
102 if use dedicated || use server ; then
103 newgamesbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT-Ded.${my_arch} ${PN}-dedicated
104 docinto examples
105 dodoc "${S_DATA}"/q3ut4/{server_example.cfg,mapcycle_example.txt}
106 fi
107
108 prepgamesdirs
109 }
110
111 pkg_preinst() {
112 games_pkg_preinst
113 use dedicated || gnome2_icon_savelist
114 }
115
116 pkg_postinst() {
117 games_pkg_postinst
118 use dedicated || gnome2_icon_cache_update
119
120 if use openal && ! use dedicated ; then
121 einfo
122 elog "You might need to set:"
123 elog " seta s_useopenal \"1\""
124 elog "in your ~/.q3a/q3ut4/q3config.cfg for openal to work."
125 einfo
126 fi
127 }
128
129 pkg_postrm() {
130 use dedicated || gnome2_icon_cache_update
131 }

  ViewVC Help
Powered by ViewVC 1.1.20