Elegant(ish) way to deal with multiple qt versions
Hi. There is a lot of whining on #crux that Qt5 port is broken (someone suggested to nuke Qt4 because 'that's the way Arch does it'.Heh.) Interestingly enough, upstream has a solution for just this situation (more than one Qt version). It is "Qt Chooser - Tool to quickly switch between multiple Qt installations."[1] There is a simple port attached to FS task I opened a while back, using (now ancient) version of it.[2] Usage is simple enough: -Qt4 is the default, so any port that depends only on it builds OOTB. -If an app depends on Qt5, or it can use either, one extra line is needed in the Pkgfile (two, if it uses cmake instead of configure and friends): ---- export QT_SELECT=qt5 export CMAKE_PREFIX_PATH=/usr/share/qt5 ---- I've been using it a while, and it JustWorks[tm] So, considering that Qt4 is nowhere near being dead, and there will be the need for both versions in opt for quite some time, I humbly suggest adding qtchooser to opt. [1]https://code.qt.io/cgit/qt/qtchooser.git/ [2]https://crux.nu/bugs/index.php?do=details&task_id=1056 Pedja
participants (1)
-
Predrag Ivanovic