Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 173996 - games-emulation/dosbox should honour alsa USE flag
Summary: games-emulation/dosbox should honour alsa USE flag
Status: RESOLVED UPSTREAM
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: 2007-04-10 07:45 UTC by kavol
Modified: 2007-04-10 15:26 UTC (History)
0 users

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 kavol 2007-04-10 07:45:22 UTC
Hi,

I guess this report should be in fact bug 171942 reopened ... as far as I can understand from that, the situation before the "fix" was that anybody having alsa-libs installed got dosbox compiled with alsa support regardless of USE. The situation now is that EVERYBODY gets alsa installed and dosbox compiled with alsa support. This is nonsense - dosbox compiles and runs perfectly without alsa, no need to force its installation even on soundcardless systems (which is the case of one of mine, so that I noticed ...)

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-04-10 07:58:46 UTC
Maybe you should read the referenced bug first before filing a duplicate ( 
Bug 171942, Comment #2 and following).

*** This bug has been marked as a duplicate of bug 171942 ***
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2007-04-10 08:01:02 UTC
yep, patches welcome or you can wait for dosbox-0.71
Comment 3 kavol 2007-04-10 11:20:31 UTC
reopening because of the patch (see below)

(In reply to comment #1)
> Maybe you should read the referenced bug first before filing a duplicate ( 
> Bug 171942, Comment #2 and following).

maybe you should read what people write before you mark something as duplicate ...

comment #2 of bug 171942 says "dosbox always binds to alsa if it finds it"

here I write "anybody having alsa-libs installed got dosbox compiled with alsa support regardless of USE"

isn't it clear that I am aware of the situation?

but the current situation is worse, IMHO - if you disagree then please put some arguments and do not make a fool of me

the patch below is just a quick and dirty improvement before the final solution which will come according to comment #5 of bug 171942 - but it works NOW while we may wait for ages for the next release of dosbox ...


(In reply to comment #2)
> yep, patches welcome or you can wait for dosbox-0.71

# diff -Naur /usr/portage/games-emulation/dosbox/dosbox-0.70.ebuild dosbox-0.70.ebuild
--- /usr/portage/games-emulation/dosbox/dosbox-0.70.ebuild      2007-04-09 21:35:41.000000000 +0200
+++ dosbox-0.70.ebuild  2007-04-10 12:56:53.000000000 +0200
@@ -13,7 +13,7 @@
 KEYWORDS="amd64 ppc ~sparc x86"
 IUSE="alsa debug hardened opengl"

-DEPEND="media-libs/alsa-lib
+DEPEND="alsa? ( media-libs/alsa-lib )
        opengl? ( virtual/opengl )
        debug? ( sys-libs/ncurses )
        media-libs/libpng
@@ -22,10 +22,12 @@
        media-libs/sdl-sound"

 pkg_setup() {
-       if ! built_with_use --missing true media-libs/alsa-lib midi; then
-               eerror "To be able to build dosbox with ALSA support you need"
-               eerror "to have built media-libs/alsa-lib with midi USE flag."
-               die "Missing midi USE flag on media-libs/alsa-lib"
+       if has_version media-libs/alsa-lib ; then
+               if ! built_with_use --missing true media-libs/alsa-lib midi; then
+                       eerror "To be able to build dosbox with ALSA support you need"
+                       eerror "to have built media-libs/alsa-lib with midi USE flag."
+                       die "Missing midi USE flag on media-libs/alsa-lib"
+               fi
        fi
        games_pkg_setup
 }


... this pulls alsa-lib only if alsa support is requested; but if alsa-lib is installed it still does the check for the right USE flags of alsa-lib (mm, I see all the "midi-aware" ebuilds still masked?) - maybe the error message should be modified too to reflect the fact that we are building with alsa support regardless of the USE flag

this seems better to me then forcing everyone to install alsa-lib, since it will affect only people with alsa selectively disabled for dosbox - and with the current dosbox ebuild, these people have bad luck anyway
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2007-04-10 15:26:10 UTC
No.  I'll take a *working* patch to configure.ac or you can wait for 0.71.  Dying in pkg_setup isn't on the table.