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.

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
Unit Tests Skipped

Event Timeline

tcberner updated this revision to Diff 22263.Nov 16 2016, 9:05 PM
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 updated this object.Nov 16 2016, 9:13 PM
tcberner edited edge metadata.
tcberner updated this object.Nov 16 2016, 9:19 PM
tcberner updated this revision to Diff 22266.Nov 16 2016, 9:25 PM
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.

Owners edited edge metadata.Nov 16 2016, 9:25 PM
tcberner updated this revision to Diff 22339.EditedNov 19 2016, 12:05 AM
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 updated this object.Nov 19 2016, 11:51 PM
tcberner edited edge metadata.
tcberner updated this object.Nov 20 2016, 2:45 PM
tcberner updated this revision to Diff 22734.Dec 6 2016, 9:49 PM
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 updated this revision to Diff 22737.Dec 7 2016, 7:44 AM
tcberner edited edge metadata.
  • Fix some lxqt ports I missed.
mat added inline comments.Dec 8 2016, 10:30 AM
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 updated this revision to Diff 22756.Dec 8 2016, 10:59 AM
tcberner edited edge metadata.
  • The svn mv of bsd.qt.mk to Uses/qt.mk got lost
  • Don't set supported versions via ?=
tcberner marked an inline comment as done.Dec 8 2016, 3:39 PM
tcberner added inline comments.Dec 8 2016, 3:41 PM
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 updated this revision to Diff 23073.Dec 18 2016, 10:56 PM
tcberner edited edge metadata.
  • Update to current state of ports tree
rakuco edited edge metadata.Dec 24 2016, 6:58 PM

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.

mat added inline comments.Jan 13 2017, 4:17 PM
Mk/Uses/qt.mk
426–430

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.

tcberner abandoned this revision.May 23 2018, 7:45 PM

I have a new one coming shortly.