diff options
author | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-01-25 20:19:38 +0000 |
---|---|---|
committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2020-01-25 20:19:38 +0000 |
commit | 93eea426e87f4ad07ba7751dea5dbff00744b015 (patch) | |
tree | a930492ad4894bbd691e092a984bbf3558e1feb8 /Mk/Uses/qt-dist.mk | |
parent | multimedia/ustreamer: Unbreak (diff) |
misc/qtchooser: do not create unnecessary wrappers
misc/qtchooser provides a wrapper binary bin/qtchooser, that when called with
name foo, will lauch the corresponding binary from lib/qt${current_qt_version}/bin/foo.
Previously qtchooser would install a list of 30-ish symlinks to itself automatically.
Now we switch this around.
qt-dist ports that define QT_BINARIES will now have a @postexec and @postunexec
entry added to their plist to run the shell-script update-qtchooser-wrapper
(installed by qtchooser).
update-qtchooser-wrapper removes all symlinks to bin/qtcreator that have no
corresponding binary in lib/qt*/bin, and readds links that are missing.
Exp-run by: antoine
PR: 242905
PR: 243443
Reported by: grarpamp@gmail.com
Reviewed by: adridg
Differential Revision: https://reviews.freebsd.org/D22991
Notes
Notes:
svn path=/head/; revision=524129
Diffstat (limited to 'Mk/Uses/qt-dist.mk')
-rw-r--r-- | Mk/Uses/qt-dist.mk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Mk/Uses/qt-dist.mk b/Mk/Uses/qt-dist.mk index f0eba8a853af..ca83c34a1f65 100644 --- a/Mk/Uses/qt-dist.mk +++ b/Mk/Uses/qt-dist.mk @@ -384,4 +384,15 @@ qt-post-install: . endif # ${QT_CONFIG:N-*} . endif # M5 +# Handle misc/qtchooser wrapper installation and deinstallation +# If a port installs Qt version-specific binaries (e.g. "designer" which existed as a Qt4 application +# and exists as a Qt5 application and will probably be a Qt6 application) which should have a +# qtchooser-based wrapper, the port should set `QT_BINARIES=yes`. +# +# When QT_BINARIES is set to yes, compatibility symlinks (designer -> qtchooser, so that +# qtchooser can run designer-qt5 or whatever is the selected Qt version) are installed by the port. +. if defined(QT_BINARIES) + ${ECHO_CMD} '@postexec if type update-qtchooser-wrapper >/dev/null 2>&1; then update-qtchooser-wrapper; fi' >> ${TMPPLIST} + ${ECHO_CMD} '@postunexec if type update-qtchooser-wrapper >/dev/null 2>&1; then update-qtchooser-wrapper; fi' >> ${TMPPLIST} +. endif .endif # defined(_QT_DIST_MK_INCLUDED) |