Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Gamers & Players
  • Search

UFO-AI newere ebuilds / Portage refresh?

Having problems getting your favorite Linux game to work? Want to discuss strategies? This is the place!
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
Author
Message
NagaDrag
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 88
Joined: Sat Dec 09, 2006 7:45 am

UFO-AI newere ebuilds / Portage refresh?

  • Quote

Post by NagaDrag » Mon Feb 05, 2007 12:02 pm

UFO AI ( www.ufoai.net )

great game, nice and free remake of the original UFO game

Problem is, the UFO-AI linux version in portage is only available for version 0.10

I am currently running version 2.0 RC6 under Window$, and I did not have much luck figuring out how the linux version installs

I downloaded the DATA FILES and the SOURCE file from sourceforge.

What im also confused on is : Windows install is over 200 MB, Linux is just about ~100MB

Would someone who figured it out either post an ebuild, add it to portage, or help me figure out how to compile it, and what I need

--NagaDrag
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Mon Feb 05, 2007 12:32 pm

It's currently distro-unfriendly because it's meant to be installed and run within ~, rather than /usr/whatever. It therefore requires some patches to the source code, to find & write files in the proper places. Here is my unfinished and broken ebuild, if it's of interest.

/usr/local/portage/games-strategy/ufo-ai/ufo-ai-2.0_rc6.ebuild

Code: Select all

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# Doesn't find the .so files

inherit eutils flag-o-matic toolchain-funcs games

MY_PV=${PV/_rc/-RC}
MY_P="ufoai-${MY_PV}"
MY_SF="mirror://sourceforge/ufoai"

DESCRIPTION="UFO: Alien Invasion - X-COM inspired strategy game"
HOMEPAGE="http://www.ufoai.net/"
SRC_URI="${MY_SF}/${MY_P}-source.tar.bz2
	${MY_SF}/base.tar.bz2
	${MY_SF}/hullbr3ach.tar.gz
	${MY_SF}/music.tar.bz2
	${MY_SF}/skins-phopue.tar.gz
	${MY_SF}/ufoai_dru_tex.zip"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="alsa arts debug dedicated dga ipv6 mmx nls oss paranoid tools"

# Info at http://ufo.myexp.de/wiki/index.php/Compile_for_Linux
# and http://ufo.myexp.de/wiki/index.php/Debian
RDEPEND=">=media-libs/libsdl-1.2
	>=media-libs/sdl-ttf-2
	virtual/opengl
	virtual/glu
	media-libs/jpeg
	media-libs/libvorbis
	media-libs/libogg
	nls? ( sys-devel/gettext )
	x11-libs/libXxf86dga
	x11-libs/libXxf86vm"
DEPEND="${RDEPEND}
	app-arch/unzip
	x11-proto/xextproto"

S=${WORKDIR}/${MY_P}-source
dir=${GAMES_DATADIR}/${PN}
libdir=${GAMES_LIBDIR}/${PN}

src_unpack() {
	unpack ${A}
	cd "${S}"

	rm -f docs/readme.solaris

	# Use shared directories
	sed -i \
		-e "s:\"basedir\", \".\":\"basedir\", \"${dir}\":" \
		-e "s:FS_AddGameDirectory(va(\"\%s/\" BASEDIRNAME, fs_basedir->string));:FS_AddGameDirectory(va(\"%s/\" BASEDIRNAME, fs_basedir->string));\n\tFS_AddGameDirectory(\"${libdir}\");:" \
		-e "s:FS_AddGameDirectory(va(\"\%s/\%s\", fs_basedir->string, dir));:FS_AddGameDirectory(va(\"\%s/\%s\", fs_basedir->string, dir));\n\tFS_AddGameDirectory(\"${libdir}\");:" \
		qcommon/files.c || die "sed files.c failed"
}

src_compile() {
	yesno() { useq $1 && echo yes || echo no ; }

	local target="release"
	use debug && target="debug"

	emake \
		BUILD_DEDICATED=$(yesno dedicated) \
		BUILD_ALSA=$(yesno alsa) \
		BUILD_OSS=$(yesno oss) \
		BUILD_ARTS=$(yesno arts) \
		HAVE_IPV6=$(yesno ipv6) \
		HAVE_GETTEXT=$(yesno nls) \
		BUILD_WITH_DGA=$(yesno dga) \
		BUILD_WITH_VIDMODE=$(yesno X) \
		BUILD_WITH_MMX=$(yesno mmx) \
		BUILD_PARANOID=$(yesno paranoid) \
		BUILD_COMPILETOOLS=$(yesno tools) \
		CC="$(tc-getCC)" \
		BUILD_RELEASE_DIR=release \
		BUILD_DEBUG_DIR=release \
		build_${target} || die "emake ${target} failed"
}

src_install() {
	exeinto "${libdir}"
	doexe release/*.so || die "doexe *.so failed"

	newgamesbin release/ufo ${PN}.bin || die "newgamesbin failed"
	games_make_wrapper ${PN}{,.bin} "${dir}"

	if use dedicated ; then
		newgamesbin release/ufoded ${PN}-ded.bin \
			|| die "newgamesbin ufoded failed"
		games_make_wrapper ${PN}-ded{,.bin} "${dir}"
	fi

	insinto "${dir}"
	doins -r "${WORKDIR}"/{base,exterior,hullbr3ach,interior,music,skins-phopue} \
		|| die "doins -r failed"

	dodoc docs/*

	prepgamesdirs
}
Top
Sivert
n00b
n00b
User avatar
Posts: 14
Joined: Wed Aug 24, 2005 4:15 pm

  • Quote

Post by Sivert » Tue Feb 06, 2007 10:08 am

It's svn is updated daily so there's no point in doing ebuild for it. Get it from svn to some dir and compile it.
Top
tboloo
Guru
Guru
User avatar
Posts: 403
Joined: Fri Jan 20, 2006 12:51 pm
Location: Grodzisq, Poland

  • Quote

Post by tboloo » Tue Feb 06, 2007 12:08 pm

I'm probably missing something trivial, but when I try to run ufo-ai I get :

Code: Select all

bolek@abt ~ $ ufo-ai
Adding game dir: /usr/share/games/ufo-ai/base
Adding game dir: /usr/games/lib/ufo-ai
using /home/bolek/.ufoai/base for writing
Adding game dir: /home/bolek/.ufoai/base
execing default.cfg
execing config.cfg
execing keys.cfg
Console initialized.

------- sound initialization -------
Loading snd_sdl sound driver
Load library failed: snd_sdl.so: cannot open shared object file: No such file or directory
------- Loading ref_glx.so -------
LoadLibrary("ref_glx.so"): can't open /etc/ufo.conf - setting search path to .
LoadLibrary("ref_glx.so") failed: ./ref_glx.so: cannot open shared object file: No such file or directory
Dumped console text to /home/bolek/.ufoai/base/gl_debug.txt.
recursive shutdown
Error: Couldn't initialize OpenGL renderer!
Consult gl_debug.txt for further information.
but

Code: Select all

bolek@abt ~ $ locate snd_sdl.so
/usr/games/lib/ufo-ai/snd_sdl.so
bolek@abt ~ $ locate ref_glx.so
/usr/games/lib/ufo-ai/ref_glx.so
and the output of gl_debug.txt is as follows

Code: Select all

 1 ------- sound initialization -------
 2 Loading snd_sdl sound driver
 3 Load library failed: snd_sdl.so: cannot open shared object file: No such file or
 4  directory
 5 ------- Loading ref_glx.so -------
 6 LoadLibrary("ref_glx.so"): can't open /etc/ufo.conf - setting search path to .
 7 LoadLibrary("ref_glx.so") failed: ./ref_glx.so: cannot open shared object file:
 8 No such file or directory
 9 Dumped console text to /home/bolek/.ufoai/base/gl_debug.txt.
.::EDIT::.
I placed snd_sdl.so in /usr/lib directory, changed permissions and the error that I get now is as follows

Code: Select all

bolek@abt ~ $ ufo-ai
Adding game dir: /usr/share/games/ufo-ai/base
Adding game dir: /usr/games/lib/ufo-ai
using /home/bolek/.ufoai/base for writing
Adding game dir: /home/bolek/.ufoai/base
execing default.cfg
execing config.cfg
execing keys.cfg
Console initialized.

------- sound initialization -------
Loading snd_sdl sound driver
Soundsystem: SDL.
SDL version: 1.2.11
SDL audio driver is "alsa".
Bits: 16
Frequency: 48000
Samples: 4096
Channels: 2
sound sampling rate: 48000
------- Loading ref_glx.so -------
LoadLibrary("ref_glx.so") failed: ./ref_glx.so: cannot open shared object file: No such file or directory
Dumped console text to /home/bolek/.ufoai/base/gl_debug.txt.
SDL audio device shut down.
recursive shutdown
Error: Couldn't initialize OpenGL renderer!
Consult gl_debug.txt for further information.
The clock is ticking, brothers and sisters, counting down to Armageddon.
Top
tboloo
Guru
Guru
User avatar
Posts: 403
Joined: Fri Jan 20, 2006 12:51 pm
Location: Grodzisq, Poland

  • Quote

Post by tboloo » Sun Feb 11, 2007 3:47 pm

.::BUMP::.
Anyone ??
I've searched ufp-ai's forum, double-checked everything but the error persists ...
The clock is ticking, brothers and sisters, counting down to Armageddon.
Top
Post Reply
  • Print view

5 posts • Page 1 of 1

Return to “Gamers & Players”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic