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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Jul 20 17:45:24 2014 UTC (3 years, 11 months ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
revbump for fixing deps

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

1 # Copyright 1999-2014 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.5.1.ebuild,v 1.3 2014/06/30 06:22:30 mr_bones_ Exp $
4
5 EAPI=5
6 inherit eutils check-reqs gnome2-utils flag-o-matic games
7
8 # BASE_DATA_PV=1.0
9 # BASE_DATA_P=${PN}_${BASE_DATA_PV}_unified
10 DATA_PV=1.51
11 UPDATE_P=${PN}_${DATA_PV}_update
12 ENGINE_PV=1.51
13 ENGINE_P=${PN}_${ENGINE_PV}_sdk
14
15 DESCRIPTION="Multiplayer FPS based on the QFusion engine (evolved from Quake 2)"
16 HOMEPAGE="http://www.warsow.net/"
17 SRC_URI="http://www.warsow.eu/${ENGINE_P}.tar.gz
18 http://www.warsow.eu/warsow_${DATA_PV}_unified.tar.gz
19 mirror://gentoo/warsow.png"
20
21 # ZLIB: bundled angelscript
22 LICENSE="GPL-2 ZLIB warsow"
23 SLOT="0"
24 KEYWORDS="~amd64 ~x86"
25 IUSE="debug dedicated irc openal server"
26
27 RDEPEND=">=dev-libs/libRocket-1.2.1_p20130110
28 media-libs/freetype
29 net-misc/curl
30 sys-libs/zlib
31 !dedicated? (
32 media-libs/libpng:0
33 media-libs/libsdl
34 media-libs/libtheora
35 media-libs/libvorbis
36 x11-libs/libX11
37 x11-libs/libXi
38 x11-libs/libXinerama
39 x11-libs/libXrandr
40 x11-libs/libXxf86dga
41 x11-libs/libXxf86vm
42 virtual/jpeg
43 virtual/opengl
44 openal? ( media-libs/openal )
45 )"
46 DEPEND="${RDEPEND}
47 app-arch/unzip
48 x11-misc/makedepend
49 !dedicated? (
50 x11-proto/xineramaproto
51 x11-proto/xf86dgaproto
52 x11-proto/xf86vidmodeproto
53 )
54 openal? ( virtual/pkgconfig )"
55
56 S=${WORKDIR}/source/source
57
58 CHECKREQS_DISK_BUILD="1G"
59 CHECKREQS_DISK_USR="500M"
60
61 src_prepare() {
62 if [[ $(tc-getCC) =~ clang ]]; then
63 einfo "disabling -ffast-math due to clang bug"
64 einfo "http://llvm.org/bugs/show_bug.cgi?id=13745"
65 append-cflags -fno-fast-math
66 append-cxxflags -fno-fast-math
67 fi
68
69 sed -i \
70 -e "/fs_basepath =/ s:\.:${GAMES_DATADIR}/${PN}:" \
71 qcommon/files.c \
72 || die "sed files.c failed"
73
74 # edos2unix breaks whitespace files
75 einfo "removing dos line breaks"
76 find . -type f -exec sed -i 's/\r$//' '{}' + || die
77
78 cd "${S}"/.. || die
79 epatch "${FILESDIR}"/${P}-build.patch \
80 "${FILESDIR}"/${P}-pic.patch
81 epatch_user
82 }
83
84 src_compile() {
85 yesno() { use ${1} && echo YES || echo NO ; }
86
87 emake -C ../libsrcs/angelscript/sdk/angelscript/projects/gnuc
88
89 local arch
90 if use amd64 ; then
91 arch=x86_64
92 elif use x86 ; then
93 arch=i386
94 fi
95
96 local myconf
97 if use dedicated ; then
98 myconf=(
99 BUILD_CLIENT=NO
100 BUILD_IRC=NO
101 BUILD_SND_OPENAL=NO
102 BUILD_SND_QF=NO
103 BUILD_CIN=NO
104 BUILD_SERVER=YES
105 BUILD_TV_SERVER=YES
106 )
107 else
108 myconf=(
109 BUILD_CLIENT=YES
110 BUILD_IRC=$(yesno irc)
111 BUILD_SND_OPENAL=$(yesno openal)
112 BUILD_SND_QF=YES
113 BUILD_CIN=YES
114 BUILD_SERVER=$(yesno server)
115 BUILD_TV_SERVER=$(yesno server)
116 )
117 fi
118
119 emake \
120 V=YES \
121 SYSTEM_LIBS=YES \
122 BASE_ARCH=${arch} \
123 BINDIR=lib \
124 BUILD_ANGELWRAP=YES \
125 DEBUG_BUILD=$(yesno debug) \
126 ${myconf[@]}
127 }
128
129 src_install() {
130 cd lib
131
132 if ! use dedicated ; then
133 newgamesbin ${PN}.* ${PN}
134 doicon -s 48 "${DISTDIR}"/${PN}.png
135 make_desktop_entry ${PN} Warsow
136 fi
137
138 if use dedicated || use server ; then
139 newgamesbin wsw_server.* ${PN}-ded
140 newgamesbin wswtv_server.* ${PN}-tv
141 fi
142
143 exeinto "$(games_get_libdir)"/${PN}
144 doexe */*.so
145
146 insinto "${GAMES_DATADIR}"/${PN}
147 doins -r "${WORKDIR}"/${PN}_15/basewsw
148
149 local so
150 for so in basewsw/*.so ; do
151 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
152 "${GAMES_DATADIR}"/${PN}/${so}
153 done
154
155 if [[ -e libs ]] ; then
156 dodir "${GAMES_DATADIR}"/${PN}/libs
157 for so in libs/*.so ; do
158 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
159 "${GAMES_DATADIR}"/${PN}/${so}
160 done
161 fi
162
163 dodoc "${WORKDIR}"/${PN}_15/docs/*
164 prepgamesdirs
165 }
166
167 pkg_preinst() {
168 games_pkg_preinst
169 gnome2_icon_savelist
170 }
171
172 pkg_postinst() {
173 games_pkg_postinst
174 gnome2_icon_cache_update
175 }
176
177 pkg_postrm() {
178 gnome2_icon_cache_update
179 }

  ViewVC Help
Powered by ViewVC 1.1.20