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