Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64863 - openttd ebuild doesn't support non-timidity midi
Summary: openttd ebuild doesn't support non-timidity midi
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-21 08:23 UTC by Gerry
Modified: 2004-12-28 02:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerry 2004-09-21 08:23:40 UTC
OpenTTD has support for playing its midi files through another midi player than timidity by using the MIDI option to the makefile.  For example, I build with MIDI=/usr/bin/pmidi to have OpenTTD play hardware midi through pmidi, in stead of using timidity emulation.  It would be nice if the ebuild had support for this, so that I can use the ebuild and get music without having to install timidity.  (use flag or environment variable ?)

Reproducible: Always
Steps to Reproduce:
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-11-19 23:38:27 UTC
I talked to upstream and they might address this with a command-line option in a future version.  Development doesn't seem to be going that quickly though and since there hasn't been a release in a while, i'm going to mark this as UPSTREAM since it won't be addressed until they release again.
Comment 2 Gerry 2004-11-20 08:01:57 UTC
Huh ?  That doesn't make sense.  OpenTTD already doesn't require timidity, only the gentoo ebuild does.  As I said, all that needs to be done is to add MIDI=/usr/bin/pmidi to the make line to use hardware midi through pmidi in stead of software midi through timidity.  

All you have to do to support this is to check for the timidity USE flag in the openttd ebuild (which you already do).  If it's disabled, you can depend on pmidi in stead of timidity, and add MIDI=/usr/bin/pmidi to $(myopts).  There's no need for any upstream changes.  Actually, if depending on pmidi is a problem, you don't have to, since if /usr/bin/pmidi doesn't exist, it simply won't be used.

Here, I'll make it easy for you.  Add this line to the openttd ebuild before the emake line:

use timidity || myopts="${myopts} MIDI=/usr/bin/pmidi"

And change:
einfo "timidity not in USE so music will not be played during the game."
to:
einfo "timidity not in USE, using pmidi in stead.  emerge pmidi if you want in-game music."

That's all that's required to make it work.
Comment 3 David Holm (RETIRED) gentoo-dev 2004-12-28 02:06:52 UTC
Fixed in 0.3.5