Page MenuHomeFreeBSD

Update Qt 5.7.1 and other thingies

Authored by tcberner on Jan 17 2017, 3:17 PM.
Referenced Files
Unknown Object (File)
Tue, Jul 16, 5:43 AM
Unknown Object (File)
Tue, Jul 16, 4:53 AM
Unknown Object (File)
Tue, Jul 16, 4:37 AM
Unknown Object (File)
Tue, Jul 16, 4:32 AM
Unknown Object (File)
Mon, Jul 15, 12:59 PM
Unknown Object (File)
Sun, Jul 14, 2:01 PM
Unknown Object (File)
Sun, Jul 14, 5:53 AM
Unknown Object (File)
Sun, Jul 14, 3:49 AM



This is an interesting one... [and I don't think its reasonable to split it up, as it would require multiple bumps to revisions].

  • Update Qt 5.7.1
  • Rename the Qt-ports as described in D8603
  • Move stuff around. Short version:
    • QT_LIBDIR -> ${PRREFIX}/lib/qt[45] (no change for qt5)
    • QT_BINDIR -> ${QT_LIBDIR}/bin (no change for qt5)
  • Depend on new port "misc/qtchooser" for qmake/moc/foo-binaries in PATH.
    • Note: previously only qt4 binaries were in path
    • Accoding to a comment in, this was prepared, or planned long ago (by someone else in kde@) but never done.
    • Install two profiles: qt4 and qt5, so that env QT_SELECT=qt4 qmake gives you qmake4 and env QT_SELECT=qt5 qmake the other. This works for all qt-installed binaries.
  • Reasons for the move of files:
    • Long standing kde@ bug, that inplace upgrading of ports can fail: As we split up qtbase a port of qtbase could pick up the old shared library from $PREFIX/lib during the build instead of the one in $BUILDWRKSRC, if a dependency added $PREFIX/lib to the linker directories.
    • The symmetry between qt4 and qt5 allows us to use qtchooser.
  • I decided to keep installing Qt5's cmake files to lib/cmake and not lib/qt5/cmake. This requires some patches.
  • All the new ports were created by Marie Loise Nolden <> back in spring of last year.
Test Plan
  • I'm at the moment building all ports depending on Qt[45]. This will take a while, and I'll add the ports that need fixing to the diff.
  • Probably mostly "c++11" no enabled (see multimedia/mlt-qt5, graphics/poppler-qt5 and so on). -- Hopefully as Qt-5.7.1 is already more than 6months out, most of the fixes have already trickeld into the tree by themseleves... :)

Diff Detail

rP FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
272 ↗(On Diff #24718)

Very small nitpick: there are two spaces instead of one after the '#'s, and an extra space before "QT_DIST".
Additionally, the comment is basically describing what we can see below, it'd be more helpful if it explained why instead.

279 ↗(On Diff #24718)

Another small style nitpick: "qt" should be "Qt", and it's always good to end the sentences with a period.

320 ↗(On Diff #24718)

Style: "# Components", not "#Components".

17 ↗(On Diff #24718)

It's a good idea to add a comment explaining why this is needed.

9 ↗(On Diff #24718)

This is an unnecessary change; I think I fixed it in area51 a while ago.

60 ↗(On Diff #24718)

Is this really necessary?

24 ↗(On Diff #24718)

--no-opengl (with a double dash) looks like a typo.

39 ↗(On Diff #24718)

This change looks important enough to be put in a separate patch file with some context.

11 ↗(On Diff #24718)

I'd rather not reorder the list without a reason to.

tcberner edited edge metadata.
  • Rather than to add a RUN_DEPENDS to the ports intalling binaries (qt5 were missing :/ ) add the RUN_DEPENDS for all QT_DIST ports via This is less confusing.
tcberner added inline comments.
60 ↗(On Diff #24718)

Nope. r424411 was never merged back to area51.

r424411 | mat | 2016-10-21 14:51:40 +0200 (Fr., 21 Okt. 2016) | 7 lines

${RM} already has -f.
39 ↗(On Diff #24718)

Is there much to gain from a separate patch? We still need to run REINPLACE_CMD over it anyway to push in the value of ${PREFIX}.

1 ↗(On Diff #24718)

This should not be here. We switched to using multimedia/assimp with the update to 5.6.1. Again something that never made it back to area51 :/

4 ↗(On Diff #24718)

Or do you prefer

tcberner marked 3 inline comments as done.

Address the issues raised by @rakuco.

Don't reorder the USES line... no idea why that was like that.. isn't even alphabetical.. :-)

39 ↗(On Diff #24718)

In this specific case, I think it's quite important to be clear about what's happening, just like you've done with devel/qt5/files/extrapatch-mkspecs_features_create__cmake.prf.

As for still having to use REINPLACE_CMD, why don't you use the same approach from that patch file I mentioned and go with $$[QT_INSTALL_PREFIX]/lib instead?

4 ↗(On Diff #24718)

The github URL is fine, it's better than just an old list of tarballs :)

tcberner added inline comments.
39 ↗(On Diff #24718)

Right... use brain. ^^

tcberner marked an inline comment as done.

Move the cmake path fix into a patch in devel/qt5-core.

  • Fixup graphics/lprof-devel: modify get_QTDIR to return a sensible value (QT_ARCHDIR) if the environment variable QTDIR is empty. This should make lprof pickup ${QT_BINDIR}/assistant directly.
rakuco edited edge metadata.

Looks good to me now, thanks! I think we can go ahead with the exp-run now.

152 ↗(On Diff #24742)

Can you add a bigger description of why we do this?

705 ↗(On Diff #24742)

I think this can moved before the "Add ${LOCALBASE}/lib" block.

15 ↗(On Diff #24742)

I think these whitespace changes aren't necessary.

tcberner edited edge metadata.
tcberner marked 3 inline comments as done.

Address the issues mentioned above.

tcberner edited edge metadata.

Move the "obosolete" comment to the right position

258–263 ↗(On Diff #24745)

If these are the ones created by qtchooser in PREFIX/bin, it should be PREFIX/bin, not QT_BINDIR. (If they are the ones in PREFIX/some-qt-directory then it's ok.)

18 ↗(On Diff #24745)

Then maybe it should be done in, no ?

258–263 ↗(On Diff #24745)

These are the real binaries, i.e. /usr/local/lib/qt4/bin/lrelease .

18 ↗(On Diff #24745)

Add somthing like

.  if ${_QT_VERSION:M5*} && ${USES:N*compiler*}
USE_CXXSTD=             c++11
.  endif

around line 291 of

18 ↗(On Diff #24745)

I think it's OK to leave those changes in the ports themselves; the vast majority of the ports just get the -std=c++11 bit for free via qmake and its mkspecs. The ports being patched here are either just relying on autoconf+pkgconfig or roll their own configuration system; I think it makes sense to have USE_CXXSTD so it can get removed in the future once those few ports are adjusted upstream.

Fix devel/Makefile, as reported by antoine in pr 216797

[00:01:43] ====>> Warning: Nonexistent port listed in category Makefiles: devel/qmake4
[00:01:43] ====>> Warning: Nonexistent port listed in category Makefiles: devel/qmake5
[00:01:43] ====>> Warning: Nonexistent port listed in category Makefiles: devel/qt5-make

Remove the Qt4 special _DIR setting again. I dropped this [or rather, failed to drop this] when regenerating the patch to :/

Another dropped change [*shakes head in a sad depressed manner*]

  • set QTDIR=${QT_ARCHDIR} and not to ${PREFIX} [in a previous version of the diff I had it set to ${QT_LIBDIR} -- which evaluates to the same.

Put the RUN_DEPENDS+=qtchooser at a proper place.

  • Fix the build of graphics/gle-graphics
  • graphcis/gle-graphics: revert the change to USE_GL.. if it's 'gl' instead of 'yes' the port fails to build...
  • Add patch to fix detection of the Qt5 tools in net/wireshark-qt5: The configure script tries to use qtchooser, or alternatively the binaries directly. However, it appends the flags for qtchooser nevertheless. Remove the qtchooser flags, as even if they are needed, we already set that up via CONFIGURE_ENV.
  • fix emulators/virtualbos-ose by adding -std=c++11 to the targets using Qt5
  • fix net-im/libqtelegram-ae by explictily allowing narrowing for clang
  • fix comms/sdr-wspr and graphics/colmap by backporting upstream commit [1] found by @rakuco

With this, everything should build against Qt 5.7.1 now...


Add the same fix to net-im/telegramqml as to net-im/libqtelegram-ae.

  • Don't pass USE_CXXSTD=c++11 for multimedia/vlc-qt4

Add preliminary UPDATING and CHANGES.

libqtelegram-ae and telegramqml have been commited already.

  • Remove the parts for vlc, as they are handled in pr 217051.
mat edited edge metadata.

This looks good, as there been a exp-run to check for possible breakage ?

91–97 ↗(On Diff #25072)

These seem to be overwrapped, as if your tabs were 8 spaces wide and not 4.

This revision is now accepted and ready to land.Feb 13 2017, 4:47 PM
tcberner edited edge metadata.

Rewrap the QT_DIST list on line 91.

This revision now requires review to proceed.Feb 13 2017, 5:01 PM
tcberner edited edge metadata.
  • Modify qtchoosers profiles, by rakuco@
  • Make qt5 the default profile
  • Remove unneeded files/ directory in qtchooser
  • Use reworded CHANGES and UPDATING by rakuco
  • Readd PORTREVISION bumps to Qt4 ports [as we switched to adding qtchooser as run depends to all of them]
  • Don't install qt4-assistant-adp and qt4-mobility into Qt4 directories.
This revision was automatically updated to reflect the committed changes.