summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquazgar <quazgar@droggelbecher>2015-11-08 22:44:50 +0100
committerPatrice Clement <monsieurp@gentoo.org>2015-11-17 13:14:36 +0000
commitaad301084de8b1716c1254bea93d15e49397a848 (patch)
treebe06463c400b38781aca9065e8d7e0ddb592c040
parentgames-strategy/ufo-ai: Version bump to 2.5 (diff)
downloadgentoo-aad301084de8b1716c1254bea93d15e49397a848.tar.gz
gentoo-aad301084de8b1716c1254bea93d15e49397a848.tar.bz2
gentoo-aad301084de8b1716c1254bea93d15e49397a848.zip
games-strategy/ufo-ai-2.5: Style changes.
Fixed a lot of style problems. Also removed games.eclass inheritance and editor USE flag. Still needs work until the dedicated server works, but should definitely be usable for playing.
-rw-r--r--games-strategy/ufo-ai/ufo-ai-2.5.ebuild130
1 files changed, 73 insertions, 57 deletions
diff --git a/games-strategy/ufo-ai/ufo-ai-2.5.ebuild b/games-strategy/ufo-ai/ufo-ai-2.5.ebuild
index ca3d0447252d..baf3a402d7e0 100644
--- a/games-strategy/ufo-ai/ufo-ai-2.5.ebuild
+++ b/games-strategy/ufo-ai/ufo-ai-2.5.ebuild
@@ -3,45 +3,55 @@
# $Id$
EAPI=5
-inherit eutils flag-o-matic games
+inherit eutils flag-o-matic gnome2-utils
MY_P=${P/ufo-ai/ufoai}
+# better than the default "/usr/games/ufo/"
+MY_DATADIR="${EPREFIX}/usr/share/games/${PN/-}"
+
DESCRIPTION="UFO: Alien Invasion - X-COM inspired strategy game"
HOMEPAGE="http://ufoai.sourceforge.net/"
SRC_URI="mirror://sourceforge/ufoai/${MY_P}-source.tar.bz2
- mirror://sourceforge/ufoai/${MY_P}-data.tar"
+ mirror://sourceforge/ufoai/${MY_P}-data.tar
+"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="debug server editor +client sse profile"
+KEYWORDS="~amd64 ~x86"
+# "editor" USE flag disabled until someone gets it to work
+# See http://ufoai.org/forum/index.php?topic=8978
+IUSE="debug dedicated profile"
# Dependencies and more instructions can be found here:
# http://ufoai.ninex.info/wiki/index.php/Compile_for_Linux
-DEPEND="!server? (
+DEPEND="!dedicated? (
virtual/opengl
virtual/glu
- media-libs/libsdl2
+ media-libs/libsdl2[joystick,opengl,sound,threads,video]
media-libs/sdl2-image[jpeg,png]
media-libs/sdl2-ttf
media-libs/sdl2-mixer
- virtual/jpeg
+ virtual/jpeg:62
media-libs/libpng:0
media-libs/libogg
media-libs/libvorbis
+ media-libs/libtheora
x11-proto/xf86vidmodeproto
)
net-misc/curl
sys-devel/gettext
sys-libs/zlib
- editor? (
- dev-libs/libxml2
- virtual/jpeg
- media-libs/openal
- x11-libs/gtkglext
- x11-libs/gtksourceview:2.0
- )"
+"
+ # editor? (
+ # dev-libs/libxml2
+ # virtual/jpeg:62
+ # media-libs/openal
+ # x11-libs/gtkglext
+ # x11-libs/gtksourceview:2.0
+ # )
+ # "
+
RDEPEND="${DEPEND}"
S=${WORKDIR}/${MY_P}-source
@@ -50,18 +60,28 @@ pkg_setup() {
if use profile; then
ewarn "USE=\"profile\" is incompatible with the hardened profile's -pie flag."
fi
+
+ einfo "
+ Note that the dedicated server (ufoded) is currently missing some
+ map files and therefore might not start:
+ http://ufoai.org/bugs/ufoalieninvasion/issues/5383
+
+ Help to fix this is welcome!
+"
+ if use dedicated ; then
+ ewarn "Only building dedicated server, which is known to still fail."
+ fi
}
src_unpack() {
unpack ${MY_P}-source.tar.bz2
- cd "${S}"
- pwd
+ cd "${S}" || die
unpack ${MY_P}-data.tar
}
src_configure() {
- # they are special and provide hand batched configure file
- local myconf="
+ # The configure script of UFO:AI is hand crafted and a bit special
+ local MY_CONF=(
--disable-cgame-campaign
--disable-cgame-multiplayer
--disable-cgame-skirmish
@@ -69,60 +89,56 @@ src_configure() {
--disable-testall
--disable-ufomodel
--disable-ufoslicer
+ --enable-ufoded
$(use_enable !debug release)
- $(use_enable editor uforadiant)
- $(use_enable editor ufo2map)
- $(use_enable server ufoded)
- $(use_enable client ufo)
- $(use_enable sse)
- --enable-game
+ # $(use_enable !dedicated game)
+ --disable-uforadiant
+ --disable-ufo2map
+ # $(use_enable editor uforadiant)
+ # $(use_enable editor ufo2map)
--disable-paranoid
$(use_enable profile profiling)
- --bindir="${GAMES_BINDIR}"
- --libdir="$(games_get_libdir)"
- --datadir="${GAMES_DATADIR}/${PN/-}"
- --localedir="${EPREFIX}/usr/share/locale/"
- --prefix="${GAMES_PREFIX}"
- "
- echo "./configure ${myconf}"
- ./configure ${myconf} || die
+ --prefix="${EPREFIX}"/usr/
+ --datadir="${MY_DATADIR}"
+ )
+ # econf does not work: "invalid option --build=x86_64-pc-linux-gnu"
+ ./configure ${MY_CONF[*]} || die
}
src_compile() {
emake
emake lang
- if use editor; then
- emake uforadiant
- fi
+ # if use editor; then
+ # emake uforadiant
+ # fi
}
src_install() {
- newicon src/ports/linux/ufo.png ${PN}.png
- if use server; then
- dobin ufoded
- make_desktop_entry ufoded "UFO: Alien Invasion Server" ${PN}
- fi
- if use client; then
- dobin ufo
- make_desktop_entry ufo "UFO: Alien Invasion" ${PN}
- fi
+ newicon -s 32 src/ports/linux/ufo.png ${PN}.png
+
+ emake DESTDIR="${D}" install
+
+ # Shell script wrappers are always created for ufo, ufoded and
+ # uforadiant, delete them if we don't need them
+ rm "${D}/usr/bin/uforadiant" || die
+ # if !use editor; then
+ # rm "${D}/usr/bin/uforadiant" || die
+ # fi
- if use editor; then
- dobin ufo2map ufomodel
+ if use dedicated; then
+ rm "${D}/usr/bin/ufo" || die
fi
+}
- # install data
- insinto "${GAMES_DATADIR}"/${PN/-}
- doins -r base || die
- rm -rf "${ED}/${GAMES_DATADIR}/${PN/-}/base/game.so"
- dogameslib base/game.so
+pkg_preinst() {
+ gnome2_icon_savelist
+}
- # move translations where they belong
- dodir "${GAMES_DATADIR_BASE}/locale"
- mv "${ED}/${GAMES_DATADIR}/${PN/-}/base/i18n/"* \
- "${ED}/${GAMES_DATADIR_BASE}/locale/" || die
- rm -rf "${ED}/${GAMES_DATADIR}/${PN/-}/base/i18n/" || die
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
- prepgamesdirs
+pkg_postrm() {
+ gnome2_icon_cache_update
}