Hi all,
As you may or may not know, during the last three or four days we've had a
new (-r1) qt ebuild that installed into /usr and consequently did no use
QTDIR.
However, when (soon) qt-3 comes out, we will have to provide for their
coexistence. Due to their headers having the same names, they cannot live in
the same dir.
There were three intermediary schemes to take care of this. If you know about
them, forget them, they failed.
The current and (I very much hope) final scheme is this:
qtX installs in /usr/lib/${P}. This is qt-x11-${PV} normally. However there
are also qt-x11-free and qt-embedded libraries which we may have in the
future, so we don't use /usr/lib/qt-${PV} anymore. A symlink is created in
/usr/lib/qt-x11-$MAJOR_VERSION. That is, for now, 2 or 3.
There is a problem: files in /etc/env. extend settings. When we have more
than one QTDIR setting, they will be concatenated and will become meaningless.
Solution:
There is the file /etc/env.d/30qt, which only sets QTDIR. So, the qt
installed last is the default.
Then, there are files ??qt-x11-$MAJOR_VERSION. The first one is 50qt-x11-2,
then 49qt-x11-3 and so on. Each of these adds the
/usr/lib/qt-x11-$MAJOR_VERSION/{bin,lib,share/man} dirs to the paths. These
don't use QTDIR and do use the symlink dirs.
The decreasing numbers make certain that later QT versions are given priority
(i.e. 3 over 2...) because they are closer to the beginning of the paths.
99% of qt apps are also KDE apps and as such use eclasses. A configure script
should automatically use the qt in QTDIR, which is by default the latest qt.
Therefore, once kde3 is out, I will make (tiny) qt{2,3}.eclass files that
will say QTDIR=/usr/lib/qt-x11-$MAJOR_VERSION. kde.eclass itself will have
QTDIR set to the latest version available.
This way:
- An app inheriting from kde-*.eclass will use the latest qt available.
- An app that needs the not-latest version (e.g. qt2 not 3), will explicitly
inherit qt$VER.eclass (after kde-*.eclass).
- An app being compiled outside ebuilds, non-kde qt apps, and everything else
that doesn't use eclasses will have to trust that QTDIR is properly set, or
to set it manually to /usr/lib/qt-x11-$MAJOR_VERSION (no biggie).
----
Well, that's it. I'm writing this late at night, so I've probably said
something stupid. Comments welcome!
--
Dan Armak
Gentoo Linux Developer, Desktop Team
Matan, Israel
|