Page MenuHomeFreeBSD

Replace Mk/bsd.qt.mk and Mk/Uses/qmake.mk by Mk/Uses/qt.mk
AbandonedPublic

Authored by tcberner on Nov 16 2016, 9:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 21, 2:28 AM
Unknown Object (File)
Thu, Mar 21, 1:40 AM
Unknown Object (File)
Sun, Mar 17, 10:26 AM
Unknown Object (File)
Feb 27 2024, 6:36 AM
Unknown Object (File)
Feb 18 2024, 3:06 PM
Unknown Object (File)
Feb 18 2024, 3:02 PM
Unknown Object (File)
Feb 18 2024, 2:03 PM
Unknown Object (File)
Feb 18 2024, 10:28 AM
Subscribers

Details

Reviewers
adridg
rakuco
mat
Group Reviewers
O5: Ports Framework(Owns No Changed Paths)
portmgr
kde
Summary

This replaces bsd.qt.mk with qt.mk

Files are moved this way:

  • svn mv Mk/bsd.qt.mk Mk/Uses/qt.mk
  • svn rm Mk/Uses/qmake.mk

Changes for ports:

  • USE_QT4=<list> becomes USE_QT=<list> with the additional USES=qt:4
  • USE_QT5=<list> becomes USE_QT=<list> with the additional USES=qt:5
  • USES=qmake has gone away and is replaced by USE_QT=qmake_build. The reasoning behind this is the following: qmake.mk and bsd.qt.mk where heavily intertwined. qmake.mk required $QT_VERSION which was chosen in bsd.qt.mk depending on whether USE_QT4 or USE_QT5 was set. The whole thing was somewhat circular. Now, given that most/allmost all? ports that used USES=qmake also set USE_QT[45]=qmake_build we can suck this handling into qt.mk and get rid of qmake.mk.
  • For ports that had USES=qmake and already set USE_QT[45]=qmake_build the only change is to drop qmake from the USES, add qt:[45], and replace USE_QT[45]= by USE_QT=.
  • Ports that did not yet qmake_build in their USE_QT[45] also need to add it.
  • Arguments previously for qmake.mk now have to be passed to qt.mk with the prefix qmake_.
    • USES=qmake:outsource -> USES=qt:[45],qmake_outsource
    • USES=qmake:nonrecursive -> USES=qt:[45],qmake_nonrecursive
  • There is also qmake_dummy which probably isn't needed ¯\_(ツ)_/¯ The idea of this is that ports that set USE_QT=qmake_build can opt out of having qmake at configure stage. The ports that would use qmake_dummy could also just set USE_QT=qmake instead of qmake_build. as qmake gets added as a BUILD_DEPENDS by default...

Issues

  • I'm not quite sure about the way I set DESTDIRNAME.
  • Same for the conditions to add qmake_configure to _USES_configure.

Non issues

  • Seems to mostly work so far: From the Qt-using 1021 ports I tested I got 16 errors back -- and they seem unrelated to the changes.
Test Plan
  • Finish a test build of everything that includes qt.mk.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

tcberner retitled this revision from to Replace Mk/bsd.qt.mk and Mk/Uses/qmake.mk by Mk/Uses/qt.mk.
tcberner updated this object.
tcberner edited the test plan for this revision. (Show Details)
tcberner added reviewers: kde, mat, rakuco, adridg.
tcberner added a subscriber: mat.
tcberner edited edge metadata.
tcberner edited the test plan for this revision. (Show Details)

Correct USES= lines, and revert unecessary changes to two linux-* ports, as well
as the CHANGES file.

tcberner edited edge metadata.

Modify the rest of the ports to use USES=qt:[45] -- so if someone could throw an eye on it, that would be great =)

From the Qt-using 1021 ports I tested I got 16 errors back -- most of them seem unrelated to the changes.

[Note, the diff also includes some patches that are pr-ed separately].

tcberner edited edge metadata.
tcberner updated this object.
tcberner edited the test plan for this revision. (Show Details)

update diff:

  • not renaming ports
  • chasing other changes in the tree
tcberner edited edge metadata.
  • Fix some lxqt ports I missed.
Mk/Uses/qt.mk
50–55

I don't really see a reason to have ?= in those three lines, changing the version will need extensive changes everywhere else.

71

I guess all those !empty(foo) should be replaced by ${foo} to be consistent.

156–158

So, this means that PREFIX=LOCALBASE, which feels wrong.

tcberner edited edge metadata.
  • The svn mv of bsd.qt.mk to Uses/qt.mk got lost
  • Don't set supported versions via ?=
Mk/Uses/qt.mk
156–158

@rakuco do you remember why this was added in this way? It comes from area51's r8723 I think.

Should we maybe just also simply get rid of QT_PREFIX and use PREFIX directly?

tcberner edited edge metadata.
  • Update to current state of ports tree

I've been talking to tcberner about how the only part that bothers me is the handling of qmake: the new way of specifying qmake as either just part of the build or the build system generator itself looks confusing, and to me the way one sets norecusive and outsource is less clear than before.

Perhaps we could keep Uses/qmake.mk separate from Uses/qt.mk if they can be untangled: we clean up qmake.mk a bit, move everything under a _POSTMKINCLDED section and add _USES_POST+=qmake to qt.mk.

We can also try to stop setting DESTDIRNAME in both qt.mk and qmake.mk, and maybe convert the Qt5 QT_DIST ports to HAS_CONFIGURE=yes like their Qt4 counterparts do. This paves the way for getting rid of the qmake-configure target and, consequently USES=qmake:_env.

Another thing we could do (not necessarily now) is allow more than one directory in BUILD_WRKSRC and others, so ports don't need to add more directories to post-build, post-install etc, which allows us to remove QMAKE_ENV.

Another thing we could do (not necessarily now) is allow more than one directory in BUILD_WRKSRC and others, so ports don't need to add more directories to post-build, post-install etc, which allows us to remove QMAKE_ENV.

FWIW, I'm experimenting with this in D8902.

Mk/Uses/qt.mk
427–431

I'm only quoting two lines here, but all the QT_*DIR usage in dependencies are wrong.

QT_*DIR are defined in a .for loop at lines ~367, and are based on PREFIX.

Dependencies get installed in LOCALBASE, and up until the package created during make install is installed, it is empty.

I have a new one coming shortly.