1 |
On Fri, Mar 27, 2020 at 4:49 PM James Le Cuirot <chewi@g.o> wrote: |
2 |
> On Fri, 27 Mar 2020 13:10:34 -0400 |
3 |
> David Michael <fedora.dm0@×××××.com> wrote: |
4 |
> |
5 |
> > I'd like to be able to install qt5 packages in a sysroot for staging, |
6 |
> > and this is an initial patch for it. The pkg-config variables might not |
7 |
> > be required, but it seemed appropriate to pass the sysroot-configured |
8 |
> > versions through the build. There are a few caveats: |
9 |
> > |
10 |
> > - The upstream configure scripts do some bad things like this: |
11 |
> > https://code.qt.io/cgit/qt/qtbase.git/tree/configure.pri#n363 |
12 |
> > That makes the build fail for systems using lib64 (e.g. amd64). I'm |
13 |
> > able to work around this by defining PKG_CONFIG_LIBDIR for dev-qt/*. |
14 |
> |
15 |
> Indeed, that sucks. We should probably patch that out. I don't know |
16 |
> what it means where it says "or use -pkg-config to override this test", |
17 |
> do you? |
18 |
|
19 |
I'm not sure, since -pkg-config is already being used by the eclass. |
20 |
Maybe it was supposed to reference the -force-pkg-config option, which |
21 |
I haven't tried. |
22 |
|
23 |
> I suspect you could define PKG_CONFIG_LIBDIR=/ or anywhere that |
24 |
> simply exists and it will still work because our wrapper redefines that |
25 |
> variable anyway. |
26 |
> |
27 |
> > - This isn't for real cross-compiling. There are places where it |
28 |
> > tries to execute cross-compiled programs that I haven't investigated |
29 |
> > yet, so this is only for building a sysroot for an architecture |
30 |
> > compatible with the build system for now. |
31 |
> |
32 |
> Understood. I did try to do cross-compiling with Qt4 once upon a time |
33 |
> and I did make a little headway but it wasn't fun. |
34 |
> |
35 |
> > - The qt packages depend on each other being installed in / as well as |
36 |
> > the sysroot, so their ebuilds will need BDEPENDs added. |
37 |
> |
38 |
> I imagine you'd at least need qtcore for qmake and moc. Probably not |
39 |
> the rest though? |
40 |
|
41 |
I needed qtcore, qtgui, and qtwidgets in /, but it's possible there |
42 |
are just bad configure scripts that I didn't dig into yet. As for VLC |
43 |
deps: |
44 |
- qtcore works as is |
45 |
- qtgui requires qtcore for bootstrap-private in / |
46 |
- qtwidgets requires qtgui in / for some opengl check |
47 |
- qtsvg and qtx11extras need qmake to build, but their packages will |
48 |
be empty unless qtwidgets is installed in / |
49 |
|
50 |
> > - I've only gotten to testing a few packages that are dependencies of |
51 |
> > other applications (like VLC), so I may be missing breakages. |
52 |
> > |
53 |
> > The patch basically just sets -sysroot when $SYSROOT is defined. It |
54 |
> > also needs to set -extprefix to the normal prefix, since otherwise it |
55 |
> > would default to installing into /sysroot/prefix. Is anyone involved in |
56 |
> > qt maintenance more experienced with this and able to comment? |
57 |
> |
58 |
> I'm not the Qt guy but I am the cross guy. I'm not in a position to |
59 |
> test this right now but it looks good and I love the simplicity of it. |
60 |
> It's a hell of a lot simpler than Qt4 was. To be honest, we should be |
61 |
> setting QMAKE_PKG_CONFIG regardless. |