Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94487 - qt-4 ebuild should honour X use flag
Summary: qt-4 ebuild should honour X use flag
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 184295 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-30 04:39 UTC by Daniel Haas
Modified: 2007-11-27 17:29 UTC (History)
2 users (show)

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


Attachments
Patch to make qt-4.3.2.ebuild accept USE="-X" (qt-4.3.2.ebuild.no-X11.patch,3.35 KB, patch)
2007-11-27 17:23 UTC, Manuel Nickschas
Details | Diff
Patch qt-x11-opensource-src-4.3.2.tar.gz2 to not build X11-dependent components anymore. (qt-4.3.2-no-X11.patch,7.29 KB, patch)
2007-11-27 17:24 UTC, Manuel Nickschas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Haas 2005-05-30 04:39:10 UTC
It would be great if the qt-4 ebuild would honour the X use flag, and build the
QtGui module only if it is present. That would allow to emerge qt on a server
without X. 
I'm writing a server-daemon which uses Qt for networking/xml/sql, but do not
need the gui. Since Qt4 allows you to build itself without gui, it would be nice
if the qt-4 ebuild honour the X use flag.

Reproducible: Always
Steps to Reproduce:



Expected Results:  
It should be possible to emerge Qt4 without an X-Server being installed.
Comment 1 Gregorio Guidi (RETIRED) gentoo-dev 2005-05-30 06:17:49 UTC
I fear this could become a hell for programs that have qt as a dependency... 
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2005-05-30 07:14:09 UTC
I worked on this a while back, but at the time there was no way to easily
disable compilation against X.  Instead, Qt decides on its own if it can build
against the server or not.  Or you can do lots of manual "makes", which were
beyond what I was going to attempt to do then.  Perhaps once the Qt4 build
process matures a bit more we'll look into it again.
Comment 3 Caleb Tennis (RETIRED) gentoo-dev 2005-05-30 07:16:03 UTC
Greg - yeah, it may be interesting.
Comment 4 Caleb Tennis (RETIRED) gentoo-dev 2005-07-13 20:16:44 UTC
Closing as a later - may support it once it's feasible to actually do it (unsupported thus far in qt-4.0.0)
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-07-05 13:21:54 UTC
*** Bug 184295 has been marked as a duplicate of this bug. ***
Comment 6 Manuel Nickschas 2007-07-05 14:17:56 UTC
Sorry, did not find this old bug using several keywords ;-)

Actually, Qt should be mature enough now to look into this again. According to Qt devs, it is possible to build the individual Qt4 components individually as subtargets.

For this to work, one runs a standard configure, and then instead of 'make all', one runs 'make sub-corelib', 'make sub-network' and so on.
Subtargets can be installed by 'make sub-corelib-install_subtargets' and so on. This is then followed by "make install_htmldocs install_translations install_qmake install_mkspecs".

Shouldn't be too hard, I think... I'd provide a patched ebuild, but I haven't done that before and I'd rather have an actual maintainer look into this, if possible.

As for other programs' dependencies, I don't think this is a real problem. Somebody having USE="-X" on his system wouldn't want to install programs depending on QtGui anyway.
Comment 7 Wulf Krueger (RETIRED) gentoo-dev 2007-07-05 15:10:49 UTC
Seeing the recent dupe and some QT versions later maybe this would be a good time to revisit this bug?
Comment 8 Wulf Krueger (RETIRED) gentoo-dev 2007-07-05 15:11:09 UTC
cf. Comment #6.
Comment 9 Caleb Tennis (RETIRED) gentoo-dev 2007-08-21 22:36:15 UTC
When someone comes up with a patch that supports this, I'm all for it.
Comment 10 Manuel Nickschas 2007-11-27 17:23:05 UTC
Created attachment 137134 [details, diff]
Patch to make qt-4.3.2.ebuild accept USE="-X"

This patch introduces the X USE flag to the current qt4 ebuild.

Apply to qt-4.3.2.ebuild (as of Nov. 27th)
Comment 11 Manuel Nickschas 2007-11-27 17:24:41 UTC
Created attachment 137136 [details, diff]
Patch qt-x11-opensource-src-4.3.2.tar.gz2 to not build X11-dependent components anymore.

Apply to stock Qt 4.3.2 source in order to prevent X11-dependent components from being built.
Comment 12 Manuel Nickschas 2007-11-27 17:29:42 UTC
As requested, I have provided patches to both the ebuild and Qt to make building without X11 deps possible. Tested on an ~amd64 server without X11 installed, and on ~x86 with X11. Builds all modules except QtGui (and whatever else is disabled via USE), plus the non-X11 dependent tools (moc, uic, lrelease, lupdate).

Since I am not an ebuild wizard, I hope I did everything correctly :) WORKSFORME at least. Hope to find this in the official portage tree soon :)