Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214489 - Why ENFORCING "X" usage in dev-python/pygame-1.8.0_rc4.ebuild?
Summary: Why ENFORCING "X" usage in dev-python/pygame-1.8.0_rc4.ebuild?
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-24 09:50 UTC by Lucian Muresan
Modified: 2009-09-10 22:25 UTC (History)
3 users (show)

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


Attachments
disable X11 source patch (pygame-1.8.0rc4_disable-X11.diff,454 bytes, patch)
2008-03-24 18:53 UTC, Lucian Muresan
Details | Diff
disable X11 ebuild patch (pygame-1.8.0_rc4_disable-X11.ebuild.diff,1.11 KB, patch)
2008-03-24 18:54 UTC, Lucian Muresan
Details | Diff
X11 optional entirely depending on X USE flag (pygame-1.8.1-r1.ebuild_optional_X11.diff,1.05 KB, patch)
2009-05-29 21:58 UTC, Lucian Muresan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lucian Muresan 2008-03-24 09:50:23 UTC
dev-python/pygame depends on media-libs/libsdl which can be built with USE="-X" (think of DirectFB for example). It would be nice (and Gentoo-ish) if upcoming dev-python/pygame ebuilds would not be telling me I should emerge libsdl with USE="X", when I'm explicitly running an X-less multimedia system (a HTPC outputting video via DirectFB), on which I occasionally use Freevo? I'm use any game emulator in Freevo itself, it's juat that pygame is still a required dependency.

Reproducible: Always

Steps to Reproduce:

Actual Results:  
emerging dev-python/pygame-1.8.0_rc4.ebuild mocks about libsdl not having been emerged with USE="X".

Expected Results:  
the pygame ebuild should play nice and respect the user'S _choice_ about USE flags (epecially since it's technically possible).
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-03-24 09:54:31 UTC
  03 Mar 2008; Tiziano Müller <dev-zero@gentoo.org>
  pygame-1.8.0_rc4.ebuild:
  Fixed various QA issues. Added check that libSDL is compiled with X support
  (bug #150329). And it now supports unicode (bug #154012 is therefore solved
  as well).
Comment 2 Lucian Muresan 2008-03-24 10:28:00 UTC
Sorry that I entered the text of my bug report too fast, maybe I wasn't too explicit. How come that this is not a bug, forcing such a huge dependency like "X" when it's not necessary?
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2008-03-24 10:34:39 UTC
What's not necessary? Read bug #150329 perhaps?
Comment 4 Lucian Muresan 2008-03-24 11:29:45 UTC
I read that. Did you read this comment, too http://bugs.gentoo.org/show_bug.cgi?id=150329#c4 ?
In the spirit of Gentoo (having CHOICE), the solution should be a combination of that proposed in this comment, and your solution (forcing X).
Plain and simple as letting the pygame ebuild have a USE flag "X", and enforce having the dependency libsdl beeing compiled with "X", ONLY if the flag is set for pygame, too, else, just compile without X11 support like proposed in the linke I gave.
Comment 5 Lucian Muresan 2008-03-24 18:53:32 UTC
Created attachment 147157 [details, diff]
disable X11 source patch

May not be teh most elegant place to disable it, but looked pretty effective to me since DISABLE_X11 is checked in 3 places in pygame's source code.
Comment 6 Lucian Muresan 2008-03-24 18:54:12 UTC
Created attachment 147158 [details, diff]
disable X11 ebuild patch
Comment 7 Lucian Muresan 2008-03-24 18:55:24 UTC
You might at least have a look at the attached patches, whioch OPTIONALLY disable X11 (by the "X" USE flag).
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2008-03-24 19:20:26 UTC

*** This bug has been marked as a duplicate of bug 150329 ***
Comment 9 Harald van Dijk (RETIRED) gentoo-dev 2008-03-24 20:05:23 UTC
Er... regardless of whether this is a duplicate, either this bug or #150329 should be reopened for the pygame maintainers to look at the attached patch. It's probably easiest to keep it here.
Comment 10 Santiago M. Mola (RETIRED) gentoo-dev 2008-04-05 12:35:21 UTC
CC'ed René Dudfield, part of upstream or something like that ;-).

René, maybe you can give us some advice about this problem...?
Comment 11 Rene Dudfield 2008-07-11 06:29:18 UTC
(In reply to comment #10)
> CC'ed René Dudfield, part of upstream or something like that ;-).
> 
> René, maybe you can give us some advice about this problem...?
> 

Hi,

yeah, pygame can be used without X (if it can't it's a bug we need to fix).

I'm not sure how the rest of SDL programs deal with this in gentoo?  However I think that's probably the best method to follow.

cheers,
Comment 12 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-05-23 15:44:33 UTC
Defining DISABLE_X11 causes compilation failure in dev-python/pygame-1.8.1-r1:

src/scrap.c:74:6: error: #error Unknown window manager for clipboard handling
Comment 13 Lucian Muresan 2009-05-29 13:20:57 UTC
(In reply to comment #12)
> Defining DISABLE_X11 causes compilation failure in dev-python/pygame-1.8.1-r1:
> 
> src/scrap.c:74:6: error: #error Unknown window manager for clipboard handling
> 

Well, it does not cause any compilation failure if the config script does not find any "SCRAP" (I do not know what that is and also don't even mind what it is since I only want to get pygame built as a dependency on my HTPC system to run Freevo with DirectFB output via SDL, and actually don't care of games) on the system.
Have a look here: http://www.mail-archive.com/pygame-users@seul.org/msg11907.html René Dudfield says it might be only this SCRAP thing really requiring X11 stuff. But, on the other side, why isn't there any such SCRAP found on my X11-less setup? I also cannot find an ebuild in the portage tree containing it, maybe it's called different.
So, as expected, pygame can optionally be used without X (if one choses to miss the marvelous X11 features), even if gentoo ebuild maintainers seem not to be willing to accept this...
Comment 14 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-05-29 19:30:36 UTC
Reopen with a working patch.
Comment 15 Lucian Muresan 2009-05-29 21:58:47 UTC
Created attachment 192934 [details, diff]
X11 optional entirely depending on X USE flag

Well, the patch working for me is the same I submitted 14 months ago for version 1.8.0_rc4 which you just obsoleted, the same applies currently for 1.8.1-r1. The patch to the current ebuild also does the same as the old ebuild patch did, I'm submitting an updated one for the ebuild, the sources patch is not changed.

However, given the SCRAP module thing I told you about, I could only test on my desktop machine, where the X USE flag is set and SCRAP is found (don't know from which ebuild):

Hunting dependencies...
SDL     : found 1.2.13
FONT    : found
IMAGE   : found
MIXER   : found
SMPEG   : found 0.4.4
PNG     : found
JPEG    : found
SCRAP   : found

On my machine without X, and with the patch, only SCRAP is not found and pygame builds successfully. Hope this helps, finally...
Comment 16 Lucian Muresan 2009-05-29 22:00:53 UTC
Comment on attachment 147157 [details, diff]
disable X11 source patch

still applies to 1.8.1-r1
Comment 17 Lucian Muresan 2009-05-29 22:02:00 UTC
reopening as requested
Comment 18 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-10 22:25:05 UTC
DISABLE_X11 seems to not be supported in dev-python/pygame-1.9.1.