|
Line
Link Here
|
| 0 |
-- games-fps/sauerbraten/sauerbraten-2010.07.28.ebuild |
0 |
++ games-fps/sauerbraten/sauerbraten-2013.01.04.ebuild |
|
Lines 2-29
Link Here
|
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/games-fps/sauerbraten/sauerbraten-2010.07.28.ebuild,v 1.5 2012/12/04 15:37:45 ago Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/games-fps/sauerbraten/sauerbraten-2010.07.28.ebuild,v 1.5 2012/12/04 15:37:45 ago Exp $ |
| 4 |
|
4 |
|
| 5 |
EAPI=2 |
5 |
EAPI=5 |
| 6 |
inherit eutils flag-o-matic games |
6 |
inherit eutils flag-o-matic gnome2-utils games |
| 7 |
|
7 |
|
| 8 |
EDITION="justice_edition" |
8 |
EDITION="collect_edition" |
| 9 |
DESCRIPTION="Cube 2: Sauerbraten is an open source game engine (Cube 2) with freeware game data (Sauerbraten)" |
9 |
DESCRIPTION="Cube 2: Sauerbraten is an open source game engine (Cube 2) with freeware game data (Sauerbraten)" |
| 10 |
HOMEPAGE="http://sauerbraten.org/" |
10 |
HOMEPAGE="http://sauerbraten.org/" |
| 11 |
SRC_URI="mirror://sourceforge/sauerbraten/2010_07_19/sauerbraten_${PV//./_}_${EDITION}_linux.tar.bz2" |
11 |
SRC_URI="mirror://sourceforge/sauerbraten/sauerbraten/2013_01_04/sauerbraten_${PV//./_}_${EDITION}_linux.tar.bz2" |
| 12 |
|
12 |
|
| 13 |
LICENSE="ZLIB freedist" |
13 |
LICENSE="ZLIB freedist" |
| 14 |
SLOT="0" |
14 |
SLOT="0" |
| 15 |
KEYWORDS="amd64 x86" |
15 |
KEYWORDS="~amd64 ~x86" |
| 16 |
IUSE="debug dedicated" |
16 |
IUSE="debug dedicated server" |
| 17 |
|
17 |
|
| 18 |
DEPEND=" |
18 |
DEPEND=" |
| 19 |
sys-libs/zlib |
19 |
sys-libs/zlib |
| 20 |
net-libs/enet:1.3 |
20 |
>=net-libs/enet-1.3.6:1.3 |
| 21 |
!dedicated? ( |
21 |
!dedicated? ( |
| 22 |
media-libs/libsdl[X,opengl] |
22 |
media-libs/libsdl[X,opengl] |
| 23 |
media-libs/sdl-mixer[vorbis] |
23 |
media-libs/sdl-mixer[vorbis] |
| 24 |
media-libs/sdl-image[png,jpeg] |
24 |
media-libs/sdl-image[png,jpeg] |
| 25 |
virtual/opengl |
25 |
virtual/opengl |
| 26 |
virtual/glu )" |
26 |
virtual/glu |
|
|
27 |
x11-libs/libX11 )" |
| 27 |
|
28 |
|
| 28 |
S=${WORKDIR}/${PN} |
29 |
S=${WORKDIR}/${PN} |
| 29 |
|
30 |
|
|
Lines 32-57
Link Here
|
| 32 |
rm -rf sauerbraten_unix bin_unix src/{include,lib,vcpp} |
33 |
rm -rf sauerbraten_unix bin_unix src/{include,lib,vcpp} |
| 33 |
|
34 |
|
| 34 |
# Patch makefile to use system enet instead of bundled |
35 |
# Patch makefile to use system enet instead of bundled |
| 35 |
epatch "${FILESDIR}"/${P}-system-enet.patch |
36 |
# respect CXXFLAGS, LDFLAGS |
|
|
37 |
epatch "${FILESDIR}"/${P}-{system-enet,QA,master}.patch |
| 36 |
|
38 |
|
| 37 |
# Fix links so they point to the correct directory |
39 |
# Fix links so they point to the correct directory |
| 38 |
sed -i \ |
40 |
sed -i \ |
| 39 |
-e 's:docs/::' \ |
41 |
-e 's:docs/::' \ |
| 40 |
README.html \ |
42 |
README.html \ |
| 41 |
|| die |
43 |
|| die |
| 42 |
# Honor CXXFLAGS and LDFLAGS |
|
|
| 43 |
sed -i \ |
| 44 |
-e 's/[[:space:]]*$//' \ |
| 45 |
-e '/^CXXFLAGS=/d' \ |
| 46 |
-e '/-o .*LIBS/s/$/ $(LDFLAGS)/' \ |
| 47 |
src/Makefile \ |
| 48 |
|| die |
| 49 |
} |
44 |
} |
| 50 |
|
45 |
|
| 51 |
src_compile() { |
46 |
src_compile() { |
| 52 |
use debug && append-flags "-D_DEBUG" |
47 |
use debug && append-cppflags -D_DEBUG |
| 53 |
emake -C src master server $(use dedicated || echo client) \ |
48 |
emake -C src master $(usex dedicated "server" "$(usex server "server client" "client")") |
| 54 |
|| die |
|
|
| 55 |
} |
49 |
} |
| 56 |
|
50 |
|
| 57 |
src_install() { |
51 |
src_install() { |
|
Lines 62-88
Link Here
|
| 62 |
if ! use dedicated ; then |
56 |
if ! use dedicated ; then |
| 63 |
# Install the game data |
57 |
# Install the game data |
| 64 |
insinto "${DATADIR}" |
58 |
insinto "${DATADIR}" |
| 65 |
doins -r data packages || die |
59 |
doins -r data packages |
| 66 |
|
60 |
|
| 67 |
# Install the client executable |
61 |
# Install the client executable |
| 68 |
exeinto "${LIBEXECDIR}" |
62 |
exeinto "${LIBEXECDIR}" |
| 69 |
doexe src/sauer_client || die |
63 |
doexe src/sauer_client |
| 70 |
|
64 |
|
| 71 |
# Install the client wrapper |
65 |
# Install the client wrapper |
| 72 |
games_make_wrapper "${PN}-client" "${LIBEXECDIR}/sauer_client -q\$HOME/.${PN} -r" "${DATADIR}" |
66 |
games_make_wrapper "${PN}-client" "${LIBEXECDIR}/sauer_client -q\$HOME/.${PN} -r" "${DATADIR}" |
| 73 |
|
67 |
|
| 74 |
# Create menu entry |
68 |
# Create menu entry |
| 75 |
newicon data/cube.png ${PN}.png |
69 |
newicon -s 256 data/cube.png ${PN}.png |
| 76 |
make_desktop_entry "${PN}-client" "Cube 2: Sauerbraten" |
70 |
make_desktop_entry "${PN}-client" "Cube 2: Sauerbraten" |
| 77 |
fi |
71 |
fi |
| 78 |
|
72 |
|
| 79 |
# Install the server config files |
73 |
# Install the server config files |
| 80 |
insinto "${STATEDIR}" |
74 |
insinto "${STATEDIR}" |
| 81 |
doins "server-init.cfg" || die |
75 |
doins "server-init.cfg" |
| 82 |
|
76 |
|
| 83 |
# Install the server executables |
77 |
# Install the server executables |
| 84 |
exeinto "${LIBEXECDIR}" |
78 |
exeinto "${LIBEXECDIR}" |
| 85 |
doexe src/sauer_{server,master} || die |
79 |
doexe src/sauer_master |
|
|
80 |
use dedicated || use server && doexe src/sauer_server |
| 86 |
|
81 |
|
| 87 |
games_make_wrapper "${PN}-server" \ |
82 |
games_make_wrapper "${PN}-server" \ |
| 88 |
"${LIBEXECDIR}/sauer_server -k${DATADIR} -q${STATEDIR}" |
83 |
"${LIBEXECDIR}/sauer_server -k${DATADIR} -q${STATEDIR}" |
|
Lines 91-121
Link Here
|
| 91 |
|
86 |
|
| 92 |
# Install the server init script |
87 |
# Install the server init script |
| 93 |
keepdir "${GAMES_STATEDIR}/run/${PN}" |
88 |
keepdir "${GAMES_STATEDIR}/run/${PN}" |
| 94 |
cp "${FILESDIR}"/${PN}.init "${T}" |
89 |
cp "${FILESDIR}"/${PN}.init "${T}" || die |
| 95 |
sed -i \ |
90 |
sed -i \ |
| 96 |
-e "s:%SYSCONFDIR%:${STATEDIR}:g" \ |
91 |
-e "s:%SYSCONFDIR%:${STATEDIR}:g" \ |
| 97 |
-e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \ |
92 |
-e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \ |
| 98 |
-e "s:%GAMES_STATEDIR%:${GAMES_STATEDIR}:g" \ |
93 |
-e "s:%GAMES_STATEDIR%:${GAMES_STATEDIR}:g" \ |
| 99 |
"${T}"/${PN}.init || die |
94 |
"${T}"/${PN}.init || die |
| 100 |
newinitd "${T}"/${PN}.init ${PN} || die |
95 |
newinitd "${T}"/${PN}.init ${PN} |
| 101 |
cp "${FILESDIR}"/${PN}.conf "${T}" |
96 |
cp "${FILESDIR}"/${PN}.conf "${T}" || die |
| 102 |
sed -i \ |
97 |
sed -i \ |
| 103 |
-e "s:%SYSCONFDIR%:${STATEDIR}:g" \ |
98 |
-e "s:%SYSCONFDIR%:${STATEDIR}:g" \ |
| 104 |
-e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \ |
99 |
-e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \ |
| 105 |
-e "s:%GAMES_USER_DED%:${GAMES_USER_DED}:g" \ |
100 |
-e "s:%GAMES_USER_DED%:${GAMES_USER_DED}:g" \ |
| 106 |
-e "s:%GAMES_GROUP%:${GAMES_GROUP}:g" \ |
101 |
-e "s:%GAMES_GROUP%:${GAMES_GROUP}:g" \ |
| 107 |
"${T}"/${PN}.conf || die |
102 |
"${T}"/${PN}.conf || die |
| 108 |
newconfd "${T}"/${PN}.conf ${PN} || die |
103 |
newconfd "${T}"/${PN}.conf ${PN} |
| 109 |
|
104 |
|
| 110 |
dodoc src/*.txt docs/dev/*.txt |
105 |
nonfatal dodoc src/*.txt docs/dev/*.txt |
| 111 |
dohtml -r README.html docs/* |
106 |
nonfatal dohtml -r README.html docs/* |
| 112 |
|
107 |
|
| 113 |
prepgamesdirs |
108 |
prepgamesdirs |
| 114 |
} |
109 |
} |
| 115 |
|
110 |
|
|
|
111 |
pkg_preinst() { |
| 112 |
games_pkg_preinst |
| 113 |
gnome2_icon_savelist |
| 114 |
} |
| 115 |
|
| 116 |
pkg_postinst() { |
116 |
pkg_postinst() { |
| 117 |
games_pkg_postinst |
117 |
games_pkg_postinst |
|
|
118 |
gnome2_icon_cache_update |
| 118 |
|
119 |
|
| 119 |
elog "If you plan to use map editor feature copy all map data from ${DATADIR}" |
120 |
elog "If you plan to use map editor feature copy all map data from ${DATADIR}" |
| 120 |
elog "to corresponding folder in your HOME/.${PN}" |
121 |
elog "to corresponding folder in your HOME/.${PN}" |
| 121 |
} |
122 |
} |
|
|
123 |
|
| 124 |
pkg_postrm() { |
| 125 |
gnome2_icon_cache_update |
| 126 |
} |