Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 245885

Summary: games-fps/rott-1.1.1 (Rise of the Triad) (new ebuild)
Product: Gentoo Linux Reporter: Ivan Anishchuk <matimatik>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: CONFIRMED ---    
Severity: enhancement CC: bugzie, caibbor, chewi, corrosifdev, nitro
Priority: High Keywords: EBUILD
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: http://icculus.org/rott/
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 200967    
Bug Blocks:    
Attachments: ebuild for rott-1.1
full-version patch for rott-1.1
ebuild for rott-1.1
ebuild for rott-1.1.1
games-fps/rott-1.1.1.ebuild
games-fps/rott-1.1.1-r1.ebuild
games-fps/rott-1.1.1-r1.ebuild
games-fps/rott-1.1.1-r1.ebuild
games-fps/rott-1.1.1-r1.ebuild

Description Ivan Anishchuk 2008-11-06 20:28:45 UTC
Ebuild for 3drealms' rott (Risen of the Triad) game ported by Icculus. This ebuild support installing demodata and cdinstall-data through games-fps/rott-data (Bug 200967). This ebuild updates one in portage.
Comment 1 Ivan Anishchuk 2008-11-06 20:33:35 UTC
Created attachment 170943 [details]
ebuild for rott-1.1

Oh! I forgot to attach ebuild :)
Comment 2 Andreas Thillosen 2008-11-10 17:16:05 UTC
(In reply to comment #1)
> Created an attachment (id=170943) [edit]
> ebuild for rott-1.1
> 
> Oh! I forgot to attach ebuild :)
> 

Where do we get the following file?
rott-1.1-full-version.patch

Could you please attach it to the bug?
Comment 3 Ivan Anishchuk 2008-11-10 17:26:24 UTC
Created attachment 171326 [details, diff]
full-version patch for rott-1.1

I've made it myself. I think that maybe replased by sed command that will not depend on version, but I haven't time...
Comment 4 Andreas Thillosen 2008-11-11 00:47:07 UTC
(In reply to comment #3)
> Created an attachment (id=171326) [edit]
> full-version patch for rott-1.1
> 
> I've made it myself. I think that maybe replased by sed command that will not
> depend on version, but I haven't time...
> 

A freedesktop icon would be nice also... I will see if I have time myself.
Comment 5 Ivan Anishchuk 2008-11-11 11:39:50 UTC
Created attachment 171409 [details]
ebuild for rott-1.1

Installing docs is fixed.
Fullversion patch replaced by sed srcript.
Desktop entry generation is added.
Comment 6 Ivan Anishchuk 2009-07-16 06:05:36 UTC
Created attachment 198126 [details]
ebuild for rott-1.1.1

new minor release
Comment 7 James Le Cuirot gentoo-dev 2009-07-16 08:51:39 UTC
Works on amd64. Had to delete my .rott directory for 1.1 and 1.1.1 to work. 1.0 didn't even build if I remember right.
Comment 8 Jared B. 2010-07-26 03:13:42 UTC
Adding updated ebuild.  Contains some minor cleanup, dependencies for midi support, and amd64 keyword.  I also removed the -j1 limitation when building; seems to compile fine with multiple jobs.
Comment 9 Jared B. 2010-07-26 03:14:42 UTC
Created attachment 240171 [details]
games-fps/rott-1.1.1.ebuild
Comment 10 Brandon Captain 2010-10-07 05:57:14 UTC
Jare;ds rott-1.1.1 ebuild on 2010-07-26 won't digest:


 # ebuild rott-1.1.1.ebuild digest
--- Unmatch removal atoms in /var/lib/layman/pcsx2/profiles/package.mask: -games-emulation/ps2emu-cddvdlinuz, -games-emulation/pcsx2, -games-emulation/ps2emu-padxwin and 5 more
Error(s) in metadata for 'games-fps/rott-1.1.1':
  RDEPEND: !demo? ( cdinstall? ( games-fps/rott-data ) ) demo? ( ! games-fps/rott-data ) midi? ( media-libs/sdl-mixer[midi,timidity] )
    Invalid atom (!), token 10
Comment 11 Jared B. 2010-10-09 04:56:02 UTC
(In reply to comment #10)
> Jare;ds rott-1.1.1 ebuild on 2010-07-26 won't digest:

I just tried regenerating the digest file and reinstalling the ebuild on my system, and it works fine.  The error messages you're getting seem to be related to an overlay, though I Have absolutely no idea why portage would be messing with pcsx2-related stuff while install rott.
Comment 12 Jared B. 2011-06-12 02:02:26 UTC
(In reply to comment #10)
> Jare;ds rott-1.1.1 ebuild on 2010-07-26 won't digest:
> <SNIP>
> Error(s) in metadata for 'games-fps/rott-1.1.1':
>   RDEPEND: !demo? ( cdinstall? ( games-fps/rott-data ) ) demo? ( !
> games-fps/rott-data ) midi? ( media-libs/sdl-mixer[midi,timidity] )
>     Invalid atom (!), token 10

I just stumbled on this problem while revisiting this ebuild.  It was caused by the space between here: "! games-fps/rott-data".  Why this worked for me before and fails now I have no idea.  I'm about to attach an updated ebuild that includes the fix, though.  Just wanted to address this point specifically since you had brought it up (a long while back :-).
Comment 13 Jared B. 2011-06-12 02:11:58 UTC
Created attachment 276723 [details]
games-fps/rott-1.1.1-r1.ebuild

So as I just mentioned I did some more work on this ebuild.  I bought the GOG version of RotT and had trouble getting it to load the additional level packs using the -filertl option.  Turns out there were two issues:

1. The rott binary only checks for mission packs in $PWD, so it'll fail unless you first CD to the directory containing the packs.  Using a standard wrapper solved that.

2. There's a typo in the source code that prevents loading RTL (single-player level) packs unless the extension is included.  On the other hand, it was possible to load RTC (multi-player level) packs without the extension.  Turns out this was because it tries appending .rtc to the filename when either the -filertl or -filertc options are specified.  I included a sed one-liner to fix this so that .rtl is appended when -filertl is used.

I also updated the rott-data ebuild to support installing everything from the GOG package.  I'll be attaching it to bug 200967 for anyone interested.
Comment 14 Jared B. 2012-04-14 02:17:48 UTC
Created attachment 308843 [details]
games-fps/rott-1.1.1-r1.ebuild

minor update:  midi USE flag only depends on on timidity support in sdl-mixer.  Best I can tell, this is all that's really needed, so no sense throwing sdl-mixer[midi] in there as well.
Comment 15 James Le Cuirot gentoo-dev 2012-04-14 07:37:48 UTC
You should use sdl-mixer[midi] rather than sdl-mixer[timidity]. As of 1.2.12, sdl-mixer also supports FluidSynth as a backend. I implemented this myself and ROTT was one of my test programs. :) It is a major improvement because FluidSynth support SoundFonts whereas the really old bundled version of Timidity doesn't. sdl-mixer also used to support native MIDI via ALSA, which I actually used, but it's been removed due to licensing issues.
Comment 16 James Le Cuirot gentoo-dev 2012-04-14 07:42:48 UTC
You could also do media-libs/sdl-mixer[midi?] in DEPEND instead of including it twice. Then again, I guess the midi flag is technically only an RDEPEND.

Out of curiosity, what does UIDEPEND mean? Why is it separate from DEPEND?
Comment 17 James Le Cuirot gentoo-dev 2012-04-14 07:46:30 UTC
Gah, it's too early in the morning. Obviously sdl-mixer has to be in DEPEND and RDEPEND. You know what I meant. ;)
Comment 18 Jared B. 2012-04-14 18:26:57 UTC
fluidsynth doesn't work for me with rott through sdl-mixer.  I already have it on my system for Rosegarden, and it works great there, but I get no must from rott if I recompile both it and sdl-mixer with USE="midi fluidsynth -timidity".  That's why I hardcoded timidity.  Is there some trick to making that work?

The other reason is I don't particularly like how midi is handled now in sdl-mixer.  I have to set USE="midi fluidsynth" or USE="midi timidity".  I know it's not really all that big of a deal, but requiring two USE flags to enable one feature seems weird, and I was trying to avoid requiring that for rott.

As for the UIDEPEND stuff, I have no idea.  I've just been editing what was already there, and the depend stuff had been working as-is, so I never gave it much thought.  I didn't even realize sdl-mixer was listed twice.  :-)  I just fixed that in my ebuild, though, and will attach a new version here, but I'd like to get the fluidsynth thing figured out since you say that's supposed to work.
Comment 19 Jared B. 2012-04-14 18:28:17 UTC
(In reply to comment #18)
> but I get no must
but I get no music
Comment 20 James Le Cuirot gentoo-dev 2012-04-14 18:46:28 UTC
FluidSynth didn't work because you need a SoundFont and you have to set the SDL_SOUNDFONTS environment variable to its path. Because FluidSynth deliberately doesn't quite work out of the box, it may be a good idea to make the timidity flag default on sdl-mixer with IUSE="+timidity".
Comment 21 Jared B. 2012-04-14 18:57:40 UTC
I have a soundfont available.  I didn't know about SDL_SOUNDFONTS, though.  Maybe that should be referenced somewhere, such as in pkg_postinst() from sdl-midi fluidsynth support is enabled?  I also agree with setting timidity as the default, but that'd have to be taken up with the maindainer of sdl-mixer.

Anyway, I set SDL_SOUNDFONTS, but I still get no music from rott:
$ echo $SDL_SOUNDFONTS
/home/user/data/music/Midis/SoundFonts/FluidR3_GM.sf2

Again, I use this same soundfont with fluidsynth for Rosegarden and it works fine there, so I know that the individual components at least work.  Is there anything else I need to do to make this work in rott?  Do I need to have something set before compilation, maybe, or add something to the rott config?
Comment 22 James Le Cuirot gentoo-dev 2012-04-14 19:27:29 UTC
pkg_postinst would be a good idea. I'll file a bug later about that and making timidity default. With hindsight, I should have made sdl-mixer output a warning if SDL_SOUNDFONTS is not set and no other backend is available. FluidSynth takes precedence over the others but only if SDL_SOUNDFONTS is set.

You at least don't have to worry about people building with USE="midi -timidity -fluidsynth" because REQUIRED_USE in sdl-mixer ensures that at least one backend is enabled.

I'm afraid I don't know why it isn't working for you. As I said, ROTT is one the few games I did test it with and I have seen comments around the web confirming that other people are using it successfully. Stupid question but did you remember to export SDL_SOUNDFONTS?
Comment 23 James Le Cuirot gentoo-dev 2012-04-14 22:18:51 UTC
I have now filed bug #412035.
Comment 24 Jared B. 2012-04-15 00:39:58 UTC
(In reply to comment #22)
> I'm afraid I don't know why it isn't working for you. As I said, ROTT is one
> the few games I did test it with and I have seen comments around the web
> confirming that other people are using it successfully. Stupid question but
> did you remember to export SDL_SOUNDFONTS?

Affirmative.  I even tried this:
SDL_SOUNDFONTS=/home/user/data/music/Midis/SoundFonts/FluidR3_GM.sf2 rott

Still, no sound, and no useful error messages.  I guess I'll try running through strace and the like to see if I can come up with anything useful.
Comment 25 Jared B. 2012-04-15 00:45:19 UTC
Created attachment 308987 [details]
games-fps/rott-1.1.1-r1.ebuild

more dependency fixes
Comment 26 James Le Cuirot gentoo-dev 2012-04-15 07:39:25 UTC
If you want to see error messages then you need to build SDL (not SDL_mixer) with debugging enabled because SDL_SetError is used.

I think the deps need to look like...

CDEPEND="media-libs/libsdl
	midi? ( media-libs/sdl-mixer[midi] )"
RDEPEND="${CDEPEND}
	!demo? ( cdinstall? ( games-fps/rott-data ) )
	demo? ( !games-fps/rott-data )"
DEPEND="${CDEPEND}
	demo? ( app-arch/unzip )
Comment 27 Jared B. 2012-09-21 03:05:05 UTC
Created attachment 324460 [details]
games-fps/rott-1.1.1-r1.ebuild

minor update - does away with cdinstall USE flag, as suggested by James in bug 200967.  Data file selection is now controlled solely by the demo USE flag.  With USE=-demo (default), rott-data is pulled in.  With USE=demo, rott-data is explicitly blocked.

Haven't changed the previously discussed dependencies as I was never able to get fluisynth working, so I'd prefer to stick with what I know works and is required.
Comment 28 James Le Cuirot gentoo-dev 2012-09-21 08:04:17 UTC
This is my fault due to the comment above but doesn't the game need sdl-mixer for the sounds as well? It probably doesn't build without it. In this case, "midi? ( media-libs/sdl-mixer[midi] )" should be changed to "media-libs/sdl-mixer[midi?]". Either way, libsdl and sdl-mixer need to be in RDEPEND too, hence my CDEPEND above.