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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Jun 30 05:59:15 2014 UTC (4 years, 2 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
old

(Portage version: 2.2.8-r1/cvs/Linux x86_64, unsigned Manifest commit)

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.ebuild,v 1.1 2014/05/11 00:32:18 hasufell 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=15
11 UPDATE_P=${PN}_${DATA_PV}_update
12 ENGINE_PV=15
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.net:1337/~warsow/${PV}/${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/libXinerama
38 x11-libs/libXrandr
39 x11-libs/libXxf86dga
40 x11-libs/libXxf86vm
41 virtual/jpeg
42 virtual/opengl
43 openal? ( media-libs/openal )
44 )"
45 DEPEND="${RDEPEND}
46 app-arch/unzip
47 x11-misc/makedepend
48 !dedicated? (
49 x11-proto/xineramaproto
50 x11-proto/xf86dgaproto
51 x11-proto/xf86vidmodeproto
52 )
53 openal? ( virtual/pkgconfig )"
54
55 S=${WORKDIR}/source/source
56
57 CHECKREQS_DISK_BUILD="1G"
58 CHECKREQS_DISK_USR="500M"
59
60 src_prepare() {
61 if [[ $(tc-getCC) =~ clang ]]; then
62 einfo "disabling -ffast-math due to clang bug"
63 einfo "http://llvm.org/bugs/show_bug.cgi?id=13745"
64 append-cflags -fno-fast-math
65 append-cxxflags -fno-fast-math
66 fi
67
68 sed -i \
69 -e "/fs_basepath =/ s:\.:${GAMES_DATADIR}/${PN}:" \
70 qcommon/files.c \
71 || die "sed files.c failed"
72
73 # edos2unix breaks whitespace files
74 einfo "removing dos line breaks"
75 find . -type f -exec sed -i 's/\r$//' '{}' + || die
76
77 cd "${S}"/.. || die
78 epatch "${FILESDIR}"/${PN}-1.5-build.patch \
79 "${FILESDIR}"/${PN}-1.03-pic.patch
80 epatch_user
81 }
82
83 src_compile() {
84 yesno() { use ${1} && echo YES || echo NO ; }
85
86 emake -C ../libsrcs/angelscript/sdk/angelscript/projects/gnuc
87
88 local arch
89 if use amd64 ; then
90 arch=x86_64
91 elif use x86 ; then
92 arch=i386
93 fi
94
95 local myconf
96 if use dedicated ; then
97 myconf=(
98 BUILD_CLIENT=NO
99 BUILD_IRC=NO
100 BUILD_SND_OPENAL=NO
101 BUILD_SND_QF=NO
102 BUILD_CIN=NO
103 BUILD_SERVER=YES
104 BUILD_TV_SERVER=YES
105 )
106 else
107 myconf=(
108 BUILD_CLIENT=YES
109 BUILD_IRC=$(yesno irc)
110 BUILD_SND_OPENAL=$(yesno openal)
111 BUILD_SND_QF=YES
112 BUILD_CIN=YES
113 BUILD_SERVER=$(yesno server)
114 BUILD_TV_SERVER=$(yesno server)
115 )
116 fi
117
118 emake \
119 V=YES \
120 SYSTEM_LIBS=YES \
121 BASE_ARCH=${arch} \
122 BINDIR=lib \
123 BUILD_ANGELWRAP=YES \
124 DEBUG_BUILD=$(yesno debug) \
125 ${myconf[@]}
126 }
127
128 src_install() {
129 cd lib
130
131 if ! use dedicated ; then
132 newgamesbin ${PN}.* ${PN}
133 doicon -s 48 "${DISTDIR}"/${PN}.png
134 make_desktop_entry ${PN} Warsow
135 fi
136
137 if use dedicated || use server ; then
138 newgamesbin wsw_server.* ${PN}-ded
139 newgamesbin wswtv_server.* ${PN}-tv
140 fi
141
142 exeinto "$(games_get_libdir)"/${PN}
143 doexe */*.so
144
145 insinto "${GAMES_DATADIR}"/${PN}
146 doins -r "${WORKDIR}"/${PN}_15/basewsw
147
148 local so
149 for so in basewsw/*.so ; do
150 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
151 "${GAMES_DATADIR}"/${PN}/${so}
152 done
153
154 if [[ -e libs ]] ; then
155 dodir "${GAMES_DATADIR}"/${PN}/libs
156 for so in libs/*.so ; do
157 dosym "$(games_get_libdir)"/${PN}/${so##*/} \
158 "${GAMES_DATADIR}"/${PN}/${so}
159 done
160 fi
161
162 dodoc "${WORKDIR}"/${PN}_15/docs/*
163 prepgamesdirs
164 }
165
166 pkg_preinst() {
167 games_pkg_preinst
168 gnome2_icon_savelist
169 }
170
171 pkg_postinst() {
172 games_pkg_postinst
173 gnome2_icon_cache_update
174 }
175
176 pkg_postrm() {
177 gnome2_icon_cache_update
178 }

  ViewVC Help
Powered by ViewVC 1.1.20