Gentoo Archives: gentoo-dev

From: Dan Armak <danarmak@g.o>
To: gentoo-dev@××××××××××.org
Subject: [gentoo-dev] Final qt/QTDIR scheme
Date: Mon, 08 Oct 2001 18:34:09
Message-Id: 200110090034.CAA09513@mailgw2.netvision.net.il
1 Hi all,
2
3 As you may or may not know, during the last three or four days we've had a
4 new (-r1) qt ebuild that installed into /usr and consequently did no use
5 QTDIR.
6
7 However, when (soon) qt-3 comes out, we will have to provide for their
8 coexistence. Due to their headers having the same names, they cannot live in
9 the same dir.
10
11 There were three intermediary schemes to take care of this. If you know about
12 them, forget them, they failed.
13
14 The current and (I very much hope) final scheme is this:
15 qtX installs in /usr/lib/${P}. This is qt-x11-${PV} normally. However there
16 are also qt-x11-free and qt-embedded libraries which we may have in the
17 future, so we don't use /usr/lib/qt-${PV} anymore. A symlink is created in
18 /usr/lib/qt-x11-$MAJOR_VERSION. That is, for now, 2 or 3.
19
20 There is a problem: files in /etc/env. extend settings. When we have more
21 than one QTDIR setting, they will be concatenated and will become meaningless.
22
23 Solution:
24 There is the file /etc/env.d/30qt, which only sets QTDIR. So, the qt
25 installed last is the default.
26
27 Then, there are files ??qt-x11-$MAJOR_VERSION. The first one is 50qt-x11-2,
28 then 49qt-x11-3 and so on. Each of these adds the
29 /usr/lib/qt-x11-$MAJOR_VERSION/{bin,lib,share/man} dirs to the paths. These
30 don't use QTDIR and do use the symlink dirs.
31 The decreasing numbers make certain that later QT versions are given priority
32 (i.e. 3 over 2...) because they are closer to the beginning of the paths.
33
34 99% of qt apps are also KDE apps and as such use eclasses. A configure script
35 should automatically use the qt in QTDIR, which is by default the latest qt.
36 Therefore, once kde3 is out, I will make (tiny) qt{2,3}.eclass files that
37 will say QTDIR=/usr/lib/qt-x11-$MAJOR_VERSION. kde.eclass itself will have
38 QTDIR set to the latest version available.
39
40 This way:
41 - An app inheriting from kde-*.eclass will use the latest qt available.
42 - An app that needs the not-latest version (e.g. qt2 not 3), will explicitly
43 inherit qt$VER.eclass (after kde-*.eclass).
44 - An app being compiled outside ebuilds, non-kde qt apps, and everything else
45 that doesn't use eclasses will have to trust that QTDIR is properly set, or
46 to set it manually to /usr/lib/qt-x11-$MAJOR_VERSION (no biggie).
47
48 ----
49
50 Well, that's it. I'm writing this late at night, so I've probably said
51 something stupid. Comments welcome!
52
53 --
54
55 Dan Armak
56 Gentoo Linux Developer, Desktop Team
57 Matan, Israel

Replies

Subject Author
Re: [gentoo-dev] Final qt/QTDIR scheme Mikael Hallendal <micke@×××××××××××.se>
Re: [gentoo-dev] Final qt/QTDIR scheme - Dan Armak <danarmak@g.o>
Re: [gentoo-dev] Final qt/QTDIR scheme - solution Dan Armak <danarmak@g.o>