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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Thu Aug 14 16:30:09 2014 UTC (4 years, 8 months ago) by phajdan.jr
Branch: MAIN
Changes since 1.2: +2 -2 lines
x86 stable wrt bug #518236

(Portage version: 2.2.8-r1/cvs/Linux i686, RepoMan options: --ignore-arches, signed Manifest commit with key 0x4F1A2555EA71991D!)

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

  ViewVC Help
Powered by ViewVC 1.1.20