/[gentoo-x86]/games-fps/warsow/warsow-1.01.ebuild
Gentoo

Contents of /games-fps/warsow/warsow-1.01.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Nov 13 07:14:25 2012 UTC (6 years, 1 month ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
old

(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-fps/warsow/warsow-1.01.ebuild,v 1.2 2012/10/12 12:30:54 hasufell Exp $
4
5 EAPI=4
6 inherit eutils check-reqs gnome2-utils games
7
8 MY_P=${PN}_${PV}
9 DESCRIPTION="Multiplayer FPS based on the QFusion engine (evolved from Quake 2)"
10 HOMEPAGE="http://www.warsow.net/"
11 SRC_URI="http://funpark.warsow-esport.net/~${PN}/1.0/${PN}_1.0_unified.tar.gz
12 http://funpark.warsow-esport.net/~${PN}/${PV}/${MY_P}_sdk.tar.gz
13 http://funpark.warsow-esport.net/~${PN}/${PV}/${MY_P}_update.tar.gz
14 mirror://gentoo/${PN}.png"
15
16 LICENSE="GPL-2 warsow"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="+angelscript debug dedicated irc openal server"
20
21 RDEPEND="media-libs/freetype
22 net-misc/curl
23 sys-libs/zlib
24 !dedicated? (
25 media-libs/libpng:0
26 media-libs/libsdl
27 media-libs/libtheora
28 media-libs/libvorbis
29 x11-libs/libX11
30 x11-libs/libXinerama
31 x11-libs/libXrandr
32 x11-libs/libXxf86dga
33 x11-libs/libXxf86vm
34 virtual/jpeg
35 virtual/opengl
36 openal? ( media-libs/openal )
37 )"
38 DEPEND="${RDEPEND}
39 x11-misc/makedepend
40 !dedicated? (
41 x11-proto/xineramaproto
42 x11-proto/xf86dgaproto
43 x11-proto/xf86vidmodeproto
44 )
45 openal? ( virtual/pkgconfig )"
46
47 S=${WORKDIR}/${MY_P}_sdk/source
48 S_U=${WORKDIR}/${PN}_1.0
49 S_UPDATE=${WORKDIR}/${MY_P}_update
50
51 CHECKREQS_DISK_BUILD="1G"
52 CHECKREQS_DISK_USR="500M"
53
54 src_prepare() {
55 sed -i \
56 -e "/fs_basepath =/ s:\.:${GAMES_DATADIR}/${PN}:" \
57 qcommon/files.c \
58 || die "sed files.c failed"
59
60 sed -i \
61 -e "s:q_jpeg_mem_src:_&:" \
62 ref_gl/r_image.c || die "sed r_image.c failed"
63
64 rm -r "${S_U}"/docs/old* || die
65
66 cd "${WORKDIR}"/${MY_P}_sdk || die
67 epatch "${FILESDIR}"/${P}-build.patch \
68 "${FILESDIR}"/${PN}-0.5-pic.patch
69 epatch_user
70 }
71
72 src_compile() {
73 yesno() { use ${1} && echo YES || echo NO ; }
74
75 use angelscript &&
76 emake -C ../libsrcs/angelscript/angelSVN/sdk/angelscript/projects/gnuc
77
78 local arch
79 if use amd64 ; then
80 arch=x86_64
81 elif use x86 ; then
82 arch=i386
83 fi
84
85 local myconf
86 if use dedicated ; then
87 myconf=(
88 BUILD_CLIENT=NO
89 BUILD_IRC=NO
90 BUILD_SND_OPENAL=NO
91 BUILD_SND_QF=NO
92 BUILD_CIN=NO
93 BUILD_SERVER=YES
94 BUILD_TV_SERVER=YES
95 )
96 else
97 myconf=(
98 BUILD_CLIENT=YES
99 BUILD_IRC=$(yesno irc)
100 BUILD_SND_OPENAL=$(yesno openal)
101 BUILD_SND_QF=YES
102 BUILD_CIN=YES
103 BUILD_SERVER=$(yesno server)
104 BUILD_TV_SERVER=$(yesno server)
105 )
106 fi
107
108 emake \
109 BASE_ARCH=${arch} \
110 BINDIR=lib \
111 BUILD_ANGELWRAP=$(yesno angelscript) \
112 DEBUG_BUILD=$(yesno debug) \
113 ${myconf[@]}
114 }
115
116 src_install() {
117 cd lib
118
119 if ! use dedicated ; then
120 newgamesbin ${PN}.* ${PN}
121 doicon -s 48 "${DISTDIR}"/${PN}.png
122 make_desktop_entry ${PN} Warsow
123 fi
124
125 if use dedicated || use server ; then
126 newgamesbin wsw_server.* ${PN}-ded
127 newgamesbin wswtv_server.* ${PN}-tv
128 fi
129
130 exeinto "$(games_get_libdir)"/${PN}
131 doexe */*.so
132
133 insinto "${GAMES_DATADIR}"/${PN}
134 doins -r "${S_U}"/basewsw
135 doins -r "${S_UPDATE}"/basewsw
136
137 local so
138 for so in basewsw/*.so ; do
139 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
140 "${GAMES_DATADIR}"/${PN}/${so}
141 done
142
143 if [[ -e libs ]] ; then
144 dodir "${GAMES_DATADIR}"/${PN}/libs
145 for so in libs/*.so ; do
146 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
147 "${GAMES_DATADIR}"/${PN}/${so}
148 done
149 fi
150
151 dodoc "${S_U}"/docs/*
152 dodoc "${S_UPDATE}"/docs/*
153 prepgamesdirs
154 }
155
156 pkg_preinst() {
157 games_pkg_preinst
158 gnome2_icon_savelist
159 }
160
161 pkg_postinst() {
162 games_pkg_postinst
163 gnome2_icon_cache_update
164 }
165
166 pkg_postrm() {
167 gnome2_icon_cache_update
168 }

  ViewVC Help
Powered by ViewVC 1.1.20